This commit is contained in:
alexsparkes
2022-08-19 12:50:14 +01:00
parent 8613a71cf7
commit b26e07722f
20 changed files with 186 additions and 127 deletions

View File

@@ -353,7 +353,7 @@ export default class Marketplace extends PureComponent {
</div>
<div className="headerExtras marketplaceCondition">
<span className="link" onClick={() => this.reloadItems()}>
<MdRefresh /> Refresh
<MdRefresh /> {this.getMessage('widgets.navbar.tooltips.refresh')}
</span>
<Dropdown
label={this.getMessage('modals.main.addons.sort.title')}

View File

@@ -17,8 +17,8 @@ export default class TimeSettings extends PureComponent {
super();
this.state = {
timeType: localStorage.getItem('timeType') || 'digital',
hourColour: localStorage.getItem('hourColour') || '#fff',
minuteColour: localStorage.getItem('minuteColour') || '#fff',
hourColour: localStorage.getItem('hourColour') || '#ffffff',
minuteColour: localStorage.getItem('minuteColour') || '#ffffff',
};
}
@@ -35,11 +35,11 @@ export default class TimeSettings extends PureComponent {
}
resetHourColour() {
localStorage.setItem('hourColour', '#fff')
localStorage.setItem('hourColour', '#ffffff')
}
resetMinuteColour() {
localStorage.setItem('minuteColour', '#fff')
localStorage.setItem('minuteColour', '#ffffff')
}
@@ -119,7 +119,7 @@ export default class TimeSettings extends PureComponent {
const verticalClock = (
<>
<SettingsItem title="Change minute text hour colour" subtitle="">
<SettingsItem title={getMessage('modals.main.settings.sections.time.vertical_clock.change_hour_colour')} subtitle="">
<div className="colourInput">
<input
type="color"
@@ -136,7 +136,7 @@ export default class TimeSettings extends PureComponent {
{getMessage('modals.main.settings.buttons.reset')}
</span>
</SettingsItem>
<SettingsItem title="Change minute text minute colour" subtitle="">
<SettingsItem title={getMessage('modals.main.settings.sections.time.vertical_clock.change_minute_colour')} subtitle="">
<div className="colourInput">
<input
type="color"
@@ -194,7 +194,7 @@ export default class TimeSettings extends PureComponent {
<option value="percentageComplete">
{getMessage('modals.main.settings.sections.time.percentage_complete')}
</option>
<option value="verticalClock">Vertical Clock</option>
<option value="verticalClock">{getMessage('modals.main.settings.sections.time.vertical_clock.title')}</option>
</Dropdown>
</SettingsItem>
{timeSettings}

View File

@@ -116,49 +116,6 @@ export default class TimeSettings extends PureComponent {
category="weather"
/>
</SettingsItem>
{localStorage.getItem('weatherType') > 1 && (
<SettingsItem title="Active bit" subtitle="idk a better word for it sorry">
<Dropdown label="Type" name="weatherActiveBit" category="weather">
<option value="weatherdescription">
{getMessage('modals.main.settings.sections.weather.extra_info.show_description')}{' '}
</option>
<option value="cloudiness">
{getMessage('modals.main.settings.sections.weather.extra_info.cloudiness')}
</option>
<option value="humidity">
{getMessage('modals.main.settings.sections.weather.extra_info.humidity')}
</option>
<option value="visibility">
{getMessage('modals.main.settings.sections.weather.extra_info.visibility')}
</option>
<option
value="windspeed"
onChange={() =>
this.setState({
windSpeed: localStorage.getItem('windspeed') !== 'true',
})
}
>
{getMessage('modals.main.settings.sections.weather.extra_info.wind_speed')}
</option>
<option value="windDirection" disabled={this.state.windSpeed}>
{getMessage('modals.main.settings.sections.weather.extra_info.wind_direction')}
</option>
<option value="mintemp">
{getMessage('modals.main.settings.sections.weather.extra_info.min_temp')}
</option>
<option value="maxtemp">
{getMessage('modals.main.settings.sections.weather.extra_info.max_temp')}
</option>
<option value="feelsliketemp">Feels like temperature</option>
<option value="atmosphericpressure">
{getMessage(
'modals.main.settings.sections.weather.extra_info.atmospheric_pressure',
)}
</option>
</Dropdown>
</SettingsItem>
)}
{localStorage.getItem('weatherType') == 4 && (
<SettingsItem title="Custom Settings">
<Checkbox

View File

@@ -8,7 +8,7 @@ export default function Marketplace(props) {
return (
<Tabs changeTab={(type) => props.changeTab(type)} current="marketplace">
<div label="All" name="all">
<div label={getMessage('modals.main.marketplace.all')} name="all">
<MarketplaceTab type="all" />
</div>
<div label={getMessage('modals.main.marketplace.photo_packs')} name="photo_packs">
@@ -20,7 +20,7 @@ export default function Marketplace(props) {
<div label={getMessage('modals.main.marketplace.preset_settings')} name="preset_settings">
<MarketplaceTab type="preset_settings" />
</div>
<div label="Collections" name="collections">
<div label={getMessage('modals.main.marketplace.collection')} name="collections">
<MarketplaceTab type="collections" />
</div>
</Tabs>

View File

@@ -118,6 +118,7 @@ function Tab({ label, currentTab, onClick, navbarTab }) {
break;
case getMessage('modals.main.addons.added'):
mue = true;
icon = <Added />;
break;
case getMessage('modals.main.addons.sideload.title'):
@@ -130,6 +131,7 @@ function Tab({ label, currentTab, onClick, navbarTab }) {
case getMessage('modals.main.marketplace.all'):
icon = <Addons />;
divider = true;
mue = true;
break;
case getMessage('modals.main.marketplace.photo_packs'):
icon = <Background />;
@@ -140,7 +142,7 @@ function Tab({ label, currentTab, onClick, navbarTab }) {
case getMessage('modals.main.marketplace.preset_settings'):
icon = <Advanced />;
break;
case 'Collections':
case getMessage('modals.main.marketplace.collection'):
icon = <Collections />;
break;

View File

@@ -107,17 +107,30 @@ class Notes extends PureComponent {
</span>
</div>
<div className="notes-buttons">
<Tooltip title="Pin">
<Tooltip
title={variables.language.getMessage(
variables.languagecode,
'widgets.navbar.todo.pin',
)}
>
<button onClick={() => this.pin()}>
<MdPushPin />
</button>
</Tooltip>
<Tooltip title="Copy">
<Tooltip
title={variables.language.getMessage(
variables.languagecode,
'widgets.quote.copy',
)}
>
<button onClick={() => this.copy()}>
<MdContentCopy />
</button>
</Tooltip>
<Tooltip title="Download">
<Tooltip title={variables.language.getMessage(
variables.languagecode,
'widgets.background.download',
)}>
<button onClick={() => this.download()}>
<MdDownload />
</button>

View File

@@ -202,7 +202,7 @@ class Todo extends PureComponent {
onChange={(data) => this.updateTodo('set', index, data)}
readOnly={this.state.todo[index].done}
/>
<MdDelete onClick={() => this.updateTodo('remove', index)} />
<MdDelete onClick={() => this.updateTodo('remove', index)} />
<MdOutlineDragIndicator />
</div>
}

View File

@@ -6,6 +6,7 @@ import { MdDisabledVisible } from 'react-icons/md';
import WeatherIcon from './WeatherIcon';
import WindDirectionIcon from './WindDirectionIcon';
import Tooltip from '../../helpers/tooltip/Tooltip';
import EventBus from 'modules/helpers/eventbus';
import './weather.scss';
@@ -190,30 +191,6 @@ export default class Weather extends PureComponent {
const expandedInfo = () => {
return (
<div className="expanded-info">
{/*}
{enabled('upcomingForecast') ? (
<>
<span className="subtitle">Upcoming Forecast</span>
<div className="upcomingForecast">
<div>
<WeatherIcon name={this.state.icon} />
<span className="period">15:00</span>
<span className="minmax">{minmax()}</span>
</div>
<div>
<WeatherIcon name={this.state.icon} />
<span className="period">16:00</span>
<span className="minmax">{minmax()}</span>
</div>
<div>
<WeatherIcon name={this.state.icon} />
<span className="period">17:00</span>
<span className="minmax">{minmax()}</span>
</div>
</div>
</>
) : null}
*/}
{weatherType >= 3 && (
<span className="subtitle">
{variables.language.getMessage(
@@ -223,48 +200,88 @@ export default class Weather extends PureComponent {
</span>
)}
{enabled('cloudiness') || weatherType === 3 ? (
<span>
<WiCloud className="weatherIcon" />
{this.state.weather.cloudiness}%
</span>
<Tooltip
title={variables.language.getMessage(
variables.languagecode,
'modals.main.settings.sections.weather.extra_info.cloudiness',
)}
placement="left"
>
<span>
<WiCloud className="weatherIcon" />
{this.state.weather.cloudiness}%
</span>
</Tooltip>
) : null}
{enabled('windspeed') || weatherType === 3 ? (
<span>
<WiWindy className="weatherIcon" />
{this.state.weather.wind_speed}
<span className="minmax"> m/s</span>{' '}
{enabled('windDirection') ? (
<div className="weatherIcon">
<WindDirectionIcon
className="weatherIcon"
degrees={this.state.weather.wind_degrees}
/>
</div>
) : null}
</span>
<Tooltip
title={variables.language.getMessage(
variables.languagecode,
'modals.main.settings.sections.weather.extra_info.wind_speed',
)}
placement="left"
>
<span>
<WiWindy className="weatherIcon" />
{this.state.weather.wind_speed}
<span className="minmax"> m/s</span>{' '}
{enabled('windDirection') ? (
<div className="weatherIcon">
<WindDirectionIcon
className="weatherIcon"
degrees={this.state.weather.wind_degrees}
/>
</div>
) : null}
</span>
</Tooltip>
) : null}
{enabled('atmosphericpressure') || weatherType === 3 ? (
<span>
<WiBarometer className="weatherIcon" />
{this.state.weather.pressure}
<span className="minmax"> hPa</span>
</span>
<Tooltip
title={variables.language.getMessage(
variables.languagecode,
'modals.main.settings.sections.weather.extra_info.atmospheric_pressure',
)}
placement="left"
>
<span>
<WiBarometer className="weatherIcon" />
{this.state.weather.pressure}
<span className="minmax"> hPa</span>
</span>
</Tooltip>
) : null}
{enabled('weatherdescription') || weatherType === 3 ? (
<span>
<div className="weatherIcon">
<WeatherIcon name={this.state.icon} />
</div>
{this.state.weather.description}
</span>
<Tooltip
title={variables.language.getMessage(
variables.languagecode,
'modals.main.settings.sections.weather.extra_info.show_description',
)}
placement="left"
>
<span>
<div className="weatherIcon">
<WeatherIcon name={this.state.icon} />
</div>
{this.state.weather.description}
</span>
</Tooltip>
) : null}
{enabled('visibility') || weatherType === 3 ? (
<span>
<MdDisabledVisible style={{ padding: '3px' }} />
{variables.language.getMessage(variables.languagecode, 'widgets.weather.meters', {
amount: this.state.weather.visibility,
})}
</span>
<Tooltip
title={variables.language.getMessage(
variables.languagecode,
'modals.main.settings.sections.weather.extra_info.visibility',
)}
placement="left"
>
<span>
<MdDisabledVisible style={{ padding: '3px' }} />
{variables.language.getMessage(variables.languagecode, 'widgets.weather.meters', {
amount: this.state.weather.visibility,
})}
</span>
</Tooltip>
) : null}
</div>
);

View File

@@ -21,9 +21,13 @@
}
.expanded-info {
width: 100%;
display: flex;
flex-direction: column;
align-items: flex-start;
.tooltip {
width: 100%;
}
}
.extra-info {