#1 PDF Application on GitHub that lets you edit PDFs on any device anywhere
TypeScript dockerhacktoberfestjavapdfpdf-converterpdf-editorpdf-manipulationpdf-mergerpdf-ocrpdf-toolspdf-web-appspdfmergerself-hosted
feat(frontend): enhance icon detection and update config navigation icon (#5524)
Ludya3b2a9b3e389
diff --git a/frontend/scripts/generate-icons.js b/frontend/scripts/generate-icons.jsindex 8dc91e6cc2..96566341c6 100644--- a/frontend/scripts/generate-icons.js+++ b/frontend/scripts/generate-icons.js@@ -52,6 +52,18 @@ function scanForUsedIcons() {});}+ // Match LocalIcon usage: <LocalIcon icon='icon-name' ...>+ const localIconSingleQuoteMatches = content.match(/<LocalIcon\s+[^>]*icon='([^']+)'/g);+ if (localIconSingleQuoteMatches) {+ localIconSingleQuoteMatches.forEach(match => {+ const iconMatch = match.match(/icon='([^']+)'/);+ if (iconMatch) {+ usedIcons.add(iconMatch[1]);+ debug(` Found: ${iconMatch[1]} in ${path.relative(srcDir, filePath)}`);+ }+ });+ }+// Match old material-symbols-rounded spans: <span className="material-symbols-rounded">icon-name</span>const spanMatches = content.match(/<span[^>]*className="[^"]*material-symbols-rounded[^"]*"[^>]*>([^<]+)<\/span>/g);if (spanMatches) {@@ -76,6 +88,18 @@ function scanForUsedIcons() {}});}++ // Match icon config usage: icon: 'icon-name' or icon: "icon-name"+ const iconPropertyMatches = content.match(/icon:\s*(['"])([a-z0-9-]+)\1/g);+ if (iconPropertyMatches) {+ iconPropertyMatches.forEach(match => {+ const iconMatch = match.match(/icon:\s*(['"])([a-z0-9-]+)\1/);+ if (iconMatch) {+ usedIcons.add(iconMatch[2]);+ debug(` Found (config): ${iconMatch[2]} in ${path.relative(srcDir, filePath)}`);+ }+ });+ }}});}diff --git a/frontend/src/desktop/components/shared/config/configNavSections.tsx b/frontend/src/desktop/components/shared/config/configNavSections.tsxindex 9f8a631144..d5daddfa7c 100644--- a/frontend/src/desktop/components/shared/config/configNavSections.tsx+++ b/frontend/src/desktop/components/shared/config/configNavSections.tsx@@ -23,7 +23,7 @@ export const useConfigNavSections = ({key: 'connectionMode',label: t('settings.connection.title', 'Connection Mode'),- icon: 'cloud-rounded',+ icon: 'desktop-cloud-rounded',component: <ConnectionSettings />,},],@@ -53,7 +53,7 @@ export const createConfigNavSections = ({key: 'connectionMode',label: 'Connection Mode',- icon: 'cloud-rounded',+ icon: 'desktop-cloud-rounded',component: <ConnectionSettings />,},],