fix: changelog tab and other improvements

This commit is contained in:
David Ralph
2021-04-23 16:37:23 +01:00
parent 9726ea1c89
commit 51e6582d23
6 changed files with 12 additions and 8 deletions

View File

@@ -103,6 +103,8 @@ ul {
background-color: var(--sidebar) !important;
border: none;
margin-left: 0;
width: 400px;
height: 200px;
}
.MuiCheckbox-colorPrimary.Mui-checked,

View File

@@ -51,7 +51,7 @@ export default class Text extends React.PureComponent {
<>
<p>{this.props.title} <span className='modalLink' onClick={this.resetItem}>{this.language.buttons.reset}</span></p>
{(this.props.textarea === true) ?
<textarea className='settingsTextarea' value={this.state.value} onChange={this.handleChange}/>
<textarea className='settingsTextarea' spellCheck={false} value={this.state.value} onChange={this.handleChange}/>
: <input type='text' value={this.state.value} onChange={this.handleChange}/>
}
</>

View File

@@ -3,6 +3,7 @@ import React from 'react';
import Checkbox from '../Checkbox';
import FileUpload from '../FileUpload';
import Text from '../Text';
import Switch from '../Switch';
import ResetModal from '../ResetModal';
import SettingsFunctions from '../../../../../modules/helpers/settings';
@@ -44,13 +45,13 @@ export default class AdvancedSettings extends React.PureComponent {
<FileUpload id='file-input' accept='application/json' type='settings' loadFunction={(e) => this.settingsImport(e)}/>
<h3>{advanced.customisation}</h3>
<Text title={advanced.tab_name} name='tabName' default={window.language.tabname} category='other'/>
<Text title={advanced.custom_js} name='customjs' textarea={true} element='.other'/>
<Text title={advanced.custom_css} name='customcss' textarea={true} element='.other'/>
<Text title={advanced.tab_name} name='tabName' default={window.language.tabname} category='other'/>
<h3>{this.language.sections.experimental.title}</h3>
<p>{advanced.experimental_warning}</p>
<Checkbox name='experimental' text={this.language.enabled} element='.other'/>
<p style={{ 'maxWidth': '75%'}}>{advanced.experimental_warning}</p>
<Switch name='experimental' text={this.language.enabled} element='.other'/>
<Modal onRequestClose={() => this.setState({ resetModal: false })} isOpen={this.state.resetModal} className='Modal resetmodal' overlayClassName='Overlay resetoverlay' ariaHideApp={false}>
<ResetModal modalClose={() => this.setState({ resetModal: false })} />

View File

@@ -29,7 +29,7 @@ export default class Changelog extends React.PureComponent {
}
componentDidMount() {
if (navigator.onLine || localStorage.getItem('offlineMode') === 'true') {
if (navigator.onLine === false || localStorage.getItem('offlineMode') === 'true') {
return;
}

View File

@@ -49,7 +49,7 @@ export default class Weather extends React.PureComponent {
};
if (!this.state.weather.temp) {
data = await (await fetch (window.constants.WEATHER_URL + `?city=${this.state.location}`)).json();
data = await (await fetch (window.constants.WEATHER_URL + `/current?city=${this.state.location}`)).json();
}
if (data.cod === '404') {
@@ -76,6 +76,7 @@ export default class Weather extends React.PureComponent {
temp_max = ((temp_max - 273.15) * 1.8) + 32;
temp_text = '°F';
break;
// kelvin
default: break;
}

View File

@@ -1,11 +1,11 @@
export const API_URL = 'https://api.muetab.com';
export const UNSPLASH_URL = 'https://unsplash.muetab.com';
export const MARKETPLACE_URL = 'https://marketplace.muetab.com';
export const WEATHER_URL = 'https://mueweather.ohlookitsderpy.workers.dev';
export const WEATHER_URL = 'https://weather.muetab.com';
export const WEBSITE_URL = 'https://muetab.com';
export const SPONSORS_URL = 'https://sponsors.muetab.com';
export const GITHUB_URL = 'https://api.github.com';
export const BLOG_POST = 'https://blog.muetab.com/posts/mue-marketplace';
export const BLOG_POST = 'https://blog.muetab.com/posts/version-5-0-the-big-one';
export const FEEDBACK_FORM = 'https://api.formcake.com/api/form/349b56cb-7e2b-4004-b32b-e8964d217dd1/submission';
export const DDG_PROXY = 'https://external-content.duckduckgo.com/iu/?u=';
export const OFFLINE_IMAGES = 20;