diff --git a/phone/src/Phone.tsx b/phone/src/Phone.tsx index 3c5ad65..47b6466 100644 --- a/phone/src/Phone.tsx +++ b/phone/src/Phone.tsx @@ -105,8 +105,8 @@ function Phone() { className="PhoneScreen" style={{ backgroundImage: - settings.wallpaper.label === 'Custom Wallpaper' - ? `url(${settings.customWallpaper})` + settings.wallpaper.label === t('APPS_SETTINGS_OPTIONS_CUSTOM_WALLPAPER') + ? `url(${settings.wallpaper.value})` : `url(media/backgrounds/${settings.wallpaper.value})`, }} > diff --git a/phone/src/apps/settings/components/SettingItem.tsx b/phone/src/apps/settings/components/SettingItem.tsx index b838228..fd6ad45 100644 --- a/phone/src/apps/settings/components/SettingItem.tsx +++ b/phone/src/apps/settings/components/SettingItem.tsx @@ -12,8 +12,6 @@ import { Switch, TextField, } from '@material-ui/core'; -import CreateIcon from '@material-ui/icons/Create'; -import { PictureThumbnail } from '../../../ui/components/PictureThumbnail'; interface ISettingItem { options?: any; diff --git a/phone/src/apps/settings/components/SettingsApp.tsx b/phone/src/apps/settings/components/SettingsApp.tsx index a4d2c1a..47824cd 100644 --- a/phone/src/apps/settings/components/SettingsApp.tsx +++ b/phone/src/apps/settings/components/SettingsApp.tsx @@ -73,10 +73,7 @@ export const SettingsApp = () => { const wallpapers = config.wallpapers.map( MapSettingItem(settings.wallpaper, (val: SettingOption) => { - if (val.label === 'Custom Wallpaper') { - setCustomWallpaperModal(true); - } - return handleSettingChange('wallpaper', val); + handleSettingChange('wallpaper', val); }), ); const frames = config.frames.map( @@ -130,6 +127,13 @@ export const SettingsApp = () => { }, ]; + const customWallpaper: IContextMenuOption = { + selected: false, + onClick: () => setCustomWallpaperModal(true), + key: 'CUSTOM_WALLPAPER', + label: t('APPS_SETTINGS_OPTIONS_CUSTOM_WALLPAPER'), + }; + const handleCopyPhoneNumber = () => { setClipboard(simcard.number); addAlert({ @@ -211,7 +215,7 @@ export const SettingsApp = () => { } /> diff --git a/phone/src/config/default.json b/phone/src/config/default.json index 4c6dc6e..5516dd0 100644 --- a/phone/src/config/default.json +++ b/phone/src/config/default.json @@ -17,10 +17,6 @@ { "label": "Project Error", "value": "projecterror.jpg" - }, - { - "label": "Custom Wallpaper", - "value": "" } ], "frames": [