diff --git a/package.json b/package.json index 51d5cdd9..c99099f4 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,6 @@ "@floating-ui/react-dom": "2.0.9", "@fontsource/lexend-deca": "5.0.12", "@fontsource/montserrat": "5.0.17", - "@muetab/react-color-gradient-picker": "0.1.2", "@muetab/react-sortable-hoc": "^2.0.1", "@mui/material": "5.15.18", "@sentry/react": "^8.2.1", @@ -26,6 +25,7 @@ "fast-blurhash": "^1.1.2", "image-conversion": "^2.1.1", "react": "^18.3.1", + "react-best-gradient-color-picker": "^3.0.7", "react-clock": "5.0.0", "react-dom": "^18.3.1", "react-icons": "^5.2.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index da94b02f..9da77228 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,9 +1,5 @@ lockfileVersion: '6.0' -settings: - autoInstallPeers: true - excludeLinksFromLockfile: false - dependencies: '@eartharoid/i18n': specifier: 1.2.1 @@ -23,9 +19,6 @@ dependencies: '@fontsource/montserrat': specifier: 5.0.17 version: 5.0.17 - '@muetab/react-color-gradient-picker': - specifier: 0.1.2 - version: 0.1.2(react-dom@18.3.1)(react@18.3.1) '@muetab/react-sortable-hoc': specifier: ^2.0.1 version: 2.0.1(prop-types@15.8.1)(react-dom@18.3.1)(react@18.3.1) @@ -50,6 +43,9 @@ dependencies: react: specifier: ^18.3.1 version: 18.3.1 + react-best-gradient-color-picker: + specifier: ^3.0.7 + version: 3.0.7(react-dom@18.3.1)(react@18.3.1) react-clock: specifier: 5.0.0 version: 5.0.0(react-dom@18.3.1)(react@18.3.1) @@ -2210,16 +2206,6 @@ packages: '@jridgewell/sourcemap-codec': 1.4.15 dev: true - /@muetab/react-color-gradient-picker@0.1.2(react-dom@18.3.1)(react@18.3.1): - resolution: {integrity: sha512-Du/FbMpH+N6OuCfOQvUH6h6KaTopFn9R0aNc0DRvY5cm5bO6iJwdrNlOKdnijUvPIa0MNxWvwTuXJfEBEaXLsg==} - peerDependencies: - react: ^18.2.0 - react-dom: ^18.2.0 - dependencies: - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) - dev: false - /@muetab/react-sortable-hoc@2.0.1(prop-types@15.8.1)(react-dom@18.3.1)(react@18.3.1): resolution: {integrity: sha512-w5tKlh+pl1PJXIdAmThxM4brkXPoRvAiV8XrmDuAu98iELRMwji9Pm6lBu2KCJnFLbZcEUk7oJHPdOAcxNvX1w==} peerDependencies: @@ -3276,6 +3262,11 @@ packages: resolution: {integrity: sha512-1ugUSr8BHXRnK23KfuYS+gVMC3LB8QGH9W1iGtDPsNWoQbgtXSExkBu2aDR4epiGWZOjZsj6lDl/N/AqqTC3UA==} dev: true + /base64-arraybuffer@1.0.2: + resolution: {integrity: sha512-I3yl4r9QB5ZRY3XuJVEPfc2XhZO6YweFPI+UovAzn+8/hb3oJ6lnysaFcjVpkCPfVWFUDvoZ8kmVDP7WyRtYtQ==} + engines: {node: '>= 0.6.0'} + dev: false + /binary-extensions@2.3.0: resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} engines: {node: '>=8'} @@ -3506,6 +3497,12 @@ packages: engines: {node: '>=12 || >=16'} dev: true + /css-line-break@2.1.0: + resolution: {integrity: sha512-FHcKFCZcAha3LwfVBhCQbW2nCNbkZXn7KVUJcsT5/P8YmfsVja0FMPJr0B903j/E69HUphKiV9iQArX8SDYA4w==} + dependencies: + utrie: 1.0.2 + dev: false + /css-tree@2.3.1: resolution: {integrity: sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==} engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0} @@ -4548,6 +4545,14 @@ packages: engines: {node: '>=8'} dev: true + /html2canvas@1.4.1: + resolution: {integrity: sha512-fPU6BHNpsyIhr8yyMpTLLxAbkaK8ArIBcmZIRiBLiDhjeqvXolaEmDGmELFuX9I4xDcaKKcJl+TKZLqruBbmWA==} + engines: {node: '>=8.0.0'} + dependencies: + css-line-break: 2.1.0 + text-segmentation: 1.0.3 + dev: false + /human-signals@5.0.0: resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==} engines: {node: '>=16.17.0'} @@ -5003,6 +5008,10 @@ packages: resolution: {integrity: sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==} dev: true + /lodash.throttle@4.1.1: + resolution: {integrity: sha512-wIkUCfVKpVsWo3JSZlc+8MB5it+2AN5W8J7YVMST30UrvcQNZ1Okbj+rbVniijTWE6FGYy4XJq/rHkas8qJMLQ==} + dev: false + /lodash.truncate@4.4.2: resolution: {integrity: sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==} dev: true @@ -5393,6 +5402,23 @@ packages: '@types/node': 10.17.60 dev: true + /react-best-gradient-color-picker@3.0.7(react-dom@18.3.1)(react@18.3.1): + resolution: {integrity: sha512-yNlPbKvSZOD8XCbPPqiKz30OUeZrY8GZfu/CSPsFSRrzjMPBMNXbDDspQ6dknXI4Tkc5dhOMiBjjyCFSa+w0+Q==} + peerDependencies: + '@types/react': ^16.8.0 || ^17.0.0 || ^18.0.0 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + '@types/react': + optional: true + dependencies: + html2canvas: 1.4.1 + lodash.throttle: 4.1.1 + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + tinycolor2: 1.4.2 + dev: false + /react-clock@5.0.0(react-dom@18.3.1)(react@18.3.1): resolution: {integrity: sha512-Cj3XqwLB1svtGWiw/A6vmLIPb9OhA/BsWUpS46lXTNTilK7zmP2zmtFgQEAfWUssc3nERXkMXzI0YrkzDpc0gQ==} peerDependencies: @@ -6011,6 +6037,12 @@ packages: engines: {node: '>=8'} dev: true + /text-segmentation@1.0.3: + resolution: {integrity: sha512-iOiPUo/BGnZ6+54OsWxZidGCsdU8YbE4PSpdPinp7DeMtUJNJBoJ/ouUSTJjHkh1KntHaltHl/gDs2FC4i5+Nw==} + dependencies: + utrie: 1.0.2 + dev: false + /text-table@0.2.0: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} dev: true @@ -6019,6 +6051,10 @@ packages: resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} dev: true + /tinycolor2@1.4.2: + resolution: {integrity: sha512-vJhccZPs965sV/L2sU4oRQVAos0pQXwsvTLkWYdqJ+a8Q5kPFzJTuOFwy7UniPli44NKQGAglksjvOcpo95aZA==} + dev: false + /to-fast-properties@2.0.0: resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} engines: {node: '>=4'} @@ -6177,6 +6213,12 @@ packages: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} dev: true + /utrie@1.0.2: + resolution: {integrity: sha512-1MLa5ouZiOmQzUbjbu9VmjLzn1QLXBhwpUa7kdLUQK+KQ5KA9I1vk5U4YHe/X2Ch7PYnJfWuWT+VbuxbGwljhw==} + dependencies: + base64-arraybuffer: 1.0.2 + dev: false + /vite-plugin-progress@0.0.7(vite@5.2.11): resolution: {integrity: sha512-zyvKdcc/X+6hnw3J1HVV1TKrlFKC4Rh8GnDnWG/2qhRXjqytTcM++xZ+SAPnoDsSyWl8O93ymK0wZRgHAoglEQ==} engines: {node: '>=14', pnpm: '>=7.0.0'} @@ -6361,3 +6403,7 @@ packages: resolution: {integrity: sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==} engines: {node: '>=12.20'} dev: true + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false diff --git a/src/components/Elements/AddModal/AddModal.jsx b/src/components/Elements/AddModal/AddModal.jsx index c86ab7c5..37fd7b1a 100644 --- a/src/components/Elements/AddModal/AddModal.jsx +++ b/src/components/Elements/AddModal/AddModal.jsx @@ -4,6 +4,7 @@ import { useState, memo } from 'react'; import { TextareaAutosize } from '@mui/material'; import { MdAddLink, MdClose } from 'react-icons/md'; import { Tooltip } from 'components/Elements'; + function AddModal({ urlError, iconError, addLink, closeModal, edit, editData, editLink }) { const [name, setName] = useState(edit ? editData.name : ''); const [url, setUrl] = useState(edit ? editData.url : ''); diff --git a/src/components/Elements/MainModal/scss/marketplace/_main.scss b/src/components/Elements/MainModal/scss/marketplace/_main.scss index 7a4ecabf..4d8afa54 100644 --- a/src/components/Elements/MainModal/scss/marketplace/_main.scss +++ b/src/components/Elements/MainModal/scss/marketplace/_main.scss @@ -433,15 +433,17 @@ p.author { } .inCollection { - background-image: linear-gradient(to left, transparent, #000), - url('https://external-preview.redd.it/JyhsEoGMhKIMi3kvfBS24L0IllAO_KrIm4UI-dA1Ax4.jpg?auto=webp&s=b5adf9859b2c1855a5b3085f9453a6e878548505'); + // background-image: linear-gradient(to left, transparent, #000), + // url('https://external-preview.redd.it/JyhsEoGMhKIMi3kvfBS24L0IllAO_KrIm4UI-dA1Ax4.jpg?auto=webp&s=b5adf9859b2c1855a5b3085f9453a6e878548505'); display: flex; flex-flow: column; gap: 15px; padding: 15px; + margin-top: 15px; @include themed { - box-shadow: 0 0 0 4px t($modal-sidebarActive); + background-color: t($modal-secondaryColour); + box-shadow: 0 0 0 1px t($modal-sidebarActive); border-radius: t($borderRadius); } } diff --git a/src/components/Elements/MainModal/scss/modules/_modalTabContent.scss b/src/components/Elements/MainModal/scss/modules/_modalTabContent.scss index a1f55b3d..8f8a71f9 100644 --- a/src/components/Elements/MainModal/scss/modules/_modalTabContent.scss +++ b/src/components/Elements/MainModal/scss/modules/_modalTabContent.scss @@ -52,7 +52,6 @@ button { margin-top: 10px; - width: 283px; } .link { @@ -67,22 +66,22 @@ } } -.activityButtons { - place-content: space-between space-between !important; - align-items: flex-end !important; - flex-flow: row wrap !important; - - button:not(:first-child) { - width: 40% !important; - height: 99px !important; - flex-flow: column-reverse !important; +.resetDataButtonsLayout { + display: grid; + grid-template-columns: 1fr 1fr; + grid-gap: 20px; + + :nth-child(1) { + grid-column: span 2; } button { @include modal-button(standard); + padding: 5px 10px 5px 10px; } } + table { border-collapse: separate; diff --git a/src/components/Elements/ResetModal/ResetModal.jsx b/src/components/Elements/ResetModal/ResetModal.jsx index 9f9be898..923c67f0 100644 --- a/src/components/Elements/ResetModal/ResetModal.jsx +++ b/src/components/Elements/ResetModal/ResetModal.jsx @@ -2,7 +2,7 @@ import { memo } from 'react'; import variables from 'config/variables'; import { MdClose, MdRestartAlt } from 'react-icons/md'; import { setDefaultSettings } from 'utils/settings'; -import { Tooltip } from 'components/Elements'; +import { Tooltip, Button } from 'components/Elements'; function ResetModal({ modalClose }) { const reset = () => { @@ -32,14 +32,8 @@ function ResetModal({ modalClose }) { {variables.getMessage('modals.main.settings.sections.advanced.reset_modal.information')}
- - +
); diff --git a/src/components/Form/Settings/ChipSelect/ChipSelect.jsx b/src/components/Form/Settings/ChipSelect/ChipSelect.jsx index d110d657..ce18454b 100644 --- a/src/components/Form/Settings/ChipSelect/ChipSelect.jsx +++ b/src/components/Form/Settings/ChipSelect/ChipSelect.jsx @@ -55,4 +55,5 @@ function ChipSelect({ label, options }) { ); } -export default memo(ChipSelect); +const MemoizedChipSelect = memo(ChipSelect); +export { ChipSelect as default, MemoizedChipSelect as ChipSelect }; \ No newline at end of file diff --git a/src/features/background/Background.jsx b/src/features/background/Background.jsx index bb00cc78..34d0c224 100644 --- a/src/features/background/Background.jsx +++ b/src/features/background/Background.jsx @@ -10,7 +10,6 @@ import EventBus from 'utils/eventbus'; import { supportsAVIF } from './api/avif'; import { getOfflineImage } from './api/getOfflineImage'; import videoCheck from './api/videoCheck'; -import { getGradient } from './api/gradient'; import { randomColourStyleBuilder } from './api/randomColour'; import './scss/index.scss'; @@ -208,10 +207,23 @@ export default class Background extends PureComponent { break; case 'colour': - const gradient = getGradient(); - if (gradient) { - this.setState(gradient); + let customBackgroundColour = localStorage.getItem('customBackgroundColour'); + // check if its a json object + if (customBackgroundColour && customBackgroundColour.startsWith('{')) { + const customBackground = JSON.parse(customBackgroundColour); + // move to new format + try { + localStorage.setItem('customBackgroundColour', customBackground.gradient[0].colour); + customBackgroundColour = customBackground.gradient.colour; + } catch (e) { + // give up + customBackgroundColour = 'rgb(0,0,0)'; + } } + this.setState({ + type: 'colour', + style: `background: ${customBackgroundColour || 'rgb(0,0,0)'}`, + }); break; case 'random_colour': diff --git a/src/features/background/api/gradient/getGradient.js b/src/features/background/api/gradient/getGradient.js deleted file mode 100644 index dd89dc7a..00000000 --- a/src/features/background/api/gradient/getGradient.js +++ /dev/null @@ -1,46 +0,0 @@ -/** - * It takes a gradient object and returns a style object - * @returns An object with two properties: type and style. - */ -export function gradientStyleBuilder({ type, angle, gradient }) { - // Note: Append the gradient for additional browser support. - const steps = gradient?.map((v) => `${v.colour} ${v.stop}%`); - const grad = `background: ${type}-gradient(${type === 'linear' ? `${angle}deg,` : ''}${steps})`; - - return { - type: 'colour', - style: `background:${gradient[0]?.colour};${grad}`, - }; -} - -/** - * It gets the gradient settings from localStorage, parses it, and returns the gradient style. - * @returns A string. - */ -export function getGradient() { - const customBackgroundColour = localStorage.getItem('customBackgroundColour') || { - angle: '180', - gradient: [{ colour: '#ffb032', stop: 0 }], - type: 'linear', - }; - - let gradientSettings = ''; - try { - gradientSettings = JSON.parse(customBackgroundColour); - } catch (e) { - const hexColorRegex = /#[0-9a-fA-F]{6}/s; - if (hexColorRegex.exec(customBackgroundColour)) { - // Colour used to be simply a hex colour or a NULL value before it was a JSON object. This automatically upgrades the hex colour value to the new standard. (NULL would not trigger an exception) - gradientSettings = { - type: 'linear', - angle: '180', - gradient: [{ colour: customBackgroundColour, stop: 0 }], - }; - localStorage.setItem('customBackgroundColour', JSON.stringify(gradientSettings)); - } - } - - if (typeof gradientSettings === 'object' && gradientSettings !== null) { - return gradientStyleBuilder(gradientSettings); - } -} diff --git a/src/features/background/api/gradient/hexToRgb.js b/src/features/background/api/gradient/hexToRgb.js deleted file mode 100644 index 42bb2a26..00000000 --- a/src/features/background/api/gradient/hexToRgb.js +++ /dev/null @@ -1,39 +0,0 @@ -import rgbToHsv from './rgbToHsv'; -import { setRGBA } from './setRgba'; - -const hexRegexp = /(^#{0,1}[0-9A-F]{6}$)|(^#{0,1}[0-9A-F]{3}$)|(^#{0,1}[0-9A-F]{8}$)/i; -const regexp = /([0-9A-F])([0-9A-F])([0-9A-F])/i; - -/** - * It takes a hex color code and returns an object with the color's RGB and HSV values - * @param value - The hex value to convert to RGB. - * @returns An object with the properties red, green, blue, alpha, hue, saturation, and value. - */ -export default function hexToRgb(value) { - const valid = hexRegexp.test(value); - - if (valid) { - if (value[0] === '#') { - value = value.slice(1, value.length); - } - - if (value.length === 3) { - value = value.replace(regexp, '$1$1$2$2$3$3'); - } - - const red = parseInt(value.substr(0, 2), 16); - const green = parseInt(value.substr(2, 2), 16); - const blue = parseInt(value.substr(4, 2), 16); - const alpha = parseInt(value.substr(6, 2), 16) / 255; - - const color = setRGBA(red, green, blue, alpha); - const hsv = rgbToHsv({ ...color }); - - return { - ...color, - ...hsv, - }; - } - - return false; -} diff --git a/src/features/background/api/gradient/index.js b/src/features/background/api/gradient/index.js deleted file mode 100644 index 5d4bd674..00000000 --- a/src/features/background/api/gradient/index.js +++ /dev/null @@ -1,17 +0,0 @@ -import { getGradient, gradientStyleBuilder } from './getGradient'; - -import hexToRgb from './hexToRgb'; -import rgbToHex from './rgbToHex'; -import rgbToHsv from './rgbToHsv'; - -import { setRGBA, isValidRGBValue } from './setRgba'; - -export { - getGradient, - gradientStyleBuilder, - hexToRgb, - rgbToHex, - rgbToHsv, - setRGBA, - isValidRGBValue, -}; diff --git a/src/features/background/api/gradient/rgbToHex.js b/src/features/background/api/gradient/rgbToHex.js deleted file mode 100644 index 49b44510..00000000 --- a/src/features/background/api/gradient/rgbToHex.js +++ /dev/null @@ -1,27 +0,0 @@ -/** - * It takes three numbers, converts them to hexadecimal, and returns a string of the three hexadecimal - * numbers concatenated together - * @param red - The red value of the color (0-255) - * @param green - 0 - * @param blue - 0 - * @returns a string of the hexadecimal value of the rgb values passed in. - */ -export default function rgbToHex(red, green, blue) { - let r16 = red.toString(16); - let g16 = green.toString(16); - let b16 = blue.toString(16); - - if (red < 16) { - r16 = `0${r16}`; - } - - if (green < 16) { - g16 = `0${g16}`; - } - - if (blue < 16) { - b16 = `0${b16}`; - } - - return r16 + g16 + b16; -} diff --git a/src/features/background/api/gradient/rgbToHsv.js b/src/features/background/api/gradient/rgbToHsv.js deleted file mode 100644 index 65e7eb12..00000000 --- a/src/features/background/api/gradient/rgbToHsv.js +++ /dev/null @@ -1,48 +0,0 @@ -/** - * It converts RGB values to HSV values - * @returns An object with the hue, saturation, and value of the color. - * @param red - The red value of the color. - * @param green - 0-255 - * @param blue - The blue value of the color. - */ -export default function rgbToHSv({ red, green, blue }) { - let rr, gg, bb, h, s; - - const rabs = red / 255; - const gabs = green / 255; - const babs = blue / 255; - - const v = Math.max(rabs, gabs, babs); - const diff = v - Math.min(rabs, gabs, babs); - const diffc = (c) => (v - c) / 6 / diff + 1 / 2; - - if (diff === 0) { - h = 0; - s = 0; - } else { - s = diff / v; - rr = diffc(rabs); - gg = diffc(gabs); - bb = diffc(babs); - - if (rabs === v) { - h = bb - gg; - } else if (gabs === v) { - h = 1 / 3 + rr - bb; - } else if (babs === v) { - h = 2 / 3 + gg - rr; - } - - if (h < 0) { - h += 1; - } else if (h > 1) { - h -= 1; - } - } - - return { - hue: Math.round(h * 360), - saturation: Math.round(s * 100), - value: Math.round(v * 100), - }; -} diff --git a/src/features/background/api/gradient/setRgba.js b/src/features/background/api/gradient/setRgba.js deleted file mode 100644 index 386783e4..00000000 --- a/src/features/background/api/gradient/setRgba.js +++ /dev/null @@ -1,35 +0,0 @@ -/** - * It returns true if the value is a number, not NaN, and between 0 and 255. - * @param value - The value to check. - * @returns A function that takes a value and returns a boolean. - */ -export function isValidRGBValue(value) { - return typeof value === 'number' && Number.isNaN(value) === false && value >= 0 && value <= 255; -} - -/** - * "If the red, green, and blue values are valid, return an object with the red, green, and blue - * values, and if the alpha value is valid, add it to the object." - * - * The function is a bit more complicated than that, but that's the gist of it - * @param red - The red value of the color. - * @param green - 0-255 - * @param blue - The blue value of the color. - * @param alpha - The alpha value of the color. - * @returns An object with the properties red, green, blue, and alpha. - */ -export function setRGBA(red, green, blue, alpha) { - if (isValidRGBValue(red) && isValidRGBValue(green) && isValidRGBValue(blue)) { - const color = { - red: red | 0, - green: green | 0, - blue: blue | 0, - }; - - if (isValidRGBValue(alpha) === true) { - color.alpha = alpha | 0; - } - - return color; - } -} diff --git a/src/features/background/options/BackgroundOptions.jsx b/src/features/background/options/BackgroundOptions.jsx index 4f582b97..6bb8c489 100644 --- a/src/features/background/options/BackgroundOptions.jsx +++ b/src/features/background/options/BackgroundOptions.jsx @@ -3,18 +3,15 @@ import { PureComponent } from 'react'; import { MdSource, MdOutlineKeyboardArrowRight, MdOutlineAutoAwesome } from 'react-icons/md'; import { Header } from 'components/Layout/Settings'; -import Checkbox from '../../../components/Form/Settings/Checkbox/Checkbox'; -import ChipSelect from '../../../components/Form/Settings/ChipSelect/ChipSelect'; -import Dropdown from '../../../components/Form/Settings/Dropdown/Dropdown'; -import Slider from '../../../components/Form/Settings/Slider/Slider'; -import Radio from '../../../components/Form/Settings/Radio/Radio'; -import { Row, Content, Action } from '../../../components/Layout/Settings/Item/SettingsItem'; -import Text from '../../../components/Form/Settings/Text/Text'; +import { Checkbox, Dropdown, Slider, Radio, Text, ChipSelect } from 'components/Form/Settings'; +import { Row, Content, Action } from 'components/Layout/Settings/Item/SettingsItem'; +//import Text from 'components/Form/Settings/Text/Text'; import ColourSettings from './Colour'; import CustomSettings from './Custom'; import values from 'utils/data/slider_values.json'; +import { APIQualityOptions, backgroundImageEffects, getBackgroundOptionItems } from './optionTypes'; class BackgroundOptions extends PureComponent { constructor() { @@ -90,47 +87,6 @@ class BackgroundOptions extends PureComponent { } render() { - /* const interval = ( - - - - - - - - - - - - - - - );*/ const APISettings = ( <> @@ -170,32 +126,7 @@ class BackgroundOptions extends PureComponent { )} name="apiQuality" element=".other" - items={[ - { - value: 'original', - text: variables.getMessage( - 'modals.main.settings.sections.background.source.quality.original', - ), - }, - { - value: 'high', - text: variables.getMessage( - 'modals.main.settings.sections.background.source.quality.high', - ), - }, - { - value: 'normal', - text: variables.getMessage( - 'modals.main.settings.sections.background.source.quality.normal', - ), - }, - { - value: 'datasaver', - text: variables.getMessage( - 'modals.main.settings.sections.background.source.quality.datasaver', - ), - }, - ]} + items={APIQualityOptions} /> this.setState({ backgroundType: value })} category="background" - items={[ - this.state.marketplaceEnabled && { - value: 'photo_pack', - text: variables.getMessage('modals.main.navbar.marketplace'), - }, - { - value: 'api', - text: variables.getMessage( - 'modals.main.settings.sections.background.type.api', - ), - }, - { - value: 'custom', - text: variables.getMessage( - 'modals.main.settings.sections.background.type.custom_image', - ), - }, - { - value: 'colour', - text: variables.getMessage( - 'modals.main.settings.sections.background.type.custom_colour', - ), - }, - { - value: 'random_colour', - text: variables.getMessage( - 'modals.main.settings.sections.background.type.random_colour', - ), - }, - { - value: 'random_gradient', - text: variables.getMessage( - 'modals.main.settings.sections.background.type.random_gradient', - ), - }, - ]} + items={getBackgroundOptionItems(this.state.marketplaceEnabled)} /> @@ -460,51 +356,11 @@ class BackgroundOptions extends PureComponent { name="backgroundType" onChange={(value) => this.setState({ backgroundType: value })} category="background" - items={[ - this.state.marketplaceEnabled && { - value: 'photo_pack', - text: variables.getMessage('modals.main.navbar.marketplace'), - }, - { - value: 'api', - text: variables.getMessage( - 'modals.main.settings.sections.background.type.api', - ), - }, - { - value: 'custom', - text: variables.getMessage( - 'modals.main.settings.sections.background.type.custom_image', - ), - }, - { - value: 'colour', - text: variables.getMessage( - 'modals.main.settings.sections.background.type.custom_colour', - ), - }, - { - value: 'random_colour', - text: variables.getMessage( - 'modals.main.settings.sections.background.type.random_colour', - ), - }, - { - value: 'random_gradient', - text: variables.getMessage( - 'modals.main.settings.sections.background.type.random_gradient', - ), - }, - ]} + items={getBackgroundOptionItems(this.state.marketplaceEnabled)} /> - {/* // todo: ideally refactor all of this file, but we need interval to appear on marketplace too */} - {/*{this.state.backgroundType === 'api' || - this.state.backgroundType === 'custom' || - this.state.marketplaceEnabled - ? interval - : null}*/} + {/* todo: ideally refactor all of this file, but we need interval to appear on marketplace too */} {backgroundSettings} )} @@ -530,7 +386,7 @@ class BackgroundOptions extends PureComponent { default="0" display="%" marks={values.background} - category="background" + category="backgroundeffect" element="#backgroundImage" /> this.setState({ backgroundFilter: value })} category="backgroundeffect" element="#backgroundImage" - items={[ - { - value: 'none', - text: variables.getMessage( - 'modals.main.settings.sections.appearance.navbar.refresh_options.none', - ), - }, - { - value: 'grayscale', - text: variables.getMessage( - 'modals.main.settings.sections.background.effects.filters.grayscale', - ), - }, - { - value: 'sepia', - text: variables.getMessage( - 'modals.main.settings.sections.background.effects.filters.sepia', - ), - }, - { - value: 'invert', - text: variables.getMessage( - 'modals.main.settings.sections.background.effects.filters.invert', - ), - }, - { - value: 'saturate', - text: variables.getMessage( - 'modals.main.settings.sections.background.effects.filters.saturate', - ), - }, - { - value: 'contrast', - text: variables.getMessage( - 'modals.main.settings.sections.background.effects.filters.contrast', - ), - }, - ]} + items={backgroundImageEffects} /> {this.state.backgroundFilter !== 'none' && ( { + const [colour, setColour] = useState(localStorage.getItem('customBackgroundColour') || 'rgba(0, 0, 0, 0)'); -export default class ColourSettings extends PureComponent { - DefaultGradientSettings = { - angle: '180', - gradient: [{ colour: '#ffb032', stop: 0 }], - type: 'linear', - }; - GradientPickerInitialState = undefined; - - constructor() { - super(); - this.state = { - gradientSettings: this.DefaultGradientSettings, - }; + const changeColour = (output) => { + setColour(output); + localStorage.setItem('customBackgroundColour', output); + showReminder(); } - resetColour() { - localStorage.setItem('customBackgroundColour', ''); - this.setState({ - gradientSettings: this.DefaultGradientSettings, - }); + const resetColour = () => { + setColour('rgba(0, 0, 0, 0)'); + localStorage.setItem('customBackgroundColour', 'rgba(0, 0, 0, 0)'); toast(variables.getMessage('toasts.reset')); + showReminder(); } - initialiseColourPickerState(gradientSettings) { - this.GradientPickerInitialState = { - points: gradientSettings.gradient.map((g) => { - const rgb = hexToRgb(g.colour); - return { - left: +g.stop, - red: rgb.red, - green: rgb.green, - blue: rgb.blue, - alpha: 1, - }; - }), - degree: +gradientSettings.angle, - type: gradientSettings.type, - }; - } - - componentDidMount() { - const hex = localStorage.getItem('customBackgroundColour'); - let gradientSettings = undefined; - - if (hex !== '') { - try { - gradientSettings = JSON.parse(hex); - } catch (e) { - // Disregard exception - } - } - - if (gradientSettings === undefined) { - gradientSettings = this.DefaultGradientSettings; - } - - this.setState({ - gradientSettings, - }); - } - - componentDidUpdate() { - localStorage.setItem('customBackgroundColour', this.currentGradientSettings()); - } - - onGradientChange = (event, index) => { - const newValue = event.target.value; - const name = event.target.name; - this.setState((s) => { - return { - gradientSettings: { - ...s.gradientSettings, - gradient: s.gradientSettings.gradient.map((g, i) => - i === index ? { ...g, [name]: newValue } : g, - ), - }, - }; - }); - - this.showReminder(); - }; - - addColour = () => { - this.setState((s) => { - const [lastGradient, ...initGradients] = s.gradientSettings.gradient.reverse(); - return { - gradientSettings: { - ...s.gradientSettings, - gradient: [ - ...initGradients, - lastGradient, - { - colour: localStorage.getItem('theme') === 'dark' ? '#000000' : '#ffffff', - stop: 100, - }, - ].sort((a, b) => (a.stop > b.stop ? 1 : -1)), - }, - }; - }); - - variables.stats.postEvent('setting', 'Changed backgroundType from colour to gradient'); - }; - - currentGradientSettings = () => { - if ( - typeof this.state.gradientSettings === 'object' && - this.state.gradientSettings.gradient.every( - (g) => - g.colour !== - variables.getMessage('modals.main.settings.sections.background.source.disabled'), - ) - ) { - const clampNumber = (num, a, b) => Math.max(Math.min(num, Math.max(a, b)), Math.min(a, b)); - return JSON.stringify({ - ...this.state.gradientSettings, - gradient: [ - ...this.state.gradientSettings.gradient.map((g) => { - return { ...g, stop: clampNumber(+g.stop, 0, 100) }; - }), - ].sort((a, b) => (a.stop > b.stop ? 1 : -1)), - }); - } - return variables.getMessage('modals.main.settings.sections.background.source.disabled'); - }; - - onColourPickerChange = (attrs, name) => { - if (process.env.NODE_ENV === 'development') { - console.log(attrs, name); - } - - this.setState({ - gradientSettings: { - angle: attrs.degree, - gradient: attrs.points.map((p) => { - return { - colour: '#' + rgbToHex(p.red, p.green, p.blue), - stop: p.left, - }; - }), - type: attrs.type, - }, - }); - - this.showReminder(); - }; - - showReminder() { + const showReminder = () => { const reminderInfo = document.querySelector('.reminder-info'); if (reminderInfo.style.display !== 'block') { reminderInfo.style.display = 'block'; @@ -165,84 +32,31 @@ export default class ColourSettings extends PureComponent { } } - render() { - let colourSettings = null; - if (typeof this.state.gradientSettings === 'object') { - const gradientHasMoreThanOneColour = this.state.gradientSettings.gradient.length > 1; + return ( + + + + +
+ resetColour()}> + + {variables.getMessage('modals.main.settings.buttons.reset')} + +
+
+
+ ); +}; - let gradientInputs; - if (gradientHasMoreThanOneColour) { - if (this.GradientPickerInitialState === undefined) { - this.initialiseColourPickerState(this.state.gradientSettings); - } - - gradientInputs = ( - this.onColourPickerChange(colour, 'start')} - onChange={(colour) => this.onColourPickerChange(colour, 'change')} - onEndChange={(colour) => this.onColourPickerChange(colour, 'end')} - gradient={this.GradientPickerInitialState} - isGradient - /> - ); - } else { - gradientInputs = this.state.gradientSettings.gradient.map((g, i) => { - return ( - - this.onGradientChange(event, i)} - value={g.colour} - > - - - ); - }); - } - - colourSettings = ( - <> -
{gradientInputs}
- {!gradientHasMoreThanOneColour && ( - <> - - - )} + {this.props.data.data.in_collections.length > 0 && ( +
+ + {variables.getMessage('modals.main.marketplace.product.part_of')} + + {this.props.data.data.in_collections[0].display_name} +
+ )} diff --git a/src/features/marketplace/components/Items/Items.jsx b/src/features/marketplace/components/Items/Items.jsx index b85abe10..79f45740 100644 --- a/src/features/marketplace/components/Items/Items.jsx +++ b/src/features/marketplace/components/Items/Items.jsx @@ -15,7 +15,8 @@ function Items({ }) { return ( <> - {(type === 'all' && !onCollection && (filter === null || filter === '')) || + {(!onCollection && + (filter === null || filter === '')) || (type === 'collections' && !onCollection && (filter === null || filter === '')) ? ( <>
- item.name.toLowerCase().includes(filter.toLowerCase()) || + item.name?.toLowerCase().includes(filter.toLowerCase()) || filter === '' || - item.author.toLowerCase().includes(filter.toLowerCase()) || - item.type.toLowerCase().includes(filter.toLowerCase()), + item.author?.toLowerCase().includes(filter.toLowerCase()) || + item.type?.toLowerCase().includes(filter.toLowerCase()), ) .map((item) => (
toggleFunction(item)} key={item.name}> @@ -71,12 +72,7 @@ function Items({ src={item.icon_url} aria-hidden="true" /> - icon + icon
{item.display_name || item.name} @@ -92,7 +88,7 @@ function Items({ ))}
- {type === 'all' && !onCollection ? ( + {!onCollection ? (
{variables.getMessage('modals.main.marketplace.cant_find')} diff --git a/src/features/marketplace/views/Browse.jsx b/src/features/marketplace/views/Browse.jsx index 79af578b..c4884adc 100644 --- a/src/features/marketplace/views/Browse.jsx +++ b/src/features/marketplace/views/Browse.jsx @@ -337,7 +337,7 @@ class Marketplace extends PureComponent { <>
this.returnToMain()} /> diff --git a/src/features/misc/sections/Advanced.jsx b/src/features/misc/sections/Advanced.jsx index d83a9dab..b5b225de 100644 --- a/src/features/misc/sections/Advanced.jsx +++ b/src/features/misc/sections/Advanced.jsx @@ -11,7 +11,7 @@ import { import { exportSettings, importSettings } from 'utils/settings'; import { FileUpload, Text, Switch, Dropdown } from 'components/Form/Settings'; -import { ResetModal } from 'components/Elements'; +import { ResetModal, Button } from 'components/Elements'; import { Header, Section, Row, Content, Action } from 'components/Layout/Settings'; @@ -32,19 +32,10 @@ function AdvancedOptions() { 'modals.main.settings.sections.advanced.data_description', )} /> -
- - - +
+
{ switch (setting) { case 'quicklinks': @@ -160,14 +161,14 @@ class Overview extends PureComponent { })}
-
+ {/*
{this.state.news.title} {this.state.news.date} {this.state.news.description} {this.state.news.linkText} -
+
*/}
diff --git a/src/features/quote/Quote.jsx b/src/features/quote/Quote.jsx index b4ada133..53bc2a15 100644 --- a/src/features/quote/Quote.jsx +++ b/src/features/quote/Quote.jsx @@ -353,30 +353,6 @@ class Quote extends PureComponent { } componentDidMount() { - // const test = localStorage.getItem('quotechange'); - - // this.interval = setInterval(() => { - // if (test !== null) { - // const targetTime = Number( - // Number(localStorage.getItem('quoteStartTime')) + - // Number(localStorage.getItem('quotechange')), - // ); - // const currentTime = Number(Date.now()); - // if (currentTime >= targetTime) { - // this.setZoom(); - // this.getQuote(); - // localStorage.setItem('quoteStartTime', Date.now()); - // } else { - // try { - // this.setState(JSON.parse(localStorage.getItem('currentQuote'))); - // } catch (e) { - // this.setZoom(); - // this.getQuote(); - // } - // } - // } - // }); - this.setZoom(); EventBus.on('refresh', (data) => { @@ -418,7 +394,6 @@ class Quote extends PureComponent { componentWillUnmount() { EventBus.off('refresh'); - clearInterval(this.interval); } render() { diff --git a/src/features/stats/options/StatsOptions.jsx b/src/features/stats/options/StatsOptions.jsx index 694e4fec..3efe0e5b 100644 --- a/src/features/stats/options/StatsOptions.jsx +++ b/src/features/stats/options/StatsOptions.jsx @@ -166,7 +166,7 @@ class Stats extends PureComponent { )} {statsElement( variables.getMessage(`${STATS_SECTION}.sections.addons_installed`), - this.state.stats.marketplace['install'] ? this.state.stats.marketplace['install'].length : 0, + this.state.stats.marketplace && this.state.stats.marketplace['install'] ? this.state.stats.marketplace['install'].length : 0, )}
diff --git a/src/features/time/clock.scss b/src/features/time/clock.scss index 1c590385..4a56d7e2 100644 --- a/src/features/time/clock.scss +++ b/src/features/time/clock.scss @@ -52,6 +52,7 @@ .vertical-clock { line-height: 100%; user-select: none; + font-size: 4em; .seconds { font-size: 0.2em; diff --git a/src/i18n/locales/bn.json b/src/i18n/locales/bn.json index 84c3b433..54f1470d 100644 --- a/src/i18n/locales/bn.json +++ b/src/i18n/locales/bn.json @@ -261,16 +261,7 @@ "display": "প্রদর্শন", "display_subtitle": "পটভূমি এবং ছবির তথ্য কিভাবে লোড হয় তা পরিবর্তন করুন", "api": "API Settings", - "api_subtitle": "Options for getting an image from an external service (API)", - "interval": { - "title": "Change every", - "subtitle": "Change how often the background is updated", - "minute": "Minute", - "half_hour": "Half hour", - "hour": "Hour", - "day": "Day", - "month": "Month" - } + "api_subtitle": "Options for getting an image from an external service (API)" }, "search": { "title": "Search", diff --git a/src/i18n/locales/de_DE.json b/src/i18n/locales/de_DE.json index b936d40f..b0ec4950 100644 --- a/src/i18n/locales/de_DE.json +++ b/src/i18n/locales/de_DE.json @@ -261,16 +261,7 @@ "display": "Anzeige", "display_subtitle": "Ändern Sie, wie Hintergrund- und Fotodaten geladen werden", "api": "API Einstellung", - "api_subtitle": "Optionen für den Abruf eines Bildes von einem externen Anbieter (API)", - "interval": { - "title": "Ändern Sie alle", - "subtitle": "Ändern Sie, wie oft der Hintergrund aktualisiert wird", - "minute": "Minute", - "half_hour": "Halbe Stunde", - "hour": "Stunde", - "day": "Tag", - "month": "Monat" - } + "api_subtitle": "Optionen für den Abruf eines Bildes von einem externen Anbieter (API)" }, "search": { "title": "Suche", diff --git a/src/i18n/locales/en_GB.json b/src/i18n/locales/en_GB.json index dd18b6a8..f5d1a929 100644 --- a/src/i18n/locales/en_GB.json +++ b/src/i18n/locales/en_GB.json @@ -182,13 +182,22 @@ "greeting": { "title": "Greeting", "events": "Events", + "events_description": "Control events on Mue such as birthdays.", + "enable_events": "Show messages on special days", "default": "Default greeting message", "name": "Name for greeting", "birthday": "Birthday", "birthday_subtitle": "Show a Happy Birthday message when it is your birthday", "birthday_age": "Birthday age", "birthday_date": "Birthday date", - "additional": "Settings for the greeting display" + "additional": "Settings for the greeting display", + "custom": "Custom events", + "event_name": "Event Name", + "day": "Day", + "month": "Month", + "no_events": "No Events", + "no_events_description": "Add Some Events", + "add_event": "Add Event" }, "background": { "title": "Background", @@ -261,16 +270,7 @@ "display": "Display", "display_subtitle": "Change how background and photo information are loaded", "api": "API Settings", - "api_subtitle": "Options for getting an image from an external service (API)", - "interval": { - "title": "Change every", - "subtitle": "Change how often the background is updated", - "minute": "Minute", - "half_hour": "Half hour", - "hour": "Hour", - "day": "Day", - "month": "Month" - } + "api_subtitle": "Options for getting an image from an external service (API)" }, "search": { "title": "Search", diff --git a/src/i18n/locales/en_US.json b/src/i18n/locales/en_US.json index fa1116fe..7276ec9c 100644 --- a/src/i18n/locales/en_US.json +++ b/src/i18n/locales/en_US.json @@ -261,16 +261,7 @@ "display": "Display", "display_subtitle": "Change how background and photo information are loaded", "api": "API Settings", - "api_subtitle": "Options for getting an image from an external service (API)", - "interval": { - "title": "Change every", - "subtitle": "Change how often the background is updated", - "minute": "Minute", - "half_hour": "Half hour", - "hour": "Hour", - "day": "Day", - "month": "Month" - } + "api_subtitle": "Options for getting an image from an external service (API)" }, "search": { "title": "Search", diff --git a/src/i18n/locales/es.json b/src/i18n/locales/es.json index 1cc49e78..9b4327e3 100644 --- a/src/i18n/locales/es.json +++ b/src/i18n/locales/es.json @@ -261,16 +261,7 @@ "display": "Mostrar", "display_subtitle": "Cambiar cómo se carga la información de fondo y de la foto", "api": "Configuración de la API", - "api_subtitle": "Opciones para obtener una imagen de un servicio externo (API)", - "interval": { - "title": "Cambiar cada", - "subtitle": "Cambiar la frecuencia de actualización del fondo", - "minute": "Minuto", - "half_hour": "Media hora", - "hour": "Hora", - "day": "Día", - "month": "Mes" - } + "api_subtitle": "Opciones para obtener una imagen de un servicio externo (API)" }, "search": { "title": "Búsqueda", diff --git a/src/i18n/locales/es_419.json b/src/i18n/locales/es_419.json index d2fea57f..396a7d39 100644 --- a/src/i18n/locales/es_419.json +++ b/src/i18n/locales/es_419.json @@ -261,16 +261,7 @@ "display": "Display", "display_subtitle": "Change how background and photo information are loaded", "api": "API Settings", - "api_subtitle": "Options for getting an image from an external service (API)", - "interval": { - "title": "Cambiar cada", - "subtitle": "Change how often the background is updated", - "minute": "Minuto", - "half_hour": "Media hora", - "hour": "Hora", - "day": "Día", - "month": "Mes" - } + "api_subtitle": "Options for getting an image from an external service (API)" }, "search": { "title": "Búsqueda", diff --git a/src/i18n/locales/events/en.json b/src/i18n/locales/events/en.json deleted file mode 100644 index e69de29b..00000000 diff --git a/src/i18n/locales/fr.json b/src/i18n/locales/fr.json index 53019a5d..4ca8c37b 100644 --- a/src/i18n/locales/fr.json +++ b/src/i18n/locales/fr.json @@ -261,16 +261,7 @@ "display": "Display", "display_subtitle": "Change how background and photo information are loaded", "api": "API Settings", - "api_subtitle": "Options for getting an image from an external service (API)", - "interval": { - "title": "Change every", - "subtitle": "Change how often the background is updated", - "minute": "Minute", - "half_hour": "Half hour", - "hour": "Hour", - "day": "Day", - "month": "Month" - } + "api_subtitle": "Options for getting an image from an external service (API)" }, "search": { "title": "Barre de Recherche", diff --git a/src/i18n/locales/id_ID.json b/src/i18n/locales/id_ID.json index 6dfdbe4a..279b9e07 100644 --- a/src/i18n/locales/id_ID.json +++ b/src/i18n/locales/id_ID.json @@ -261,16 +261,7 @@ "display": "Display", "display_subtitle": "Change how background and photo information are loaded", "api": "API Settings", - "api_subtitle": "Options for getting an image from an external service (API)", - "interval": { - "title": "Ubah setiap", - "subtitle": "Change how often the background is updated", - "minute": "Menit", - "half_hour": "Setengah jam", - "hour": "Jam", - "day": "Hari", - "month": "Bulan" - } + "api_subtitle": "Options for getting an image from an external service (API)" }, "search": { "title": "Cari", diff --git a/src/i18n/locales/nl.json b/src/i18n/locales/nl.json index d9bca687..80b884b9 100644 --- a/src/i18n/locales/nl.json +++ b/src/i18n/locales/nl.json @@ -261,16 +261,7 @@ "display": "Weergave", "display_subtitle": "Verander hoe achtergrond- en foto informatie geladen wordt", "api": "API Instellingen", - "api_subtitle": "Opties voor het verkrijgen van afbeeldingen van externe bronnen (API)", - "interval": { - "title": "Change every", - "subtitle": "Verander hoe vaak de achtergrond geüpdatet wordt", - "minute": "Minute", - "half_hour": "Half hour", - "hour": "Hour", - "day": "Day", - "month": "Month" - } + "api_subtitle": "Opties voor het verkrijgen van afbeeldingen van externe bronnen (API)" }, "search": { "title": "Zoekbalk", diff --git a/src/i18n/locales/no.json b/src/i18n/locales/no.json index 2abbcd70..c58a10d5 100644 --- a/src/i18n/locales/no.json +++ b/src/i18n/locales/no.json @@ -261,16 +261,7 @@ "display": "Display", "display_subtitle": "Change how background and photo information are loaded", "api": "API Settings", - "api_subtitle": "Options for getting an image from an external service (API)", - "interval": { - "title": "Change every", - "subtitle": "Change how often the background is updated", - "minute": "Minute", - "half_hour": "Half hour", - "hour": "Hour", - "day": "Day", - "month": "Month" - } + "api_subtitle": "Options for getting an image from an external service (API)" }, "search": { "title": "Søkebar", diff --git a/src/i18n/locales/pt.json b/src/i18n/locales/pt.json index 15d2ee98..0d51086d 100644 --- a/src/i18n/locales/pt.json +++ b/src/i18n/locales/pt.json @@ -261,16 +261,7 @@ "display": "Ecrã", "display_subtitle": "Alterar como as informações de plano de fundo e foto são carregadas", "api": "Configurações da API", - "api_subtitle": "Opções para obter uma imagem de um serviço externo (API)", - "interval": { - "title": "mudar a cada", - "subtitle": "Alterar a frequência com que o plano de fundo é atualizado", - "minute": "Minuto", - "half_hour": "Meia hora", - "hour": "Hora", - "day": "Dia", - "month": "Mês" - } + "api_subtitle": "Opções para obter uma imagem de um serviço externo (API)" }, "search": { "title": "Pesquisar", diff --git a/src/i18n/locales/pt_BR.json b/src/i18n/locales/pt_BR.json index 176eeb59..b2c92277 100644 --- a/src/i18n/locales/pt_BR.json +++ b/src/i18n/locales/pt_BR.json @@ -261,16 +261,7 @@ "display": "Tela", "display_subtitle": "Alterar como as informações de plano de fundo e foto são carregadas", "api": "Configurações da API", - "api_subtitle": "Opções para obter uma imagem de um serviço externo (API)", - "interval": { - "title": "mudar a cada", - "subtitle": "Alterar a frequência com que o plano de fundo é atualizado", - "minute": "Minuto", - "half_hour": "Meia hora", - "hour": "Hora", - "day": "Dia", - "month": "Mês" - } + "api_subtitle": "Opções para obter uma imagem de um serviço externo (API)" }, "search": { "title": "Pesquisar", diff --git a/src/i18n/locales/ru.json b/src/i18n/locales/ru.json index 1dd1033a..fa5aa04d 100644 --- a/src/i18n/locales/ru.json +++ b/src/i18n/locales/ru.json @@ -261,16 +261,7 @@ "display": "Отображать", "display_subtitle": "Изменение способа загрузки фона и информации о фотографии", "api": "Настройки API", - "api_subtitle": "Варианты получения изображения из внешнего сервиса (API)", - "interval": { - "title": "Менять каждые", - "subtitle": "Изменить частоту обновления фона", - "minute": "Minute", - "half_hour": "Полчаса", - "hour": "Час", - "day": "Day", - "month": "Месяц" - } + "api_subtitle": "Варианты получения изображения из внешнего сервиса (API)" }, "search": { "title": "Панель поиска", diff --git a/src/i18n/locales/tr_TR.json b/src/i18n/locales/tr_TR.json index d2d5f8a1..6f368bba 100644 --- a/src/i18n/locales/tr_TR.json +++ b/src/i18n/locales/tr_TR.json @@ -261,16 +261,7 @@ "display": "Görüntüleme", "display_subtitle": "Arka plan ve fotoğraf bilgilerinin nasıl yüklendiğini değiştirin.", "api": "API Ayarları", - "api_subtitle": "Harici bir hizmetten (API) aracılığıyla görüntü alma seçeneklerini belirleyin.", - "interval": { - "title": "Değiştirme Sıklığı", - "subtitle": "Arka planın ne sıklıkla güncelleneceğini değiştirin.", - "minute": "Dakikada Bir", - "half_hour": "Yarım Saatte Bir", - "hour": "Saatte Bir", - "day": "Günde Bir", - "month": "Ayda Bir" - } + "api_subtitle": "Harici bir hizmetten (API) aracılığıyla görüntü alma seçeneklerini belirleyin." }, "search": { "title": "Arama", diff --git a/src/i18n/locales/zh_CN.json b/src/i18n/locales/zh_CN.json index 61eb7e3d..54ec1805 100644 --- a/src/i18n/locales/zh_CN.json +++ b/src/i18n/locales/zh_CN.json @@ -261,16 +261,7 @@ "display": "Display", "display_subtitle": "Change how background and photo information are loaded", "api": "API Settings", - "api_subtitle": "Options for getting an image from an external service (API)", - "interval": { - "title": "更改频率", - "subtitle": "Change how often the background is updated", - "minute": "每分钟", - "half_hour": "每半小时", - "hour": "每小时", - "day": "每天", - "month": "每月" - } + "api_subtitle": "Options for getting an image from an external service (API)" }, "search": { "title": "搜索栏", diff --git a/src/utils/data/default_settings.json b/src/utils/data/default_settings.json index ada36628..047bb654 100644 --- a/src/utils/data/default_settings.json +++ b/src/utils/data/default_settings.json @@ -35,10 +35,6 @@ "name": "events", "value": true }, - { - "name": "customBackgroundColour", - "value": "{\"angle\":\"180\",\"gradient\":[{\"colour\":\"#ffb032\",\"stop\":0}],\"type\":\"linear\"}" - }, { "name": "customBackground", "value": ""