Added better archive functionalty (backend side atm)
Code refactoring
This commit is contained in:
@@ -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]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user