mirror of
https://github.com/mue/mue.git
synced 2026-07-17 14:04:09 +02:00
Merge remote-tracking branch 'origin/7.0' into 7.0
This commit is contained in:
@@ -4,7 +4,6 @@ import Tooltip from '../../../helpers/tooltip/Tooltip';
|
||||
import ImageCarousel from '../../../helpers/carousel/Carousel';
|
||||
import { toast } from 'react-toastify';
|
||||
import {
|
||||
MdArrowBack,
|
||||
MdIosShare,
|
||||
MdFlag,
|
||||
MdWarning,
|
||||
@@ -13,8 +12,6 @@ import {
|
||||
MdFormatQuote,
|
||||
MdImage,
|
||||
MdTranslate,
|
||||
MdKeyboardArrowDown,
|
||||
MdKeyboardArrowUp,
|
||||
MdOutlineKeyboardArrowRight,
|
||||
MdExpandMore,
|
||||
} from 'react-icons/md';
|
||||
|
||||
@@ -7,7 +7,6 @@ import {
|
||||
MdOutlineKeyboardArrowRight,
|
||||
MdRefresh,
|
||||
MdOutlineArrowForward,
|
||||
MdOutlineOpenInNew,
|
||||
} from 'react-icons/md';
|
||||
|
||||
import Item from '../Item';
|
||||
|
||||
@@ -149,7 +149,13 @@ export default class Stats extends PureComponent {
|
||||
</span>
|
||||
<br />
|
||||
<span className="subtitle">
|
||||
{this.getUnlockedCount()}/{this.state.achievements.length} Unlocked
|
||||
{variables.language.getMessage(
|
||||
variables.languagecode,
|
||||
'modals.main.settings.sections.stats.unlocked',
|
||||
{
|
||||
count: this.getUnlockedCount() + '/' + this.state.achievements.length,
|
||||
},
|
||||
)}
|
||||
</span>
|
||||
<div className="achievements">
|
||||
{this.state.achievements.map((achievement, index) => {
|
||||
|
||||
@@ -22,7 +22,6 @@ import {
|
||||
MdOutlineAssessment as Stats,
|
||||
MdOutlineNewReleases as Changelog,
|
||||
MdInfoOutline as About,
|
||||
MdEvent as Reminder,
|
||||
MdCode as Sideload,
|
||||
MdAddCircleOutline as Added,
|
||||
MdAddCircleOutline as Create,
|
||||
|
||||
@@ -167,11 +167,15 @@ export default class WelcomeSections extends PureComponent {
|
||||
<FaDiscord />
|
||||
</div>
|
||||
<div className="text">
|
||||
<span className="title">Join our Discord</span>
|
||||
<span className="subtitle">Talk with the Mue community and developers</span>
|
||||
<span className="title">
|
||||
{this.getMessage('modals.welcome.sections.intro.notices.discord_title')}
|
||||
</span>
|
||||
<span className="subtitle">
|
||||
{this.getMessage('modals.welcome.sections.intro.notices.discord_description')}
|
||||
</span>
|
||||
</div>
|
||||
<a href="https://discord.gg/zv8C9F8" target="_blank" rel="noopener noreferrer">
|
||||
<MdOpenInNew /> Join
|
||||
<MdOpenInNew /> {this.getMessage('modals.welcome.sections.intro.notices.discord_join')}
|
||||
</a>
|
||||
</div>
|
||||
<div className="welcomeNotice">
|
||||
@@ -179,11 +183,15 @@ export default class WelcomeSections extends PureComponent {
|
||||
<FaGithub />
|
||||
</div>
|
||||
<div className="text">
|
||||
<span className="title">Contribute on GitHub</span>
|
||||
<span className="subtitle">Report bugs, add features or donate</span>
|
||||
<span className="title">
|
||||
{this.getMessage('modals.welcome.sections.intro.notices.github_title')}
|
||||
</span>
|
||||
<span className="subtitle">
|
||||
{this.getMessage('modals.welcome.sections.intro.notices.github_description')}
|
||||
</span>
|
||||
</div>
|
||||
<a href="https://github.com/mue/mue" target="_blank" rel="noopener noreferrer">
|
||||
<MdOpenInNew /> Open
|
||||
<MdOpenInNew /> {this.getMessage('modals.welcome.sections.intro.notices.github_open')}
|
||||
</a>
|
||||
</div>
|
||||
</>
|
||||
@@ -241,20 +249,25 @@ export default class WelcomeSections extends PureComponent {
|
||||
|
||||
const style = (
|
||||
<>
|
||||
<span className="mainTitle">Choose a theme</span>
|
||||
<span className="mainTitle">
|
||||
{this.getMessage('modals.main.settings.sections.appearance.style.title')}
|
||||
</span>
|
||||
<span className="subtitle">
|
||||
Mue currently offers the choice between the legacy styling and the newly released modern
|
||||
styling.
|
||||
{this.getMessage('modals.main.settings.sections.appearance.style.description')}
|
||||
</span>
|
||||
<div className="themesToggleArea">
|
||||
<div className="options">
|
||||
<div className={this.state.legacyStyle} onClick={() => this.changeStyle('legacy')}>
|
||||
<MdArchive />
|
||||
<span>Legacy</span>
|
||||
<span>
|
||||
{this.getMessage('modals.main.settings.sections.appearance.style.legacy')}
|
||||
</span>
|
||||
</div>
|
||||
<div className={this.state.newStyle} onClick={() => this.changeStyle('new')}>
|
||||
<MdOutlineWhatshot />
|
||||
<span>Modern</span>
|
||||
<span>
|
||||
{this.getMessage('modals.main.settings.sections.appearance.style.modern')}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -271,7 +284,6 @@ export default class WelcomeSections extends PureComponent {
|
||||
</span>
|
||||
<button className="upload" onClick={() => document.getElementById('file-input').click()}>
|
||||
<MdCloudUpload />
|
||||
|
||||
<span>{this.getMessage('modals.main.settings.buttons.import')}</span>
|
||||
</button>
|
||||
<FileUpload
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import variables from 'modules/variables';
|
||||
import { useState, Fragment } from 'react';
|
||||
import { useState } from 'react';
|
||||
import Favourite from './Favourite';
|
||||
import {
|
||||
MdInfo,
|
||||
@@ -160,16 +160,13 @@ export default function PhotoInformation({ info, url, api }) {
|
||||
showingPhotoMap = true;
|
||||
|
||||
return (
|
||||
<Fragment key="photomap">
|
||||
<a
|
||||
href={`${variables.constants.OPENSTREETMAP_URL}/?mlat=${info.latitude}&mlon=${info.longitude}`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<img className="locationMap" src={tile} alt="location" draggable={false} />
|
||||
</a>
|
||||
<br />
|
||||
</Fragment>
|
||||
<a
|
||||
href={`${variables.constants.OPENSTREETMAP_URL}/?mlat=${info.latitude}&mlon=${info.longitude}`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<img className="locationMap" src={tile} alt="location" draggable={false} />
|
||||
</a>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -288,20 +285,16 @@ export default function PhotoInformation({ info, url, api }) {
|
||||
)}
|
||||
</span>
|
||||
{info.location && info.location !== 'N/A' ? (
|
||||
<Fragment key="location">
|
||||
<div className="concept-row">
|
||||
<MdLocationOn />
|
||||
<span id="infoLocation">{info.location}</span>
|
||||
</div>
|
||||
</Fragment>
|
||||
<div className="concept-row">
|
||||
<MdLocationOn />
|
||||
<span id="infoLocation">{info.location}</span>
|
||||
</div>
|
||||
) : null}
|
||||
{info.camera && info.camera !== 'N/A' ? (
|
||||
<Fragment key="camera">
|
||||
<div className="concept-row">
|
||||
<MdPhotoCamera />
|
||||
<span id="infoCamera">{info.camera}</span>
|
||||
</div>
|
||||
</Fragment>
|
||||
<div className="concept-row">
|
||||
<MdPhotoCamera />
|
||||
<span id="infoCamera">{info.camera}</span>
|
||||
</div>
|
||||
) : null}
|
||||
<div className="concept-row">
|
||||
<Resolution />
|
||||
|
||||
@@ -115,7 +115,7 @@ export default class Quote extends PureComponent {
|
||||
|
||||
const authorimgdata = await (
|
||||
await fetch(
|
||||
`https://en.wikipedia.org/w/api.php?action=query&titles=${author}&origin=*&prop=pageimages&format=json&pithumbsize=100`,
|
||||
`https://${variables.languagecode.split('_')[0]}.wikipedia.org/w/api.php?action=query&titles=${author}&origin=*&prop=pageimages&format=json&pithumbsize=100`,
|
||||
)
|
||||
).json();
|
||||
|
||||
@@ -126,7 +126,7 @@ export default class Quote extends PureComponent {
|
||||
|
||||
const authorimglicensedata = await (
|
||||
await fetch(
|
||||
`https://en.wikipedia.org/w/api.php?action=query&prop=imageinfo&iiprop=extmetadata&titles=File:${
|
||||
`https://${variables.languagecode.split('_')[0]}.wikipedia.org/w/api.php?action=query&prop=imageinfo&iiprop=extmetadata&titles=File:${
|
||||
authorimgdata.query.pages[Object.keys(authorimgdata.query.pages)[0]].pageimage
|
||||
}&origin=*&format=json`,
|
||||
)
|
||||
|
||||
@@ -149,7 +149,7 @@ export default class Weather extends PureComponent {
|
||||
render() {
|
||||
const weatherType = localStorage.getItem('weatherType');
|
||||
const enabled = (setting) => {
|
||||
return (localStorage.getItem(setting) === 'true' && weatherType >= 3) || weatherType == 3;
|
||||
return (localStorage.getItem(setting) === 'true' && weatherType >= 3) || weatherType === "3";
|
||||
};
|
||||
|
||||
if (
|
||||
@@ -199,7 +199,7 @@ export default class Weather extends PureComponent {
|
||||
)}
|
||||
</span>
|
||||
)}
|
||||
{enabled('cloudiness') || weatherType === 3 ? (
|
||||
{enabled('cloudiness') ? (
|
||||
<Tooltip
|
||||
title={variables.language.getMessage(
|
||||
variables.languagecode,
|
||||
@@ -213,7 +213,7 @@ export default class Weather extends PureComponent {
|
||||
</span>
|
||||
</Tooltip>
|
||||
) : null}
|
||||
{enabled('windspeed') || weatherType === 3 ? (
|
||||
{enabled('windspeed') ? (
|
||||
<Tooltip
|
||||
title={variables.language.getMessage(
|
||||
variables.languagecode,
|
||||
@@ -236,7 +236,7 @@ export default class Weather extends PureComponent {
|
||||
</span>
|
||||
</Tooltip>
|
||||
) : null}
|
||||
{enabled('atmosphericpressure') || weatherType === 3 ? (
|
||||
{enabled('atmosphericpressure') ? (
|
||||
<Tooltip
|
||||
title={variables.language.getMessage(
|
||||
variables.languagecode,
|
||||
@@ -251,7 +251,7 @@ export default class Weather extends PureComponent {
|
||||
</span>
|
||||
</Tooltip>
|
||||
) : null}
|
||||
{enabled('weatherdescription') || weatherType === 3 ? (
|
||||
{enabled('weatherdescription') ? (
|
||||
<Tooltip
|
||||
title={variables.language.getMessage(
|
||||
variables.languagecode,
|
||||
@@ -267,7 +267,7 @@ export default class Weather extends PureComponent {
|
||||
</span>
|
||||
</Tooltip>
|
||||
) : null}
|
||||
{enabled('visibility') || weatherType === 3 ? (
|
||||
{enabled('visibility') ? (
|
||||
<Tooltip
|
||||
title={variables.language.getMessage(
|
||||
variables.languagecode,
|
||||
@@ -315,7 +315,7 @@ export default class Weather extends PureComponent {
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
{weatherType === 3 ? expandedInfo() : null}
|
||||
{weatherType >= 3 ? expandedInfo() : null}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user