replace old client with new client from commafeed-ui repository

This commit is contained in:
Athou
2022-08-13 10:56:07 +02:00
parent ac7b6eeb21
commit 04894f118b
183 changed files with 20326 additions and 12678 deletions

View File

@@ -0,0 +1,31 @@
import { t } from "@lingui/macro"
import { Select, Stack, Switch } from "@mantine/core"
import { changeLanguage, changeScrollSpeed } from "app/slices/user"
import { useAppDispatch, useAppSelector } from "app/store"
import { locales } from "i18n"
export function DisplaySettings() {
const language = useAppSelector(state => state.user.settings?.language)
const scrollSpeed = useAppSelector(state => state.user.settings?.scrollSpeed)
const dispatch = useAppDispatch()
return (
<Stack>
<Select
description={t`Language`}
value={language}
data={locales.map(l => ({
value: l.key,
label: l.label,
}))}
onChange={s => s && dispatch(changeLanguage(s))}
/>
<Switch
label={t`Scroll smoothly when navigating between entries`}
checked={scrollSpeed ? scrollSpeed > 0 : false}
onChange={e => dispatch(changeScrollSpeed(e.currentTarget.checked))}
/>
</Stack>
)
}