Add config menu framework

Options don't do anything as of now, but they are saved and loaded
This commit is contained in:
MassiveBox 2025-04-15 19:42:43 +02:00
parent 6bca12c934
commit fc4ce8e69e
Signed by: massivebox
GPG key ID: 9B74D3A59181947D
3 changed files with 127 additions and 2 deletions

View file

@ -105,4 +105,11 @@ export function imgSrcToIDs(imgSrc: string | null): { fileID: string; syncID: st
return assetPathToIDs(imgSrc);
}
export function validateColor(hex: string) {
hex = hex.replace('#', '');
return typeof hex === 'string'
&& hex.length === 6
&& !isNaN(Number('0x' + hex))
}