kopia lustrzana https://github.com/cheeaun/phanpy
Initial support for API Versions
rodzic
cf27553a25
commit
75a35b7e27
|
@ -216,7 +216,7 @@ msgstr ""
|
|||
#: src/pages/catchup.jsx:73
|
||||
#: src/pages/catchup.jsx:1444
|
||||
#: src/pages/catchup.jsx:2067
|
||||
#: src/pages/settings.jsx:1151
|
||||
#: src/pages/settings.jsx:1154
|
||||
msgid "Boosts"
|
||||
msgstr ""
|
||||
|
||||
|
@ -446,7 +446,7 @@ msgstr ""
|
|||
#: src/pages/list.jsx:276
|
||||
#: src/pages/notifications.jsx:915
|
||||
#: src/pages/scheduled-posts.jsx:257
|
||||
#: src/pages/settings.jsx:78
|
||||
#: src/pages/settings.jsx:79
|
||||
#: src/pages/status.jsx:1301
|
||||
msgid "Close"
|
||||
msgstr ""
|
||||
|
@ -691,7 +691,7 @@ msgstr "Content warning or sensitive media"
|
|||
|
||||
#: src/components/compose.jsx:1263
|
||||
#: src/components/status.jsx:95
|
||||
#: src/pages/settings.jsx:306
|
||||
#: src/pages/settings.jsx:307
|
||||
msgid "Public"
|
||||
msgstr ""
|
||||
|
||||
|
@ -704,13 +704,13 @@ msgstr ""
|
|||
|
||||
#: src/components/compose.jsx:1272
|
||||
#: src/components/status.jsx:97
|
||||
#: src/pages/settings.jsx:309
|
||||
#: src/pages/settings.jsx:310
|
||||
msgid "Unlisted"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/compose.jsx:1275
|
||||
#: src/components/status.jsx:98
|
||||
#: src/pages/settings.jsx:312
|
||||
#: src/pages/settings.jsx:313
|
||||
msgid "Followers only"
|
||||
msgstr ""
|
||||
|
||||
|
@ -960,7 +960,7 @@ msgid "Error loading GIFs"
|
|||
msgstr ""
|
||||
|
||||
#: src/components/drafts.jsx:64
|
||||
#: src/pages/settings.jsx:693
|
||||
#: src/pages/settings.jsx:696
|
||||
msgid "Unsent drafts"
|
||||
msgstr ""
|
||||
|
||||
|
@ -1369,7 +1369,7 @@ msgstr ""
|
|||
#: src/pages/home.jsx:225
|
||||
#: src/pages/mentions.jsx:21
|
||||
#: src/pages/mentions.jsx:168
|
||||
#: src/pages/settings.jsx:1143
|
||||
#: src/pages/settings.jsx:1146
|
||||
#: src/pages/trending.jsx:379
|
||||
msgid "Mentions"
|
||||
msgstr ""
|
||||
|
@ -1408,7 +1408,7 @@ msgstr ""
|
|||
#: src/pages/catchup.jsx:2061
|
||||
#: src/pages/favourites.jsx:12
|
||||
#: src/pages/favourites.jsx:24
|
||||
#: src/pages/settings.jsx:1147
|
||||
#: src/pages/settings.jsx:1150
|
||||
msgid "Likes"
|
||||
msgstr ""
|
||||
|
||||
|
@ -2451,7 +2451,7 @@ msgid "<0/> <1/> boosted"
|
|||
msgstr ""
|
||||
|
||||
#: src/components/timeline.jsx:455
|
||||
#: src/pages/settings.jsx:1171
|
||||
#: src/pages/settings.jsx:1174
|
||||
msgid "New posts"
|
||||
msgstr ""
|
||||
|
||||
|
@ -3325,7 +3325,7 @@ msgid "{0, plural, one {Announcement} other {Announcements}}"
|
|||
msgstr ""
|
||||
|
||||
#: src/pages/notifications.jsx:654
|
||||
#: src/pages/settings.jsx:1159
|
||||
#: src/pages/settings.jsx:1162
|
||||
msgid "Follow requests"
|
||||
msgstr ""
|
||||
|
||||
|
@ -3542,244 +3542,244 @@ msgstr ""
|
|||
msgid "Enter your search term or paste a URL above to get started."
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/settings.jsx:83
|
||||
#: src/pages/settings.jsx:84
|
||||
msgid "Settings"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/settings.jsx:92
|
||||
#: src/pages/settings.jsx:93
|
||||
msgid "Appearance"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/settings.jsx:168
|
||||
#: src/pages/settings.jsx:169
|
||||
msgid "Light"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/settings.jsx:179
|
||||
#: src/pages/settings.jsx:180
|
||||
msgid "Dark"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/settings.jsx:192
|
||||
#: src/pages/settings.jsx:193
|
||||
msgid "Auto"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/settings.jsx:202
|
||||
#: src/pages/settings.jsx:203
|
||||
msgid "Text size"
|
||||
msgstr ""
|
||||
|
||||
#. Preview of one character, in smallest size
|
||||
#. Preview of one character, in largest size
|
||||
#: src/pages/settings.jsx:207
|
||||
#: src/pages/settings.jsx:232
|
||||
#: src/pages/settings.jsx:208
|
||||
#: src/pages/settings.jsx:233
|
||||
msgid "A"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/settings.jsx:246
|
||||
#: src/pages/settings.jsx:247
|
||||
msgid "Display language"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/settings.jsx:255
|
||||
#: src/pages/settings.jsx:256
|
||||
msgid "Volunteer translations"
|
||||
msgstr "Volunteer translations"
|
||||
|
||||
#: src/pages/settings.jsx:266
|
||||
#: src/pages/settings.jsx:267
|
||||
msgid "Posting"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/settings.jsx:273
|
||||
#: src/pages/settings.jsx:274
|
||||
msgid "Default visibility"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/settings.jsx:274
|
||||
#: src/pages/settings.jsx:320
|
||||
#: src/pages/settings.jsx:275
|
||||
#: src/pages/settings.jsx:321
|
||||
msgid "Synced"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/settings.jsx:299
|
||||
#: src/pages/settings.jsx:300
|
||||
msgid "Failed to update posting privacy"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/settings.jsx:322
|
||||
#: src/pages/settings.jsx:323
|
||||
msgid "Synced to your instance server's settings. <0>Go to your instance ({instance}) for more settings.</0>"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/settings.jsx:337
|
||||
#: src/pages/settings.jsx:338
|
||||
msgid "Experiments"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/settings.jsx:350
|
||||
#: src/pages/settings.jsx:351
|
||||
msgid "Auto refresh timeline posts"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/settings.jsx:362
|
||||
#: src/pages/settings.jsx:363
|
||||
msgid "Boosts carousel"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/settings.jsx:378
|
||||
#: src/pages/settings.jsx:379
|
||||
msgid "Post translation"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/settings.jsx:389
|
||||
#: src/pages/settings.jsx:390
|
||||
msgid "Translate to "
|
||||
msgstr "Translate to "
|
||||
|
||||
#: src/pages/settings.jsx:400
|
||||
#: src/pages/settings.jsx:401
|
||||
msgid "System language ({systemTargetLanguageText})"
|
||||
msgstr ""
|
||||
|
||||
#. placeholder {0}: snapStates.settings.contentTranslationHideLanguages.length
|
||||
#: src/pages/settings.jsx:426
|
||||
#: src/pages/settings.jsx:427
|
||||
msgid "{0, plural, =0 {Hide \"Translate\" button for:} other {Hide \"Translate\" button for (#):}}"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/settings.jsx:480
|
||||
#: src/pages/settings.jsx:481
|
||||
msgid "Note: This feature uses external translation services, powered by <0>Lingva API</0> & <1>Lingva Translate</1>."
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/settings.jsx:514
|
||||
#: src/pages/settings.jsx:515
|
||||
msgid "Auto inline translation"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/settings.jsx:518
|
||||
#: src/pages/settings.jsx:519
|
||||
msgid "Automatically show translation for posts in timeline. Only works for <0>short</0> posts without content warning, media and poll."
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/settings.jsx:538
|
||||
#: src/pages/settings.jsx:539
|
||||
msgid "GIF Picker for composer"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/settings.jsx:542
|
||||
#: src/pages/settings.jsx:543
|
||||
msgid "Note: This feature uses external GIF search service, powered by <0>GIPHY</0>. G-rated (suitable for viewing by all ages), tracking parameters are stripped, referrer information is omitted from requests, but search queries and IP address information will still reach their servers."
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/settings.jsx:571
|
||||
#: src/pages/settings.jsx:572
|
||||
msgid "Image description generator"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/settings.jsx:576
|
||||
#: src/pages/settings.jsx:577
|
||||
msgid "Only for new images while composing new posts."
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/settings.jsx:583
|
||||
#: src/pages/settings.jsx:584
|
||||
msgid "Note: This feature uses external AI service, powered by <0>img-alt-api</0>. May not work well. Only for images and in English."
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/settings.jsx:609
|
||||
#: src/pages/settings.jsx:612
|
||||
msgid "Server-side grouped notifications"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/settings.jsx:613
|
||||
#: src/pages/settings.jsx:616
|
||||
msgid "Alpha-stage feature. Potentially improved grouping window but basic grouping logic."
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/settings.jsx:634
|
||||
#: src/pages/settings.jsx:637
|
||||
msgid "\"Cloud\" import/export for shortcuts settings"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/settings.jsx:639
|
||||
#: src/pages/settings.jsx:642
|
||||
msgid "⚠️⚠️⚠️ Very experimental.<0/>Stored in your own profile’s notes. Profile (private) notes are mainly used for other profiles, and hidden for own profile."
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/settings.jsx:650
|
||||
#: src/pages/settings.jsx:653
|
||||
msgid "Note: This feature uses currently-logged-in instance server API."
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/settings.jsx:667
|
||||
#: src/pages/settings.jsx:670
|
||||
msgid "Cloak mode <0>(<1>Text</1> → <2>████</2>)</0>"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/settings.jsx:676
|
||||
#: src/pages/settings.jsx:679
|
||||
msgid "Replace text as blocks, useful when taking screenshots, for privacy reasons."
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/settings.jsx:701
|
||||
#: src/pages/settings.jsx:704
|
||||
msgid "About"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/settings.jsx:740
|
||||
#: src/pages/settings.jsx:743
|
||||
msgid "<0>Built</0> by <1>@cheeaun</1>"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/settings.jsx:769
|
||||
#: src/pages/settings.jsx:772
|
||||
msgid "Sponsor"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/settings.jsx:777
|
||||
#: src/pages/settings.jsx:780
|
||||
msgid "Donate"
|
||||
msgstr "Donate"
|
||||
|
||||
#: src/pages/settings.jsx:789
|
||||
#: src/pages/settings.jsx:792
|
||||
msgid "Privacy Policy"
|
||||
msgstr ""
|
||||
|
||||
#. placeholder {0}: WEBSITE.replace(/https?:\/\//g, '').replace(/\/$/, '')
|
||||
#: src/pages/settings.jsx:796
|
||||
#: src/pages/settings.jsx:799
|
||||
msgid "<0>Site:</0> {0}"
|
||||
msgstr ""
|
||||
|
||||
#. placeholder {0}: !__FAKE_COMMIT_HASH__ && ( <span class="ib insignificant"> ( <a href={`https://github.com/cheeaun/phanpy/commit/${__COMMIT_HASH__}`} target="_blank" rel="noopener" > <RelativeTime datetime={new Date(__BUILD_TIME__)} /> </a> ) </span> )
|
||||
#: src/pages/settings.jsx:803
|
||||
#: src/pages/settings.jsx:806
|
||||
msgid "<0>Version:</0> <1/> {0}"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/settings.jsx:818
|
||||
#: src/pages/settings.jsx:821
|
||||
msgid "Version string copied"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/settings.jsx:821
|
||||
#: src/pages/settings.jsx:824
|
||||
msgid "Unable to copy version string"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/settings.jsx:1056
|
||||
#: src/pages/settings.jsx:1061
|
||||
#: src/pages/settings.jsx:1059
|
||||
#: src/pages/settings.jsx:1064
|
||||
msgid "Failed to update subscription. Please try again."
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/settings.jsx:1067
|
||||
#: src/pages/settings.jsx:1070
|
||||
msgid "Failed to remove subscription. Please try again."
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/settings.jsx:1074
|
||||
#: src/pages/settings.jsx:1077
|
||||
msgid "Push Notifications (beta)"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/settings.jsx:1096
|
||||
#: src/pages/settings.jsx:1099
|
||||
msgid "Push notifications are blocked. Please enable them in your browser settings."
|
||||
msgstr ""
|
||||
|
||||
#. placeholder {0}: [ { value: 'all', label: t`anyone`, }, { value: 'followed', label: t`people I follow`, }, { value: 'follower', label: t`followers`, }, ].map((type) => ( <option value={type.value}>{type.label}</option> ))
|
||||
#: src/pages/settings.jsx:1105
|
||||
#: src/pages/settings.jsx:1108
|
||||
msgid "Allow from <0>{0}</0>"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/settings.jsx:1114
|
||||
#: src/pages/settings.jsx:1117
|
||||
msgid "anyone"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/settings.jsx:1118
|
||||
#: src/pages/settings.jsx:1121
|
||||
msgid "people I follow"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/settings.jsx:1122
|
||||
#: src/pages/settings.jsx:1125
|
||||
msgid "followers"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/settings.jsx:1155
|
||||
#: src/pages/settings.jsx:1158
|
||||
msgid "Follows"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/settings.jsx:1163
|
||||
#: src/pages/settings.jsx:1166
|
||||
msgid "Polls"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/settings.jsx:1167
|
||||
#: src/pages/settings.jsx:1170
|
||||
msgid "Post edits"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/settings.jsx:1188
|
||||
#: src/pages/settings.jsx:1191
|
||||
msgid "Push permission was not granted since your last login. You'll need to <0><1>log in</1> again to grant push permission</0>."
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/settings.jsx:1204
|
||||
#: src/pages/settings.jsx:1207
|
||||
msgid "NOTE: Push notifications only work for <0>one account</0>."
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@ import {
|
|||
import showToast from '../utils/show-toast';
|
||||
import states from '../utils/states';
|
||||
import store from '../utils/store';
|
||||
import { getAPIVersions } from '../utils/store-utils';
|
||||
import supports from '../utils/supports';
|
||||
|
||||
const DEFAULT_TEXT_SIZE = 16;
|
||||
|
@ -595,29 +596,31 @@ function Settings({ onClose }) {
|
|||
</div>
|
||||
</li>
|
||||
)}
|
||||
{authenticated && supports('@mastodon/grouped-notifications') && (
|
||||
<li class="block">
|
||||
<label>
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={snapStates.settings.groupedNotificationsAlpha}
|
||||
onChange={(e) => {
|
||||
states.settings.groupedNotificationsAlpha =
|
||||
e.target.checked;
|
||||
}}
|
||||
/>{' '}
|
||||
<Trans>Server-side grouped notifications</Trans>
|
||||
</label>
|
||||
<div class="sub-section insignificant">
|
||||
<small>
|
||||
<Trans>
|
||||
Alpha-stage feature. Potentially improved grouping window
|
||||
but basic grouping logic.
|
||||
</Trans>
|
||||
</small>
|
||||
</div>
|
||||
</li>
|
||||
)}
|
||||
{authenticated &&
|
||||
supports('@mastodon/grouped-notifications') &&
|
||||
getAPIVersions()?.mastodon >= 2 && (
|
||||
<li class="block">
|
||||
<label>
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={snapStates.settings.groupedNotificationsAlpha}
|
||||
onChange={(e) => {
|
||||
states.settings.groupedNotificationsAlpha =
|
||||
e.target.checked;
|
||||
}}
|
||||
/>{' '}
|
||||
<Trans>Server-side grouped notifications</Trans>
|
||||
</label>
|
||||
<div class="sub-section insignificant">
|
||||
<small>
|
||||
<Trans>
|
||||
Alpha-stage feature. Potentially improved grouping
|
||||
window but basic grouping logic.
|
||||
</Trans>
|
||||
</small>
|
||||
</div>
|
||||
</li>
|
||||
)}
|
||||
{authenticated && (
|
||||
<li class="block">
|
||||
<label>
|
||||
|
|
|
@ -164,6 +164,11 @@ export function getCurrentInstanceConfiguration() {
|
|||
return getInstanceConfiguration(instance);
|
||||
}
|
||||
|
||||
export function getAPIVersions() {
|
||||
const instance = getCurrentInstance();
|
||||
return instance?.apiVersions || {};
|
||||
}
|
||||
|
||||
export function getVapidKey() {
|
||||
// Vapid key has moved from account to instance config
|
||||
const config = getCurrentInstanceConfiguration();
|
||||
|
|
Ładowanie…
Reference in New Issue