update settings page, move admin-panel to tailwind/daisy

This commit is contained in:
Evan Jarrett
2026-02-06 11:23:12 -06:00
parent 834bb8d36c
commit ef0161fb0e
49 changed files with 1690 additions and 1585 deletions
+16 -5
View File
@@ -22,7 +22,10 @@ function discoverIcons() {
// 1. Scan templates for {{ icon "name" ... }}
const templatePattern = /\{\{\s*icon\s+"([^"]+)"/g;
const templates = globSync('pkg/appview/templates/**/*.html', { cwd: basePath });
const templates = [
...globSync('pkg/appview/templates/**/*.html', { cwd: basePath }),
...globSync('pkg/hold/admin/templates/**/*.html', { cwd: basePath }),
];
templates.forEach(file => {
const content = fs.readFileSync(path.join(basePath, file), 'utf8');
let match;
@@ -35,7 +38,9 @@ function discoverIcons() {
const svgUsePattern = /icons\.svg#([a-z0-9-]+)/g;
const allFiles = [
...globSync('pkg/appview/templates/**/*.html', { cwd: basePath }),
...globSync('pkg/hold/admin/templates/**/*.html', { cwd: basePath }),
...globSync('pkg/appview/src/js/**/*.js', { cwd: basePath }),
...globSync('pkg/hold/admin/src/js/**/*.js', { cwd: basePath }),
];
allFiles.forEach(file => {
const content = fs.readFileSync(path.join(basePath, file), 'utf8');
@@ -117,8 +122,9 @@ function getLucideIcon(iconName) {
function generateSprite() {
const symbols = [];
// Process Lucide icons
// Process Lucide icons (skip custom icons handled below)
for (const iconName of ICONS) {
if (CUSTOM_ICONS[iconName]) continue;
const icon = getLucideIcon(iconName);
if (icon) {
symbols.push(` <symbol id="${iconName}" viewBox="${icon.viewBox}">${icon.content}</symbol>`);
@@ -138,12 +144,17 @@ ${symbols.join('\n')}
}
// Main
const outputPath = path.join(__dirname, '..', 'pkg', 'appview', 'public', 'icons.svg');
const outputPaths = [
path.join(__dirname, '..', 'pkg', 'appview', 'public', 'icons.svg'),
path.join(__dirname, '..', 'pkg', 'hold', 'admin', 'public', 'icons.svg'),
];
try {
const sprite = generateSprite();
fs.writeFileSync(outputPath, sprite);
console.log(`Generated ${outputPath}`);
for (const outputPath of outputPaths) {
fs.writeFileSync(outputPath, sprite);
console.log(`Generated ${outputPath}`);
}
console.log(`Discovered icons (${ICONS.length}): ${ICONS.join(', ')}`);
console.log(`Custom icons (${Object.keys(CUSTOM_ICONS).length}): ${Object.keys(CUSTOM_ICONS).join(', ')}`);
console.log(`Total: ${ICONS.length + Object.keys(CUSTOM_ICONS).length} icons`);