Run prettier

This commit is contained in:
Scott Feeney 2024-10-10 17:38:06 -07:00
parent 22f0703162
commit 59d5c73359
5 changed files with 31 additions and 24 deletions

View file

@ -24,7 +24,9 @@ function ListAddEdit({ list, onClose }) {
} }
} }
}, [editMode]); }, [editMode]);
const supportsExclusive = supports('@mastodon/list-exclusive') || supports('@gotosocial/list-exclusive'); const supportsExclusive =
supports('@mastodon/list-exclusive') ||
supports('@gotosocial/list-exclusive');
return ( return (
<div class="sheet"> <div class="sheet">

30
src/locales/en.po generated
View file

@ -409,7 +409,7 @@ msgstr ""
#: src/components/embed-modal.jsx:12 #: src/components/embed-modal.jsx:12
#: src/components/generic-accounts.jsx:142 #: src/components/generic-accounts.jsx:142
#: src/components/keyboard-shortcuts-help.jsx:39 #: src/components/keyboard-shortcuts-help.jsx:39
#: src/components/list-add-edit.jsx:33 #: src/components/list-add-edit.jsx:35
#: src/components/media-alt-modal.jsx:33 #: src/components/media-alt-modal.jsx:33
#: src/components/media-modal.jsx:247 #: src/components/media-modal.jsx:247
#: src/components/notification-service.jsx:156 #: src/components/notification-service.jsx:156
@ -453,7 +453,7 @@ msgid "No lists."
msgstr "" msgstr ""
#: src/components/account-info.jsx:1936 #: src/components/account-info.jsx:1936
#: src/components/list-add-edit.jsx:37 #: src/components/list-add-edit.jsx:39
#: src/pages/lists.jsx:58 #: src/pages/lists.jsx:58
msgid "New list" msgid "New list"
msgstr "" msgstr ""
@ -480,7 +480,7 @@ msgid "Unable to update profile."
msgstr "" msgstr ""
#: src/components/account-info.jsx:2152 #: src/components/account-info.jsx:2152
#: src/components/list-add-edit.jsx:102 #: src/components/list-add-edit.jsx:104
msgid "Name" msgid "Name"
msgstr "" msgstr ""
@ -501,7 +501,7 @@ msgid "Content"
msgstr "" msgstr ""
#: src/components/account-info.jsx:2220 #: src/components/account-info.jsx:2220
#: src/components/list-add-edit.jsx:147 #: src/components/list-add-edit.jsx:149
#: src/components/shortcuts-settings.jsx:712 #: src/components/shortcuts-settings.jsx:712
#: src/pages/filters.jsx:554 #: src/pages/filters.jsx:554
#: src/pages/notifications.jsx:934 #: src/pages/notifications.jsx:934
@ -888,7 +888,7 @@ msgid "Error deleting draft! Please try again."
msgstr "" msgstr ""
#: src/components/drafts.jsx:127 #: src/components/drafts.jsx:127
#: src/components/list-add-edit.jsx:183 #: src/components/list-add-edit.jsx:185
#: src/components/status.jsx:1318 #: src/components/status.jsx:1318
#: src/pages/filters.jsx:587 #: src/pages/filters.jsx:587
msgid "Delete…" msgid "Delete…"
@ -1115,44 +1115,44 @@ msgstr ""
msgid "<0>Shift</0> + <1>Alt</1> + <2>k</2>" msgid "<0>Shift</0> + <1>Alt</1> + <2>k</2>"
msgstr "" msgstr ""
#: src/components/list-add-edit.jsx:37 #: src/components/list-add-edit.jsx:39
msgid "Edit list" msgid "Edit list"
msgstr "" msgstr ""
#: src/components/list-add-edit.jsx:93 #: src/components/list-add-edit.jsx:95
msgid "Unable to edit list." msgid "Unable to edit list."
msgstr "" msgstr ""
#: src/components/list-add-edit.jsx:94 #: src/components/list-add-edit.jsx:96
msgid "Unable to create list." msgid "Unable to create list."
msgstr "" msgstr ""
#: src/components/list-add-edit.jsx:122 #: src/components/list-add-edit.jsx:124
msgid "Show replies to list members" msgid "Show replies to list members"
msgstr "" msgstr ""
#: src/components/list-add-edit.jsx:125 #: src/components/list-add-edit.jsx:127
msgid "Show replies to people I follow" msgid "Show replies to people I follow"
msgstr "" msgstr ""
#: src/components/list-add-edit.jsx:128 #: src/components/list-add-edit.jsx:130
msgid "Don't show replies" msgid "Don't show replies"
msgstr "" msgstr ""
#: src/components/list-add-edit.jsx:141 #: src/components/list-add-edit.jsx:143
msgid "Hide posts on this list from Home/Following" msgid "Hide posts on this list from Home/Following"
msgstr "" msgstr ""
#: src/components/list-add-edit.jsx:147 #: src/components/list-add-edit.jsx:149
#: src/pages/filters.jsx:554 #: src/pages/filters.jsx:554
msgid "Create" msgid "Create"
msgstr "" msgstr ""
#: src/components/list-add-edit.jsx:154 #: src/components/list-add-edit.jsx:156
msgid "Delete this list?" msgid "Delete this list?"
msgstr "" msgstr ""
#: src/components/list-add-edit.jsx:173 #: src/components/list-add-edit.jsx:175
msgid "Unable to delete list." msgid "Unable to delete list."
msgstr "" msgstr ""

View file

@ -110,11 +110,14 @@ export async function initInstance(client, instance) {
try { try {
if (uri || domain) { if (uri || domain) {
let urlBase = uri || `https://${domain}`; let urlBase = uri || `https://${domain}`;
const wellKnown = await (await fetch(`${urlBase}/.well-known/nodeinfo`)).json(); const wellKnown = await (
await fetch(`${urlBase}/.well-known/nodeinfo`)
).json();
if (Array.isArray(wellKnown?.links)) { if (Array.isArray(wellKnown?.links)) {
const nodeInfoUrl = wellKnown.links.find( const nodeInfoUrl = wellKnown.links.find(
(link) => typeof link.rel === 'string' && (link) =>
link.rel.startsWith('http://nodeinfo.diaspora.software/ns/schema/') typeof link.rel === 'string' &&
link.rel.startsWith('http://nodeinfo.diaspora.software/ns/schema/'),
)?.href; )?.href;
if (nodeInfoUrl && nodeInfoUrl.startsWith(urlBase)) { if (nodeInfoUrl && nodeInfoUrl.startsWith(urlBase)) {
nodeInfo = await (await fetch(nodeInfoUrl)).json(); nodeInfo = await (await fetch(nodeInfoUrl)).json();

View file

@ -122,7 +122,7 @@ export function getCurrentNodeInfo() {
const account = getCurrentAccount(); const account = getCurrentAccount();
const nodeInfos = store.local.getJSON('nodeInfos') || {}; const nodeInfos = store.local.getJSON('nodeInfos') || {};
const instanceURL = account.instanceURL.toLowerCase(); const instanceURL = account.instanceURL.toLowerCase();
return (currentNodeInfo = (nodeInfos[instanceURL] || {})); return (currentNodeInfo = nodeInfos[instanceURL] || {});
} catch (e) { } catch (e) {
console.error(e); console.error(e);
return {}; return {};

View file

@ -53,7 +53,9 @@ function supports(feature) {
const featureSoftware = feature.match(/^@([a-z]+)\//)[1]; const featureSoftware = feature.match(/^@([a-z]+)\//)[1];
const doesSoftwareMatch = featureSoftware === softwareName.toLowerCase(); const doesSoftwareMatch = featureSoftware === softwareName.toLowerCase();
return (supportsCache[key] = doesSoftwareMatch && satisfies(version, range, { return (supportsCache[key] =
doesSoftwareMatch &&
satisfies(version, range, {
includePrerelease: true, includePrerelease: true,
loose: true, loose: true,
})); }));