From 2b948bc70d043dfbebd341c9b613141ffa84a556 Mon Sep 17 00:00:00 2001 From: alexsparkes Date: Tue, 21 May 2024 15:09:05 +0100 Subject: [PATCH] fix(marketplace): Sideload UI, addon title, Turkish translation inconsitencies Co-authored-by: David Ralph --- .../PreferencesWrapper/PreferencesWrapper.jsx | 2 +- src/components/Layout/Settings/index.jsx | 2 +- .../background/options/BackgroundOptions.jsx | 2 +- src/features/background/options/Colour.jsx | 5 +- .../components/Elements/Lightbox/Lightbox.jsx | 2 +- .../marketplace/components/Items/Items.jsx | 7 +- src/features/marketplace/views/Added.jsx | 47 +++++- src/features/marketplace/views/Browse.jsx | 10 +- .../Items/Item.jsx => views/ItemPage.jsx} | 152 ++++++++++-------- src/features/misc/sections/Experimental.jsx | 2 +- src/features/navbar/options/NavbarOptions.jsx | 2 +- src/i18n/locales/bn.json | 4 +- src/i18n/locales/de_DE.json | 4 +- src/i18n/locales/en_GB.json | 4 +- src/i18n/locales/en_US.json | 4 +- src/i18n/locales/es.json | 4 +- src/i18n/locales/es_419.json | 4 +- src/i18n/locales/fr.json | 4 +- src/i18n/locales/id_ID.json | 4 +- src/i18n/locales/nl.json | 4 +- src/i18n/locales/no.json | 4 +- src/i18n/locales/pt.json | 4 +- src/i18n/locales/pt_BR.json | 4 +- src/i18n/locales/ru.json | 4 +- src/i18n/locales/tr_TR.json | 14 +- src/i18n/locales/zh_CN.json | 4 +- src/scss/_variables.scss | 2 + src/utils/marketplace/install.js | 17 +- 28 files changed, 200 insertions(+), 122 deletions(-) rename src/features/marketplace/{components/Items/Item.jsx => views/ItemPage.jsx} (73%) diff --git a/src/components/Layout/Settings/PreferencesWrapper/PreferencesWrapper.jsx b/src/components/Layout/Settings/PreferencesWrapper/PreferencesWrapper.jsx index 179d9a00..1b0bfa21 100644 --- a/src/components/Layout/Settings/PreferencesWrapper/PreferencesWrapper.jsx +++ b/src/components/Layout/Settings/PreferencesWrapper/PreferencesWrapper.jsx @@ -1,5 +1,5 @@ import React, { useState } from 'react'; -import { Row, Content, Action } from '../Item/SettingsItem'; +import { Row, Content, Action } from 'components/Layout/Settings/Item'; import variables from 'config/variables'; import Slider from '../../../Form/Settings/Slider/Slider'; diff --git a/src/components/Layout/Settings/index.jsx b/src/components/Layout/Settings/index.jsx index 8350f6eb..f56c0274 100644 --- a/src/components/Layout/Settings/index.jsx +++ b/src/components/Layout/Settings/index.jsx @@ -1,4 +1,4 @@ export * from './Header'; -export * from './Item'; export * from './PreferencesWrapper'; export * from './Section'; +export * from './Item'; \ No newline at end of file diff --git a/src/features/background/options/BackgroundOptions.jsx b/src/features/background/options/BackgroundOptions.jsx index cf3cd7ca..6692f0ec 100644 --- a/src/features/background/options/BackgroundOptions.jsx +++ b/src/features/background/options/BackgroundOptions.jsx @@ -4,7 +4,7 @@ import { MdSource, MdOutlineKeyboardArrowRight, MdOutlineAutoAwesome } from 'rea import { Header } from 'components/Layout/Settings'; import { Checkbox, Dropdown, Slider, Radio, Text, ChipSelect } from 'components/Form/Settings'; -import { Row, Content, Action } from 'components/Layout/Settings/Item/SettingsItem'; +import { Row, Content, Action } from 'components/Layout/Settings/Item'; //import Text from 'components/Form/Settings/Text/Text'; import ColourSettings from './Colour'; diff --git a/src/features/background/options/Colour.jsx b/src/features/background/options/Colour.jsx index 9cb189e7..456637f5 100644 --- a/src/features/background/options/Colour.jsx +++ b/src/features/background/options/Colour.jsx @@ -1,9 +1,8 @@ import variables from 'config/variables'; -import { Fragment, useState } from 'react'; +import { useState } from 'react'; import ColorPicker from 'react-best-gradient-color-picker'; import { toast } from 'react-toastify'; -import { Row, Content, Action } from 'components/Layout/Settings'; -import { Button } from 'components/Elements'; +import { Row, Content, Action } from 'components/Layout/Settings/Item'; import { MdRefresh } from 'react-icons/md'; import '../scss/_colourpicker.scss'; diff --git a/src/features/marketplace/components/Elements/Lightbox/Lightbox.jsx b/src/features/marketplace/components/Elements/Lightbox/Lightbox.jsx index 3cc17ed7..294def64 100644 --- a/src/features/marketplace/components/Elements/Lightbox/Lightbox.jsx +++ b/src/features/marketplace/components/Elements/Lightbox/Lightbox.jsx @@ -9,7 +9,7 @@ function Lightbox({ modalClose, img }) { × - Item screenshot + ItemPage screenshot ); } diff --git a/src/features/marketplace/components/Items/Items.jsx b/src/features/marketplace/components/Items/Items.jsx index 60787cb7..5b3127ec 100644 --- a/src/features/marketplace/components/Items/Items.jsx +++ b/src/features/marketplace/components/Items/Items.jsx @@ -15,7 +15,7 @@ function filterItems(item, filter) { ); } -function Item({ item, toggleFunction, type, onCollection, isCurator }) { +function ItemPage({ item, toggleFunction, type, onCollection, isCurator }) { return (
toggleFunction(item)} key={item.name}> filterItems(item, filter)) .map((item) => ( -
- {!onCollection && !isCurator ? ( + {showCreateYourOwn ? (
{variables.getMessage('modals.main.marketplace.cant_find')} diff --git a/src/features/marketplace/views/Added.jsx b/src/features/marketplace/views/Added.jsx index b49c5b4f..66a01e7c 100644 --- a/src/features/marketplace/views/Added.jsx +++ b/src/features/marketplace/views/Added.jsx @@ -5,7 +5,7 @@ import { toast } from 'react-toastify'; import Modal from 'react-modal'; import { SideloadFailedModal } from '../components/Elements/SideloadFailedModal/SideloadFailedModal'; -import Item from '../components/Items/Item'; +import ItemPage from './ItemPage'; import Items from '../components/Items/Items'; import { Dropdown, FileUpload } from 'components/Form/Settings'; import { Header, CustomActions } from 'components/Layout/Settings'; @@ -68,9 +68,12 @@ export default class Added extends PureComponent { }); } - install(input.type, input); + install(input.type, input, true, false); toast(variables.getMessage('toasts.installed')); variables.stats.postEvent('marketplace', 'Sideload'); + this.setState({ + installed: JSON.parse(localStorage.getItem('installed')), + }); } getSideloadButton() { @@ -105,7 +108,7 @@ export default class Added extends PureComponent { }, button: this.buttons.uninstall, }); - variables.stats.postEvent('marketplace', 'Item viewed'); + variables.stats.postEvent('marketplace', 'ItemPage viewed'); } else { this.setState({ item: {}, @@ -121,6 +124,7 @@ export default class Added extends PureComponent { this.setState({ button: '', installed: JSON.parse(localStorage.getItem('installed')), + item: {}, }); variables.stats.postEvent('marketplace', 'Uninstall'); @@ -135,7 +139,15 @@ export default class Added extends PureComponent { case 'oldest': break; case 'a-z': - installed.sort(); + installed.sort((a, b) => { + if (a.display_name < b.display_name) { + return -1; + } + if (a.display_name > b.display_name) { + return 1; + } + return 0; + }); break; case 'z-a': installed.sort(); @@ -158,7 +170,7 @@ export default class Added extends PureComponent { let updates = 0; this.state.installed.forEach(async (item) => { const data = await ( - await fetch(variables.constants.API_URL + 'marketplace//item/' + item.name) + await fetch(variables.constants.API_URL + 'marketplace/item/' + item.name) ).json(); if (data.version !== item.version) { updates++; @@ -176,6 +188,25 @@ export default class Added extends PureComponent { } } + removeAll() { + try { + this.state.installed.forEach((item) => { + uninstall(item.type, item.name); + }); + } catch (e) { + } + + localStorage.setItem('installed', JSON.stringify([])); + + toast(variables.getMessage('toasts.uninstalled_all')); + + this.setState({ + installed: [], + }); + + this.forceUpdate(); + } + componentDidMount() { this.sortAddons(localStorage.getItem('sortAddons'), false); } @@ -229,9 +260,10 @@ export default class Added extends PureComponent { if (this.state.item.display_name) { return ( - this.toggle()} /> ); @@ -249,6 +281,7 @@ export default class Added extends PureComponent { icon={} label={variables.getMessage('modals.main.addons.check_updates')} /> +
@@ -460,6 +461,7 @@ class Marketplace extends PureComponent { toggleFunction={(input) => this.toggle('item', input)} collectionFunction={(input) => this.toggle('collection', input)} filter={this.state.filter} + showCreateYourOwn={true} /> )} diff --git a/src/features/marketplace/components/Items/Item.jsx b/src/features/marketplace/views/ItemPage.jsx similarity index 73% rename from src/features/marketplace/components/Items/Item.jsx rename to src/features/marketplace/views/ItemPage.jsx index 53a96131..e4c5f78b 100644 --- a/src/features/marketplace/components/Items/Item.jsx +++ b/src/features/marketplace/views/ItemPage.jsx @@ -18,12 +18,12 @@ import { Header } from 'components/Layout/Settings'; import { Button } from 'components/Elements'; import { install, uninstall } from 'utils/marketplace'; -import { Carousel } from '../Elements/Carousel'; +import { Carousel } from '../components/Elements/Carousel'; import { ShareModal } from 'components/Elements'; import placeholderIcon from 'assets/icons/marketplace-placeholder.png'; -import { Items } from './Items'; +import { Items } from '../components/Items/Items'; -class Item extends PureComponent { +class ItemPage extends PureComponent { constructor(props) { super(props); this.state = { @@ -119,34 +119,33 @@ class Item extends PureComponent { ); } - let itemWarning; - if ( - this.props.data.data.language !== undefined && - this.props.data.data.language !== null && - shortLocale !== this.props.data.data.language - ) { - itemWarning = ( + const itemWarning = () => { + const template = (message) => (
Warning - {variables.getMessage('modals.main.marketplace.product.not_in_language')} + {message}
); - } - if (this.props.data.data.image_api === true) { - itemWarning = ( -
- -
- Warning - {variables.getMessage('modals.main.marketplace.product.third_party_api')} -
-
- ); - } + if (this.props.data.data.sideload === true) { + return template(variables.getMessage('modals.main.marketplace.product.sideload_warning')); + } + + if (this.props.data.data.image_api === true) { + return template(variables.getMessage('modals.main.marketplace.product.third_party_api')); + } + + if (this.props.data.data.language !== undefined && this.props.data.data.language !== null) { + if (shortLocale !== this.props.data.data.language) { + return template(variables.getMessage('modals.main.marketplace.product.not_in_language')); + } + } + + return null; + }; const moreInfoItem = (icon, header, text) => (
@@ -158,31 +157,7 @@ class Item extends PureComponent {
); - const DataTable = ({ data, title, value, incrementCount, count }) => ( - <> - - - - - - - {data.slice(0, count).map((item, index) => ( - - - - - ))} - -
{variables.getMessage(title)}{variables.getMessage(value)}
{item.quote || item.key}{item.author || item.value}
-
- - {count !== data.length - ? variables.getMessage('modals.main.marketplace.product.show_all') - : variables.getMessage('modals.main.marketplace.product.show_less')} - -
- - ); + console.log(this.props.data.data) return ( <> @@ -203,11 +178,13 @@ class Item extends PureComponent {
0 - ? this.props.data.data.in_collections[0].display_name - : variables.getMessage('modals.main.navbar.marketplace') + this.props.addons + ? variables.getMessage('modals.main.addons.added') + : this.props.data.data.in_collections?.length > 0 + ? this.props.data.data.in_collections[0].display_name + : variables.getMessage('modals.main.navbar.marketplace') } - secondaryTitle={this.props.data.data.display_name} + secondaryTitle={this.props.data.data.sideload ? this.props.data.data.name : this.props.data.data.display_name} report={false} goBack={this.props.toggleFunction} /> @@ -219,7 +196,7 @@ class Item extends PureComponent { variables.getMessage('modals.main.marketplace.product.created_by'), this.props.data.author, )} - {itemWarning} + {itemWarning()}
{this.props.data.data.photos && (
@@ -249,22 +226,56 @@ class Item extends PureComponent { />
{this.props.data.data.quotes && ( - this.incrementCount('quotes')} - count={this.state.count} - /> + <> + + + + + + + {this.props.data.data.quotes.slice(0, this.state.count).map((quote, index) => ( + + + + + ))} + +
{variables.getMessage('modals.main.settings.sections.quote.title')}{variables.getMessage('modals.main.settings.sections.quote.author')}
{quote.quote}{quote.author}
+
+ this.incrementCount('quotes')}> + {this.state.count !== this.props.data.data.quotes.length + ? variables.getMessage('modals.main.marketplace.product.show_all') + : variables.getMessage('modals.main.marketplace.product.show_less')} + +
+ )} {this.props.data.data.settings && ( - this.incrementCount('settings')} - count={this.state.count} - /> + <> + + + + + + + {Object.entries(this.props.data.data.settings) + .slice(0, this.state.count) + .map(([key, value]) => ( + + + + + ))} + +
{variables.getMessage('modals.main.marketplace.product.setting')}{variables.getMessage('modals.main.marketplace.product.value')}
{key}{value}
+
+ this.incrementCount('settings')}> + {this.state.count !== this.props.data.data.settings.length + ? variables.getMessage('modals.main.marketplace.product.show_all') + : variables.getMessage('modals.main.marketplace.product.show_less')} + +
+ )}
@@ -353,7 +364,7 @@ class Item extends PureComponent { tooltipKey="report" />
- {this.props.data.data.in_collections.length > 0 && ( + {this.props.data.data.in_collections?.length > 0 && (
@@ -387,12 +398,13 @@ class Item extends PureComponent { 0.5 - Math.random()).slice(0, 3)} onCollection={this.state.collection} toggleFunction={(input) => this.props.toggleFunction('item', input)} collectionFunction={(input) => this.props.toggleFunction('collection', input)} filter={''} moreByCreator={true} + showCreateYourOwn={false} />
@@ -402,4 +414,4 @@ class Item extends PureComponent { } } -export { Item as default, Item }; +export { ItemPage as default, ItemPage }; diff --git a/src/features/misc/sections/Experimental.jsx b/src/features/misc/sections/Experimental.jsx index d962930f..9ed13ecf 100644 --- a/src/features/misc/sections/Experimental.jsx +++ b/src/features/misc/sections/Experimental.jsx @@ -7,7 +7,7 @@ import { TextField } from '@mui/material'; import EventBus from 'utils/eventbus'; import values from 'utils/data/slider_values.json'; -import { Row, Content, Action } from 'components/Layout/Settings/Item/SettingsItem'; +import { Row, Content, Action } from 'components/Layout/Settings/Item'; function ExperimentalOptions() { const [eventType, setEventType] = useState(); diff --git a/src/features/navbar/options/NavbarOptions.jsx b/src/features/navbar/options/NavbarOptions.jsx index 32d455b3..b32394e5 100644 --- a/src/features/navbar/options/NavbarOptions.jsx +++ b/src/features/navbar/options/NavbarOptions.jsx @@ -18,7 +18,7 @@ import { Checkbox, Dropdown } from 'components/Form'; import { Button } from 'components/Elements'; import EventBus from 'utils/eventbus'; -import { Row, Content, Action } from 'components/Layout/Settings'; +import { Row, Content, Action } from 'components/Layout/Settings/Item'; import { Header } from 'components/Layout/Settings'; import { getTitleFromUrl, isValidUrl } from 'utils/links'; import { QuickLinks } from 'features/quicklinks'; diff --git a/src/i18n/locales/bn.json b/src/i18n/locales/bn.json index 40db932a..57d601d5 100644 --- a/src/i18n/locales/bn.json +++ b/src/i18n/locales/bn.json @@ -525,13 +525,14 @@ "knowledgebase_one": "Visit the", "knowledgebase_two": "knowledgebase", "knowledgebase_three": "to create your own.", + "installing": "Installing", "product": { "overview": "Overview", "information": "Information", "last_updated": "Last Updated", "description": "Description", "details": "Details", - "more_from_curator": "More from {name}", + "more_from_curator": "More like this from {name}", "show_more": "Show More", "show_less": "Show Less", "show_all": "Show All", @@ -551,6 +552,7 @@ }, "not_in_language": "This add-on is not in your language", "third_party_api": "This add-on uses a third-party API", + "sideload_warning": "This add-on has been sideloaded.", "setting": "Setting", "value": "Value" }, diff --git a/src/i18n/locales/de_DE.json b/src/i18n/locales/de_DE.json index 4a008078..c2a4a859 100644 --- a/src/i18n/locales/de_DE.json +++ b/src/i18n/locales/de_DE.json @@ -525,13 +525,14 @@ "knowledgebase_one": "Besuchen Sie die", "knowledgebase_two": "Wissensdatenbank", "knowledgebase_three": "um Ihr eigenes zu erstellen.", + "installing": "Installing", "product": { "overview": "Übersicht", "information": "Information", "last_updated": "Letzte Aktualisierung", "description": "Beschreibung", "details": "Details", - "more_from_curator": "More from {name}", + "more_from_curator": "More like this from {name}", "show_more": "Mehr anzeigen", "show_less": "Weniger anzeigen", "show_all": "Alle anzeigen", @@ -551,6 +552,7 @@ }, "not_in_language": "This add-on is not in your language", "third_party_api": "This add-on uses a third-party API", + "sideload_warning": "This add-on has been sideloaded.", "setting": "Einstellung", "value": "Wert" }, diff --git a/src/i18n/locales/en_GB.json b/src/i18n/locales/en_GB.json index 11f70b71..60ac463c 100644 --- a/src/i18n/locales/en_GB.json +++ b/src/i18n/locales/en_GB.json @@ -525,13 +525,14 @@ "knowledgebase_one": "Visit the", "knowledgebase_two": "knowledgebase", "knowledgebase_three": "to create your own.", + "installing": "Installing", "product": { "overview": "Overview", "information": "Information", "last_updated": "Last Updated", "description": "Description", "details": "Details", - "more_from_curator": "More from {name}", + "more_from_curator": "More like this from {name}", "show_more": "Show More", "show_less": "Show Less", "show_all": "Show All", @@ -551,6 +552,7 @@ }, "not_in_language": "This add-on is not in your language", "third_party_api": "This add-on uses a third-party API", + "sideload_warning": "This add-on has been sideloaded.", "setting": "Setting", "value": "Value" }, diff --git a/src/i18n/locales/en_US.json b/src/i18n/locales/en_US.json index c9ec2b35..c9ecdacb 100644 --- a/src/i18n/locales/en_US.json +++ b/src/i18n/locales/en_US.json @@ -525,13 +525,14 @@ "knowledgebase_one": "Visit the", "knowledgebase_two": "knowledgebase", "knowledgebase_three": "to create your own.", + "installing": "Installing", "product": { "overview": "Overview", "information": "Information", "last_updated": "Last Updated", "description": "Description", "details": "Details", - "more_from_curator": "More from {name}", + "more_from_curator": "More like this from {name}", "show_more": "Show More", "show_less": "Show Less", "show_all": "Show All", @@ -551,6 +552,7 @@ }, "not_in_language": "This add-on is not in your language", "third_party_api": "This add-on uses a third-party API", + "sideload_warning": "This add-on has been sideloaded.", "setting": "Setting", "value": "Value" }, diff --git a/src/i18n/locales/es.json b/src/i18n/locales/es.json index c657e02c..09e1d47e 100644 --- a/src/i18n/locales/es.json +++ b/src/i18n/locales/es.json @@ -525,13 +525,14 @@ "knowledgebase_one": "Visite la", "knowledgebase_two": "Base de conocimiento", "knowledgebase_three": "para crear la suya propia.", + "installing": "Installing", "product": { "overview": "Vista general", "information": "Información", "last_updated": "Última actualización", "description": "Descripción", "details": "Details", - "more_from_curator": "More from {name}", + "more_from_curator": "More like this from {name}", "show_more": "Mostrar más", "show_less": "Mostrar menos", "show_all": "Mostrar todo", @@ -551,6 +552,7 @@ }, "not_in_language": "This add-on is not in your language", "third_party_api": "This add-on uses a third-party API", + "sideload_warning": "This add-on has been sideloaded.", "setting": "Ajustes", "value": "Valor" }, diff --git a/src/i18n/locales/es_419.json b/src/i18n/locales/es_419.json index e6e8dbcf..9017def4 100644 --- a/src/i18n/locales/es_419.json +++ b/src/i18n/locales/es_419.json @@ -525,13 +525,14 @@ "knowledgebase_one": "Visit the", "knowledgebase_two": "knowledgebase", "knowledgebase_three": "to create your own.", + "installing": "Installing", "product": { "overview": "Vista general", "information": "Información", "last_updated": "Última actualización", "description": "Description", "details": "Details", - "more_from_curator": "More from {name}", + "more_from_curator": "More like this from {name}", "show_more": "Show More", "show_less": "Show Less", "show_all": "Show All", @@ -551,6 +552,7 @@ }, "not_in_language": "This add-on is not in your language", "third_party_api": "This add-on uses a third-party API", + "sideload_warning": "This add-on has been sideloaded.", "setting": "Setting", "value": "Value" }, diff --git a/src/i18n/locales/fr.json b/src/i18n/locales/fr.json index 69f5ab88..04d651df 100644 --- a/src/i18n/locales/fr.json +++ b/src/i18n/locales/fr.json @@ -525,13 +525,14 @@ "knowledgebase_one": "Visit the", "knowledgebase_two": "knowledgebase", "knowledgebase_three": "to create your own.", + "installing": "Installing", "product": { "overview": "Aperçu", "information": "Information", "last_updated": "Dernière mise à jour", "description": "Description", "details": "Details", - "more_from_curator": "More from {name}", + "more_from_curator": "More like this from {name}", "show_more": "Show More", "show_less": "Show Less", "show_all": "Show All", @@ -551,6 +552,7 @@ }, "not_in_language": "This add-on is not in your language", "third_party_api": "This add-on uses a third-party API", + "sideload_warning": "This add-on has been sideloaded.", "setting": "Setting", "value": "Value" }, diff --git a/src/i18n/locales/id_ID.json b/src/i18n/locales/id_ID.json index 304405cf..525f6816 100644 --- a/src/i18n/locales/id_ID.json +++ b/src/i18n/locales/id_ID.json @@ -525,13 +525,14 @@ "knowledgebase_one": "Visit the", "knowledgebase_two": "knowledgebase", "knowledgebase_three": "to create your own.", + "installing": "Installing", "product": { "overview": "Ikhtisar", "information": "Informasi", "last_updated": "Pembaruan Terakhir", "description": "Description", "details": "Details", - "more_from_curator": "More from {name}", + "more_from_curator": "More like this from {name}", "show_more": "Show More", "show_less": "Show Less", "show_all": "Show All", @@ -551,6 +552,7 @@ }, "not_in_language": "This add-on is not in your language", "third_party_api": "This add-on uses a third-party API", + "sideload_warning": "This add-on has been sideloaded.", "setting": "Setting", "value": "Value" }, diff --git a/src/i18n/locales/nl.json b/src/i18n/locales/nl.json index 44340919..21ee45a3 100644 --- a/src/i18n/locales/nl.json +++ b/src/i18n/locales/nl.json @@ -525,13 +525,14 @@ "knowledgebase_one": "Bezoek de", "knowledgebase_two": "kennisbank", "knowledgebase_three": "Om je eigen te creëren.", + "installing": "Installing", "product": { "overview": "Overzicht", "information": "Informatie", "last_updated": "Laatst geüpdatet", "description": "Beschrijving", "details": "Details", - "more_from_curator": "More from {name}", + "more_from_curator": "More like this from {name}", "show_more": "Toon Meer", "show_less": "Toon Minder", "show_all": "Toon Alles", @@ -551,6 +552,7 @@ }, "not_in_language": "This add-on is not in your language", "third_party_api": "This add-on uses a third-party API", + "sideload_warning": "This add-on has been sideloaded.", "setting": "Instelling", "value": "Waarde" }, diff --git a/src/i18n/locales/no.json b/src/i18n/locales/no.json index fe263978..6116b820 100644 --- a/src/i18n/locales/no.json +++ b/src/i18n/locales/no.json @@ -525,13 +525,14 @@ "knowledgebase_one": "Visit the", "knowledgebase_two": "knowledgebase", "knowledgebase_three": "to create your own.", + "installing": "Installing", "product": { "overview": "Oversikt", "information": "Informasjon", "last_updated": "Sist oppdatert", "description": "Description", "details": "Details", - "more_from_curator": "More from {name}", + "more_from_curator": "More like this from {name}", "show_more": "Show More", "show_less": "Show Less", "show_all": "Show All", @@ -551,6 +552,7 @@ }, "not_in_language": "This add-on is not in your language", "third_party_api": "This add-on uses a third-party API", + "sideload_warning": "This add-on has been sideloaded.", "setting": "Setting", "value": "Value" }, diff --git a/src/i18n/locales/pt.json b/src/i18n/locales/pt.json index 644b0669..107e5eb3 100644 --- a/src/i18n/locales/pt.json +++ b/src/i18n/locales/pt.json @@ -525,13 +525,14 @@ "knowledgebase_one": "Visite a", "knowledgebase_two": "base de conhecimento", "knowledgebase_three": "para criar o seu próprio.", + "installing": "Installing", "product": { "overview": "Visão geral", "information": "Informações", "last_updated": "Ultima atualização", "description": "Descrição", "details": "Details", - "more_from_curator": "More from {name}", + "more_from_curator": "More like this from {name}", "show_more": "Mostrar mais", "show_less": "Mostrar menos", "show_all": "Mostrar tudo", @@ -551,6 +552,7 @@ }, "not_in_language": "This add-on is not in your language", "third_party_api": "This add-on uses a third-party API", + "sideload_warning": "This add-on has been sideloaded.", "setting": "Configuração", "value": "Valor" }, diff --git a/src/i18n/locales/pt_BR.json b/src/i18n/locales/pt_BR.json index fb3dc627..3a528a8d 100644 --- a/src/i18n/locales/pt_BR.json +++ b/src/i18n/locales/pt_BR.json @@ -525,13 +525,14 @@ "knowledgebase_one": "Visite a", "knowledgebase_two": "base de conhecimento", "knowledgebase_three": "para criar o seu próprio.", + "installing": "Installing", "product": { "overview": "Visão geral", "information": "Informações", "last_updated": "Ultima atualização", "description": "Descrição", "details": "Details", - "more_from_curator": "More from {name}", + "more_from_curator": "More like this from {name}", "show_more": "Mostrar mais", "show_less": "Mostrar menos", "show_all": "Mostrar tudo", @@ -551,6 +552,7 @@ }, "not_in_language": "This add-on is not in your language", "third_party_api": "This add-on uses a third-party API", + "sideload_warning": "This add-on has been sideloaded.", "setting": "Configuração", "value": "Valor" }, diff --git a/src/i18n/locales/ru.json b/src/i18n/locales/ru.json index bf2ddbe5..e1baa14d 100644 --- a/src/i18n/locales/ru.json +++ b/src/i18n/locales/ru.json @@ -525,13 +525,14 @@ "knowledgebase_one": "Посетить", "knowledgebase_two": "база знаний", "knowledgebase_three": "чтобы создать свой собственный.", + "installing": "Installing", "product": { "overview": "Обзор", "information": "Информация", "last_updated": "Последнее обновление", "description": "Описание", "details": "Details", - "more_from_curator": "More from {name}", + "more_from_curator": "More like this from {name}", "show_more": "Показать больше", "show_less": "Показать меньше", "show_all": "Показать все", @@ -551,6 +552,7 @@ }, "not_in_language": "This add-on is not in your language", "third_party_api": "This add-on uses a third-party API", + "sideload_warning": "This add-on has been sideloaded.", "setting": "Параметр", "value": "Цена" }, diff --git a/src/i18n/locales/tr_TR.json b/src/i18n/locales/tr_TR.json index 43e7ce05..6e736ffb 100644 --- a/src/i18n/locales/tr_TR.json +++ b/src/i18n/locales/tr_TR.json @@ -252,7 +252,7 @@ "drop_to_upload": "Yüklemek için bırakın!", "formats": "Kullanılabilir biçimler: {list}", "select": "Veya Seç", - "add_url": "URL/Uzantı Ekle", + "add_url": "URL Ekle", "disabled": "Kullanılamaz", "loop_video": "Tekrarlayan video", "mute_video": "Videonun sesini kapat.", @@ -277,7 +277,7 @@ "additional": "Arama widget'ı ekranı ve işlevselliği için ek seçenekleri belirleyin.", "search_engine": "Arama Motoru", "search_engine_subtitle": "Arama çubuğunda kullanmak için arama motorunu seçin.", - "custom": "Özel URL/bağlantı", + "custom": "Özel URL", "autocomplete": "Otomatik Tamamlama", "autocomplete_provider": "Otomatik Tamamlama Sağlayıcısı", "autocomplete_provider_subtitle": "Otomatik tamamlama açılır sonuçları için kullanılacak arama motorunu belirleyin.", @@ -463,7 +463,7 @@ }, "experimental": { "title": "Deneysel Özellikler", - "warning": "Bu ayarlar tam olarak test edilmedi/uygulanmadı ve düzgün çalışmayabilir!", + "warning": "Bu ayarlar tam olarak test edilmedi ve düzgün çalışmayabilir!", "developer": "Geliştirici" }, "language": { @@ -525,13 +525,14 @@ "knowledgebase_one": "Kendiniz oluşturmak için ", "knowledgebase_two": "bilgilendirme sayfamızı ", "knowledgebase_three": "ziyaret edin.", + "installing": "Installing", "product": { "overview": "Genel Bakış", "information": "Bilgi", "last_updated": "Son Güncelleme", - "description": "Açıklama/Tanım", + "description": "Açıklama", "details": "Details", - "more_from_curator": "More from {name}", + "more_from_curator": "More like this from {name}", "show_more": "Daha Fazla Göster", "show_less": "Daha Az Göster", "show_all": "Hepsini Göster", @@ -547,10 +548,11 @@ "remove": "Kaldır", "update_addon": "Eklentiyi Güncelle", "back": "Geri", - "report": "Bildir/Raporla" + "report": "Raporla" }, "not_in_language": "This add-on is not in your language", "third_party_api": "This add-on uses a third-party API", + "sideload_warning": "This add-on has been sideloaded.", "setting": "Ayarlar", "value": "Değer" }, diff --git a/src/i18n/locales/zh_CN.json b/src/i18n/locales/zh_CN.json index ba9472be..4d0a467c 100644 --- a/src/i18n/locales/zh_CN.json +++ b/src/i18n/locales/zh_CN.json @@ -525,13 +525,14 @@ "knowledgebase_one": "Visit the", "knowledgebase_two": "knowledgebase", "knowledgebase_three": "to create your own.", + "installing": "Installing", "product": { "overview": "总览", "information": "信息", "last_updated": "更新日期", "description": "Description", "details": "Details", - "more_from_curator": "More from {name}", + "more_from_curator": "More like this from {name}", "show_more": "Show More", "show_less": "Show Less", "show_all": "Show All", @@ -551,6 +552,7 @@ }, "not_in_language": "This add-on is not in your language", "third_party_api": "This add-on uses a third-party API", + "sideload_warning": "This add-on has been sideloaded.", "setting": "Setting", "value": "Value" }, diff --git a/src/scss/_variables.scss b/src/scss/_variables.scss index 23896c01..d57f4075 100644 --- a/src/scss/_variables.scss +++ b/src/scss/_variables.scss @@ -97,6 +97,7 @@ $themes: ( box-shadow: t($boxShadow); } + -webkit-backdrop-filter: blur(map.get($ui-elements, 'backgroundBlur')); backdrop-filter: blur(map.get($ui-elements, 'backgroundBlur')); .title { @@ -131,6 +132,7 @@ $themes: ( .backTitle { cursor: pointer; + transition: 0.5s; @include themed { color: t($subColor); diff --git a/src/utils/marketplace/install.js b/src/utils/marketplace/install.js index 84c899c5..fc74b66d 100644 --- a/src/utils/marketplace/install.js +++ b/src/utils/marketplace/install.js @@ -10,7 +10,7 @@ function showReminder() { localStorage.setItem('showReminder', true); } -export function install(type, input, sideload) { +export function install(type, input, sideload, collection) { switch (type) { case 'settings': localStorage.removeItem('backup_settings'); @@ -45,7 +45,9 @@ export function install(type, input, sideload) { EventBus.emit('refresh', 'background'); // TODO: make this legitimately good and work without a reload - currently we just refresh sleep(4000); - window.location.reload(); + if (!collection) { + window.location.reload(); + } break; case 'quotes': @@ -70,15 +72,10 @@ export function install(type, input, sideload) { const installed = JSON.parse(localStorage.getItem('installed')); if (sideload) { - installed.push({ - content: { - updated: 'Unpublished', - data: input, - }, - }); - } else { - installed.push(input); + input.sideload = true; } + installed.push(input); + localStorage.setItem('installed', JSON.stringify(installed)); }