tweak(phone/settings): simplify custom background (#185)

Adds the custom background option into wallpaper SettingItem, with an nice DialogForm.
This commit is contained in:
Christopher Gjelten authored and GitHub committed 2021-04-07 23:29:18 +02:00
1 parent 8ef1a0aa9a
commit 0cf5bc2bc7
9 files changed
+139 -101

No files matched your search

+3 -2
View File
@@ -33,6 +33,7 @@ import WindowSnackbar from './ui/components/WindowSnackbar';
import { usePhone } from './os/phone/hooks/usePhone';
import { useTranslation } from 'react-i18next';
import { useSnackbar } from './ui/hooks/useSnackbar';
import { isDefaultWallpaper } from './apps/settings/utils/isDefaultWallpaper';
function Phone() {
const { t, i18n } = useTranslation();
@@ -104,8 +105,8 @@ function Phone() {
id="phone"
className="PhoneScreen"
style={{
backgroundImage: settings.customWallpaper
? `url(${settings.customWallpaper})`
backgroundImage: !isDefaultWallpaper(settings.wallpaper.value)
? `url(${settings.wallpaper.value})`
: `url(media/backgrounds/${settings.wallpaper.value})`,
}}
>