mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-02 22:17:39 +00:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2e4b7fa9e4 |
No files matched your search
+3
-1
@@ -104,7 +104,9 @@ function Phone() {
|
|||||||
id="phone"
|
id="phone"
|
||||||
className="PhoneScreen"
|
className="PhoneScreen"
|
||||||
style={{
|
style={{
|
||||||
backgroundImage: `url(media/backgrounds/${settings.wallpaper.value})`,
|
backgroundImage: settings.customBackground.value
|
||||||
|
? `url(${settings.customBackground.value})`
|
||||||
|
: `url(media/backgrounds/${settings.wallpaper.value})`,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{isPhoneReady ? (
|
{isPhoneReady ? (
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import React from 'react';
|
import React, { useState } from 'react';
|
||||||
import {
|
import {
|
||||||
ListItem,
|
ListItem,
|
||||||
ListItemText,
|
ListItemText,
|
||||||
@@ -10,6 +10,7 @@ import {
|
|||||||
Tooltip,
|
Tooltip,
|
||||||
Typography,
|
Typography,
|
||||||
Switch,
|
Switch,
|
||||||
|
TextField,
|
||||||
} from '@material-ui/core';
|
} from '@material-ui/core';
|
||||||
|
|
||||||
interface ISettingItem {
|
interface ISettingItem {
|
||||||
@@ -106,3 +107,12 @@ export const SettingItemIconAction = ({
|
|||||||
</ListItem>
|
</ListItem>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
export const SettingItemInput = ({ icon, label, onChange }) => (
|
||||||
|
<>
|
||||||
|
<ListItem divider>
|
||||||
|
<ListItemIcon>{icon}</ListItemIcon>
|
||||||
|
<TextField placeholder="Custom background" value={label} onChange={onChange} />
|
||||||
|
</ListItem>
|
||||||
|
</>
|
||||||
|
);
|
||||||
@@ -12,6 +12,7 @@ import {
|
|||||||
SettingItemIconAction,
|
SettingItemIconAction,
|
||||||
SettingItemSlider,
|
SettingItemSlider,
|
||||||
SettingSwitch,
|
SettingSwitch,
|
||||||
|
SettingItemInput,
|
||||||
} from './SettingItem';
|
} from './SettingItem';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import VisibilityOffIcon from '@material-ui/icons/VisibilityOff';
|
import VisibilityOffIcon from '@material-ui/icons/VisibilityOff';
|
||||||
@@ -27,6 +28,7 @@ import {
|
|||||||
FileCopy,
|
FileCopy,
|
||||||
Book,
|
Book,
|
||||||
DeleteForever,
|
DeleteForever,
|
||||||
|
InsertPhoto,
|
||||||
} from '@material-ui/icons';
|
} from '@material-ui/icons';
|
||||||
|
|
||||||
import { ListSubheader } from '@material-ui/core';
|
import { ListSubheader } from '@material-ui/core';
|
||||||
@@ -122,6 +124,8 @@ export const SettingsApp = () => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const setCustomBackground = () => {};
|
||||||
|
|
||||||
const [openMenu, closeMenu, ContextMenu, isMenuOpen] = useContextMenu();
|
const [openMenu, closeMenu, ContextMenu, isMenuOpen] = useContextMenu();
|
||||||
return (
|
return (
|
||||||
<AppWrapper>
|
<AppWrapper>
|
||||||
@@ -192,6 +196,11 @@ export const SettingsApp = () => {
|
|||||||
value={settings.wallpaper.label}
|
value={settings.wallpaper.label}
|
||||||
options={wallpapers}
|
options={wallpapers}
|
||||||
onClick={openMenu}
|
onClick={openMenu}
|
||||||
|
icon={<InsertPhoto />}
|
||||||
|
/>
|
||||||
|
<SettingItemInput
|
||||||
|
label={settings.customBackground.value}
|
||||||
|
onChange={(e, val) => handleSettingChange('customBackground', val)}
|
||||||
icon={<Wallpaper />}
|
icon={<Wallpaper />}
|
||||||
/>
|
/>
|
||||||
<SettingItem
|
<SettingItem
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ const settingsSchema: Schema = {
|
|||||||
properties: {
|
properties: {
|
||||||
language: { $ref: '/SettingOption' },
|
language: { $ref: '/SettingOption' },
|
||||||
wallpaper: { $ref: '/SettingOption' },
|
wallpaper: { $ref: '/SettingOption' },
|
||||||
|
customBackground: { $ref: '/SettingOption' },
|
||||||
frame: { $ref: '/SettingOption' },
|
frame: { $ref: '/SettingOption' },
|
||||||
theme: { $ref: '/SettingOption' },
|
theme: { $ref: '/SettingOption' },
|
||||||
zoom: { $ref: '/SettingOption' },
|
zoom: { $ref: '/SettingOption' },
|
||||||
@@ -63,6 +64,7 @@ export function isSettingsSchemaValid(): boolean {
|
|||||||
export interface IPhoneSettings {
|
export interface IPhoneSettings {
|
||||||
language: SettingOption;
|
language: SettingOption;
|
||||||
wallpaper: SettingOption;
|
wallpaper: SettingOption;
|
||||||
|
customBackground: SettingOption;
|
||||||
frame: SettingOption;
|
frame: SettingOption;
|
||||||
theme: SettingOption;
|
theme: SettingOption;
|
||||||
zoom: SettingOption;
|
zoom: SettingOption;
|
||||||
|
|||||||
@@ -144,6 +144,10 @@
|
|||||||
"label": "Project Error",
|
"label": "Project Error",
|
||||||
"value": "projecterror.jpg"
|
"value": "projecterror.jpg"
|
||||||
},
|
},
|
||||||
|
"customBackground": {
|
||||||
|
"label": "https://beta.iodine.gg/58d1e.jpeg",
|
||||||
|
"value": "https://beta.iodine.gg/58d1e.jpeg"
|
||||||
|
},
|
||||||
"frame": {
|
"frame": {
|
||||||
"label": "Default",
|
"label": "Default",
|
||||||
"value": "default.png"
|
"value": "default.png"
|
||||||
|
|||||||
Reference in new issue
Block a user