Remove green & mint theme

This commit is contained in:
2026-02-04 19:22:01 -07:00
parent 68525f161e
commit dbaac6a6a6
4 changed files with 31 additions and 36 deletions

View File

@@ -28,18 +28,6 @@ body {
--col8: rgb(152, 128, 128);
}
.green-theme {
--col0: rgb(8, 32, 8);
--col1: rgb(16, 40, 16);
--col2: rgb(32, 56, 32);
--col3: rgb(48, 72, 48);
--col4: rgb(64, 88, 64);
--col5: rgb(80, 104, 80);
--col6: rgb(96, 120, 96);
--col7: rgb(112, 136, 112);
--col8: rgb(128, 152, 128);
}
.blue-theme {
--col0: rgb(8, 8, 32);
--col1: rgb(16, 16, 40);
@@ -64,18 +52,6 @@ body {
--col8: rgb(140, 128, 152);
}
.mint-theme {
--col0: rgb(8, 32, 16);
--col1: rgb(16, 48, 32);
--col2: rgb(32, 56, 40);
--col3: rgb(48, 72, 48);
--col4: rgb(64, 88, 66);
--col5: rgb(80, 104, 65);
--col6: rgb(96, 120, 80);
--col7: rgb(112, 136, 85);
--col8: rgb(128, 152, 95);
}
.button {
@apply rounded-md cursor-pointer text-[16px] py-1 px-2 transition-colors border;
}

View File

@@ -427,13 +427,9 @@ export default function RootLayout ({
normalConfig?.settings.theme === 1
? 'red-theme'
: normalConfig?.settings.theme === 2
? 'green-theme'
: normalConfig?.settings.theme === 3
? 'blue-theme'
: normalConfig?.settings.theme === 4
: normalConfig?.settings.theme === 3
? 'purple-theme'
: normalConfig?.settings.theme === 5
? 'mint-theme'
: 'dark-theme'
}
>

View File

@@ -193,10 +193,8 @@ export default function Settings () {
>
<option value={0}>Dark (default)</option>
<option value={1}>Red</option>
<option value={2}>Green</option>
<option value={3}>Blue</option>
<option value={4}>Purple</option>
<option value={5}>Mint</option>
<option value={2}>Blue</option>
<option value={3}>Purple</option>
</select>
</div>
</div>

View File

@@ -32,7 +32,31 @@ export async function readNormalConfig (): Promise<NormalConfig> {
return new NormalConfig(version)
}
const config = await readTextFile('config.json', options)
return NormalConfig.import(JSON.parse(config))
const raw = JSON.parse(config)
if (
raw.settings &&
raw.settings.theme &&
(raw.version == '1.0.0' ||
raw.version == '1.1.0' ||
raw.version == '1.1.1' ||
raw.version == '1.2.0' ||
raw.version == '1.3.0' ||
raw.version == '1.3.1' ||
raw.version == '1.4.0' ||
raw.version == '1.5.0' ||
raw.version == '1.5.1' ||
raw.version == '1.5.2' ||
raw.version == '1.5.3' ||
raw.version == '1.5.4')
) {
const parsed = Number(raw.settings.theme)
if (parsed == 3) raw.settings.theme = 2
if (parsed == 4) raw.settings.theme = 3
else if (parsed != 0 && parsed != 1) raw.settings.theme = 0
}
raw.version = version
writeNormalConfig(raw)
return NormalConfig.import(raw)
} catch {
return new NormalConfig(version)
}
@@ -83,8 +107,7 @@ export async function readVersionsConfig (): Promise<VersionsConfig> {
}
const config = await readTextFile('versions.json', options)
const raw = JSON.parse(config)
if (raw.version && raw.list && raw.timestamps) {
raw.version = version
if (raw.list && raw.timestamps) {
raw.list = raw.timestamps
delete raw.timestamps
@@ -94,6 +117,8 @@ export async function readVersionsConfig (): Promise<VersionsConfig> {
options
)
}
raw.version = version
writeVersionsConfig(raw)
return VersionsConfig.import(raw)
} catch {
return new VersionsConfig(version)