Added better archive functionalty (backend side atm)

Code refactoring
This commit is contained in:
2024-12-18 11:59:17 +01:00
parent d9cb018132
commit 9d3861ab39
29 changed files with 1401 additions and 417 deletions

View File

@@ -1,6 +1,6 @@
import { blue, red } from '@mui/material/colors'
import { pipe } from 'fp-ts/lib/function'
import { Accent } from './atoms/settings'
import { Accent, ThemeNarrowed } from './atoms/settings'
import type { RPCResponse } from "./types"
import { ProcessStatus } from './types'
@@ -83,13 +83,13 @@ export const base64URLEncode = (s: string) => pipe(
encodeURIComponent
)
export const getAccentValue = (accent: Accent) => {
export const getAccentValue = (accent: Accent, mode: ThemeNarrowed) => {
switch (accent) {
case 'default':
return blue[700]
return mode === 'light' ? blue[700] : blue[300]
case 'red':
return red[600]
return mode === 'light' ? red[600] : red[400]
default:
return blue[700]
return mode === 'light' ? blue[700] : blue[300]
}
}