Skip to content

Code and UI refactoring#1

Merged
moufmouf merged 3 commits intomainfrom
refactor-code
Feb 5, 2026
Merged

Code and UI refactoring#1
moufmouf merged 3 commits intomainfrom
refactor-code

Conversation

@moufmouf
Copy link
Contributor

@moufmouf moufmouf commented Feb 5, 2026

  • Moving duplicated HTML code in Mustache partials
  • Adding a "Publish now" button right on the first page and another "Configure publishing" button
  • Moving the module to ESM
  • Fixing path in self-hosted single-domain mode

- Moving duplicated HTML code in Mustache partials
- Adding a "Publish now" button right on the first page and another "Configure publishing" button
- Moving the module to ESM
- Fixing path in self-hosted single-domain mode
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the codebase to improve maintainability and add new publishing features. The main changes include migrating to ESM modules, extracting duplicated HTML into Mustache partials, and adding a "Publish now" button on the index page.

Changes:

  • Migrated the module system from CommonJS to ESM, updating vite.config.ts and package.json accordingly
  • Refactored HTML templates to use Mustache partials (head, header, footer, error-popup) to eliminate code duplication
  • Added a "Publish now" button to the index page with conditional enabling based on publishing configuration
  • Removed the /uploader/status endpoint and moved its logic to FrontController methods
  • Fixed URL construction logic for self-hosted single-domain mode in the map display script

Reviewed changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
vite.config.ts Updated to output ESM format, removed redundant output.exports configuration
package.json Added "type": "module" and removed CommonJS exports
src/server.ts Commented out controller logging statements
src/controllers/UploaderController.ts Removed /status endpoint (functionality moved to FrontController)
src/controllers/FrontController.ts Added methods for loading partials, head scripts, secret config, and determining publishing status
public/styles/styles.css Added styles for button groups, disabled buttons, error popups, and loading overlays
public/assets/views/*.html Converted all templates to use Mustache partials, eliminating duplication
public/assets/views/partials/*.html New partial templates for head, header, footer, and error popup
public/assets/views/partials/head-scripts/*.html Extracted page-specific scripts into separate files
public/assets/js/index.js Added setupPublishingActions function for "Publish now" button
.github/workflows/typecheck.yml Added new GitHub Actions workflow for TypeScript type checking

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@moufmouf moufmouf merged commit 9e0ceec into main Feb 5, 2026
1 check passed
@moufmouf moufmouf deleted the refactor-code branch February 5, 2026 16:29
@github-actions
Copy link

github-actions bot commented Feb 5, 2026

🎉 This PR is included in version 1.1.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant