chore: run prettier, lint, change changelog version, urls etc

This commit is contained in:
David Ralph
2024-06-03 17:03:32 +01:00
parent 8346ce06ea
commit 9b03763b44
26 changed files with 68 additions and 82 deletions

27
.env
View File

@@ -1,27 +0,0 @@
# API URLs
API_URL=https://api.muetab.com/v2
SPONSORS_URL=https://sponsors.muetab.com
GITHUB_URL=https://api.github.com
OPENSTREETMAP_URL=https://www.openstreetmap.org
# Mue URLs
WEBSITE_URL=https://muetab.com
PRIVACY_URL=https://muetab.com/privacy
BLOG_POST=https://blog.muetab.com/posts/version-7-0
TRANSLATIONS_URL=https://docs.muetab.com/translations/
WEBLATE_URL=https://hosted.weblate.org/projects/mue/mue-tab/
REPORT_ITEM =https://github.com/mue/marketplace/issues/new?assignees=&labels=item+report&template=item-report.md&title=%5BItem+Report%5D+
BUG_REPORT =https://github.com/mue/mue/issues/new?assignees=&labels=issue+report&template=bug-report.md&title=%5BBug%5D+
DONATE_LINK=https://muetab.com/donate
SENTRY_DSN =https://430352fd4b174d688ebd82fc85c22c58@o1217438.ingest.sentry.io/6359480
KNOWLEDGEBASE=https://support.muetab.com
# Mue Info
ORG_NAME=mue
REPO_NAME=mue
EMAIL=hello@muetab.com
TWITTER_HANDLE=getmue
DISCORD_SERVER=zv8C9F8
OPENCOLLECTIVE_USERNAME=mue
VERSION=7.0.1

View File

@@ -1,6 +1,6 @@
---
name: Request a feature
about: Request something to be implemented in the extension
about: Request something to be implemented in the extension.
title: "[Feature Request]"
labels: enhancement
assignees: ''

View File

@@ -52,9 +52,19 @@ function AddModal({ urlError, iconError, addLink, closeModal, edit, editData, ed
{iconError} {urlError}
</span>
{edit ? (
<Button type="settings" onClick={() => editLink(editData, name, url, icon)} icon={<MdAddLink />} label={variables.getMessage('modals.main.settings.sections.quicklinks.edit')} />
<Button
type="settings"
onClick={() => editLink(editData, name, url, icon)}
icon={<MdAddLink />}
label={variables.getMessage('modals.main.settings.sections.quicklinks.edit')}
/>
) : (
<Button type="settings" onClick={() => addLink(name, url, icon)} icon={<MdAddLink />} label={variables.getMessage('widgets.quicklinks.add')} />
<Button
type="settings"
onClick={() => addLink(name, url, icon)}
icon={<MdAddLink />}
label={variables.getMessage('widgets.quicklinks.add')}
/>
)}
</div>
</div>

View File

@@ -174,7 +174,6 @@
box-sizing: border-box !important;
border-radius: 12px 12px 0 0;
backdrop-filter: blur(40px) saturate(150%) brightness(75%);
backdrop-filter: blur(40px) saturate(150%) brightness(75%);
@include themed {
background-image: linear-gradient(to bottom, transparent, t($modal-background));
@@ -367,7 +366,6 @@ p.author {
border-radius: 150px;
padding: 1px 12px;
backdrop-filter: blur(16px) saturate(180%);
backdrop-filter: blur(16px) saturate(180%);
background-color: rgb(255 255 255 / 10%);
border: 1px solid rgb(209 213 219 / 30%);
color: #fff;

View File

@@ -71,7 +71,6 @@
.btn-collection {
padding: 1px 12px;
backdrop-filter: blur(16px) saturate(180%);
backdrop-filter: blur(16px) saturate(180%);
background-color: rgb(255 255 255 / 10%);
border: 1px solid rgb(209 213 219 / 30%);
color: #fff;

View File

@@ -166,7 +166,6 @@ p.description {
.subtitle {
user-select: text !important;
user-select: text !important;
}
}

View File

@@ -86,6 +86,7 @@ table {
border-collapse: separate;
border-radius: 10px;
margin-top: 20px;
@include themed {
box-shadow: 0 0 0 1px t($modal-sidebarActive);
padding: 0;
@@ -97,9 +98,10 @@ table {
@include themed {
border-radius: t($borderRadius);
color: t($subColor);
}
letter-spacing: 2px;
letter-spacing: 2px;
th {
padding: 20px;
}
@@ -130,6 +132,7 @@ table {
textarea {
width: 90%;
margin: 10px;
@include themed {
color: t($color);
}

View File

@@ -31,7 +31,11 @@ function ShareModal({ modalClose, data }) {
const copyLink = () => {
navigator.clipboard.writeText(data.url);
toast(data.startsWith('"') ? variables.getMessage('toasts.quote') : variables.getMessage('toasts.link_copied'));
toast(
data.startsWith('"')
? variables.getMessage('toasts.quote')
: variables.getMessage('toasts.link_copied'),
);
};
return (

View File

@@ -32,7 +32,6 @@
margin-left: -30px; */
cursor: initial;
user-select: none;
user-select: none;
opacity: 1;
animation-name: floating;
animation-duration: 0.3s;

View File

@@ -10,9 +10,9 @@ export const PRIVACY_URL = 'https://muetab.com/privacy';
export const TRANSLATIONS_URL = 'https://docs.muetab.com/translations/';
export const WEBLATE_URL = 'https://hosted.weblate.org/projects/mue/mue-tab/';
export const REPORT_ITEM =
'https://github.com/mue/marketplace/issues/new?assignees=&labels=item+report&template=item-report.md&title=%5BItem+Report%5D+';
'https://github.com/mue/marketplace/issues/new?assignees=&labels=item%2Creport&projects=&template=item_issue_report.yml&title=%5BItem+Report%5D+Insert+marketplace+item+name+here';
export const BUG_REPORT =
'https://github.com/mue/mue/issues/new?assignees=&labels=issue+report&template=bug-report.md&title=%5BBug%5D+';
'https://github.com/mue/mue/issues/new?assignees=&labels=bug&projects=&template=issue_report.yml&title=%5BBug%5D+Insert+issue+name+here';
export const DONATE_LINK = 'https://muetab.com/donate';
export const SENTRY_DSN =
'https://430352fd4b174d688ebd82fc85c22c58@o1217438.ingest.sentry.io/6359480';

View File

@@ -16,7 +16,7 @@ function filterItems(item, filter) {
}
function ItemCard({ item, toggleFunction, type, onCollection, isCurator }) {
item._onCollection = onCollection
item._onCollection = onCollection;
return (
<div className="item" onClick={() => toggleFunction(item)} key={item.name}>
<img

View File

@@ -51,7 +51,7 @@ class Changelog extends PureComponent {
// get the release which tag_name is the same as the current version
const data = await releases.json();
const release = data.find((release) => release.tag_name === `7.0.0`);
const release = data.find((release) => release.tag_name === variables.constants.VERSION);
if (this.controller.signal.aborted === true) {
return;

View File

@@ -34,7 +34,17 @@ const SortableContainer = sortableContainer(({ children }) => (
));
const Overview = () => {
const [items, setItems] = useState(() => JSON.parse(localStorage.getItem('order')) || ['greeting', 'time', 'quicklinks', 'quote', 'date', 'message']);
const [items, setItems] = useState(
() =>
JSON.parse(localStorage.getItem('order')) || [
'greeting',
'time',
'quicklinks',
'quote',
'date',
'message',
],
);
const [news, setNews] = useState({
title: '',
date: '',
@@ -101,7 +111,7 @@ const Overview = () => {
year: 'numeric',
month: 'long',
day: 'numeric',
}
},
);
setNews(data);
setNewsDone(true);

View File

@@ -29,10 +29,13 @@ function Refresh() {
text = variables.getMessage('modals.main.settings.sections.quote.title');
break;
case 'quotebackground':
text = new Intl.ListFormat(localStorage.getItem('language')?.replace(/_/gm, '-') || 'en-GB', {
style: 'long',
type: 'conjunction',
}).format([
text = new Intl.ListFormat(
localStorage.getItem('language')?.replace(/_/gm, '-') || 'en-GB',
{
style: 'long',
type: 'conjunction',
},
).format([
variables.getMessage('modals.main.settings.sections.quote.title'),
variables.getMessage('modals.main.settings.sections.background.title'),
]);

View File

@@ -3,9 +3,7 @@ import variables from 'config/variables';
import { useState, memo } from 'react';
import Modal from 'react-modal';
import {
MdAddLink,
} from 'react-icons/md';
import { MdAddLink } from 'react-icons/md';
import { AddModal } from 'components/Elements/AddModal';
import { Button } from 'components/Elements';

View File

@@ -2,13 +2,7 @@ import variables from 'config/variables';
import { useState, memo } from 'react';
import {
MdAssignment,
MdCropFree,
MdRefresh,
MdChecklist,
MdOutlineApps,
} from 'react-icons/md';
import { MdAssignment, MdCropFree, MdRefresh, MdChecklist, MdOutlineApps } from 'react-icons/md';
import { Checkbox, Dropdown } from 'components/Form';
import EventBus from 'utils/eventbus';

View File

@@ -5,7 +5,6 @@
text-shadow: 0 0 10px rgb(0 0 0 / 30%);
cursor: initial;
user-select: none;
user-select: none;
--shadow-shift: 0.125rem;
@@ -18,7 +17,6 @@
font-size: 0.9em;
letter-spacing: 0.5px;
user-select: none;
user-select: none;
--shadow-shift: 0.125rem;
@@ -37,7 +35,6 @@ h1.quoteauthor {
text-decoration: none;
color: white;
user-select: none;
user-select: none;
}
.author {

View File

@@ -12,7 +12,7 @@ export default class Stats {
`🏆 ${variables.getMessage('modals.main.settings.sections.stats.achievement_unlocked', { name: name })}`,
{
icon: false,
closeButton: false
closeButton: false,
},
);
}

View File

@@ -32,7 +32,7 @@ const Stats = () => {
}, [stats, updateAchievements]);
const getUnlockedCount = useMemo(() => {
return achievements.filter(achievement => achievement.achieved).length;
return achievements.filter((achievement) => achievement.achieved).length;
}, [achievements]);
const resetStats = () => {
@@ -106,10 +106,7 @@ const Stats = () => {
overlayClassName="Overlay resetoverlay"
ariaHideApp={false}
>
<ClearModal
modalClose={() => setClearmodal(false)}
resetStats={resetStats}
/>
<ClearModal modalClose={() => setClearmodal(false)} resetStats={resetStats} />
</Modal>
<div className="modalInfoPage stats">
<div className="statSection rightPanel">
@@ -151,7 +148,9 @@ const Stats = () => {
<span className="title">{variables.getMessage(`${STATS_SECTION}.achievements`)}</span>
<br />
<span className="subtitle">
{variables.getMessage(`${STATS_SECTION}.unlocked`, { count: `${getUnlockedCount}/${achievements.length}` })}
{variables.getMessage(`${STATS_SECTION}.unlocked`, {
count: `${getUnlockedCount}/${achievements.length}`,
})}
</span>
</div>
<div className="achievements">

View File

@@ -213,7 +213,7 @@ const TimeOptions = () => {
</span>
</Action>
</Row>
{digitalSettings}
</>
);

View File

@@ -28,7 +28,7 @@ const useWeatherSettings = () => {
async (position) => {
const data = await (
await fetch(
`${variables.constants.API_URL}/gps?latitude=${position.coords.latitude}&longitude=${position.coords.longitude}`
`${variables.constants.API_URL}/gps?latitude=${position.coords.latitude}&longitude=${position.coords.longitude}`,
)
).json();
setLocation(data[0].name);
@@ -39,7 +39,7 @@ const useWeatherSettings = () => {
},
{
enableHighAccuracy: true,
}
},
);
}, [setLocation, showReminder]);
@@ -53,7 +53,8 @@ const useWeatherSettings = () => {
};
const WeatherOptions = () => {
const { location, windSpeed, setWindSpeed, changeLocation, getAutoLocation } = useWeatherSettings();
const { location, windSpeed, setWindSpeed, changeLocation, getAutoLocation } =
useWeatherSettings();
const weatherType = localStorage.getItem('weatherType');
const WEATHER_SECTION = 'modals.main.settings.sections.weather';
@@ -190,7 +191,7 @@ const WeatherOptions = () => {
visibilityToggle={true}
>
<WidgetType />
{/* https://stackoverflow.com/a/65328486 when using inputs it may defocus so we do the {} instead of <> */}
{/* https://stackoverflow.com/a/65328486 when using inputs it may defocus so we do the {} instead of <> */}
{LocationSetting()}
<TemperatureFormat />
{weatherType === '4' && <CustomOptions />}

View File

@@ -213,7 +213,7 @@ a.privacy {
flex-flow: column;
.shareYourMue {
width: -moz-fit-content;
width: fit-content;
width: fit-content;
}
@@ -320,7 +320,7 @@ a.privacy {
.welcomeButtons {
z-index: 999;
-webkit-backdrop-filter: blur(2px);
backdrop-filter: blur(2px);
backdrop-filter: blur(2px);
position: sticky;
bottom: 0;

View File

@@ -442,8 +442,8 @@
},
"experimental_warning": "Please note that the Mue team cannot provide support if you have experimental mode on. Please disable it first and see if the issue continues to occur before contacting support.",
"preview_data_disabled": {
"title":"Data Settings Disabled",
"description":"Data settings are disabled in preview mode. Please exit preview mode to use this feature."
"title": "Data Settings Disabled",
"description": "Data settings are disabled in preview mode. Please exit preview mode to use this feature."
}
},
"stats": {

View File

@@ -18,11 +18,11 @@
color: var(--modal-text) !important;
}
/*.Toastify__progress-bar--default {
/* .Toastify__progress-bar--default {
height: 3px !important;
background: var(--modal-text) !important;
color: var(--modal-text) !important;
}*/
} */
.Toastify__toast-container {
width: auto !important;
@@ -38,4 +38,4 @@
.Toastify__progress-bar--info {
background-color: gold !important;
}
}

View File

@@ -97,7 +97,6 @@ $themes: (
box-shadow: t($boxShadow);
}
backdrop-filter: blur(map.get($ui-elements, 'backgroundBlur'));
backdrop-filter: blur(map.get($ui-elements, 'backgroundBlur'));
.title {

View File

@@ -8,4 +8,4 @@ export const useLocalStorageState = (key, initialValue) => {
}, [key, state]);
return [state, setState];
};
};