feat: add CHRNX shell and theme preference
This commit is contained in:
18 files changed
+633
-16
No files matched your search
@@ -94,11 +94,10 @@
|
||||
groups.forEach( ( group ) => {
|
||||
const status = group.querySelector( '[data-chrnx-theme-status]' );
|
||||
if ( status ) {
|
||||
const label =
|
||||
group.dataset[ `status${ resolved[ 0 ].toUpperCase() }${ resolved.slice( 1 ) }` ] ||
|
||||
`${ resolved === 'dark' ? 'Dark' : 'Light' } theme active`;
|
||||
const systemSuffix = group.dataset.statusSystem || 'following system';
|
||||
status.textContent = explicitPreference ? label : `${ label }, ${ systemSuffix }`;
|
||||
const resolvedName = resolved[ 0 ].toUpperCase() + resolved.slice( 1 );
|
||||
const explicitStatus = group.dataset[ `status${ resolvedName }` ];
|
||||
const systemStatus = group.dataset[ `statusSystem${ resolvedName }` ];
|
||||
status.textContent = explicitPreference ? explicitStatus : systemStatus;
|
||||
}
|
||||
} );
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user