Enhances settings and backend API configuration#3
Merged
LeCyreaxYT merged 2 commits intomainfrom Dec 3, 2025
Merged
Conversation
Updates the settings page to include language and theme options, allowing users to customize the application's appearance and localization. Simplifies the backend API configuration by removing the "/api" suffix from the API_URL, ensuring consistent URL handling for uploads and other API endpoints. The commit also introduces a fallback slug generation mechanism for forms, using the first 8 characters of the form ID when the slug is cleared.
Ensures `effectiveTheme` is always assigned a value before being used in the `applyTheme` function, avoiding potential runtime errors.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enhances settings and backend API configuration.
This commit refactors the backend API URL configuration, introduces language and theme settings, and improves slug generation. It also updates frontend components to reflect these changes.
Changes
/apisuffix fromAPI_URLconfiguration, updating.env.example,config.go, andmain.go. TheAPI_URLnow represents the base backend URL. Constructs the uploads URL inmain.goby combiningApiURLandStorage.LocalURL.LanguageandThemefields to theSettingsmodel inbackend/internal/models/settings.goandfrontend/shared/types/index.ts. Also updates the default settings.backend/internal/handlers/setup.goto includeLanguageandThemein the setup status and update settings requests.backend/internal/models/form.goandbackend/internal/handlers/form.go. If a slug is cleared during form update, it defaults to the first 8 characters of the form ID. Auto-generates a slug from the Form ID on form creation if no slug exists.frontend/app/pages/settings.vue) to include language and theme selection.ThemeTogglecomponent and integrating theme management into thesetupstore (frontend/app/store/setup.ts) and thesettingspage, SSR settings head plugin to prevent flash of unstyled content.frontend/app/composables/useApi.tsto use the base API URL.Impact
/apiprefix.apiUrlconfiguration now uses the base backend URL.