chore: merge main into 8.0

This commit is contained in:
David Ralph
2024-06-08 18:24:33 +01:00
16 changed files with 221 additions and 44 deletions

View File

@@ -71,8 +71,8 @@
}
@media (prefers-color-scheme: light) {
* {
background-color: #ffffff;
body {
background-color: #fff;
}
.criticalError .criticalError-message {
@@ -96,8 +96,8 @@
</style>
<div class="criticalError">
<div class="criticalError-message">
<h1>A critical error has occurred</h1>
<p>The new tab could not be loaded. Please enable JavaScript and try again.</p>
<h1>JavaScript is required</h1>
<p>The new tab could not be loaded. Please enable JavaScript and refresh the page.</p>
<div class="criticalError-actions">
<a href="https://github.com/mue/mue/issues/new/choose" target="_blank" rel="noreferrer"
>Report Issue</a

View File

@@ -0,0 +1,8 @@
{
"name": {
"message": "Mue"
},
"description": {
"message": "Fast, open and free-to-use new tab page for modern browsers."
}
}

View File

@@ -0,0 +1,8 @@
{
"name": {
"message": "Mue"
},
"description": {
"message": "Fast, open and free-to-use new tab page for modern browsers."
}
}

View File

@@ -0,0 +1,8 @@
{
"name": {
"message": "Mue"
},
"description": {
"message": "Fast, open and free-to-use new tab page for modern browsers."
}
}

View File

@@ -0,0 +1,8 @@
{
"name": {
"message": "Mue"
},
"description": {
"message": "Fast, open and free-to-use new tab page for modern browsers."
}
}

View File

@@ -4,7 +4,7 @@
"default_locale": "en",
"name": "__MSG_name__",
"description": "__MSG_description__",
"version": "7.1.0",
"version": "7.1.1",
"homepage_url": "https://muetab.com",
"action": {
"default_icon": "icons/128x128.png"

View File

@@ -2,7 +2,7 @@
"manifest_version": 3,
"name": "Mue",
"description": "Fast, open and free-to-use new tab page for modern browsers.",
"version": "7.1.0",
"version": "7.1.1",
"homepage_url": "https://muetab.com",
"action": {
"default_icon": "icons/128x128.png"

View File

@@ -9,7 +9,7 @@
"homepage": "https://muetab.com",
"bugs": "https://github.com/mue/mue/issues/new?assignees=&labels=bug&template=bug-report.md&title=%5BBUG%5D",
"license": "BSD-3-Clause",
"version": "7.1.0",
"version": "7.1.1",
"dependencies": {
"@eartharoid/i18n": "1.2.1",
"@emotion/react": "^11.11.4",
@@ -20,15 +20,14 @@
"@headlessui/react": "^2.0.4",
"@muetab/react-sortable-hoc": "^2.0.1",
"@mui/material": "5.15.19",
"@sentry/react": "^8.5.0",
"clsx": "^2.1.1",
"@sentry/react": "^8.8.0",
"embla-carousel-autoplay": "8.1.3",
"embla-carousel-react": "8.1.3",
"fast-blurhash": "^1.1.2",
"image-conversion": "^2.1.1",
"markdown-to-jsx": "^7.4.7",
"react": "^18.3.1",
"react-best-gradient-color-picker": "^3.0.7",
"react-best-gradient-color-picker": "^3.0.8",
"react-clock": "5.0.0",
"react-dom": "^18.3.1",
"react-icons": "^5.2.1",
@@ -48,8 +47,7 @@
"eslint-config-prettier": "^9.1.0",
"eslint-config-react-app": "^7.0.1",
"husky": "^9.0.11",
"postcss": "^8.4.38",
"prettier": "^3.3.0",
"prettier": "^3.3.1",
"sass": "^1.77.4",
"stylelint": "^16.6.0",
"stylelint-config-standard-scss": "^13.1.0",

116
pnpm-lock.yaml generated
View File

@@ -5200,6 +5200,7 @@ snapshots:
'@rollup/rollup-win32-x64-msvc@4.18.0':
optional: true
<<<<<<< HEAD
'@rushstack/eslint-patch@1.10.3': {}
'@sentry-internal/browser-utils@8.7.0':
@@ -5244,19 +5245,99 @@ snapshots:
'@sentry/utils': 8.7.0
'@sentry/react@8.7.0(react@18.3.1)':
=======
/@sentry-internal/browser-utils@8.8.0:
resolution: {integrity: sha512-yE4khknnGpAxy3TeAD9TU1eUqa0GUJ2xluIAsHKkL+RXg3AgEssMO3DBDUbpHp+QANIjzKmZIXtbdTV+1P26aQ==}
engines: {node: '>=14.18'}
dependencies:
'@sentry/browser': 8.7.0
'@sentry/core': 8.7.0
'@sentry/types': 8.7.0
'@sentry/utils': 8.7.0
'@sentry/core': 8.8.0
'@sentry/types': 8.8.0
'@sentry/utils': 8.8.0
dev: false
/@sentry-internal/feedback@8.8.0:
resolution: {integrity: sha512-mybzWx99DuCJxYCVPx12NHVSVbSDF1goEo+rhDGYY8kqyn+snoVBLQtsSdDXYwZyssS1G7Gh6WhX+JVDKcQO9A==}
engines: {node: '>=14.18'}
dependencies:
'@sentry/core': 8.8.0
'@sentry/types': 8.8.0
'@sentry/utils': 8.8.0
dev: false
/@sentry-internal/replay-canvas@8.8.0:
resolution: {integrity: sha512-LUoPi38Y8VRnxorIMmKLpfpf+jguhOsovMsZ3ZLc+FvMER62IIvSt4GKK4ARmUBX7+v3r61fdUWqxFs1j3uUTg==}
engines: {node: '>=14.18'}
dependencies:
'@sentry-internal/replay': 8.8.0
'@sentry/core': 8.8.0
'@sentry/types': 8.8.0
'@sentry/utils': 8.8.0
dev: false
/@sentry-internal/replay@8.8.0:
resolution: {integrity: sha512-gMRWcjpiLJl03JB4rTMN2I4HOOJ6z611kdhUBYc+RRAue13A6uCSIPElgvlCMREkVmr/8eUKrCcIrpqj9PDJ4w==}
engines: {node: '>=14.18'}
dependencies:
'@sentry-internal/browser-utils': 8.8.0
'@sentry/core': 8.8.0
'@sentry/types': 8.8.0
'@sentry/utils': 8.8.0
dev: false
/@sentry/browser@8.8.0:
resolution: {integrity: sha512-TkmbjV9pGpQ+OfUtIE8DaU467w73NqPTX/w/+241VlKpE9HbfranMG0N8Bibgt59GwoNIiC0NhmKaMTZg79elQ==}
engines: {node: '>=14.18'}
dependencies:
'@sentry-internal/browser-utils': 8.8.0
'@sentry-internal/feedback': 8.8.0
'@sentry-internal/replay': 8.8.0
'@sentry-internal/replay-canvas': 8.8.0
'@sentry/core': 8.8.0
'@sentry/types': 8.8.0
'@sentry/utils': 8.8.0
dev: false
/@sentry/core@8.8.0:
resolution: {integrity: sha512-SnQ42rOuUO03WvhS+2aogKhEzCW9cxpnpPzs2obxnS04KoAz7VL3oYyIwiACrRTlKpwdb9y6vuO89fDvgqPQbA==}
engines: {node: '>=14.18'}
dependencies:
'@sentry/types': 8.8.0
'@sentry/utils': 8.8.0
dev: false
/@sentry/react@8.8.0(react@18.3.1):
resolution: {integrity: sha512-7BZyYQFJCRpWz5dn5SZxrhMU8hHH7eBC7BqNMhtsbctP/ObK6BEt3YJUDjTslkXZMOCXfN9ZdBgYEAGc7EPhFQ==}
engines: {node: '>=14.18'}
peerDependencies:
react: ^16.14.0 || 17.x || 18.x || 19.x
>>>>>>> main
dependencies:
'@sentry/browser': 8.8.0
'@sentry/core': 8.8.0
'@sentry/types': 8.8.0
'@sentry/utils': 8.8.0
hoist-non-react-statics: 3.3.2
react: 18.3.1
<<<<<<< HEAD
'@sentry/types@8.7.0': {}
'@sentry/utils@8.7.0':
dependencies:
'@sentry/types': 8.7.0
=======
/@sentry/types@8.8.0:
resolution: {integrity: sha512-2EOkyHoSOJyCRCsK/O6iA3wyELkRApfY7jNxsC/Amgb5ftuGl/rGO6B4dNKjMJNLNvlkEqZIANoUKOcClBH6yw==}
engines: {node: '>=14.18'}
dev: false
/@sentry/utils@8.8.0:
resolution: {integrity: sha512-agLqo9KlXacj7NOcdYZUYqTKlFcPXdTzCnC2u9J1LxDjru9cogbiw6yyDtxBg3kpgYZubfOPz/7F2z9wCjK1cw==}
engines: {node: '>=14.18'}
dependencies:
'@sentry/types': 8.8.0
dev: false
>>>>>>> main
'@swc/core-darwin-arm64@1.5.22':
optional: true
@@ -5476,7 +5557,14 @@ snapshots:
acorn@8.11.3: {}
<<<<<<< HEAD
adm-zip@0.5.13: {}
=======
/adm-zip@0.5.12:
resolution: {integrity: sha512-6TVU49mK6KZb4qG6xWaaM4C7sA/sgUMLy/JYMOzkcp3BvVLpW0fXDFQiIzAuxFCt/2+xD7fNIiPFAoLZPhVNLQ==}
engines: {node: '>=6.0'}
dev: true
>>>>>>> main
ajv@6.12.6:
dependencies:
@@ -7049,7 +7137,15 @@ snapshots:
prelude-ls@1.2.1: {}
<<<<<<< HEAD
prettier@3.3.0: {}
=======
/prettier@3.3.1:
resolution: {integrity: sha512-7CAwy5dRsxs8PHXT3twixW9/OEll8MLE0VRPCJyl7CkS6VHGPSlsVaWTiASPTyGyYRyApxlaWTzwUxVNrhcwDg==}
engines: {node: '>=14'}
hasBin: true
dev: true
>>>>>>> main
progress@2.0.3: {}
@@ -7067,7 +7163,19 @@ snapshots:
dependencies:
'@types/node': 10.17.60
<<<<<<< HEAD
react-best-gradient-color-picker@3.0.7(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
=======
/react-best-gradient-color-picker@3.0.8(react-dom@18.3.1)(react@18.3.1):
resolution: {integrity: sha512-dq9VYxx1TtrvzKBHX3DYmuyMJY+F3/uB16AhmLag3hqMxULm2PZubmdQp9JB8Bg20Irg+E5YD6bIIw2GUo44kQ==}
peerDependencies:
'@types/react': ^16.8.0 || ^17.0.0 || ^18.0.0
react: ^16.8.0 || ^17.0.0 || ^18.0.0
react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0
peerDependenciesMeta:
'@types/react':
optional: true
>>>>>>> main
dependencies:
html2canvas: 1.4.1
lodash.throttle: 4.1.1

View File

@@ -12,4 +12,8 @@
opacity: 0.8;
}
}
.changelogAt {
text-decoration: none;
}
}

View File

@@ -26,4 +26,4 @@ export const TWITTER_HANDLE = 'getmue';
export const DISCORD_SERVER = 'zv8C9F8';
export const OPENCOLLECTIVE_USERNAME = 'mue';
export const VERSION = '7.1.0';
export const VERSION = '7.1.1';

View File

@@ -160,12 +160,15 @@ class ItemPage extends PureComponent {
</div>
);
const dateObj = new Date(this.props.data.data.updated_at);
const formattedDate = new Intl.DateTimeFormat(shortLocale, {
year: 'numeric',
month: 'long',
day: '2-digit',
}).format(dateObj);
let dateObj, formattedDate;
if (this.props.data.data.updated_at) {
dateObj = new Date(this.props.data.data.updated_at);
formattedDate = new Intl.DateTimeFormat(shortLocale, {
year: 'numeric',
month: 'long',
day: '2-digit',
}).format(dateObj);
}
return (
<>
@@ -291,11 +294,12 @@ class ItemPage extends PureComponent {
{variables.getMessage('modals.main.marketplace.product.details')}
</span>
<div className="moreInfo">
{moreInfoItem(
<MdCalendarMonth />,
variables.getMessage('modals.main.marketplace.product.updated_at'),
formattedDate,
)}
{this.props.data.data.updated_at &&
moreInfoItem(
<MdCalendarMonth />,
variables.getMessage('modals.main.marketplace.product.updated_at'),
formattedDate,
)}
{this.props.data.data.quotes &&
moreInfoItem(
<MdFormatQuote />,

View File

@@ -14,6 +14,34 @@ class Changelog extends PureComponent {
this.changelog = createRef();
}
parseMarkdown = (text) => {
if (typeof text !== 'string') {
throw new Error('Input must be a string');
}
// Replace markdown syntax
text = text
.replace(/\*\*(.*?)\*\*/g, '<strong>$1</strong>')
.replace(/^## (.*$)/gm, '<span class="title">$1</span>')
.replace(
/((http|https):\/\/[^\s]+)/g,
'<a href="$1" target="_blank" rel="noopener noreferrer">$1</a>',
)
// resolve @ to github user link
.replace(
/@([a-zA-Z0-9-_]+)/g,
'<a href="https://github.com/$1" target="_blank" class="changelogAt">@$1</a>',
);
// Replace list items
text = text.replace(/^\* (.*$)/gm, '<li>$1</li>');
// Wrap list items in <ul></ul>
text = text.replace(/((<li>.*<\/li>\s*)+)/g, '<ul>$1</ul>');
return text;
};
async getUpdate() {
const releases = await fetch(
`https://api.github.com/repos/${variables.constants.ORG_NAME}/${variables.constants.REPO_NAME}/releases`,
@@ -22,14 +50,18 @@ 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 === variables.constants.VERSION);
if (this.controller.signal.aborted === true) {
return;
}
// get the release which tag_name is the same as the current version
const data = await releases.json();
let release = data.find((release) => release.tag_name === variables.constants.VERSION);
if (!release) {
release = data[0];
}
// request the changelog
const res = await fetch(release.url, { signal: this.controller.signal });

View File

@@ -1,6 +1,6 @@
import variables from 'config/variables';
import { useState, memo } from 'react';
import { useState } from 'react';
import Modal from 'react-modal';
import { MdAddLink } from 'react-icons/md';
@@ -11,9 +11,9 @@ import { Button } from 'components/Elements';
import { Row, Content, Action } from 'components/Layout/Settings/Item';
import { getTitleFromUrl, isValidUrl } from 'utils/links';
import { QuickLinks } from 'features/quicklinks';
import { QuickLink } from 'features/quicklinks/options/QuickLink';
function AppsOptions(appsEnabled) {
function AppsOptions({ appsEnabled }) {
const [appsModalInfo, setAppsModalInfo] = useState({
newLink: false,
edit: false,
@@ -126,7 +126,7 @@ function AppsOptions(appsEnabled) {
<div className="messagesContainer">
{appsModalInfo.items.map((item, i) => (
<QuickLinks
<QuickLink
key={i}
item={item}
startEditLink={() => startEditLink(item)}
@@ -160,5 +160,4 @@ function AppsOptions(appsEnabled) {
);
}
const MemorizedAppsOptions = memo(AppsOptions);
export { MemorizedAppsOptions as default, MemorizedAppsOptions as AppsOptions };
export { AppsOptions as default, AppsOptions };

View File

@@ -16,7 +16,7 @@ function NavbarOptions() {
const [showRefreshOptions, setShowRefreshOptions] = useState(
localStorage.getItem('refresh') === 'true',
);
const [appsEnabled, setAppsEnabled] = useState(localStorage.getItem('appsEnabled') === 'true');
const [appsEnabled, setAppsEnabled] = useState(localStorage.getItem('appsEnabled') === 'true' || false);
const NAVBAR_SECTION = 'modals.main.settings.sections.appearance.navbar';

View File

@@ -151,9 +151,9 @@ body {
/* light theme critical error */
@media (prefers-color-scheme: dark) {
/** {
background-color: #000000 !important;
} */
body {
background-color: #000;
}
.criticalError {
.criticalError-message {
@@ -177,8 +177,8 @@ body {
}
@media (prefers-color-scheme: light) {
* {
background-color: #fff !important;
body {
background-color: #fff;
}
.criticalError {