forked from naskya/firefish
Firefish v1.0.5-dev20
This commit is contained in:
parent
28ecb4aa11
commit
c98debc569
198 changed files with 1092 additions and 18003 deletions
|
@ -171,6 +171,9 @@ reservedUsernames: [
|
|||
# Proxy remote files (default: false)
|
||||
#proxyRemoteFiles: true
|
||||
|
||||
# Use authorized fetch for outgoing requests
|
||||
signToActivityPubGet: true
|
||||
|
||||
#allowedPrivateNetworks: [
|
||||
# '127.0.0.1/32'
|
||||
#]
|
||||
|
|
|
@ -1550,7 +1550,7 @@ troubleshooting: Resolució de problemes
|
|||
learnMore: Més informació
|
||||
misskeyUpdated: Firefish s'ha actualitzat!
|
||||
translate: Tradueix
|
||||
translatedFrom: Traduït desde {x}
|
||||
translatedFrom: Traduït del {x}
|
||||
aiChanMode: Ai-chan a la interfície d'usuari clàssica
|
||||
keepCw: Mantenir els avisos de contingut
|
||||
pubSub: Comptes Pub/Sub
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
_lang_: Inglés
|
||||
_lang_: Galego
|
||||
introFirefish: Benvida! Firefish é unha plataforma de medios sociais de código aberto,
|
||||
descentralizada e gratuíta para sempre!🚀
|
||||
monthAndDay: '{day}/{month}'
|
||||
|
|
|
@ -2181,3 +2181,14 @@ openServerInfo: Tampilkan informasi server dengan mengeklik ticker server di seb
|
|||
kiriman
|
||||
vibrate: Putar getaran
|
||||
clickToShowPatterns: Klik untuk menampilkan pola modul
|
||||
iconSet: Set ikon
|
||||
_iconSets:
|
||||
fill: Penuh
|
||||
regular: Reguler
|
||||
bold: Tebal
|
||||
duotone: Duotone
|
||||
light: Tipis
|
||||
reactions: Reaksi
|
||||
replies: Balasan
|
||||
quotes: Kutipan
|
||||
renotes: Postingan ulang
|
||||
|
|
|
@ -2169,3 +2169,14 @@ openServerInfo: Mostra informazioni sul server cliccando sul riquadro del server
|
|||
un post
|
||||
vibrate: Abilita la vibrazione
|
||||
clickToShowPatterns: Clicca per vedere i pattern del modulo
|
||||
iconSet: Set di icone
|
||||
_iconSets:
|
||||
fill: Con riempimento
|
||||
regular: Regolare
|
||||
bold: Grassetto
|
||||
duotone: Con due toni
|
||||
light: Sottile
|
||||
reactions: Reazioni
|
||||
replies: Risposte
|
||||
quotes: Citazioni
|
||||
renotes: Boost
|
||||
|
|
|
@ -1444,7 +1444,12 @@ _tutorial:
|
|||
step4_1: 投稿しとーみ
|
||||
step5_1: タイムライン! 文字と写真の宝石箱や~
|
||||
step5_2: うちのサーバーでは{timelines}種類のタイムラインをご用意しとります。
|
||||
step4_2: 最初は{introduction}に投稿したり、シンプルに「ここは賑やかどすなぁ。うちはそこまで喋れまへんが、どうぞよろしゅうに」などと投稿しはる方もいてます。
|
||||
step4_2: 最初は{introduction}に投稿したり、シンプルに「ここは賑やかどすなぁ。ウチはそんなに喋れまへんが、どうぞよろしゅうに」などと投稿しはる方もいてます。
|
||||
step5_7: グローバル{icon}タイムラインでは、接続しとるそこいらのサーバーからアレがガーッ流れてきてえらいこっちゃで。
|
||||
step5_6: おすすめ{icon}タイムラインでは、うちの管理人がばりおすすめしとるサーバーの投稿を表示させとうよ。
|
||||
step5_5: ソーシャル{icon}タイムラインでは、ホームタイムラインとローカルタイムラインの投稿が両方見られてホンマお得やわぁ。
|
||||
step5_3: ホーム{icon}タイムラインでは、あんたはんがフォローしてはる兄ちゃんらの投稿が見られまんねん。
|
||||
step5_4: ローカル{icon}タイムラインでは、このサーバーにおる人らの投稿を見られますわ。
|
||||
_postForm:
|
||||
_placeholders:
|
||||
b: なんかおましたか?
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
_lang_: "Polski"
|
||||
headlineFirefish: "Otwartoźródłowa, zdecentralizowana sieć społecznościowa, która zawsze
|
||||
będzie darmowa! 🚀"
|
||||
headlineFirefish: "Otwartoźródłowa, zdecentralizowana sieć społecznościowa, która
|
||||
zawsze będzie darmowa! 🚀"
|
||||
introFirefish: "Hej! Firefish to otwartoźródłowa oraz zdecentralizowana sieć społecznościowa,
|
||||
która zawsze będzie darmowa! 🚀"
|
||||
monthAndDay: "{month}-{day}"
|
||||
|
@ -94,7 +94,7 @@ privacy: "Prywatność"
|
|||
makeFollowManuallyApprove: "Prośby o możliwość obserwacji wymagają zatwierdzenia"
|
||||
defaultNoteVisibility: "Domyślna widoczność"
|
||||
follow: "Obserwuj"
|
||||
followRequest: "Poproś o możliwość obserwacji"
|
||||
followRequest: "Poproś o możliwość obserwowania"
|
||||
followRequests: "Prośby o możliwość obserwacji"
|
||||
unfollow: "Przestań obserwować"
|
||||
followRequestPending: "Oczekująca prośba o możliwość obserwacji"
|
||||
|
@ -147,9 +147,9 @@ cacheRemoteFilesDescription: "Gdy ta opcja jest wyłączona, zdalne pliki są ł
|
|||
bezpośrednio ze zdalnego serwera. Wyłączenie tej opcji zmniejszy użycie powierzchni
|
||||
dyskowej, ale zwiększy transfer, ponieważ miniaturki nie będą generowane."
|
||||
flagAsBot: "To konto jest botem"
|
||||
flagAsBotDescription: "Jeżeli ten kanał jest kontrolowany przez jakiś program, ustaw
|
||||
tę opcję. Jeżeli włączona, będzie działać jako flaga informująca innych programistów,
|
||||
aby zapobiegać nieskończonej interakcji z różnymi botami i dostosowywać wewnętrzne
|
||||
flagAsBotDescription: "Ustaw tę opcję ten jeśli kanał kontrolowany jest przez jakiś
|
||||
program. Po włączeniu, będzie działać jako flaga informująca innych programistów,
|
||||
aby zapobiegać nieskończonej interakcji pomiędzy innymi botami i dostosowywać wewnętrzne
|
||||
systemy Firefish, traktując konto jako bota."
|
||||
flagAsCat: "Czy jesteś kotem? 😺"
|
||||
flagAsCatDescription: "Dostaniesz kocie uszka, oraz będziesz mówić jak kot!"
|
||||
|
@ -158,7 +158,7 @@ autoAcceptFollowed: "Automatycznie przyjmuj prośby o możliwość obserwacji od
|
|||
których obserwujesz"
|
||||
addAccount: "Dodaj konto"
|
||||
loginFailed: "Nie udało się zalogować"
|
||||
showOnRemote: "Zobacz na zdalnym serwerze"
|
||||
showOnRemote: "Zobacz oryginalną treść"
|
||||
general: "Ogólne"
|
||||
wallpaper: "Tapeta"
|
||||
setWallpaper: "Ustaw tapetę"
|
||||
|
@ -211,7 +211,7 @@ noUsers: "Brak użytkowników"
|
|||
editProfile: "Edytuj profil"
|
||||
noteDeleteConfirm: "Czy na pewno chcesz usunąć ten wpis?"
|
||||
pinLimitExceeded: "Nie możesz przypiąć więcej wpisów"
|
||||
intro: "Zakończono instalację Firefish! Utwórz konto administratora."
|
||||
intro: "Zakończono instalację Firefish! Utwórz teraz konto administratora."
|
||||
done: "Gotowe"
|
||||
processing: "Przetwarzanie"
|
||||
preview: "Podgląd"
|
||||
|
@ -299,11 +299,11 @@ emptyDrive: "Dysk jest pusty"
|
|||
emptyFolder: "Ten katalog jest pusty"
|
||||
unableToDelete: "Nie można usunąć"
|
||||
inputNewFileName: "Wprowadź nową nazwę pliku"
|
||||
inputNewDescription: "Proszę wpisać nowy napis"
|
||||
inputNewDescription: "Podaj nowy napis"
|
||||
inputNewFolderName: "Wprowadź nową nazwę katalogu"
|
||||
circularReferenceFolder: "Katalog docelowy jest podkatalogiem katalogu, który chcesz
|
||||
przenieść."
|
||||
hasChildFilesOrFolders: "Ponieważ ten katalog nie jest pusty, nie może być usunięty."
|
||||
hasChildFilesOrFolders: "Katalog nie może być usunięty ponieważ nie jest pusty."
|
||||
copyUrl: "Skopiuj adres URL"
|
||||
rename: "Zmień nazwę"
|
||||
avatar: "Awatar"
|
||||
|
@ -578,8 +578,8 @@ disablePlayer: "Zamknij odtwarzacz wideo"
|
|||
expandTweet: "Rozwiń tweet"
|
||||
themeEditor: "Edytor motywu"
|
||||
description: "Opis"
|
||||
describeFile: "Dodaj podpis"
|
||||
enterFileDescription: "Wprowadź napis"
|
||||
describeFile: "Dodaj opis"
|
||||
enterFileDescription: "Wprowadź opis"
|
||||
author: "Autor"
|
||||
leaveConfirm: "Są niezapisane zmiany. Czy chcesz je odrzucić?"
|
||||
manage: "Zarządzanie"
|
||||
|
@ -616,7 +616,7 @@ emptyToDisableSmtpAuth: "Pozostaw adres e-mail i hasło puste, aby wyłączyć w
|
|||
SMTP"
|
||||
smtpSecureInfo: "Wyłącz, jeżeli używasz STARTTLS"
|
||||
testEmail: "Przetestuj dostarczanie wiadomości e-mail"
|
||||
wordMute: "Wyciszenie słowa"
|
||||
wordMute: "Wyciszenie słów i języków"
|
||||
instanceMute: "Wyciszenie serwera"
|
||||
userSaysSomething: "{name} powiedział* coś"
|
||||
makeActive: "Aktywuj"
|
||||
|
@ -691,8 +691,7 @@ no: "Nie"
|
|||
driveFilesCount: "Liczba plików na dysku"
|
||||
driveUsage: "Użycie przestrzeni dyskowej"
|
||||
noCrawle: "Odrzuć indeksowanie przez crawlery"
|
||||
noCrawleDescription: "Proś wyszukiwarki internetowe, aby nie indeksowały Twojego profilu,
|
||||
wpisów, stron itd."
|
||||
noCrawleDescription: "Proś wyszukiwarki internetowe, aby nie indeksowały Twoich treści."
|
||||
lockedAccountInfo: "Dopóki nie ustawisz widoczności wpisu na \"Obserwujący\", twoje
|
||||
wpisy będą mogli widzieć wszyscy, nawet jeśli ustawisz manualne zatwierdzanie obserwujących."
|
||||
alwaysMarkSensitive: "Oznacz domyślnie jako NSFW"
|
||||
|
@ -759,7 +758,7 @@ useReactionPickerForContextMenu: "Otwórz wybornik reakcji prawym kliknięciem"
|
|||
typingUsers: "{users} pisze/ą"
|
||||
jumpToSpecifiedDate: "Przejdź do określonej daty"
|
||||
showingPastTimeline: "Obecnie wyświetla starą oś czasu"
|
||||
clear: "Wróć"
|
||||
clear: "Wyczyść"
|
||||
markAllAsRead: "Oznacz wszystkie jako przeczytane"
|
||||
goBack: "Wróć"
|
||||
unlikeConfirm: "Na pewno chcesz usunąć polubienie?"
|
||||
|
@ -800,7 +799,7 @@ gallery: "Galeria"
|
|||
recentPosts: "Ostatnie wpisy"
|
||||
popularPosts: "Popularne wpisy"
|
||||
shareWithNote: "Udostępnij z wpisem"
|
||||
ads: "Reklamy"
|
||||
ads: "Banery"
|
||||
expiration: "Ankieta kończy się"
|
||||
memo: "Notatki"
|
||||
priority: "Priorytet"
|
||||
|
@ -852,7 +851,7 @@ ffVisibility: "Widoczność obserwowanych/obserwujących"
|
|||
ffVisibilityDescription: "Pozwala skonfigurować, kto może zobaczyć, kogo obserwujesz
|
||||
i kto Cię obserwuje."
|
||||
continueThread: "Kontynuuj wątek"
|
||||
deleteAccountConfirm: "Spowoduje to nieodwracalne usunięcie Twojego konta. Kontynuować?"
|
||||
deleteAccountConfirm: "Spowoduje to nieodwracalne usunięcie tego konta. Kontynuować?"
|
||||
incorrectPassword: "Nieprawidłowe hasło."
|
||||
voteConfirm: "Potwierdzić swój głos na \"{choice}\"?"
|
||||
hide: "Ukryj"
|
||||
|
@ -1001,8 +1000,8 @@ _nsfw:
|
|||
force: "Ukrywaj wszystkie media"
|
||||
_mfm:
|
||||
cheatSheet: "Ściąga MFM"
|
||||
intro: "MFM jest językiem składniowym używanym przez m.in. Firefish, forki *key (w
|
||||
tym Firefish), oraz Akkomę, który może być użyty w wielu miejscach. Tu znajdziesz
|
||||
intro: "MFM jest językiem składniowym używanym przez m.in. Firefish, forki *key
|
||||
(w tym Firefish), oraz Akkomę, który może być użyty w wielu miejscach. Tu znajdziesz
|
||||
listę wszystkich możliwych elementów składni MFM."
|
||||
dummy: "Firefish rozszerza świat Fediwersum"
|
||||
mention: "Wspomnij"
|
||||
|
@ -1250,7 +1249,7 @@ _tutorial:
|
|||
innej połączonej instancji."
|
||||
step6_1: "Więc, czym to jest to miejsce?"
|
||||
step6_2: "Cóż, nie dołączył*ś po prostu do Firefish. Dołączył*ś do portalu do Fediverse,
|
||||
połączonej sieci tysięcy serwerów, zwanych instancjami."
|
||||
sieci tysięcy połączonych ze sobą serwerów, zwanych instancjami."
|
||||
step6_3: "Każdy serwer działa w inny sposób, i nie wszystkie serwery używają Firefish.
|
||||
Ten jednak używa! Jest to trochę skomplikowane, ale w krótkim czasie załapiesz
|
||||
o co chodzi."
|
||||
|
@ -1816,8 +1815,8 @@ instanceSecurity: Bezpieczeństwo serwera
|
|||
privateMode: Tryb prywatny
|
||||
allowedInstances: Dopuszczone serwery
|
||||
recommended: Polecane
|
||||
allowedInstancesDescription: Hosty serwerów, które mają być dopuszczone do federacji,
|
||||
każdy oddzielony nowym wierszem (dotyczy tylko trybu prywatnego).
|
||||
allowedInstancesDescription: Hosty serwerów, które mają być dopuszczone do federacji.
|
||||
Każdy oddzielony nowym wierszem (dotyczy tylko trybu prywatnego).
|
||||
seperateRenoteQuote: Oddziel przyciski podbicia i cytowania
|
||||
refreshInterval: 'Częstotliwość aktualizacji '
|
||||
slow: Wolna
|
||||
|
@ -1916,14 +1915,14 @@ sendErrorReportsDescription: "Gdy ta opcja jest włączona, szczegółowe inform
|
|||
błędach będą udostępnianie z Firefish gdy wystąpi problem, pomagając w ulepszaniu
|
||||
Firefish.\nZawrze to informacje takie jak wersja twojego systemu operacyjnego, przeglądarki,
|
||||
Twoja aktywność na Firefish itd."
|
||||
privateModeInfo: Gdy ta opcja jest włączona, tylko serwery z białej listy mogą federować
|
||||
się z twoim serwerem. Wszystkie posty będą ukryte publicznie.
|
||||
privateModeInfo: Gdy ta opcja jest włączona, tylko serwery z listy serwerów dozwolonych
|
||||
mogą federować się z twoim serwerem. Żadne posty nie będą publicznie dostępne.
|
||||
oneHour: Godzina
|
||||
oneDay: Dzień
|
||||
oneWeek: Tydzień
|
||||
recommendedInstances: Polecane serwery
|
||||
recommendedInstancesDescription: Polecane serwery, mające pojawić się w odpowiedniej
|
||||
osi czasu, oddzielane nowymi liniami. NIE dodawaj “https://”, TYLKO samą domenę.
|
||||
osi czasu, oddzielane nowymi liniami.
|
||||
rateLimitExceeded: Przekroczono ratelimit
|
||||
cropImage: Kadruj zdjęcie
|
||||
cropImageAsk: Czy chcesz skadrować to zdjęcie?
|
||||
|
@ -1948,7 +1947,7 @@ activeEmailValidationDescription: Włącza ściślejszą walidację adresów e-m
|
|||
obejmuje sprawdzanie adresów jednorazowych oraz tego, czy rzeczywiście można się
|
||||
z nim komunikować. Jeśli wyłączone, walidowany jest tylko format wiadomości e-mail.
|
||||
shuffle: Losuj
|
||||
showAds: Pokazuj reklamy
|
||||
showAds: Pokazuj banery
|
||||
enterSendsMessage: Wciśnij Enter w komunikatorze, by wysłać wiadomość (domyślnie –
|
||||
Ctrl + Enter)
|
||||
adminCustomCssWarn: To ustawienie powinno być używane tylko pod warunkiem, że wiesz
|
||||
|
@ -2012,7 +2011,7 @@ silencedInstancesDescription: Wypisz nazwy hostów serwerów, które chcesz wyci
|
|||
cannotUploadBecauseExceedsFileSizeLimit: Ten plik nie mógł być przesłany, ponieważ
|
||||
jego wielkość przekracza dozwolony limit.
|
||||
sendModMail: Wyślij Powiadomienie Moderacyjne
|
||||
searchPlaceholder: Szukaj Firefish
|
||||
searchPlaceholder: Szukaj w Firefish
|
||||
jumpToPrevious: Przejdź do poprzedniej sekcji
|
||||
listsDesc: Listy umożliwiają tworzenie osi czasu z określonymi użytkownikami. Dostęp
|
||||
do nich można uzyskać na stronie osi czasu.
|
||||
|
@ -2028,3 +2027,15 @@ newer: nowsze
|
|||
older: starsze
|
||||
cw: Ostrzeżenie zawartości
|
||||
removeReaction: Usuń reakcję
|
||||
reactions: Reakcje
|
||||
clipsDesc: Spinki to skategoryzowane zakładki, które można udostępniać. Możesz utworzyć
|
||||
spinkę dla każdego wpisu w menu wpisu.
|
||||
swipeOnMobile: Pozwalaj na przeciąganie pomiędzy stronami
|
||||
image: Obrazek
|
||||
xl: XL
|
||||
replies: Odpowiedzi
|
||||
video: Film
|
||||
quotes: Cytaty
|
||||
clickToShowPatterns: Kliknij aby pokazać wzory modułów
|
||||
renotes: Boosty
|
||||
audio: Dźwięk
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
_lang_: "Português"
|
||||
_lang_: "Português (Portugal)"
|
||||
headlineFirefish: "Uma rede ligada por notas"
|
||||
introFirefish: "Bem-vindo! Firefish é um serviço de microblogue descentralizado de
|
||||
código aberto, gratuito para sempre! 🚀"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
_lang_: Português (Brasil)
|
||||
username: Nome de usuário
|
||||
ok: OK
|
||||
_lang_: Inglês
|
||||
headlineFirefish: Uma plataforma de mídia social descentralizada e de código aberto
|
||||
que é gratuita para sempre! 🚀
|
||||
search: Pesquisar
|
||||
|
|
|
@ -1 +1 @@
|
|||
0a44d0652244240aa50fbae3ea88c616c8e1c136
|
||||
3b3320d5323648a5ad9a9c3e12561613e3b89a6c
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "firefish",
|
||||
"version": "1.0.5-dev19",
|
||||
"version": "1.0.5-dev20",
|
||||
"codename": "aqua",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
|
@ -47,6 +47,7 @@
|
|||
"blurhash": "2.0.5",
|
||||
"bull": "4.11.3",
|
||||
"cacheable-lookup": "TheEssem/cacheable-lookup",
|
||||
"cbor-x": "^1.5.4",
|
||||
"chalk": "5.3.0",
|
||||
"chalk-template": "0.4.0",
|
||||
"chokidar": "^3.5.3",
|
||||
|
@ -86,7 +87,7 @@
|
|||
"meilisearch": "0.34.1",
|
||||
"mfm-js": "0.23.3",
|
||||
"mime-types": "2.1.35",
|
||||
"msgpackr": "1.9.7",
|
||||
"msgpackr": "^1.9.9",
|
||||
"multer": "1.4.4-lts.1",
|
||||
"native-utils": "link:native-utils",
|
||||
"nested-property": "4.0.0",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Misskey Entry Point!
|
||||
* Firefish Entry Point
|
||||
*/
|
||||
|
||||
import { EventEmitter } from "node:events";
|
||||
|
|
|
@ -70,7 +70,7 @@ export function parseUri(value: string | IObject): UriParseResult {
|
|||
|
||||
export default class DbResolver {
|
||||
/**
|
||||
* AP Note => Misskey Note in DB
|
||||
* AP Note => Firefish Note in DB
|
||||
*/
|
||||
public async getNoteFromApId(value: string | IObject): Promise<Note | null> {
|
||||
const parsed = parseUri(value);
|
||||
|
@ -114,7 +114,7 @@ export default class DbResolver {
|
|||
}
|
||||
|
||||
/**
|
||||
* AP Person => Misskey User in DB
|
||||
* AP Person => Firefish User in DB
|
||||
*/
|
||||
public async getUserFromApId(
|
||||
value: string | IObject,
|
||||
|
@ -147,7 +147,7 @@ export default class DbResolver {
|
|||
}
|
||||
|
||||
/**
|
||||
* AP KeyId => Misskey User and Key
|
||||
* AP KeyId => Firefish User and Key
|
||||
*/
|
||||
public async getAuthUserFromKeyId(keyId: string): Promise<{
|
||||
user: CacheableRemoteUser;
|
||||
|
@ -181,7 +181,7 @@ export default class DbResolver {
|
|||
}
|
||||
|
||||
/**
|
||||
* AP Actor id => Misskey User and Key
|
||||
* AP Actor id => Firefish User and Key
|
||||
*/
|
||||
public async getAuthUserFromApId(uri: string): Promise<{
|
||||
user: CacheableRemoteUser;
|
||||
|
|
|
@ -452,7 +452,7 @@ export async function updatePerson(
|
|||
|
||||
const emojiNames = emojis.map((emoji) => emoji.name);
|
||||
|
||||
const { fields } = analyzeAttachments(person.attachment || []);
|
||||
const fields = analyzeAttachments(person.attachment || []);
|
||||
|
||||
const tags = extractApHashtags(person.tag)
|
||||
.map((tag) => normalizeForSearch(tag))
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { decode } from "msgpackr";
|
||||
import { decode } from "cbor-x";
|
||||
import define from "../../../define.js";
|
||||
import {
|
||||
UserProfiles,
|
||||
|
@ -62,7 +62,7 @@ export default define(meta, paramDef, async (ps, user) => {
|
|||
|
||||
const clientDataJSONHash = hash(Buffer.from(ps.clientDataJSON, "utf-8"));
|
||||
|
||||
const attestation = decode(Buffer.from(ps.attestationObject, "utf-8"));
|
||||
const attestation = decode(Buffer.from(ps.attestationObject, "hex"));
|
||||
|
||||
const rpIdHash = attestation.authData.slice(0, 32);
|
||||
if (!rpIdHashReal.equals(rpIdHash)) {
|
||||
|
@ -79,7 +79,13 @@ export default define(meta, paramDef, async (ps, user) => {
|
|||
const credentialIdLength = authData.readUInt16BE(53);
|
||||
const credentialId = authData.slice(55, 55 + credentialIdLength);
|
||||
const publicKeyData = authData.slice(55 + credentialIdLength);
|
||||
const publicKey: Map<number, any> = decode(publicKeyData);
|
||||
const publicKey: Map<Number, any> = new Map(
|
||||
Object.entries(decode(publicKeyData)).map(([key, value]) => [
|
||||
Number(key),
|
||||
value,
|
||||
]),
|
||||
);
|
||||
|
||||
if (publicKey.get(3) !== -7) {
|
||||
throw new Error("alg mismatch");
|
||||
}
|
||||
|
|
|
@ -64,6 +64,7 @@ export default define(meta, paramDef, async (ps, user) => {
|
|||
|
||||
let targetLang = ps.targetLang;
|
||||
if (targetLang.includes("-")) targetLang = targetLang.split("-")[0];
|
||||
if (targetLang.includes("_")) targetLang = targetLang.split("_")[0];
|
||||
|
||||
if (instance.libreTranslateApiUrl != null) {
|
||||
const jsonBody = {
|
||||
|
|
|
@ -89,9 +89,6 @@ const nodeinfo2 = async () => {
|
|||
enableRecaptcha: meta.enableRecaptcha,
|
||||
maxNoteTextLength: MAX_NOTE_TEXT_LENGTH,
|
||||
maxCaptionTextLength: MAX_CAPTION_TEXT_LENGTH,
|
||||
enableTwitterIntegration: meta.enableTwitterIntegration,
|
||||
enableGithubIntegration: meta.enableGithubIntegration,
|
||||
enableDiscordIntegration: meta.enableDiscordIntegration,
|
||||
enableEmail: meta.enableEmail,
|
||||
enableServiceWorker: meta.enableServiceWorker,
|
||||
proxyAccountName: proxyAccount ? proxyAccount.username : null,
|
||||
|
|
|
@ -6,17 +6,11 @@ import { apiUrl } from "@/config";
|
|||
import { alert, api, popup, popupMenu, waiting } from "@/os";
|
||||
import { reloadChannel, unisonReload } from "@/scripts/unison-reload";
|
||||
import icon from "@/scripts/icon";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
|
||||
// TODO: 他のタブと永続化されたstateを同期
|
||||
|
||||
type Account = firefish.entities.MeDetailed;
|
||||
|
||||
const accountData = localStorage.getItem("account");
|
||||
|
||||
// TODO: 外部からはreadonlyに
|
||||
export const $i = accountData
|
||||
? reactive(JSON.parse(accountData) as Account)
|
||||
: null;
|
||||
export type Account = firefish.entities.MeDetailed;
|
||||
|
||||
export const iAmModerator = $i != null && ($i.isAdmin || $i.isModerator);
|
||||
export const iAmAdmin = $i?.isAdmin;
|
||||
|
@ -101,7 +95,6 @@ function fetchAccount(token: string): Promise<Account> {
|
|||
if (res.error.id === "a8c724b3-6e9c-4b46-b1a8-bc3ed6258370") {
|
||||
showSuspendedDialog();
|
||||
signout();
|
||||
return;
|
||||
} else {
|
||||
alert({
|
||||
type: "error",
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
import * as Acct from "firefish-js/built/acct";
|
||||
import { i18n } from "@/i18n";
|
||||
import { acct } from "@/filters/user";
|
||||
import { $i } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
|
||||
const getAcct = Acct.toString;
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ import Cropper from "cropperjs";
|
|||
import tinycolor from "tinycolor2";
|
||||
import XModalWindow from "@/components/MkModalWindow.vue";
|
||||
import * as os from "@/os";
|
||||
import { $i } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import { defaultStore } from "@/store";
|
||||
import { apiUrl, url } from "@/config";
|
||||
import { query } from "@/scripts/url";
|
||||
|
|
|
@ -19,7 +19,10 @@
|
|||
></i>
|
||||
<i
|
||||
v-else-if="type === 'error'"
|
||||
:class="[$style.iconInner, iconClass('ph-circle-wavy-warning')]"
|
||||
:class="[
|
||||
$style.iconInner,
|
||||
iconClass('ph-circle-wavy-warning'),
|
||||
]"
|
||||
></i>
|
||||
<i
|
||||
v-else-if="type === 'warning'"
|
||||
|
|
|
@ -45,7 +45,7 @@ import MkDriveFileThumbnail from "@/components/MkDriveFileThumbnail.vue";
|
|||
import bytes from "@/filters/bytes";
|
||||
import * as os from "@/os";
|
||||
import { i18n } from "@/i18n";
|
||||
import { $i } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import icon from "@/scripts/icon";
|
||||
|
||||
const props = withDefaults(
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
</button>
|
||||
</header>
|
||||
<transition
|
||||
:name="defaultStore.state.animation ? 'folder-toggle' : ''"
|
||||
:name="animation ? 'folder-toggle' : ''"
|
||||
@enter="enter"
|
||||
@after-enter="afterEnter"
|
||||
@leave="leave"
|
||||
|
@ -62,8 +62,8 @@ export default defineComponent({
|
|||
localStoragePrefix + this.persistKey,
|
||||
) === "t"
|
||||
: this.expanded,
|
||||
defaultStore,
|
||||
icon,
|
||||
animation: defaultStore.state.animation,
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
|
|
|
@ -66,7 +66,7 @@ import type * as firefish from "firefish-js";
|
|||
import * as os from "@/os";
|
||||
import { stream } from "@/stream";
|
||||
import { i18n } from "@/i18n";
|
||||
import { $i } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import { getUserMenu } from "@/scripts/get-user-menu";
|
||||
import { useRouter } from "@/router";
|
||||
import { vibrate } from "@/scripts/vibrate";
|
||||
|
|
|
@ -15,7 +15,7 @@ import { defaultStore } from "@/store";
|
|||
import { useChartTooltip } from "@/scripts/use-chart-tooltip";
|
||||
import { alpha } from "@/scripts/color";
|
||||
import { initChart } from "@/scripts/init-chart";
|
||||
import { $i } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
|
||||
initChart();
|
||||
|
||||
|
|
|
@ -50,9 +50,9 @@ import XMedia from "@/components/MkMedia.vue";
|
|||
import XModPlayer from "@/components/MkModPlayer.vue";
|
||||
import * as os from "@/os";
|
||||
import {
|
||||
FILE_EXT_TRACKER_MODULES,
|
||||
FILE_TYPE_BROWSERSAFE,
|
||||
FILE_TYPE_TRACKER_MODULES,
|
||||
FILE_EXT_TRACKER_MODULES,
|
||||
} from "@/const";
|
||||
|
||||
const props = defineProps<{
|
||||
|
@ -196,9 +196,7 @@ const previewable = (file: firefish.entities.DriveFile): boolean => {
|
|||
|
||||
const isModule = (file: firefish.entities.DriveFile): boolean => {
|
||||
return (
|
||||
FILE_TYPE_TRACKER_MODULES.some((type) => {
|
||||
return file.type === type;
|
||||
}) ||
|
||||
FILE_TYPE_TRACKER_MODULES.includes(file.type) ||
|
||||
FILE_EXT_TRACKER_MODULES.some((ext) => {
|
||||
return file.name.toLowerCase().endsWith("." + ext);
|
||||
})
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
import { toUnicode } from "punycode";
|
||||
import {} from "vue";
|
||||
import { host as localHost } from "@/config";
|
||||
import { $i } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import { defaultStore } from "@/store";
|
||||
|
||||
const props = defineProps<{
|
||||
|
|
|
@ -1,33 +1,33 @@
|
|||
<template>
|
||||
<div class="mod-player-disabled" v-if="!available">
|
||||
<div v-if="!available" class="mod-player-disabled">
|
||||
<MkLoading v-if="fetching" />
|
||||
<MkError v-else-if="error" @retry="load()" />
|
||||
</div>
|
||||
<div class="mod-player-disabled" v-else-if="hide" @click="toggleVisible()">
|
||||
<div v-else-if="hide" class="mod-player-disabled" @click="toggleVisible()">
|
||||
<div>
|
||||
<b><i class="ph-warning"></i> {{ i18n.ts.sensitive }}</b>
|
||||
<span>{{ i18n.ts.clickToShow }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mod-player-enabled" v-else>
|
||||
<div v-else class="mod-player-enabled">
|
||||
<div class="pattern-display">
|
||||
<div class="mod-pattern" ref="modPattern" v-if="patternShow">
|
||||
<div v-if="patternShow" ref="modPattern" class="mod-pattern">
|
||||
<span
|
||||
v-for="(row, i) in patData[currentPattern]"
|
||||
ref="initRow"
|
||||
v-bind:class="{ modRowActive: isRowActive(i) }"
|
||||
v-if="patData.length !== 0"
|
||||
ref="initRow"
|
||||
:class="{ modRowActive: isRowActive(i) }"
|
||||
>
|
||||
<span v-bind:class="{ modColQuarter: i % 4 === 0 }">{{
|
||||
<span :class="{ modColQuarter: i % 4 === 0 }">{{
|
||||
indexText(i)
|
||||
}}</span>
|
||||
<span class="mod-row-inner">{{ getRowText(row) }}</span>
|
||||
</span>
|
||||
<MkLoading v-else />
|
||||
</div>
|
||||
<div class="mod-pattern" v-else @click="showPattern()">
|
||||
<span class="modRowActive" ref="initRow">
|
||||
<div v-else class="mod-pattern" @click="showPattern()">
|
||||
<span ref="initRow" class="modRowActive">
|
||||
<span class="modColQuarter">00</span>
|
||||
<span class="mod-row-inner">|F-12Ev10XEF</span>
|
||||
</span>
|
||||
|
@ -36,39 +36,39 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<button class="play" @click="playPause()" v-if="!loading">
|
||||
<i class="ph-pause ph-fill" v-if="playing"></i>
|
||||
<i class="ph-play ph-fill" v-else></i>
|
||||
<button v-if="!loading" class="play" @click="playPause()">
|
||||
<i v-if="playing" class="ph-pause ph-fill"></i>
|
||||
<i v-else class="ph-play ph-fill"></i>
|
||||
</button>
|
||||
<MkLoading v-else :em="true" />
|
||||
<button class="stop" @click="stop()">
|
||||
<i class="ph-stop ph-fill"></i>
|
||||
</button>
|
||||
<button class="loop" @click="toggleLoop()">
|
||||
<i class="ph-repeat ph-fill" v-if="loop === -1"></i>
|
||||
<i class="ph-repeat-once ph-fill" v-else></i>
|
||||
<i v-if="loop === -1" class="ph-repeat ph-fill"></i>
|
||||
<i v-else class="ph-repeat-once ph-fill"></i>
|
||||
</button>
|
||||
<FormRange
|
||||
ref="progress"
|
||||
v-model="position"
|
||||
class="progress"
|
||||
:min="0"
|
||||
:max="length"
|
||||
v-model="position"
|
||||
:step="0.1"
|
||||
ref="progress"
|
||||
:background="false"
|
||||
:tooltips="false"
|
||||
:instant="true"
|
||||
@update:modelValue="performSeek()"
|
||||
></FormRange>
|
||||
<button class="mute" @click="toggleMute()">
|
||||
<i class="ph-speaker-simple-x ph-fill" v-if="muted"></i>
|
||||
<i class="ph-speaker-simple-high ph-fill" v-else></i>
|
||||
<i v-if="muted" class="ph-speaker-simple-x ph-fill"></i>
|
||||
<i v-else class="ph-speaker-simple-high ph-fill"></i>
|
||||
</button>
|
||||
<FormRange
|
||||
v-model="player.context.gain.value"
|
||||
class="volume"
|
||||
:min="0"
|
||||
:max="1"
|
||||
v-model="player.context.gain.value"
|
||||
:step="0.1"
|
||||
:background="false"
|
||||
:tooltips="false"
|
||||
|
@ -106,13 +106,13 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, shallowRef, nextTick, onDeactivated, onMounted } from "vue";
|
||||
import * as firefish from "firefish-js";
|
||||
import { nextTick, onDeactivated, onMounted, ref, shallowRef } from "vue";
|
||||
import type * as firefish from "firefish-js";
|
||||
import FormRange from "./form/range.vue";
|
||||
import { i18n } from "@/i18n";
|
||||
import * as os from "@/os";
|
||||
import { defaultStore } from "@/store";
|
||||
import { ChiptuneJsPlayer, ChiptuneJsConfig } from "@/scripts/chiptune2";
|
||||
import { ChiptuneJsConfig, ChiptuneJsPlayer } from "@/scripts/chiptune2";
|
||||
import icon from "@/scripts/icon";
|
||||
|
||||
const props = defineProps<{
|
||||
|
@ -130,25 +130,25 @@ interface ModRow {
|
|||
const available = ref(false);
|
||||
const initRow = shallowRef<HTMLSpanElement>();
|
||||
const player = shallowRef(new ChiptuneJsPlayer(new ChiptuneJsConfig()));
|
||||
let hide = ref(
|
||||
const hide = ref(
|
||||
defaultStore.state.nsfw === "force"
|
||||
? true
|
||||
: props.module.isSensitive && defaultStore.state.nsfw !== "ignore",
|
||||
);
|
||||
let playing = ref(false);
|
||||
let patternShow = ref(false);
|
||||
let modPattern = ref<HTMLDivElement>();
|
||||
let progress = ref<typeof FormRange>();
|
||||
let position = ref(0);
|
||||
let patData = shallowRef([] as ModRow[][]);
|
||||
let currentPattern = ref(0);
|
||||
let nbChannels = ref(0);
|
||||
let length = ref(1);
|
||||
let muted = ref(false);
|
||||
let loop = ref(0);
|
||||
let fetching = ref(true);
|
||||
let error = ref(false);
|
||||
let loading = ref(false);
|
||||
const playing = ref(false);
|
||||
const patternShow = ref(false);
|
||||
const modPattern = ref<HTMLDivElement>();
|
||||
const progress = ref<typeof FormRange>();
|
||||
const position = ref(0);
|
||||
const patData = shallowRef([] as ModRow[][]);
|
||||
const currentPattern = ref(0);
|
||||
const nbChannels = ref(0);
|
||||
const length = ref(1);
|
||||
const muted = ref(false);
|
||||
const loop = ref(0);
|
||||
const fetching = ref(true);
|
||||
const error = ref(false);
|
||||
const loading = ref(false);
|
||||
|
||||
function load() {
|
||||
player.value
|
||||
|
@ -168,10 +168,10 @@ function load() {
|
|||
|
||||
onMounted(load);
|
||||
|
||||
let currentRow = 0;
|
||||
let rowHeight = 0;
|
||||
let buffer = null;
|
||||
let isSeeking = false;
|
||||
let currentRow = 0,
|
||||
rowHeight = 0,
|
||||
buffer = null,
|
||||
isSeeking = false;
|
||||
|
||||
function captionPopup() {
|
||||
os.alert({
|
||||
|
@ -293,7 +293,6 @@ function isRowActive(i: number) {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
function indexText(i: number) {
|
||||
|
@ -305,11 +304,11 @@ function indexText(i: number) {
|
|||
}
|
||||
|
||||
function getRow(pattern: number, rowOffset: number) {
|
||||
let notes: string[] = [],
|
||||
insts: string[] = [],
|
||||
vols: string[] = [],
|
||||
fxs: string[] = [],
|
||||
ops: string[] = [];
|
||||
const notes: string[] = [];
|
||||
const insts: string[] = [];
|
||||
const vols: string[] = [];
|
||||
const fxs: string[] = [];
|
||||
const ops: string[] = [];
|
||||
|
||||
for (let channel = 0; channel < nbChannels.value; channel++) {
|
||||
const part = player.value.getPatternRowChannel(
|
||||
|
|
|
@ -294,7 +294,7 @@ import { userPage } from "@/filters/user";
|
|||
import * as os from "@/os";
|
||||
import { defaultStore, noteViewInterruptors } from "@/store";
|
||||
import { reactionPicker } from "@/scripts/reaction-picker";
|
||||
import { $i } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import { i18n } from "@/i18n";
|
||||
import { getNoteMenu } from "@/scripts/get-note-menu";
|
||||
import { useNoteCapture } from "@/scripts/use-note-capture";
|
||||
|
|
|
@ -181,7 +181,7 @@ import { userPage } from "@/filters/user";
|
|||
import * as os from "@/os";
|
||||
import { defaultStore, noteViewInterruptors } from "@/store";
|
||||
import { reactionPicker } from "@/scripts/reaction-picker";
|
||||
import { $i } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import { i18n } from "@/i18n";
|
||||
import { getNoteMenu } from "@/scripts/get-note-menu";
|
||||
import { useNoteCapture } from "@/scripts/use-note-capture";
|
||||
|
|
|
@ -210,7 +210,7 @@ import { useRouter } from "@/router";
|
|||
import { userPage } from "@/filters/user";
|
||||
import * as os from "@/os";
|
||||
import { reactionPicker } from "@/scripts/reaction-picker";
|
||||
import { $i } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import { i18n } from "@/i18n";
|
||||
import { useNoteCapture } from "@/scripts/use-note-capture";
|
||||
import { defaultStore } from "@/store";
|
||||
|
|
|
@ -54,7 +54,7 @@ import XNotification from "@/components/MkNotification.vue";
|
|||
import XList from "@/components/MkDateSeparatedList.vue";
|
||||
import XNote from "@/components/MkNote.vue";
|
||||
import { stream } from "@/stream";
|
||||
import { $i } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import { i18n } from "@/i18n";
|
||||
|
||||
const props = defineProps<{
|
||||
|
|
|
@ -285,11 +285,8 @@ import { defaultStore, notePostInterruptors, postFormActions } from "@/store";
|
|||
import MkInfo from "@/components/MkInfo.vue";
|
||||
import { i18n } from "@/i18n";
|
||||
import { instance } from "@/instance";
|
||||
import {
|
||||
$i,
|
||||
getAccounts,
|
||||
openAccountMenu as openAccountMenu_,
|
||||
} from "@/account";
|
||||
import { getAccounts, openAccountMenu as openAccountMenu_ } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import { uploadFile } from "@/scripts/upload";
|
||||
import { deepClone } from "@/scripts/clone";
|
||||
import preprocess from "@/scripts/preprocess";
|
||||
|
@ -345,7 +342,7 @@ const poll = ref<{
|
|||
expiredAfter: string | null;
|
||||
} | null>(null);
|
||||
const useCw = ref(false);
|
||||
let showPreview = ref(defaultStore.state.showPreviewByDefault);
|
||||
const showPreview = ref(defaultStore.state.showPreviewByDefault);
|
||||
const cw = ref<string | null>(null);
|
||||
const localOnly = ref<boolean>(
|
||||
props.initialLocalOnly ?? defaultStore.state.rememberNoteVisibility
|
||||
|
|
|
@ -55,7 +55,8 @@
|
|||
<script setup lang="ts">
|
||||
import { ref } from "vue";
|
||||
|
||||
import { $i, getAccounts } from "@/account";
|
||||
import { getAccounts } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import MkButton from "@/components/MkButton.vue";
|
||||
import { instance } from "@/instance";
|
||||
import { api, apiWithDialog, promiseDialog } from "@/os";
|
||||
|
|
|
@ -14,7 +14,7 @@ import { computed } from "vue";
|
|||
import type { Note } from "firefish-js/built/entities";
|
||||
import { pleaseLogin } from "@/scripts/please-login";
|
||||
import * as os from "@/os";
|
||||
import { $i } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import { i18n } from "@/i18n";
|
||||
import { defaultStore } from "@/store";
|
||||
import icon from "@/scripts/icon";
|
||||
|
|
|
@ -28,7 +28,7 @@ import XDetails from "@/components/MkReactionsViewer.details.vue";
|
|||
import XReactionIcon from "@/components/MkReactionIcon.vue";
|
||||
import * as os from "@/os";
|
||||
import { useTooltip } from "@/scripts/use-tooltip";
|
||||
import { $i } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
|
||||
const props = defineProps<{
|
||||
reaction: string;
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<script lang="ts" setup>
|
||||
import { computed, ref } from "vue";
|
||||
import type * as firefish from "firefish-js";
|
||||
import { $i } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import XReaction from "@/components/MkReactionsViewer.reaction.vue";
|
||||
|
||||
const props = defineProps<{
|
||||
|
|
|
@ -27,7 +27,7 @@ import Ripple from "@/components/MkRipple.vue";
|
|||
import XDetails from "@/components/MkUsersTooltip.vue";
|
||||
import { pleaseLogin } from "@/scripts/please-login";
|
||||
import * as os from "@/os";
|
||||
import { $i } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import { useTooltip } from "@/scripts/use-tooltip";
|
||||
import { i18n } from "@/i18n";
|
||||
import { defaultStore } from "@/store";
|
||||
|
|
|
@ -33,7 +33,7 @@ import XNotes from "@/components/MkNotes.vue";
|
|||
import MkInfo from "@/components/MkInfo.vue";
|
||||
import { stream } from "@/stream";
|
||||
import * as sound from "@/scripts/sound";
|
||||
import { $i } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import { i18n } from "@/i18n";
|
||||
import { defaultStore } from "@/store";
|
||||
import icon from "@/scripts/icon";
|
||||
|
|
|
@ -208,7 +208,7 @@ import MkPushNotificationAllowButton from "@/components/MkPushNotificationAllowB
|
|||
import FormSwitch from "@/components/form/switch.vue";
|
||||
import { defaultStore } from "@/store";
|
||||
import { i18n } from "@/i18n";
|
||||
import { $i } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import { instance } from "@/instance";
|
||||
import icon from "@/scripts/icon";
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
></i>
|
||||
<i
|
||||
v-else-if="note.visibility === 'specified'"
|
||||
v-tooltip="i18n.ts._visibility.private"
|
||||
ref="specified"
|
||||
v-tooltip="i18n.ts._visibility.private"
|
||||
:class="icon('ph-eye-slash')"
|
||||
></i>
|
||||
</span>
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
<script lang="ts" setup>
|
||||
import { shallowRef, watch } from "vue";
|
||||
import MkModal from "@/components/MkModal.vue";
|
||||
import iconClass from "@/scripts/icon"
|
||||
import iconClass from "@/scripts/icon";
|
||||
|
||||
const modal = shallowRef<InstanceType<typeof MkModal>>();
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<span class="mk-acct" v-if="show">
|
||||
<span v-if="show" class="mk-acct">
|
||||
<span class="name">@{{ user.username }}</span>
|
||||
<span
|
||||
v-if="user.host || detail || defaultStore.state.showFullAcct"
|
||||
|
@ -14,7 +14,7 @@ import type * as firefish from "firefish-js";
|
|||
import { toUnicode } from "punycode/";
|
||||
import { host as hostRaw } from "@/config";
|
||||
import { defaultStore } from "@/store";
|
||||
import { $i } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
|
||||
const props = defineProps<{
|
||||
user: firefish.entities.UserDetailed;
|
||||
|
|
|
@ -49,7 +49,7 @@ import { extractAvgColorFromBlurhash } from "@/scripts/extract-avg-color-from-bl
|
|||
import { acct, userPage } from "@/filters/user";
|
||||
import MkUserOnlineIndicator from "@/components/MkUserOnlineIndicator.vue";
|
||||
import { defaultStore } from "@/store";
|
||||
import { $i } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
<i
|
||||
v-else-if="metadata.icon && !narrow"
|
||||
class="icon"
|
||||
:class="metadata.icon"
|
||||
:class="icon(metadata.icon)"
|
||||
></i>
|
||||
|
||||
<div class="title">
|
||||
|
@ -138,7 +138,8 @@ import MkFollowButton from "@/components/MkFollowButton.vue";
|
|||
import { popupMenu } from "@/os";
|
||||
import { scrollToTop } from "@/scripts/scroll";
|
||||
import { injectPageMetadata } from "@/scripts/page-metadata";
|
||||
import { $i, openAccountMenu as openAccountMenu_ } from "@/account";
|
||||
import { openAccountMenu as openAccountMenu_ } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import { i18n } from "@/i18n";
|
||||
import icon from "@/scripts/icon";
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<script lang="ts" setup>
|
||||
import type * as firefish from "firefish-js";
|
||||
import { defaultStore } from "@/store";
|
||||
import { $i } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
|
|
|
@ -264,7 +264,7 @@ export default defineComponent({
|
|||
: token.props.args.y
|
||||
? "perspective(128px) rotateY"
|
||||
: "rotate";
|
||||
const degrees = parseInt(token.props.args.deg) || "90";
|
||||
const degrees = parseFloat(token.props.args.deg) ?? "90";
|
||||
style = `transform: ${rotate}(${degrees}deg); transform-origin: center center;`;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ import { parse } from "@syuilo/aiscript";
|
|||
import XBlock from "./page.block.vue";
|
||||
import { Hpml } from "@/scripts/hpml/evaluator";
|
||||
import { url } from "@/config";
|
||||
import { $i } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import { defaultStore } from "@/store";
|
||||
|
||||
export default defineComponent({
|
||||
|
|
|
@ -14,7 +14,6 @@ import "@phosphor-icons/web/light";
|
|||
import "@phosphor-icons/web/duotone";
|
||||
|
||||
// #region account indexedDB migration
|
||||
import { set } from "@/scripts/idb-proxy";
|
||||
|
||||
const accounts = localStorage.getItem("accounts");
|
||||
if (accounts) {
|
||||
|
@ -31,6 +30,7 @@ import {
|
|||
version as vueVersion,
|
||||
watch,
|
||||
} from "vue";
|
||||
import { set } from "@/scripts/idb-proxy";
|
||||
|
||||
import widgets from "@/widgets";
|
||||
import directives from "@/directives";
|
||||
|
@ -42,7 +42,8 @@ import { i18n } from "@/i18n";
|
|||
import { alert, api, confirm, popup, post, toast } from "@/os";
|
||||
import { stream } from "@/stream";
|
||||
import * as sound from "@/scripts/sound";
|
||||
import { $i, login, refreshAccount, signout, updateAccount } from "@/account";
|
||||
import { login, refreshAccount, signout, updateAccount } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import { ColdDeviceStorage, defaultStore } from "@/store";
|
||||
import { fetchInstance, instance } from "@/instance";
|
||||
import { makeHotkey } from "@/scripts/hotkey";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { computed, reactive } from "vue";
|
||||
import { $i } from "./account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import { search } from "@/scripts/search";
|
||||
import * as os from "@/os";
|
||||
import { i18n } from "@/i18n";
|
||||
|
|
|
@ -12,7 +12,7 @@ import MkWaitingDialog from "@/components/MkWaitingDialog.vue";
|
|||
import MkToast from "@/components/MkToast.vue";
|
||||
import MkDialog from "@/components/MkDialog.vue";
|
||||
import type { MenuItem } from "@/types/menu";
|
||||
import { $i } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
|
||||
export const pendingApiRequestsCount = ref(0);
|
||||
|
||||
|
@ -24,7 +24,7 @@ export const api = ((
|
|||
endpoint: string,
|
||||
data: Record<string, any> = {},
|
||||
token?: string | null | undefined,
|
||||
useToken: boolean = true,
|
||||
useToken = true,
|
||||
) => {
|
||||
pendingApiRequestsCount.value++;
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@
|
|||
><i :class="icon('ph-code')"></i
|
||||
></template>
|
||||
{{ i18n.ts._aboutFirefish.source }}
|
||||
<template #suffix>GitLab</template>
|
||||
<template #suffix>Repository</template>
|
||||
</FormLink>
|
||||
<FormLink
|
||||
to="https://opencollective.com/firefish"
|
||||
|
|
|
@ -2,7 +2,11 @@
|
|||
<div ref="el" class="fdidabkc" :style="{ background: bg }" @click="onClick">
|
||||
<template v-if="metadata">
|
||||
<div class="titleContainer" @click="showTabsPopup">
|
||||
<i v-if="metadata.icon" class="icon" :class="metadata.icon"></i>
|
||||
<i
|
||||
v-if="metadata.icon"
|
||||
class="icon"
|
||||
:class="icon(metadata.icon)"
|
||||
></i>
|
||||
|
||||
<div class="title">
|
||||
<div class="title">{{ metadata.title }}</div>
|
||||
|
@ -63,6 +67,7 @@ import { scrollToTop } from "@/scripts/scroll";
|
|||
import MkButton from "@/components/MkButton.vue";
|
||||
import { globalEvents } from "@/events";
|
||||
import { injectPageMetadata } from "@/scripts/page-metadata";
|
||||
import icon from "@/scripts/icon";
|
||||
|
||||
interface Tab {
|
||||
key?: string | null;
|
||||
|
|
|
@ -73,7 +73,7 @@ import MkSuperMenu from "@/components/MkSuperMenu.vue";
|
|||
import MkInfo from "@/components/MkInfo.vue";
|
||||
import { instance } from "@/instance";
|
||||
import { version } from "@/config";
|
||||
import { $i } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import * as os from "@/os";
|
||||
import { lookupUser } from "@/scripts/lookup-user";
|
||||
import { lookupFile } from "@/scripts/lookup-file";
|
||||
|
|
|
@ -51,7 +51,8 @@ import XForm from "./auth.form.vue";
|
|||
import MkSignin from "@/components/MkSignin.vue";
|
||||
import MkKeyValue from "@/components/MkKeyValue.vue";
|
||||
import * as os from "@/os";
|
||||
import { $i, login } from "@/account";
|
||||
import { login } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import { i18n } from "@/i18n";
|
||||
|
||||
const props = defineProps<{
|
||||
|
|
|
@ -103,7 +103,7 @@ import XTimeline from "@/components/MkTimeline.vue";
|
|||
import XChannelFollowButton from "@/components/MkChannelFollowButton.vue";
|
||||
import * as os from "@/os";
|
||||
import { useRouter } from "@/router";
|
||||
import { $i } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import { i18n } from "@/i18n";
|
||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||
import icon from "@/scripts/icon";
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
import { computed, provide, ref, watch } from "vue";
|
||||
import type * as firefish from "firefish-js";
|
||||
import XNotes from "@/components/MkNotes.vue";
|
||||
import { $i } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import { i18n } from "@/i18n";
|
||||
import * as os from "@/os";
|
||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||
|
|
|
@ -146,7 +146,7 @@ import MkFolder from "@/components/MkFolder.vue";
|
|||
import MkTab from "@/components/MkTab.vue";
|
||||
import * as os from "@/os";
|
||||
import { i18n } from "@/i18n";
|
||||
import { $i } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import icon from "@/scripts/icon";
|
||||
|
||||
const props = defineProps<{
|
||||
|
|
|
@ -88,7 +88,7 @@ import { acct, userPage } from "@/filters/user";
|
|||
import * as os from "@/os";
|
||||
import { i18n } from "@/i18n";
|
||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||
import { $i } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import icon from "@/scripts/icon";
|
||||
|
||||
const paginationComponent = ref<InstanceType<typeof MkPagination>>();
|
||||
|
|
|
@ -100,7 +100,7 @@ import { stream } from "@/stream";
|
|||
import { useRouter } from "@/router";
|
||||
import { i18n } from "@/i18n";
|
||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||
import { $i } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import { deviceKind } from "@/scripts/device-kind";
|
||||
import { defaultStore } from "@/store";
|
||||
import icon from "@/scripts/icon";
|
||||
|
|
|
@ -90,7 +90,7 @@ import XMediaList from "@/components/MkMediaList.vue";
|
|||
import { extractUrlFromMfm } from "@/scripts/extract-url-from-mfm";
|
||||
import MkUrlPreview from "@/components/MkUrlPreview.vue";
|
||||
import * as os from "@/os";
|
||||
import { $i } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import { i18n } from "@/i18n";
|
||||
import icon from "@/scripts/icon";
|
||||
|
||||
|
|
|
@ -122,7 +122,7 @@ import { stream } from "@/stream";
|
|||
import * as sound from "@/scripts/sound";
|
||||
import { vibrate } from "@/scripts/vibrate";
|
||||
import { i18n } from "@/i18n";
|
||||
import { $i } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import { defaultStore } from "@/store";
|
||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||
import icon from "@/scripts/icon";
|
||||
|
|
|
@ -82,7 +82,8 @@ import { ref } from "vue";
|
|||
import MkSignin from "@/components/MkSignin.vue";
|
||||
import MkButton from "@/components/MkButton.vue";
|
||||
import * as os from "@/os";
|
||||
import { $i, login } from "@/account";
|
||||
import { login } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import { appendQuery, query } from "@/scripts/url";
|
||||
import { i18n } from "@/i18n";
|
||||
import icon from "@/scripts/icon";
|
||||
|
|
|
@ -79,7 +79,7 @@ import * as os from "@/os";
|
|||
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||
import { i18n } from "@/i18n";
|
||||
import { defaultStore } from "@/store";
|
||||
import { $i } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import icon from "@/scripts/icon";
|
||||
|
||||
const props = defineProps<{
|
||||
|
|
|
@ -179,7 +179,7 @@ import { selectFile } from "@/scripts/select-file";
|
|||
import { mainRouter } from "@/router";
|
||||
import { i18n } from "@/i18n";
|
||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||
import { $i } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import icon from "@/scripts/icon";
|
||||
|
||||
const props = defineProps<{
|
||||
|
|
|
@ -50,7 +50,7 @@ import MkContainer from "@/components/MkContainer.vue";
|
|||
import MkButton from "@/components/MkButton.vue";
|
||||
import { createAiScriptEnv } from "@/scripts/aiscript/api";
|
||||
import * as os from "@/os";
|
||||
import { $i } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import { i18n } from "@/i18n";
|
||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||
import icon from "@/scripts/icon";
|
||||
|
|
|
@ -120,7 +120,7 @@ import MkSwitch from "@/components/form/switch.vue";
|
|||
import FormSection from "@/components/form/section.vue";
|
||||
import MkFolder from "@/components/MkFolder.vue";
|
||||
import * as os from "@/os";
|
||||
import { $i } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import { i18n } from "@/i18n";
|
||||
import icon from "@/scripts/icon";
|
||||
|
||||
|
@ -279,7 +279,7 @@ async function addSecurityKey() {
|
|||
challenge: byteify(challenge.challenge, "base64"),
|
||||
rp: {
|
||||
id: hostname,
|
||||
name: "Misskey",
|
||||
name: "Firefish",
|
||||
},
|
||||
user: {
|
||||
id: byteify($i!.id, "ascii"),
|
||||
|
|
|
@ -179,7 +179,7 @@ import MkKeyValue from "@/components/MkKeyValue.vue";
|
|||
import * as os from "@/os";
|
||||
import number from "@/filters/number";
|
||||
import bytes from "@/filters/bytes";
|
||||
import { $i } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import { i18n } from "@/i18n";
|
||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||
import icon from "@/scripts/icon";
|
||||
|
|
|
@ -34,12 +34,12 @@ import FormSuspense from "@/components/form/suspense.vue";
|
|||
import FormButton from "@/components/MkButton.vue";
|
||||
import * as os from "@/os";
|
||||
import {
|
||||
$i,
|
||||
removeAccount as _removeAccount,
|
||||
addAccount as addAccounts,
|
||||
getAccounts,
|
||||
login,
|
||||
} from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import { i18n } from "@/i18n";
|
||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||
import icon from "@/scripts/icon";
|
||||
|
|
|
@ -70,7 +70,7 @@ import bytes from "@/filters/bytes";
|
|||
import { defaultStore } from "@/store";
|
||||
import { i18n } from "@/i18n";
|
||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||
import { $i } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import icon from "@/scripts/icon";
|
||||
|
||||
const fetching = ref(true);
|
||||
|
|
|
@ -66,7 +66,7 @@ import FormSection from "@/components/form/section.vue";
|
|||
import FormInput from "@/components/form/input.vue";
|
||||
import FormSwitch from "@/components/form/switch.vue";
|
||||
import * as os from "@/os";
|
||||
import { $i } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import { i18n } from "@/i18n";
|
||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||
import icon from "@/scripts/icon";
|
||||
|
|
|
@ -395,7 +395,7 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { computed, ref, watch } from "vue";
|
||||
import { $i } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import FormSwitch from "@/components/form/switch.vue";
|
||||
import FormSelect from "@/components/form/select.vue";
|
||||
import FormRadios from "@/components/form/radios.vue";
|
||||
|
|
|
@ -45,7 +45,8 @@ import { computed, onActivated, onMounted, onUnmounted, ref, watch } from "vue";
|
|||
import { i18n } from "@/i18n";
|
||||
import MkInfo from "@/components/MkInfo.vue";
|
||||
import MkSuperMenu from "@/components/MkSuperMenu.vue";
|
||||
import { $i, signout } from "@/account";
|
||||
import { signout } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import { unisonReload } from "@/scripts/unison-reload";
|
||||
import { instance } from "@/instance";
|
||||
import { useRouter } from "@/router";
|
||||
|
|
|
@ -26,7 +26,7 @@ import FormTextarea from "@/components/form/textarea.vue";
|
|||
import MkInfo from "@/components/MkInfo.vue";
|
||||
import MkButton from "@/components/MkButton.vue";
|
||||
import * as os from "@/os";
|
||||
import { $i } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import { i18n } from "@/i18n";
|
||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||
import icon from "@/scripts/icon";
|
||||
|
|
|
@ -60,7 +60,7 @@ import FormInfo from "@/components/MkInfo.vue";
|
|||
import * as os from "@/os";
|
||||
import { i18n } from "@/i18n";
|
||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||
import { $i } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import icon from "@/scripts/icon";
|
||||
|
||||
const moveToAccount = ref("");
|
||||
|
|
|
@ -54,7 +54,7 @@ import { notificationTypes } from "firefish-js";
|
|||
import FormButton from "@/components/MkButton.vue";
|
||||
import FormSection from "@/components/form/section.vue";
|
||||
import * as os from "@/os";
|
||||
import { $i } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import { i18n } from "@/i18n";
|
||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||
import MkPushNotificationAllowButton from "@/components/MkPushNotificationAllowButton.vue";
|
||||
|
|
|
@ -65,7 +65,7 @@ import * as os from "@/os";
|
|||
import { ColdDeviceStorage, defaultStore } from "@/store";
|
||||
import { unisonReload } from "@/scripts/unison-reload";
|
||||
import { stream } from "@/stream";
|
||||
import { $i } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import { i18n } from "@/i18n";
|
||||
import { host, version } from "@/config";
|
||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||
|
|
|
@ -165,7 +165,7 @@ import FormFolder from "@/components/form/folder.vue";
|
|||
import * as os from "@/os";
|
||||
import { defaultStore } from "@/store";
|
||||
import { i18n } from "@/i18n";
|
||||
import { $i } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||
import icon from "@/scripts/icon";
|
||||
|
||||
|
|
|
@ -170,7 +170,7 @@ import FormSlot from "@/components/form/slot.vue";
|
|||
import { selectFile } from "@/scripts/select-file";
|
||||
import * as os from "@/os";
|
||||
import { i18n } from "@/i18n";
|
||||
import { $i } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import { langmap } from "@/scripts/langmap";
|
||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||
import { host } from "@/config";
|
||||
|
|
|
@ -70,7 +70,7 @@ import MkTab from "@/components/MkTab.vue";
|
|||
import * as os from "@/os";
|
||||
import number from "@/filters/number";
|
||||
import { defaultStore } from "@/store";
|
||||
import { $i } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import { i18n } from "@/i18n";
|
||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||
import icon from "@/scripts/icon";
|
||||
|
|
|
@ -151,7 +151,7 @@ import FormButton from "@/components/MkButton.vue";
|
|||
import FormTextarea from "@/components/form/textarea.vue";
|
||||
import FormFolder from "@/components/form/folder.vue";
|
||||
|
||||
import { $i } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import type { Theme } from "@/scripts/theme";
|
||||
import { applyTheme } from "@/scripts/theme";
|
||||
import lightTheme from "@/themes/_light.json5";
|
||||
|
|
|
@ -74,7 +74,7 @@ import * as os from "@/os";
|
|||
import { defaultStore } from "@/store";
|
||||
import { i18n } from "@/i18n";
|
||||
import { instance } from "@/instance";
|
||||
import { $i } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||
import { deviceKind } from "@/scripts/device-kind";
|
||||
import icon from "@/scripts/icon";
|
||||
|
|
|
@ -214,7 +214,7 @@
|
|||
:inline="true"
|
||||
:transparent="false"
|
||||
:full="true"
|
||||
:hideFollowButton="hideFollowButton"
|
||||
:hide-follow-button="hideFollowButton"
|
||||
class="koudoku"
|
||||
@refresh="emit('refresh')"
|
||||
/>
|
||||
|
@ -389,7 +389,7 @@ import { userPage } from "@/filters/user";
|
|||
import { defaultStore } from "@/store";
|
||||
import * as os from "@/os";
|
||||
import { i18n } from "@/i18n";
|
||||
import { $i } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import { host } from "@/config";
|
||||
import icon from "@/scripts/icon";
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ import * as os from "@/os";
|
|||
import { useRouter } from "@/router";
|
||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||
import { i18n } from "@/i18n";
|
||||
import { $i } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import icon from "@/scripts/icon";
|
||||
|
||||
const XHome = defineAsyncComponent(() => import("./home.vue"));
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
import type { Ref } from "vue";
|
||||
import { onUnmounted, ref, watch } from "vue";
|
||||
import { $i } from "./account";
|
||||
import { api } from "./os";
|
||||
import { stream } from "./stream";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
|
||||
type StateDef = Record<
|
||||
string,
|
||||
|
|
9
packages/client/src/reactiveAccount.ts
Normal file
9
packages/client/src/reactiveAccount.ts
Normal file
|
@ -0,0 +1,9 @@
|
|||
import { reactive } from "vue";
|
||||
import type { Account } from "@/account";
|
||||
|
||||
const accountData = localStorage.getItem("account");
|
||||
|
||||
// TODO: 外部からはreadonlyに
|
||||
export const $i = accountData
|
||||
? reactive(JSON.parse(accountData) as Account)
|
||||
: null;
|
|
@ -1,7 +1,8 @@
|
|||
import type { AsyncComponentLoader } from "vue";
|
||||
import { defineAsyncComponent, inject } from "vue";
|
||||
import { Router } from "@/nirax";
|
||||
import { $i, iAmModerator, iAmEmojiMod } from "@/account";
|
||||
import { iAmEmojiMod, iAmModerator } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import MkLoading from "@/pages/_loading_.vue";
|
||||
import MkError from "@/pages/_error_.vue";
|
||||
import { api } from "@/os";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { utils, values } from "@syuilo/aiscript";
|
||||
import * as os from "@/os";
|
||||
import { $i } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
|
||||
export function createAiScriptEnv(opts) {
|
||||
let apiRequests = 0;
|
||||
|
|
|
@ -105,14 +105,14 @@ export function getWordSoftMute(
|
|||
}
|
||||
}
|
||||
if (mutedLangs.length > 0) {
|
||||
let noteLangMuted = checkLangMute(note, mutedLangs);
|
||||
const noteLangMuted = checkLangMute(note, mutedLangs);
|
||||
if (noteLangMuted.muted) {
|
||||
noteLangMuted.what = "note";
|
||||
return noteLangMuted;
|
||||
}
|
||||
|
||||
if (note.renote) {
|
||||
let renoteLangMuted = checkLangMute(note, mutedLangs);
|
||||
const renoteLangMuted = checkLangMute(note, mutedLangs);
|
||||
if (renoteLangMuted.muted) {
|
||||
renoteLangMuted.what = note.text == null ? "renote" : "quote";
|
||||
return renoteLangMuted;
|
||||
|
@ -120,7 +120,7 @@ export function getWordSoftMute(
|
|||
}
|
||||
|
||||
if (note.reply) {
|
||||
let replyLangMuted = checkLangMute(note, mutedLangs);
|
||||
const replyLangMuted = checkLangMute(note, mutedLangs);
|
||||
if (replyLangMuted.muted) {
|
||||
replyLangMuted.what = "reply";
|
||||
return replyLangMuted;
|
||||
|
|
|
@ -309,9 +309,9 @@ ChiptuneJsPlayer.prototype.createLibopenmptNode = async function (
|
|||
}
|
||||
return;
|
||||
}
|
||||
let framesRendered = 0;
|
||||
let ended = false;
|
||||
let error = false;
|
||||
let framesRendered = 0,
|
||||
ended = false,
|
||||
error = false;
|
||||
|
||||
const currentPattern =
|
||||
processNode.player.libopenmpt._openmpt_module_get_current_pattern(
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import type { Ref } from "vue";
|
||||
import { defineAsyncComponent, inject } from "vue";
|
||||
import type * as firefish from "firefish-js";
|
||||
import { $i } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import { i18n } from "@/i18n";
|
||||
import { instance } from "@/instance";
|
||||
import * as os from "@/os";
|
||||
|
|
|
@ -5,7 +5,8 @@ import copyToClipboard from "@/scripts/copy-to-clipboard";
|
|||
import { host } from "@/config";
|
||||
import * as os from "@/os";
|
||||
import { userActions } from "@/store";
|
||||
import { $i, iAmModerator } from "@/account";
|
||||
import { iAmModerator } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import { mainRouter } from "@/router";
|
||||
import type { Router } from "@/nirax";
|
||||
import icon from "@/scripts/icon";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { defineAsyncComponent } from "vue";
|
||||
import { $i } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import { i18n } from "@/i18n";
|
||||
import { popup } from "@/os";
|
||||
import { vibrate } from "@/scripts/vibrate";
|
||||
|
|
|
@ -3,7 +3,7 @@ import type * as firefish from "firefish-js";
|
|||
import { readAndCompressImage } from "browser-image-resizer";
|
||||
import { defaultStore } from "@/store";
|
||||
import { apiUrl } from "@/config";
|
||||
import { $i } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import { alert } from "@/os";
|
||||
import { i18n } from "@/i18n";
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ import type { Ref } from "vue";
|
|||
import { onUnmounted } from "vue";
|
||||
import type * as firefish from "firefish-js";
|
||||
import { stream } from "@/stream";
|
||||
import { $i } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import * as os from "@/os";
|
||||
|
||||
export function useNoteCapture(props: {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import * as firefish from "firefish-js";
|
||||
import { markRaw } from "vue";
|
||||
import { $i } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import { url } from "@/config";
|
||||
|
||||
export const stream = markRaw(
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import type { Theme } from "./scripts/theme";
|
||||
import { api } from "@/os";
|
||||
import { $i } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
|
||||
const lsCacheKey = $i ? `themes:${$i.id}` : "";
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ import { swInject } from "./sw-inject";
|
|||
import { pendingApiRequestsCount, popup, popups } from "@/os";
|
||||
import { uploads } from "@/scripts/upload";
|
||||
import * as sound from "@/scripts/sound";
|
||||
import { $i } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import { stream } from "@/stream";
|
||||
|
||||
const XStreamIndicator = defineAsyncComponent(
|
||||
|
|
|
@ -147,7 +147,8 @@ import {
|
|||
} from "vue";
|
||||
import * as os from "@/os";
|
||||
import { navbarItemDef } from "@/navbar";
|
||||
import { $i, openAccountMenu as openAccountMenu_ } from "@/account";
|
||||
import { openAccountMenu as openAccountMenu_ } from "@/account";
|
||||
import { $i } from "@/reactiveAccount";
|
||||
import { openHelpMenu_ } from "@/scripts/helpMenu";
|
||||
import { defaultStore } from "@/store";
|
||||
import { i18n } from "@/i18n";
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue