-
- {msg}
-
+
);
}
if (navigator.onLine === false || localStorage.getItem('offlineMode') === 'true') {
- return errorMessage(
- <>
-
-
{this.language.offline.title}
-
{this.language.offline.description}
- >
- );
+ return errorMessage(<>
+
+
{this.language.offline.title}
+
{this.language.offline.description}
+ >);
}
if (this.state.done === false) {
@@ -148,20 +144,18 @@ export default class Marketplace extends React.PureComponent {
{window.language.modals.main.addons.empty.title}
{this.language.no_items}
- >)
+ >);
}
return (
<>
-
+
{this.state.featured.title}
{this.state.featured.name}
-
+
-
this.toggle('item', input)} />
+ this.toggle('item', input)} />
- this.toggle()} display={this.state.display.item} />
>
diff --git a/src/components/modals/main/marketplace/sections/Sideload.jsx b/src/components/modals/main/marketplace/sections/Sideload.jsx
index c04d6b03..acedc926 100644
--- a/src/components/modals/main/marketplace/sections/Sideload.jsx
+++ b/src/components/modals/main/marketplace/sections/Sideload.jsx
@@ -14,10 +14,8 @@ export default function Sideload() {
return (
<>
-
- install(JSON.parse(e.target.result))} />
-
-
+ install(JSON.parse(e.target.result))} />
+
>
);
}
diff --git a/src/components/modals/main/scss/index.scss b/src/components/modals/main/scss/index.scss
index c23bd22e..3e48f8be 100644
--- a/src/components/modals/main/scss/index.scss
+++ b/src/components/modals/main/scss/index.scss
@@ -6,7 +6,9 @@
@import 'settings/dropdown';
@import 'settings/daypicker';
-@import './settings/react-color-picker-gradient-picker-custom-styles.scss';
+@import 'settings/react-color-picker-gradient-picker-custom-styles.scss';
+
+@import 'marketplace/main';
.Modal {
color: var(--modal-text);
diff --git a/src/scss/modules/_marketplace.scss b/src/components/modals/main/scss/marketplace/_main.scss
similarity index 87%
rename from src/scss/modules/_marketplace.scss
rename to src/components/modals/main/scss/marketplace/_main.scss
index bc785274..001f815b 100644
--- a/src/scss/modules/_marketplace.scss
+++ b/src/components/modals/main/scss/marketplace/_main.scss
@@ -106,6 +106,7 @@ p.description {
box-shadow: 0 0 10px rgb(0 0 0 / 30%);
position: absolute;
width: 300px;
+
svg {
font-size: 50px;
margin-bottom: -20px;
@@ -114,6 +115,8 @@ p.description {
.backArrow {
cursor: pointer;
+ width: 2rem !important;
+ height: 2rem !important;
&:hover {
color: grey;
@@ -158,22 +161,6 @@ p.description {
width: auto;
}
-.marketplaceanimation {
- @include animation('content 0.5s');
-}
-
-@include keyframes(content) {
- from {
- opacity: 0;
- transform: translateY(5%);
- }
-
- to {
- opacity: 1;
- transform: translateY(0%);
- }
-}
-
.featured {
margin-top: 40px;
border-radius: 15px;
@@ -197,18 +184,4 @@ p.description {
h1 {
margin-top: -20px;
}
-}
-
-.dark .featured {
- background: black;
- color: white;
-}
-
-#seemore {
- display: none;
-
- svg {
- font-size: 35px !important;
- margin-bottom: -30px;
- }
-}
+}
\ No newline at end of file
diff --git a/src/components/modals/main/scss/settings/_buttons.scss b/src/components/modals/main/scss/settings/_buttons.scss
index b66b9492..d5a23956 100644
--- a/src/components/modals/main/scss/settings/_buttons.scss
+++ b/src/components/modals/main/scss/settings/_buttons.scss
@@ -134,8 +134,7 @@
@extend %storebutton;
}
-.sideload,
-.seemore {
+.sideload {
margin-top: 12px;
}
diff --git a/src/components/widgets/background/Background.jsx b/src/components/widgets/background/Background.jsx
index 164e7219..e471c913 100644
--- a/src/components/widgets/background/Background.jsx
+++ b/src/components/widgets/background/Background.jsx
@@ -225,6 +225,18 @@ export default class Background extends React.PureComponent {
componentDidMount() {
const element = document.querySelector('#backgroundImage');
+ const refresh = () => {
+ element.classList.remove('fade-in');
+ this.setState({
+ url: '',
+ video: false,
+ photoInfo: {
+ hidden: true
+ }
+ });
+ this.getBackground();
+ }
+
EventBus.on('refresh', (data) => {
if (data === 'background') {
const backgroundType = localStorage.getItem('backgroundType');
@@ -234,15 +246,7 @@ export default class Background extends React.PureComponent {
|| (localStorage.getItem('backgroundAPI') !== this.state.currentAPI && backgroundType === 'api')
|| (backgroundType === 'custom' && localStorage.getItem('customBackground') !== this.state.url)
) {
- element.classList.remove('fade-in');
- this.setState({
- url: '',
- video: false,
- photoInfo: {
- hidden: true
- }
- });
- return this.getBackground();
+ return refresh();
}
if (this.state.video === true) {
@@ -251,6 +255,10 @@ export default class Background extends React.PureComponent {
element.style.webkitFilter = `blur(${localStorage.getItem('blur')}px) brightness(${localStorage.getItem('brightness')}%)`;
}
}
+
+ if (data === 'marketplacebackgrounduninstall') {
+ refresh();
+ }
});
this.getBackground();
diff --git a/src/modules/helpers/marketplace.js b/src/modules/helpers/marketplace.js
index e16355e6..4124b384 100644
--- a/src/modules/helpers/marketplace.js
+++ b/src/modules/helpers/marketplace.js
@@ -25,7 +25,7 @@ export default class MarketplaceFunctions {
localStorage.removeItem('photo_packs');
localStorage.setItem('backgroundType', localStorage.getItem('oldBackgroundType'));
localStorage.removeItem('oldBackgroundType');
- EventBus.dispatch('refresh', 'background');
+ EventBus.dispatch('refresh', 'marketplacebackgrounduninstall');
break;
default:
try {
diff --git a/src/scss/_variables.scss b/src/scss/_variables.scss
index c499ed98..810ddc5f 100644
--- a/src/scss/_variables.scss
+++ b/src/scss/_variables.scss
@@ -26,15 +26,15 @@ $modal: (
$marketplace: (
'item-background': rgba(242, 243, 244, 1),
- 'product-information-backgroud': rgba(242, 243, 244, 1),
+ 'product-information-backgroud': rgba(242, 243, 244, 1)
);
$button-colours: (
'confirm': rgba(46, 213, 115, 1),
'reset': rgba(255, 71, 87, 1),
- 'other': rgba(83, 82, 237, 1),
+ 'other': rgba(83, 82, 237, 1)
);
$main-parts: (
- 'shadow': 0 0 1rem 0 rgba(0, 0, 0, .2),
+ 'shadow': 0 0 1rem 0 rgba(0, 0, 0, .2)
);
diff --git a/src/scss/index.scss b/src/scss/index.scss
index 788b4256..a1e49a31 100644
--- a/src/scss/index.scss
+++ b/src/scss/index.scss
@@ -3,7 +3,6 @@
@import 'themes';
@import 'modules/toast';
-@import 'modules/marketplace';
@import 'modules/buttons';
body {