mirror of
https://github.com/mue/mue.git
synced 2026-07-16 21:44:22 +02:00
fix: bug fixes
Co-authored-by: Alex Sparkes <turbomarshmello@gmail.com>
This commit is contained in:
@@ -107,8 +107,7 @@ export default class Added extends React.PureComponent {
|
||||
<div className='emptyMessage'>
|
||||
<LocalMallIcon/>
|
||||
<h1>Empty</h1>
|
||||
<p className='description'>Nothing here (yet)</p>
|
||||
<button className='goToMarket'>Take me there</button>
|
||||
<p className='description'>No addons are installed</p>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -115,11 +115,13 @@ ul.sidebar {
|
||||
left: 0;
|
||||
margin: 0;
|
||||
padding-left: 0;
|
||||
height: 100vh;
|
||||
height: 20%;
|
||||
background: var(--sidebar);
|
||||
border-radius: 12px 0 0 12px;
|
||||
text-align: left;
|
||||
font-size: 24px;
|
||||
padding-bottom: 100%;
|
||||
margin-bottom: -100%;
|
||||
|
||||
h1 {
|
||||
text-align: center;
|
||||
@@ -163,11 +165,6 @@ li {
|
||||
background: var(--tab-active);
|
||||
}
|
||||
|
||||
@media only screen and (max-height: 898px) {
|
||||
ul.sidebar {
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 1200px) {
|
||||
li.tab-list-item {
|
||||
|
||||
@@ -68,9 +68,9 @@
|
||||
.uploadbg,
|
||||
.import {
|
||||
@extend %settingsButton;
|
||||
background-color: map-get($button-colours, 'other');
|
||||
border: 2px solid map-get($button-colours, 'other');
|
||||
color: map-get($theme-colours, 'main');
|
||||
background-color: map-get($modal, 'sidebar');
|
||||
border: none;
|
||||
color: map-get($theme-colours, 'secondary');
|
||||
|
||||
&:hover {
|
||||
color: map-get($button-colours, 'other');
|
||||
|
||||
@@ -86,7 +86,7 @@ export default class Widgets extends React.PureComponent {
|
||||
<div id='widgets'>
|
||||
{this.enabled('searchBar') ? <Search/> : null}
|
||||
{elements}
|
||||
{this.enabled('weatherEnabled') ? <Weather/> : null}
|
||||
{this.enabled('weatherEnabled') && (localStorage.getItem('offlineMode') === 'false') ? <Weather/> : null}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -82,12 +82,14 @@ export default class Background extends React.PureComponent {
|
||||
|
||||
// Main background getting function
|
||||
async getBackground() {
|
||||
if (localStorage.getItem('offlineMode') === 'true') {
|
||||
return this.offlineBackground();
|
||||
}
|
||||
const offline = (localStorage.getItem('offlineMode') === 'true');
|
||||
|
||||
switch (localStorage.getItem('backgroundType')) {
|
||||
case 'api':
|
||||
if (offline) {
|
||||
return this.offlineBackground();
|
||||
}
|
||||
|
||||
// favourite button
|
||||
const favourited = JSON.parse(localStorage.getItem('favourite'));
|
||||
if (favourited) {
|
||||
@@ -155,6 +157,12 @@ export default class Background extends React.PureComponent {
|
||||
case 'custom':
|
||||
// custom user background
|
||||
const customBackground = localStorage.getItem('customBackground');
|
||||
|
||||
// allow users to use offline images
|
||||
if (offline && !customBackground.startsWith('data:')) {
|
||||
return this.offlineBackground();
|
||||
}
|
||||
|
||||
if (customBackground !== '') {
|
||||
// video background
|
||||
if (customBackground.endsWith('.mp4') || customBackground.endsWith('.webm') || customBackground.endsWith('.ogg')) {
|
||||
@@ -178,6 +186,10 @@ export default class Background extends React.PureComponent {
|
||||
break;
|
||||
|
||||
case 'photo_pack':
|
||||
if (offline) {
|
||||
return this.offlineBackground();
|
||||
}
|
||||
|
||||
// photo pack
|
||||
const photoPack = JSON.parse(localStorage.getItem('photo_packs'));
|
||||
if (photoPack) {
|
||||
|
||||
@@ -139,9 +139,13 @@ export default class Quote extends React.PureComponent {
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
// todo: fix (localStorage.getItem('favouriteQuoteEnabled') === 'false')
|
||||
let favouriteQuote = '';
|
||||
if (localStorage.getItem('favouriteQuoteEnabled') === 'true') {
|
||||
favouriteQuote = localStorage.getItem('favouriteQuote') ? <StarIcon className='copyButton' onClick={() => this.favourite()} /> : <StarIcon2 className='copyButton' onClick={() => this.favourite()} />;
|
||||
}
|
||||
|
||||
this.setState({
|
||||
favourited: localStorage.getItem('favouriteQuote') ? <StarIcon className='copyButton' onClick={() => this.favourite()} /> : null,
|
||||
favourited: favouriteQuote,
|
||||
copy: (localStorage.getItem('copyButton') === 'false') ? null : this.state.copy,
|
||||
tweet: (localStorage.getItem('tweetButton') === 'false') ? null : this.state.tweet
|
||||
});
|
||||
|
||||
@@ -15,6 +15,9 @@
|
||||
.quoteauthor {
|
||||
font-size: 0.9em;
|
||||
letter-spacing: 0.5px;
|
||||
svg {
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.copyButton {
|
||||
|
||||
@@ -162,5 +162,9 @@
|
||||
{
|
||||
"name": "temperatureformat",
|
||||
"value": "celsius"
|
||||
},
|
||||
{
|
||||
"name": "authorLink",
|
||||
"value": true
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user