diff --git a/.gitignore b/.gitignore index 3e8d62d651..c727091e03 100644 --- a/.gitignore +++ b/.gitignore @@ -48,11 +48,9 @@ app/core/src/main/resources/static/assets/ app/core/src/main/resources/static/index.html app/core/src/main/resources/static/locales/ app/core/src/main/resources/static/Login/ -app/core/src/main/resources/static/classic-logo/ -app/core/src/main/resources/static/modern-logo/ +app/core/src/main/resources/static/logo/ app/core/src/main/resources/static/og_images/ app/core/src/main/resources/static/samples/ -app/core/src/main/resources/static/manifest-classic.json app/core/src/main/resources/static/robots.txt app/core/src/main/resources/static/pdfium/ app/core/src/main/resources/static/pdfjs/ diff --git a/app/common/src/main/java/stirling/software/common/model/ApplicationProperties.java b/app/common/src/main/java/stirling/software/common/model/ApplicationProperties.java index b955a2fe32..219e682cea 100644 --- a/app/common/src/main/java/stirling/software/common/model/ApplicationProperties.java +++ b/app/common/src/main/java/stirling/software/common/model/ApplicationProperties.java @@ -1132,7 +1132,6 @@ public class ApplicationProperties { public static class Ui { private String appNameNavbar; private List languages; - private String logoStyle = "classic"; // Options: "classic" (default) or "modern" private boolean defaultHideUnavailableTools = false; private boolean defaultHideUnavailableConversions = false; private HideDisabledTools hideDisabledTools = new HideDisabledTools(); @@ -1141,14 +1140,6 @@ public class ApplicationProperties { return appNameNavbar != null && !appNameNavbar.trim().isEmpty() ? appNameNavbar : null; } - public String getLogoStyle() { - // Validate and return either "modern" or "classic" - if ("modern".equalsIgnoreCase(logoStyle)) { - return "modern"; - } - return "classic"; // default - } - @Data public static class HideDisabledTools { private boolean googleDrive = false; diff --git a/app/common/src/main/java/stirling/software/common/util/RequestUriUtils.java b/app/common/src/main/java/stirling/software/common/util/RequestUriUtils.java index 74c713b6db..45f26e90eb 100644 --- a/app/common/src/main/java/stirling/software/common/util/RequestUriUtils.java +++ b/app/common/src/main/java/stirling/software/common/util/RequestUriUtils.java @@ -31,8 +31,7 @@ public class RequestUriUtils { || normalizedUri.startsWith("/locales/") || normalizedUri.startsWith("/Login/") || normalizedUri.startsWith("/samples/") - || normalizedUri.startsWith("/classic-logo/") - || normalizedUri.startsWith("/modern-logo/") + || normalizedUri.startsWith("/logo/") || normalizedUri.startsWith("/og_images/")) { return true; } @@ -42,7 +41,6 @@ public class RequestUriUtils { || "/favicon.ico".equals(normalizedUri) || "/manifest.json".equals(normalizedUri) || "/site.webmanifest".equals(normalizedUri) - || "/manifest-classic.json".equals(normalizedUri) || "/index.html".equals(normalizedUri)) { return true; } diff --git a/app/core/build.gradle b/app/core/build.gradle index 7f2fe4dc73..dffaf8c31b 100644 --- a/app/core/build.gradle +++ b/app/core/build.gradle @@ -218,13 +218,9 @@ def generatedFrontendPaths = [ 'site.webmanifest.br', 'browserconfig.xml.gz', 'browserconfig.xml.br', - 'manifest-classic.json', - 'manifest-classic.json.gz', - 'manifest-classic.json.br', 'locales', 'Login', - 'classic-logo', - 'modern-logo', + 'logo', 'og_images', 'samples', 'pdfium', diff --git a/app/core/src/main/java/stirling/software/SPDF/config/WebMvcConfig.java b/app/core/src/main/java/stirling/software/SPDF/config/WebMvcConfig.java index 367c875744..b89ecd491e 100644 --- a/app/core/src/main/java/stirling/software/SPDF/config/WebMvcConfig.java +++ b/app/core/src/main/java/stirling/software/SPDF/config/WebMvcConfig.java @@ -81,8 +81,7 @@ public class WebMvcConfig implements WebMvcConfigurer { "/mstile-*.png", "/safari-pinned-tab.svg", "/icons/**", - "/modern-logo/**", - "/classic-logo/**", + "/logo/**", "/robots.txt", "/3rdPartyLicenses.json", "/pdfjs/**", @@ -94,8 +93,7 @@ public class WebMvcConfig implements WebMvcConfigurer { "/vendor/**", "/samples/**", "/og_images/**", - "/Login/**", - "/manifest-classic.json") + "/Login/**") .addResourceLocations( staticPath, "classpath:/static/", @@ -121,10 +119,8 @@ public class WebMvcConfig implements WebMvcConfigurer { "classpath:/static/Login/", staticPath + "icons/", "classpath:/static/icons/", - staticPath + "modern-logo/", - "classpath:/static/modern-logo/", - staticPath + "classic-logo/", - "classpath:/static/classic-logo/") + staticPath + "logo/", + "classpath:/static/logo/") .setCacheControl( CacheControl.maxAge(Duration.ofDays(1)) .cachePublic() diff --git a/app/core/src/main/java/stirling/software/SPDF/controller/api/misc/ConfigController.java b/app/core/src/main/java/stirling/software/SPDF/controller/api/misc/ConfigController.java index 1b2fcaddfa..8547ea2f08 100644 --- a/app/core/src/main/java/stirling/software/SPDF/controller/api/misc/ConfigController.java +++ b/app/core/src/main/java/stirling/software/SPDF/controller/api/misc/ConfigController.java @@ -208,7 +208,6 @@ public class ConfigController { // Extract values from ApplicationProperties configData.put("appNameNavbar", applicationProperties.getUi().getAppNameNavbar()); configData.put("languages", applicationProperties.getUi().getLanguages()); - configData.put("logoStyle", applicationProperties.getUi().getLogoStyle()); configData.put("defaultLocale", applicationProperties.getSystem().getDefaultLocale()); // User preference defaults diff --git a/app/core/src/main/java/stirling/software/SPDF/controller/web/ReactRoutingController.java b/app/core/src/main/java/stirling/software/SPDF/controller/web/ReactRoutingController.java index 62ce9dac01..f5cf4f924f 100644 --- a/app/core/src/main/java/stirling/software/SPDF/controller/web/ReactRoutingController.java +++ b/app/core/src/main/java/stirling/software/SPDF/controller/web/ReactRoutingController.java @@ -203,13 +203,13 @@ public class ReactRoutingController { // (Real storage endpoints live under /api/v1/storage/files, already // excluded by the leading `api` token in the same regex.) @GetMapping( - "/{path:^(?!api|static|robots\\.txt|favicon\\.ico|manifest.*\\.json|pipeline|pdfjs|pdfjs-legacy|pdfium|vendor|fonts|images|css|js|assets|locales|modern-logo|classic-logo|Login|og_images|samples)[^\\.]*$}") + "/{path:^(?!api|static|robots\\.txt|favicon\\.ico|manifest.*\\.json|pipeline|pdfjs|pdfjs-legacy|pdfium|vendor|fonts|images|css|js|assets|locales|logo|Login|og_images|samples)[^\\.]*$}") public ResponseEntity forwardRootPaths(HttpServletRequest request) throws IOException { return serveIndexHtml(request); } @GetMapping( - "/{path:^(?!api|static|pipeline|pdfjs|pdfjs-legacy|pdfium|vendor|fonts|images|css|js|assets|locales|modern-logo|classic-logo|Login|og_images|samples)[^\\.]*}/{subpath:^(?!.*\\.).*$}") + "/{path:^(?!api|static|pipeline|pdfjs|pdfjs-legacy|pdfium|vendor|fonts|images|css|js|assets|locales|logo|Login|og_images|samples)[^\\.]*}/{subpath:^(?!.*\\.).*$}") public ResponseEntity forwardNestedPaths(HttpServletRequest request) throws IOException { return serveIndexHtml(request); diff --git a/app/core/src/main/resources/settings.yml.template b/app/core/src/main/resources/settings.yml.template index 9bce7d1c55..4a4311c6a3 100644 --- a/app/core/src/main/resources/settings.yml.template +++ b/app/core/src/main/resources/settings.yml.template @@ -301,7 +301,6 @@ autoPipeline: ui: appNameNavbar: "" # name displayed on the navigation bar - logoStyle: classic # Options: 'classic' (default - classic S icon) or 'modern' (minimalist logo) languages: [] # If empty, all languages are enabled. To restrict to specific languages, use a whitelist like ["de_DE", "pl_PL", "sv_SE"]. Empty list or not restricting any languages will enable all available languages. defaultHideUnavailableTools: false # Default user preference: hide disabled tools instead of greying them out defaultHideUnavailableConversions: false # Default user preference: hide disabled conversion options instead of greying them out diff --git a/app/core/src/main/resources/static/manifest.json b/app/core/src/main/resources/static/manifest.json index 039dc00dcf..b269214993 100644 --- a/app/core/src/main/resources/static/manifest.json +++ b/app/core/src/main/resources/static/manifest.json @@ -3,17 +3,17 @@ "name": "Stirling PDF", "icons": [ { - "src": "modern-logo/favicon.ico", + "src": "logo/favicon.ico", "sizes": "64x64 32x32 24x24 16x16", "type": "image/x-icon" }, { - "src": "modern-logo/logo192.png", + "src": "logo/logo192.png", "type": "image/png", "sizes": "192x192" }, { - "src": "modern-logo/logo512.png", + "src": "logo/logo512.png", "type": "image/png", "sizes": "512x512" } diff --git a/frontend/editor/index.html b/frontend/editor/index.html index c5599cb3c8..c7757ccc55 100644 --- a/frontend/editor/index.html +++ b/frontend/editor/index.html @@ -3,14 +3,14 @@ - + - + Stirling PDF diff --git a/frontend/editor/public/classic-logo/Firstpage.png b/frontend/editor/public/classic-logo/Firstpage.png deleted file mode 100644 index 3cee859e7f..0000000000 Binary files a/frontend/editor/public/classic-logo/Firstpage.png and /dev/null differ diff --git a/frontend/editor/public/classic-logo/StirlingPDFLogoNoTextDark.svg b/frontend/editor/public/classic-logo/StirlingPDFLogoNoTextDark.svg deleted file mode 100644 index 06319c1714..0000000000 --- a/frontend/editor/public/classic-logo/StirlingPDFLogoNoTextDark.svg +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/frontend/editor/public/classic-logo/StirlingPDFLogoNoTextLight.svg b/frontend/editor/public/classic-logo/StirlingPDFLogoNoTextLight.svg deleted file mode 100644 index dee8650333..0000000000 --- a/frontend/editor/public/classic-logo/StirlingPDFLogoNoTextLight.svg +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/frontend/editor/public/classic-logo/favicon.ico b/frontend/editor/public/classic-logo/favicon.ico deleted file mode 100644 index 0d7774d32a..0000000000 Binary files a/frontend/editor/public/classic-logo/favicon.ico and /dev/null differ diff --git a/frontend/editor/public/classic-logo/logo-tooltip.svg b/frontend/editor/public/classic-logo/logo-tooltip.svg deleted file mode 100644 index a19eaabc9c..0000000000 --- a/frontend/editor/public/classic-logo/logo-tooltip.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/frontend/editor/public/classic-logo/logo192.png b/frontend/editor/public/classic-logo/logo192.png deleted file mode 100644 index 08101ad33c..0000000000 Binary files a/frontend/editor/public/classic-logo/logo192.png and /dev/null differ diff --git a/frontend/editor/public/classic-logo/logo512.png b/frontend/editor/public/classic-logo/logo512.png deleted file mode 100644 index 1f7fe384fd..0000000000 Binary files a/frontend/editor/public/classic-logo/logo512.png and /dev/null differ diff --git a/frontend/editor/public/locales/en-US/translation.toml b/frontend/editor/public/locales/en-US/translation.toml index 5b22c30644..3c76f4c35f 100644 --- a/frontend/editor/public/locales/en-US/translation.toml +++ b/frontend/editor/public/locales/en-US/translation.toml @@ -1034,14 +1034,6 @@ description = "Languages that users can select from (leave empty to enable all l label = "Available Languages" placeholder = "Select languages" -[admin.settings.general.logoStyle] -classic = "Classic" -classicAlt = "Classic logo" -description = "Set the default logo style for all users on this server. Users can override this setting in their personal preferences." -label = "Logo Style" -modern = "Modern" -modernAlt = "Modern logo" - [admin.settings.general.showUpdate] description = "Display notifications when a new version is available" label = "Show Update Notifications" diff --git a/frontend/editor/public/modern-logo/Firstpage.png b/frontend/editor/public/logo/Firstpage.png similarity index 100% rename from frontend/editor/public/modern-logo/Firstpage.png rename to frontend/editor/public/logo/Firstpage.png diff --git a/frontend/editor/public/modern-logo/LoginDarkModeHeader.svg b/frontend/editor/public/logo/LoginDarkModeHeader.svg similarity index 100% rename from frontend/editor/public/modern-logo/LoginDarkModeHeader.svg rename to frontend/editor/public/logo/LoginDarkModeHeader.svg diff --git a/frontend/editor/public/modern-logo/LoginLightModeHeader.svg b/frontend/editor/public/logo/LoginLightModeHeader.svg similarity index 100% rename from frontend/editor/public/modern-logo/LoginLightModeHeader.svg rename to frontend/editor/public/logo/LoginLightModeHeader.svg diff --git a/frontend/editor/public/classic-logo/StirlingPDFLogoBlackText.svg b/frontend/editor/public/logo/StirlingPDFLogoBlackText.svg similarity index 100% rename from frontend/editor/public/classic-logo/StirlingPDFLogoBlackText.svg rename to frontend/editor/public/logo/StirlingPDFLogoBlackText.svg diff --git a/frontend/editor/public/classic-logo/StirlingPDFLogoGreyText.svg b/frontend/editor/public/logo/StirlingPDFLogoGreyText.svg similarity index 100% rename from frontend/editor/public/classic-logo/StirlingPDFLogoGreyText.svg rename to frontend/editor/public/logo/StirlingPDFLogoGreyText.svg diff --git a/frontend/editor/public/modern-logo/StirlingPDFLogoNoTextDark.svg b/frontend/editor/public/logo/StirlingPDFLogoNoTextDark.svg similarity index 100% rename from frontend/editor/public/modern-logo/StirlingPDFLogoNoTextDark.svg rename to frontend/editor/public/logo/StirlingPDFLogoNoTextDark.svg diff --git a/frontend/editor/public/modern-logo/StirlingPDFLogoNoTextLight.svg b/frontend/editor/public/logo/StirlingPDFLogoNoTextLight.svg similarity index 100% rename from frontend/editor/public/modern-logo/StirlingPDFLogoNoTextLight.svg rename to frontend/editor/public/logo/StirlingPDFLogoNoTextLight.svg diff --git a/frontend/editor/public/classic-logo/StirlingPDFLogoWhiteText.svg b/frontend/editor/public/logo/StirlingPDFLogoWhiteText.svg similarity index 100% rename from frontend/editor/public/classic-logo/StirlingPDFLogoWhiteText.svg rename to frontend/editor/public/logo/StirlingPDFLogoWhiteText.svg diff --git a/frontend/editor/public/modern-logo/favicon.ico b/frontend/editor/public/logo/favicon.ico similarity index 100% rename from frontend/editor/public/modern-logo/favicon.ico rename to frontend/editor/public/logo/favicon.ico diff --git a/frontend/editor/public/modern-logo/logo-tooltip.svg b/frontend/editor/public/logo/logo-tooltip.svg similarity index 100% rename from frontend/editor/public/modern-logo/logo-tooltip.svg rename to frontend/editor/public/logo/logo-tooltip.svg diff --git a/frontend/editor/public/modern-logo/logo192.png b/frontend/editor/public/logo/logo192.png similarity index 100% rename from frontend/editor/public/modern-logo/logo192.png rename to frontend/editor/public/logo/logo192.png diff --git a/frontend/editor/public/modern-logo/logo512.png b/frontend/editor/public/logo/logo512.png similarity index 100% rename from frontend/editor/public/modern-logo/logo512.png rename to frontend/editor/public/logo/logo512.png diff --git a/frontend/editor/public/manifest-classic.json b/frontend/editor/public/manifest-classic.json deleted file mode 100644 index d6e81e7ddf..0000000000 --- a/frontend/editor/public/manifest-classic.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "short_name": "Stirling PDF", - "name": "Stirling PDF", - "icons": [ - { - "src": "classic-logo/favicon.ico", - "sizes": "64x64 32x32 24x24 16x16", - "type": "image/x-icon" - }, - { - "src": "classic-logo/logo192.png", - "type": "image/png", - "sizes": "192x192" - }, - { - "src": "classic-logo/logo512.png", - "type": "image/png", - "sizes": "512x512" - } - ], - "start_url": ".", - "display": "standalone", - "theme_color": "#000000", - "background_color": "#ffffff" -} diff --git a/frontend/editor/public/manifest.json b/frontend/editor/public/manifest.json index 039dc00dcf..b269214993 100644 --- a/frontend/editor/public/manifest.json +++ b/frontend/editor/public/manifest.json @@ -3,17 +3,17 @@ "name": "Stirling PDF", "icons": [ { - "src": "modern-logo/favicon.ico", + "src": "logo/favicon.ico", "sizes": "64x64 32x32 24x24 16x16", "type": "image/x-icon" }, { - "src": "modern-logo/logo192.png", + "src": "logo/logo192.png", "type": "image/png", "sizes": "192x192" }, { - "src": "modern-logo/logo512.png", + "src": "logo/logo512.png", "type": "image/png", "sizes": "512x512" } diff --git a/frontend/editor/public/modern-logo/StirlingPDFLogoBlackText.svg b/frontend/editor/public/modern-logo/StirlingPDFLogoBlackText.svg deleted file mode 100644 index a4a1a1f87e..0000000000 --- a/frontend/editor/public/modern-logo/StirlingPDFLogoBlackText.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/frontend/editor/public/modern-logo/StirlingPDFLogoGreyText.svg b/frontend/editor/public/modern-logo/StirlingPDFLogoGreyText.svg deleted file mode 100644 index deac1ee165..0000000000 --- a/frontend/editor/public/modern-logo/StirlingPDFLogoGreyText.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/frontend/editor/public/modern-logo/StirlingPDFLogoWhiteText.svg b/frontend/editor/public/modern-logo/StirlingPDFLogoWhiteText.svg deleted file mode 100644 index ade6937870..0000000000 --- a/frontend/editor/public/modern-logo/StirlingPDFLogoWhiteText.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/frontend/editor/scripts/sample-pdf/template.html b/frontend/editor/scripts/sample-pdf/template.html index 20733766fa..cf2aa451af 100644 --- a/frontend/editor/scripts/sample-pdf/template.html +++ b/frontend/editor/scripts/sample-pdf/template.html @@ -11,27 +11,27 @@
@@ -39,7 +39,7 @@
diff --git a/frontend/editor/src/core/components/onboarding/OnboardingModalSlide.tsx b/frontend/editor/src/core/components/onboarding/OnboardingModalSlide.tsx index b1bc731d52..0edf876836 100644 --- a/frontend/editor/src/core/components/onboarding/OnboardingModalSlide.tsx +++ b/frontend/editor/src/core/components/onboarding/OnboardingModalSlide.tsx @@ -51,7 +51,7 @@ export default function OnboardingModalSlide({
Stirling icon diff --git a/frontend/editor/src/core/components/onboarding/slides/MFASetupSlide.tsx b/frontend/editor/src/core/components/onboarding/slides/MFASetupSlide.tsx index de76eadd6b..0905f69f89 100644 --- a/frontend/editor/src/core/components/onboarding/slides/MFASetupSlide.tsx +++ b/frontend/editor/src/core/components/onboarding/slides/MFASetupSlide.tsx @@ -44,7 +44,7 @@ function MFASetupContent({ onMfaSetupComplete }: MFASetupSlideProps) { const setupCompleteRef = useRef(false); const { signOut } = useAuth(); const accountLogout = useAccountLogout(); - const qrLogoSrc = `${BASE_PATH}/modern-logo/StirlingPDFLogoNoTextDark.svg`; + const qrLogoSrc = `${BASE_PATH}/logo/StirlingPDFLogoNoTextDark.svg`; const normalizeMfaCode = useCallback( (value: string) => value.replace(/\D/g, "").slice(0, 6), diff --git a/frontend/editor/src/core/constants/logo.ts b/frontend/editor/src/core/constants/logo.ts deleted file mode 100644 index d73f14b4a7..0000000000 --- a/frontend/editor/src/core/constants/logo.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { LogoVariant } from "@app/services/preferencesService"; - -export const LOGO_FOLDER_BY_VARIANT: Record = { - modern: "modern-logo", - classic: "classic-logo", -}; - -export const ensureLogoVariant = (value?: string | null): LogoVariant => { - return value === "classic" ? "classic" : "modern"; -}; - -export const getLogoFolder = (variant?: LogoVariant | null): string => { - return LOGO_FOLDER_BY_VARIANT[ensureLogoVariant(variant)]; -}; diff --git a/frontend/editor/src/core/hooks/useLogoAssets.test.ts b/frontend/editor/src/core/hooks/useLogoAssets.test.ts index 3d314ba60b..34ba6e5598 100644 --- a/frontend/editor/src/core/hooks/useLogoAssets.test.ts +++ b/frontend/editor/src/core/hooks/useLogoAssets.test.ts @@ -1,11 +1,9 @@ import { describe, expect, test } from "vitest"; import * as fs from "fs"; import * as path from "path"; -import { LOGO_FOLDER_BY_VARIANT } from "@app/constants/logo"; -import type { LogoVariant } from "@app/services/preferencesService"; /** - * Tests that all required logo assets exist for each logo variant. + * Tests that all required logo assets exist in the `logo` folder. * This ensures that when useLogoAssets returns paths, those files actually exist. */ describe("useLogoAssets - Logo Asset Files", () => { @@ -23,34 +21,21 @@ describe("useLogoAssets - Logo Asset Files", () => { "StirlingPDFLogoGreyText.svg", ]; - const logoVariants: LogoVariant[] = ["modern", "classic"]; + const folderPath = path.join(publicDir, "logo"); - describe.each(logoVariants)("%s logo variant", (variant) => { - const folder = LOGO_FOLDER_BY_VARIANT[variant]; - const folderPath = path.join(publicDir, folder); - - test(`folder "${folder}" should exist`, () => { - expect(fs.existsSync(folderPath)).toBe(true); - }); - - test.each(requiredAssets)("should have %s", (assetName) => { - const assetPath = path.join(folderPath, assetName); - expect( - fs.existsSync(assetPath), - `Missing asset: ${folder}/${assetName}`, - ).toBe(true); - }); + test('folder "logo" should exist', () => { + expect(fs.existsSync(folderPath)).toBe(true); }); - describe("manifest files", () => { - test("manifest.json should exist for modern variant", () => { - const manifestPath = path.join(publicDir, "manifest.json"); - expect(fs.existsSync(manifestPath)).toBe(true); - }); + test.each(requiredAssets)("should have %s", (assetName) => { + const assetPath = path.join(folderPath, assetName); + expect(fs.existsSync(assetPath), `Missing asset: logo/${assetName}`).toBe( + true, + ); + }); - test("manifest-classic.json should exist for classic variant", () => { - const manifestPath = path.join(publicDir, "manifest-classic.json"); - expect(fs.existsSync(manifestPath)).toBe(true); - }); + test("manifest.json should exist", () => { + const manifestPath = path.join(publicDir, "manifest.json"); + expect(fs.existsSync(manifestPath)).toBe(true); }); }); diff --git a/frontend/editor/src/core/hooks/useLogoAssets.ts b/frontend/editor/src/core/hooks/useLogoAssets.ts index 8fd0ad4ba5..2486a2f589 100644 --- a/frontend/editor/src/core/hooks/useLogoAssets.ts +++ b/frontend/editor/src/core/hooks/useLogoAssets.ts @@ -1,18 +1,13 @@ import { useMemo } from "react"; import { BASE_PATH } from "@app/constants/app"; -import { getLogoFolder } from "@app/constants/logo"; -import { useLogoVariant } from "@app/hooks/useLogoVariant"; + +const LOGO_FOLDER = "logo"; export function useLogoAssets() { - const logoVariant = useLogoVariant(); - return useMemo(() => { - const folder = getLogoFolder(logoVariant); - const folderPath = `${BASE_PATH}/${folder}`; + const folderPath = `${BASE_PATH}/${LOGO_FOLDER}`; return { - logoVariant, - folder, folderPath, getAssetPath: (name: string) => `${folderPath}/${name}`, wordmark: { @@ -25,10 +20,7 @@ export function useLogoAssets() { favicon: `${folderPath}/favicon.ico`, logo192: `${folderPath}/logo192.png`, logo512: `${folderPath}/logo512.png`, - manifestHref: - logoVariant === "classic" - ? `${BASE_PATH}/manifest-classic.json` - : `${BASE_PATH}/manifest.json`, + manifestHref: `${BASE_PATH}/manifest.json`, }; - }, [logoVariant]); + }, []); } diff --git a/frontend/editor/src/core/hooks/useLogoPath.ts b/frontend/editor/src/core/hooks/useLogoPath.ts index d1ccd9beec..4f8ea9b748 100644 --- a/frontend/editor/src/core/hooks/useLogoPath.ts +++ b/frontend/editor/src/core/hooks/useLogoPath.ts @@ -1,7 +1,7 @@ import { useMemo } from "react"; import { useLogoAssets } from "@app/hooks/useLogoAssets"; -/** Theme-specific no-text logo SVG URLs under the active variant folder (`modern-logo` / `classic-logo`). */ +/** Theme-specific no-text logo SVG URLs under the `logo` folder. */ export function useLogoPath(): { dark: string; light: string } { const { folderPath } = useLogoAssets(); diff --git a/frontend/editor/src/core/hooks/useLogoVariant.ts b/frontend/editor/src/core/hooks/useLogoVariant.ts deleted file mode 100644 index 49c251a71f..0000000000 --- a/frontend/editor/src/core/hooks/useLogoVariant.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { useMemo } from "react"; -import { usePreferences } from "@app/contexts/PreferencesContext"; -import { useAppConfig } from "@app/contexts/AppConfigContext"; -import type { LogoVariant } from "@app/services/preferencesService"; -import { ensureLogoVariant } from "@app/constants/logo"; - -export function useLogoVariant(): LogoVariant { - const { preferences } = usePreferences(); - const { config } = useAppConfig(); - - return useMemo(() => { - // Check local storage first, then fall back to server config - const preferenceVariant = preferences.logoVariant; - const configVariant = config?.logoStyle; - return ensureLogoVariant(preferenceVariant ?? configVariant); - }, [config?.logoStyle, preferences.logoVariant]); -} diff --git a/frontend/editor/src/core/services/preferencesService.ts b/frontend/editor/src/core/services/preferencesService.ts index 94f7ea10e2..beb06b3356 100644 --- a/frontend/editor/src/core/services/preferencesService.ts +++ b/frontend/editor/src/core/services/preferencesService.ts @@ -4,8 +4,6 @@ import { } from "@app/constants/toolPanel"; import { type ThemeMode, getSystemTheme } from "@app/constants/theme"; -export type LogoVariant = "modern" | "classic"; - export type PdfRenderMode = "normal" | "dark" | "sepia"; export type StartupView = "tools" | "read" | "automate"; @@ -36,7 +34,6 @@ export interface UserPreferences { hasSeenCookieBanner: boolean; hideUnavailableTools: boolean; hideUnavailableConversions: boolean; - logoVariant: LogoVariant | null; pdfRenderMode: PdfRenderMode; } @@ -55,7 +52,6 @@ export const DEFAULT_PREFERENCES: UserPreferences = { hasSeenCookieBanner: false, hideUnavailableTools: false, hideUnavailableConversions: false, - logoVariant: null, pdfRenderMode: "normal", }; diff --git a/frontend/editor/src/core/types/appConfig.ts b/frontend/editor/src/core/types/appConfig.ts index 55d73d7e0f..d796fd8f55 100644 --- a/frontend/editor/src/core/types/appConfig.ts +++ b/frontend/editor/src/core/types/appConfig.ts @@ -6,7 +6,6 @@ export interface AppConfig { appNameNavbar?: string; languages?: string[]; defaultLocale?: string; - logoStyle?: "modern" | "classic"; enableLogin?: boolean; showSettingsWhenNoLogin?: boolean; enableEmailInvites?: boolean; diff --git a/frontend/editor/src/desktop/components/SetupWizard/DesktopAuthLayout.tsx b/frontend/editor/src/desktop/components/SetupWizard/DesktopAuthLayout.tsx index 44d145ed0d..2efd60d99a 100644 --- a/frontend/editor/src/desktop/components/SetupWizard/DesktopAuthLayout.tsx +++ b/frontend/editor/src/desktop/components/SetupWizard/DesktopAuthLayout.tsx @@ -3,7 +3,6 @@ import { useTranslation } from "react-i18next"; import LoginRightCarousel from "@app/components/shared/LoginRightCarousel"; import buildLoginSlides from "@app/components/shared/loginSlides"; import styles from "@app/routes/authShared/AuthLayout.module.css"; -import { useLogoVariant } from "@app/hooks/useLogoVariant"; interface DesktopAuthLayoutProps { children: React.ReactNode; @@ -15,11 +14,7 @@ export const DesktopAuthLayout: React.FC = ({ const { t } = useTranslation(); const cardRef = useRef(null); const [hideRightPanel, setHideRightPanel] = useState(false); - const logoVariant = useLogoVariant(); - const imageSlides = useMemo( - () => buildLoginSlides(logoVariant, t), - [logoVariant, t], - ); + const imageSlides = useMemo(() => buildLoginSlides(t), [t]); // Force light mode on auth pages useEffect(() => { diff --git a/frontend/editor/src/proprietary/components/shared/config/configSections/AccountSection.tsx b/frontend/editor/src/proprietary/components/shared/config/configSections/AccountSection.tsx index 40d16cfc56..6129ee538f 100644 --- a/frontend/editor/src/proprietary/components/shared/config/configSections/AccountSection.tsx +++ b/frontend/editor/src/proprietary/components/shared/config/configSections/AccountSection.tsx @@ -55,7 +55,7 @@ const AccountSection: React.FC = () => { (value: string) => value.replace(/\D/g, "").slice(0, 6), [], ); - const qrLogoSrc = `${BASE_PATH}/modern-logo/StirlingPDFLogoNoTextDark.svg`; + const qrLogoSrc = `${BASE_PATH}/logo/StirlingPDFLogoNoTextDark.svg`; const authTypeFromMetadata = useMemo(() => { const metadata = user?.app_metadata as diff --git a/frontend/editor/src/proprietary/components/shared/config/configSections/AdminGeneralSection.tsx b/frontend/editor/src/proprietary/components/shared/config/configSections/AdminGeneralSection.tsx index ebfb7ed6ab..7e1a907e2d 100644 --- a/frontend/editor/src/proprietary/components/shared/config/configSections/AdminGeneralSection.tsx +++ b/frontend/editor/src/proprietary/components/shared/config/configSections/AdminGeneralSection.tsx @@ -12,7 +12,6 @@ import { Group, MultiSelect, Badge, - SegmentedControl, Select, } from "@mantine/core"; import { alert } from "@app/components/toast"; @@ -25,7 +24,6 @@ import { SettingsStickyFooter } from "@app/components/shared/config/SettingsStic import apiClient from "@app/services/apiClient"; import { useLoginRequired } from "@app/hooks/useLoginRequired"; import LoginRequiredBanner from "@app/components/shared/config/LoginRequiredBanner"; -import { usePreferences } from "@app/contexts/PreferencesContext"; import { useUnsavedChanges } from "@app/contexts/UnsavedChangesContext"; import { supportedLanguages, @@ -38,7 +36,6 @@ interface GeneralSettingsData { ui: { appNameNavbar?: string; languages?: string[]; - logoStyle?: "modern" | "classic"; hideDisabledTools?: { googleDrive?: boolean; mobileQRScanner?: boolean; @@ -83,7 +80,6 @@ export default function AdminGeneralSection() { closeRestartModal, restartServer, } = useRestartServer(); - const { preferences, updatePreference } = usePreferences(); const { markClean } = useUnsavedChanges(); const languageOptions = useMemo( () => @@ -200,7 +196,6 @@ export default function AdminGeneralSection() { // UI settings "ui.appNameNavbar": settings.ui?.appNameNavbar, "ui.languages": settings.ui?.languages, - "ui.logoStyle": settings.ui?.logoStyle, "ui.hideDisabledTools.googleDrive": settings.ui?.hideDisabledTools?.googleDrive, "ui.hideDisabledTools.mobileQRScanner": @@ -338,14 +333,6 @@ export default function AdminGeneralSection() { } }, [loginEnabled, fetchSettings]); - // Sync local preference with server setting on initial load - useEffect(() => { - if (loading || !loginEnabled || !settings.ui?.logoStyle) return; - - // This ensures localStorage always reflects the server's authoritative value - updatePreference("logoVariant", settings.ui.logoStyle); - }, [loading, loginEnabled, settings.ui?.logoStyle, updatePreference]); - // Handle hash navigation for deep linking to specific fields useEffect(() => { if (location.hash && !loading) { @@ -367,31 +354,6 @@ export default function AdminGeneralSection() { // Override loading state when login is disabled const actualLoading = loginEnabled ? loading : false; - // Show the server setting when loaded (for admin config), otherwise show user's preference - // Note: User's preference in localStorage is separate and takes precedence in the app via useLogoVariant hook - const logoStyleValue = loginEnabled - ? (settings.ui?.logoStyle ?? preferences.logoVariant ?? "classic") - : (preferences.logoVariant ?? "classic"); - - const handleLogoStyleChange = (value: string) => { - const nextValue = value === "modern" ? "modern" : "classic"; - - // Only update local settings state - don't update the actual preference until save - // When login is disabled, update preference immediately since there's no server to save to - if (!loginEnabled) { - updatePreference("logoVariant", nextValue); - return; - } - - setSettings({ - ...settings, - ui: { - ...settings.ui, - logoStyle: nextValue, - }, - }); - }; - const handleSave = async () => { // Block save if login is disabled if (!validateLoginEnabled()) { @@ -404,11 +366,6 @@ export default function AdminGeneralSection() { await saveSettings(); - // Update local preference after successful save so the app reflects the saved logo style - if (settings.ui?.logoStyle) { - updatePreference("logoVariant", settings.ui.logoStyle); - } - markClean(); showRestartModal(); } catch (_error) { @@ -481,85 +438,6 @@ export default function AdminGeneralSection() { />
-
- - - - {t("admin.settings.general.logoStyle.label", "Logo Style")} - - - - - - {t( - "admin.settings.general.logoStyle.description", - "Choose between the modern minimalist logo or the classic S icon", - )} - - - {t( - - {t( - "admin.settings.general.logoStyle.classic", - "Classic", - )} - -
- ), - }, - { - value: "modern", - label: ( -
- {t( - - {t( - "admin.settings.general.logoStyle.modern", - "Modern", - )} - -
- ), - }, - ]} - /> -
-
{ - const folder = getLogoFolder(variant); - const heroImage = `${BASE_PATH}/${folder}/Firstpage.png`; +export const buildLoginSlides = (t: TFunction): LoginCarouselSlide[] => { + const heroImage = `${BASE_PATH}/logo/Firstpage.png`; return [ { diff --git a/frontend/editor/src/proprietary/routes/Login.tsx b/frontend/editor/src/proprietary/routes/Login.tsx index c334bef8dc..ed5bc25fbc 100644 --- a/frontend/editor/src/proprietary/routes/Login.tsx +++ b/frontend/editor/src/proprietary/routes/Login.tsx @@ -470,12 +470,12 @@ export default function Login() {
Stirling PDF Stirling PDF @@ -565,12 +565,12 @@ export default function Login() {
Stirling PDF Stirling PDF diff --git a/frontend/editor/src/proprietary/routes/Signup.tsx b/frontend/editor/src/proprietary/routes/Signup.tsx index 9773106c45..abf898f7ef 100644 --- a/frontend/editor/src/proprietary/routes/Signup.tsx +++ b/frontend/editor/src/proprietary/routes/Signup.tsx @@ -93,12 +93,12 @@ export default function Signup() {
Stirling PDF Stirling PDF diff --git a/frontend/editor/src/proprietary/routes/authShared/AuthLayout.tsx b/frontend/editor/src/proprietary/routes/authShared/AuthLayout.tsx index 2b52d66941..06564eebbb 100644 --- a/frontend/editor/src/proprietary/routes/authShared/AuthLayout.tsx +++ b/frontend/editor/src/proprietary/routes/authShared/AuthLayout.tsx @@ -3,7 +3,6 @@ import { useTranslation } from "react-i18next"; import LoginRightCarousel from "@app/components/shared/LoginRightCarousel"; import buildLoginSlides from "@app/components/shared/loginSlides"; import styles from "@app/routes/authShared/AuthLayout.module.css"; -import { useLogoVariant } from "@app/hooks/useLogoVariant"; import Footer from "@app/components/shared/Footer"; interface AuthLayoutProps { @@ -14,11 +13,7 @@ export default function AuthLayout({ children }: AuthLayoutProps) { const { t } = useTranslation(); const cardRef = useRef(null); const [hideRightPanel, setHideRightPanel] = useState(false); - const logoVariant = useLogoVariant(); - const imageSlides = useMemo( - () => buildLoginSlides(logoVariant, t), - [logoVariant, t], - ); + const imageSlides = useMemo(() => buildLoginSlides(t), [t]); // Force light mode on auth pages useEffect(() => { diff --git a/frontend/editor/src/saas/components/onboarding/SaasOnboardingModal.tsx b/frontend/editor/src/saas/components/onboarding/SaasOnboardingModal.tsx index 491aad7dcc..072ee1da21 100644 --- a/frontend/editor/src/saas/components/onboarding/SaasOnboardingModal.tsx +++ b/frontend/editor/src/saas/components/onboarding/SaasOnboardingModal.tsx @@ -39,7 +39,7 @@ export default function SaasOnboardingModal(props: SaasOnboardingModalProps) {
Stirling icon @@ -51,7 +51,7 @@ export default function SaasOnboardingModal(props: SaasOnboardingModalProps) { if (slideDefinition.hero.type === "logo") { return ( Stirling logo diff --git a/frontend/editor/src/saas/components/onboarding/slides/FreeEditorSlide.tsx b/frontend/editor/src/saas/components/onboarding/slides/FreeEditorSlide.tsx index 6391d0a0f7..aededcb7e1 100644 --- a/frontend/editor/src/saas/components/onboarding/slides/FreeEditorSlide.tsx +++ b/frontend/editor/src/saas/components/onboarding/slides/FreeEditorSlide.tsx @@ -4,7 +4,7 @@ import { SlideConfig } from "@app/types/types"; import { createLightSlideBackground } from "@app/components/onboarding/slides/unifiedBackgroundConfig"; import styles from "@app/components/onboarding/slides/SaasOnboardingSlides.module.css"; -// Stirling logo red (sampled from modern-logo/logo512.png) +// Stirling logo red (sampled from logo/logo512.png) const FREE_EDITOR_BACKGROUND = createLightSlideBackground( [142, 49, 49], "#F8E0E0", diff --git a/frontend/editor/src/saas/routes/AuthCallback.tsx b/frontend/editor/src/saas/routes/AuthCallback.tsx index 1701163f9d..3869154cc5 100644 --- a/frontend/editor/src/saas/routes/AuthCallback.tsx +++ b/frontend/editor/src/saas/routes/AuthCallback.tsx @@ -181,7 +181,7 @@ export default function AuthCallback() { >
Stirling PDF diff --git a/frontend/editor/src/saas/routes/Login.tsx b/frontend/editor/src/saas/routes/Login.tsx index e57a46468f..071945ae7b 100644 --- a/frontend/editor/src/saas/routes/Login.tsx +++ b/frontend/editor/src/saas/routes/Login.tsx @@ -267,12 +267,12 @@ export default function Login() { {/* Centered logo */}
Stirling PDF Stirling PDF diff --git a/frontend/editor/src/saas/routes/OAuthConsent.tsx b/frontend/editor/src/saas/routes/OAuthConsent.tsx index 0113edf62f..7e21c40864 100644 --- a/frontend/editor/src/saas/routes/OAuthConsent.tsx +++ b/frontend/editor/src/saas/routes/OAuthConsent.tsx @@ -190,12 +190,12 @@ export default function OAuthConsent() { const logoBlock = (
Stirling PDF Stirling PDF diff --git a/frontend/editor/src/saas/routes/Signup.tsx b/frontend/editor/src/saas/routes/Signup.tsx index 724bf455a5..c2aca511f5 100644 --- a/frontend/editor/src/saas/routes/Signup.tsx +++ b/frontend/editor/src/saas/routes/Signup.tsx @@ -184,12 +184,12 @@ export default function Signup() { {/* Centered logo */}
Stirling PDF Stirling PDF diff --git a/frontend/editor/src/saas/routes/authShared/AuthLayout.tsx b/frontend/editor/src/saas/routes/authShared/AuthLayout.tsx index 0fe344db75..b3c73ba677 100644 --- a/frontend/editor/src/saas/routes/authShared/AuthLayout.tsx +++ b/frontend/editor/src/saas/routes/authShared/AuthLayout.tsx @@ -3,7 +3,6 @@ import { useTranslation } from "react-i18next"; import LoginRightCarousel from "@app/components/shared/LoginRightCarousel"; import buildLoginSlides from "@app/components/shared/loginSlides"; import styles from "@app/routes/authShared/AuthLayout.module.css"; -import { useLogoVariant } from "@app/hooks/useLogoVariant"; import { useIsOverflowing } from "@app/hooks/useIsOverflowing"; import Footer from "@app/components/shared/Footer"; @@ -20,11 +19,7 @@ export default function AuthLayout({ const cardRef = useRef(null); const leftPanelRef = useRef(null); const [hideRightPanel, setHideRightPanel] = useState(false); - const logoVariant = useLogoVariant(); - const imageSlides = useMemo( - () => buildLoginSlides(logoVariant, t), - [logoVariant, t], - ); + const imageSlides = useMemo(() => buildLoginSlides(t), [t]); const isOverflowing = useIsOverflowing(leftPanelRef); // Use either overflow detection or email form expansion to determine scrollable state diff --git a/scripts/ignore_translation.toml b/scripts/ignore_translation.toml index 34f7d261c0..ec15baa05d 100644 --- a/scripts/ignore_translation.toml +++ b/scripts/ignore_translation.toml @@ -70,7 +70,6 @@ ignore = [ 'admin.settings.connections.oauth2.label', 'admin.settings.connections.saml2.label', 'admin.settings.database.port.label', - 'admin.settings.general.logoStyle.modern', 'admin.settings.general.system', 'admin.settings.legal.impressum.label', 'admin.settings.premium.title', diff --git a/testing/allEndpointsRemovedSettings.yml b/testing/allEndpointsRemovedSettings.yml index 52e85dd128..062e8d9a52 100644 --- a/testing/allEndpointsRemovedSettings.yml +++ b/testing/allEndpointsRemovedSettings.yml @@ -266,7 +266,6 @@ autoPipeline: ui: appNameNavbar: "" # name displayed on the navigation bar - logoStyle: classic # Options: 'classic' (default - classic S icon) or 'modern' (minimalist logo) languages: [] # If empty, all languages are enabled. To restrict to specific languages, use a whitelist like ["de_DE", "pl_PL", "sv_SE"]. Empty list or not restricting any languages will enable all available languages. defaultHideUnavailableTools: false # Default user preference: hide disabled tools instead of greying them out defaultHideUnavailableConversions: false # Default user preference: hide disabled conversion options instead of greying them out