@@ -462,6 +462,51 @@ const lightColorSections: ColorSection[] = [
462462 },
463463 ],
464464 },
465+ {
466+ title: " Top Nav" ,
467+ fields: [
468+ {
469+ key: " public.color_topnav_background" ,
470+ label: " Top Nav Background" ,
471+ default: " 0 0% 98%" ,
472+ },
473+ {
474+ key: " public.color_topnav_foreground" ,
475+ label: " Top Nav Text" ,
476+ default: " 240 5.3% 26.1%" ,
477+ },
478+ {
479+ key: " public.color_topnav_accent" ,
480+ label: " Top Nav Hover" ,
481+ default: " 142 77% 73%" ,
482+ },
483+ {
484+ key: " public.color_topnav_accent_foreground" ,
485+ label: " Top Nav Hover Text" ,
486+ default: " 0 0% 98%" ,
487+ },
488+ {
489+ key: " public.color_topnav_border" ,
490+ label: " Top Nav Border" ,
491+ default: " 220 13% 91%" ,
492+ },
493+ {
494+ key: " public.color_topnav_primary" ,
495+ label: " Top Nav Primary" ,
496+ default: " 240 5.9% 10%" ,
497+ },
498+ {
499+ key: " public.color_topnav_primary_foreground" ,
500+ label: " Top Nav Primary Text" ,
501+ default: " 0 0% 98%" ,
502+ },
503+ {
504+ key: " public.color_topnav_ring" ,
505+ label: " Top Nav Focus Ring" ,
506+ default: " 217.2 91.2% 59.8%" ,
507+ },
508+ ],
509+ },
465510];
466511
467512const darkColorSections: ColorSection [] = [
@@ -625,6 +670,51 @@ const darkColorSections: ColorSection[] = [
625670 },
626671 ],
627672 },
673+ {
674+ title: " Top Nav" ,
675+ fields: [
676+ {
677+ key: " public.color_dark_topnav_background" ,
678+ label: " Top Nav Background" ,
679+ default: " 240 4% 16%" ,
680+ },
681+ {
682+ key: " public.color_dark_topnav_foreground" ,
683+ label: " Top Nav Text" ,
684+ default: " 0 0% 98%" ,
685+ },
686+ {
687+ key: " public.color_dark_topnav_accent" ,
688+ label: " Top Nav Hover" ,
689+ default: " 142 77% 73%" ,
690+ },
691+ {
692+ key: " public.color_dark_topnav_accent_foreground" ,
693+ label: " Top Nav Hover Text" ,
694+ default: " 0 0% 98%" ,
695+ },
696+ {
697+ key: " public.color_dark_topnav_border" ,
698+ label: " Top Nav Border" ,
699+ default: " 240 3% 23%" ,
700+ },
701+ {
702+ key: " public.color_dark_topnav_primary" ,
703+ label: " Top Nav Primary" ,
704+ default: " 240 6% 10%" ,
705+ },
706+ {
707+ key: " public.color_dark_topnav_primary_foreground" ,
708+ label: " Top Nav Primary Text" ,
709+ default: " 0 0% 98%" ,
710+ },
711+ {
712+ key: " public.color_dark_topnav_ring" ,
713+ label: " Top Nav Focus Ring" ,
714+ default: " 217.2 91.2% 59.8%" ,
715+ },
716+ ],
717+ },
628718];
629719
630720export default {
@@ -808,7 +898,7 @@ export default {
808898 async removeFavicon() {
809899 await this .deleteBrandingFile (" favicon" );
810900 },
811- async deleteBrandingFile(type : " logo" | " favicon" ) {
901+ async deleteBrandingFile(type : " logo" | " favicon" , silent = false ) {
812902 try {
813903 const response = await fetch (
814904 ` https://${this .apiDomain }/branding/${type } ` ,
@@ -822,13 +912,17 @@ export default {
822912 throw new Error (` Delete failed: ${response .statusText } ` );
823913 }
824914
825- toast ({ title: ` ${type === " logo" ? " Logo" : " Favicon" } removed ` });
915+ if (! silent ) {
916+ toast ({ title: ` ${type === " logo" ? " Logo" : " Favicon" } removed ` });
917+ }
826918 } catch (error : any ) {
827- toast ({
828- title: " Delete failed" ,
829- description: error .message ,
830- variant: " destructive" ,
831- });
919+ if (! silent ) {
920+ toast ({
921+ title: " Delete failed" ,
922+ description: error .message ,
923+ variant: " destructive" ,
924+ });
925+ }
832926 }
833927 },
834928 onColorChange(key : string , event : Event ) {
@@ -929,8 +1023,8 @@ export default {
9291023
9301024 // Delete uploaded files
9311025 await Promise .allSettled ([
932- this .deleteBrandingFile (" logo" ),
933- this .deleteBrandingFile (" favicon" ),
1026+ this .deleteBrandingFile (" logo" , true ),
1027+ this .deleteBrandingFile (" favicon" , true ),
9341028 ]);
9351029
9361030 this .brandName = " " ;
@@ -939,7 +1033,7 @@ export default {
9391033 this .loginFooterUrl = " " ;
9401034 this .colorValues = {};
9411035
942- await this . saveAll ( );
1036+ toast ({ title: " Branding reset to defaults " } );
9431037 } catch (error : any ) {
9441038 toast ({
9451039 title: " Reset failed" ,
0 commit comments