-
-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added settings option to toggle blur effect and disable blur in more …
…places
- Loading branch information
1 parent
6fb117e
commit 234d2ab
Showing
9 changed files
with
109 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
...nts/drawer-header/DrawerHeader.module.css → ...ts/drawer-header/DrawerHeader.module.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
import { createEffect, createSignal, For, Show } from 'solid-js'; | ||
import Text from '@/components/ui/Text'; | ||
import { css, styled } from 'solid-styled-components'; | ||
import { getCurrentLanguage, getLanguage, Language, languages, setCurrentLanguage } from '@/locales/languages'; | ||
|
||
import ItemContainer from '../ui/Item'; | ||
import twemoji from 'twemoji'; | ||
import { FlexColumn, FlexRow } from '../ui/Flexbox'; | ||
import useStore from '@/chat-api/store/useStore'; | ||
import { useTransContext } from '@mbarzda/solid-i18next'; | ||
import env from '@/common/env'; | ||
import { emojiUnicodeToShortcode, unicodeToTwemojiUrl } from '@/emoji'; | ||
import { Emoji } from '../markup/Emoji'; | ||
import { getStorageBoolean, getStorageNumber, setStorageBoolean, setStorageNumber, StorageKeys } from '@/common/localStorage'; | ||
import Checkbox from '../ui/Checkbox'; | ||
import Breadcrumb, { BreadcrumbItem } from '../ui/Breadcrumb'; | ||
import { t } from 'i18next'; | ||
import SettingsBlock from '../ui/settings-block/SettingsBlock'; | ||
import Slider from '../ui/Slider'; | ||
import { playMessageNotification } from '@/common/Sound'; | ||
import { useWindowProperties } from '@/common/useWindowProperties'; | ||
|
||
const Container = styled("div")` | ||
display: flex; | ||
flex-direction: column; | ||
gap: 5px; | ||
padding: 10px; | ||
`; | ||
|
||
|
||
|
||
export default function InterfaceSettings() { | ||
const { header } = useStore(); | ||
|
||
|
||
createEffect(() => { | ||
header.updateHeader({ | ||
title: "Settings - Notifications", | ||
iconName: 'settings', | ||
}); | ||
}) | ||
|
||
|
||
return ( | ||
<Container> | ||
<Breadcrumb> | ||
<BreadcrumbItem href='/app' icon='home' title="Dashboard" /> | ||
<BreadcrumbItem title={t('settings.drawer.interface')} /> | ||
</Breadcrumb> | ||
<DesktopNotification/> | ||
</Container> | ||
) | ||
} | ||
|
||
|
||
function DesktopNotification() { | ||
const {setBlurEffectEnabled, blurEffectEnabled} = useWindowProperties(); | ||
const toggleBlurEffect = () => { | ||
setBlurEffectEnabled(!blurEffectEnabled()); | ||
} | ||
|
||
return ( | ||
<SettingsBlock icon='dvr' label='Blur Effect' description='Enables transparent blur effect. Disabled by default on mobile. Can cause performance issues.'> | ||
<Checkbox onChange={toggleBlurEffect} checked={blurEffectEnabled()} /> | ||
</SettingsBlock> | ||
) | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters