mirror of
https://github.com/modrinth/code.git
synced 2026-08-25 09:04:55 +00:00
feat: blocking frontend (#6911)
* feat: blocking api interfaces * feat: block action on user pages + shared instance flows * feat: safety settings subpage * feat: interaction source settings * feat: finish social settings * feat: profile settings xplat * fix: prepr * feat: click on friends * default instance -> game options & fix feature flag width * fix: scroll indicators --------- Co-authored-by: Prospector <6166773+Prospector@users.noreply.github.com>
This commit is contained in:
@@ -2972,12 +2972,6 @@
|
||||
"settings.pats.modal.delete.description": {
|
||||
"message": "Toto vymaže tento token navždy (jako opravdu navždy)."
|
||||
},
|
||||
"settings.profile.bio.title": {
|
||||
"message": "Bio"
|
||||
},
|
||||
"settings.profile.profile-picture.title": {
|
||||
"message": "Profilový obrázek"
|
||||
},
|
||||
"settings.sidebar.label.developer": {
|
||||
"message": "Vývojář"
|
||||
},
|
||||
|
||||
@@ -3200,27 +3200,6 @@
|
||||
"settings.pats.token.never-used": {
|
||||
"message": "Aldrig brugt"
|
||||
},
|
||||
"settings.profile.bio.description": {
|
||||
"message": "En kort beskrivelse, der fortæller alle lidt om dig selv."
|
||||
},
|
||||
"settings.profile.bio.title": {
|
||||
"message": "Om dig"
|
||||
},
|
||||
"settings.profile.description": {
|
||||
"message": "Dine profiloplysninger kan ses offentligt på Modrinth og via <docs-link>Modrinth API</docs-link>."
|
||||
},
|
||||
"settings.profile.head-title": {
|
||||
"message": "Profil indstillinger"
|
||||
},
|
||||
"settings.profile.profile-info": {
|
||||
"message": "Profiloplysninger"
|
||||
},
|
||||
"settings.profile.profile-picture.title": {
|
||||
"message": "Profilbillede"
|
||||
},
|
||||
"settings.profile.username.description": {
|
||||
"message": "Et unikt, ikke-versalfølsomt navn til at identificere din profil."
|
||||
},
|
||||
"settings.sessions.action.revoke-session": {
|
||||
"message": "Inddrag adgang"
|
||||
},
|
||||
|
||||
@@ -5129,27 +5129,6 @@
|
||||
"settings.pats.token.never-used": {
|
||||
"message": "Nie verwendet"
|
||||
},
|
||||
"settings.profile.bio.description": {
|
||||
"message": "Eine kurze Beschreibung um allen etwas über dich zu erzählen."
|
||||
},
|
||||
"settings.profile.bio.title": {
|
||||
"message": "Bio"
|
||||
},
|
||||
"settings.profile.description": {
|
||||
"message": "Deine Profilinformationen sind auf Modrinth und über die <docs-link>Modrinth API</docs-link> öffentlich einsehbar."
|
||||
},
|
||||
"settings.profile.head-title": {
|
||||
"message": "Profileinstellungen"
|
||||
},
|
||||
"settings.profile.profile-info": {
|
||||
"message": "Profilinformationen"
|
||||
},
|
||||
"settings.profile.profile-picture.title": {
|
||||
"message": "Profilbild"
|
||||
},
|
||||
"settings.profile.username.description": {
|
||||
"message": "Ein eindeutiger Name (ohne berücksichtigung der Gross-/Kleinschreibung) zur identifikation deines Profils."
|
||||
},
|
||||
"settings.sessions.action.revoke-session": {
|
||||
"message": "Sitzung widerrufen"
|
||||
},
|
||||
|
||||
@@ -5129,27 +5129,6 @@
|
||||
"settings.pats.token.never-used": {
|
||||
"message": "Nie verwendet"
|
||||
},
|
||||
"settings.profile.bio.description": {
|
||||
"message": "Eine kurze Beschreibung, um allen ein wenig über dich zu erzählen."
|
||||
},
|
||||
"settings.profile.bio.title": {
|
||||
"message": "Bio"
|
||||
},
|
||||
"settings.profile.description": {
|
||||
"message": "Deine Profilinformationen sind auf Modrinth und über die <docs-link>Modrinth-API</docs-link> öffentlich einsehbar."
|
||||
},
|
||||
"settings.profile.head-title": {
|
||||
"message": "Profileinstellungen"
|
||||
},
|
||||
"settings.profile.profile-info": {
|
||||
"message": "Profilinformationen"
|
||||
},
|
||||
"settings.profile.profile-picture.title": {
|
||||
"message": "Profilbild"
|
||||
},
|
||||
"settings.profile.username.description": {
|
||||
"message": "Ein eindeutiger Name ohne Berücksichtigung der Groß-/Kleinschreibung zur Identifizierung deines Profils."
|
||||
},
|
||||
"settings.sessions.action.revoke-session": {
|
||||
"message": "Sitzung widerrufen"
|
||||
},
|
||||
|
||||
@@ -5174,27 +5174,6 @@
|
||||
"settings.pats.token.never-used": {
|
||||
"message": "Never used"
|
||||
},
|
||||
"settings.profile.bio.description": {
|
||||
"message": "A short description to tell everyone a little bit about you."
|
||||
},
|
||||
"settings.profile.bio.title": {
|
||||
"message": "Bio"
|
||||
},
|
||||
"settings.profile.description": {
|
||||
"message": "Your profile information is publicly viewable on Modrinth and through the <docs-link>Modrinth API</docs-link>."
|
||||
},
|
||||
"settings.profile.head-title": {
|
||||
"message": "Profile settings"
|
||||
},
|
||||
"settings.profile.profile-info": {
|
||||
"message": "Profile information"
|
||||
},
|
||||
"settings.profile.profile-picture.title": {
|
||||
"message": "Profile picture"
|
||||
},
|
||||
"settings.profile.username.description": {
|
||||
"message": "A unique case-insensitive name to identify your profile."
|
||||
},
|
||||
"settings.sessions.action.revoke-session": {
|
||||
"message": "Revoke session"
|
||||
},
|
||||
|
||||
@@ -4637,27 +4637,6 @@
|
||||
"settings.pats.token.never-used": {
|
||||
"message": "Nunca usado"
|
||||
},
|
||||
"settings.profile.bio.description": {
|
||||
"message": "Una breve descripción para que todos sepan un poco sobre ti."
|
||||
},
|
||||
"settings.profile.bio.title": {
|
||||
"message": "Biografía"
|
||||
},
|
||||
"settings.profile.description": {
|
||||
"message": "La información de tu perfil es visible públicamente en Modrinth y mediante la <docs-link>API de Modrinth</docs-link>."
|
||||
},
|
||||
"settings.profile.head-title": {
|
||||
"message": "Configuración del perfil"
|
||||
},
|
||||
"settings.profile.profile-info": {
|
||||
"message": "Información del perfil"
|
||||
},
|
||||
"settings.profile.profile-picture.title": {
|
||||
"message": "Imagen de perfil"
|
||||
},
|
||||
"settings.profile.username.description": {
|
||||
"message": "Un nombre único, sin distinción entre mayúsculas y minúsculas, para identificar tu perfil."
|
||||
},
|
||||
"settings.sessions.action.revoke-session": {
|
||||
"message": "Revocar sesión"
|
||||
},
|
||||
|
||||
@@ -4310,27 +4310,6 @@
|
||||
"settings.pats.token.never-used": {
|
||||
"message": "Nunca utilizado"
|
||||
},
|
||||
"settings.profile.bio.description": {
|
||||
"message": "Una breve descripción para que todos sepan un poco sobre ti."
|
||||
},
|
||||
"settings.profile.bio.title": {
|
||||
"message": "Biografía"
|
||||
},
|
||||
"settings.profile.description": {
|
||||
"message": "La información de tu perfil es visible públicamente en Modrinth y a través de la <docs-link>API de Modrinth</docs-link>."
|
||||
},
|
||||
"settings.profile.head-title": {
|
||||
"message": "Configuración del perfil"
|
||||
},
|
||||
"settings.profile.profile-info": {
|
||||
"message": "Información perfil"
|
||||
},
|
||||
"settings.profile.profile-picture.title": {
|
||||
"message": "Foto de perfil"
|
||||
},
|
||||
"settings.profile.username.description": {
|
||||
"message": "Un nombre único que no distingue entre mayúsculas y minúsculas para identificar tu perfil."
|
||||
},
|
||||
"settings.sessions.action.revoke-session": {
|
||||
"message": "Revocar sesión"
|
||||
},
|
||||
|
||||
@@ -1055,9 +1055,6 @@
|
||||
"settings.pats.token.never-used": {
|
||||
"message": "Ei koskaan käytetty"
|
||||
},
|
||||
"settings.profile.bio.title": {
|
||||
"message": "Kuvaus"
|
||||
},
|
||||
"settings.sessions.unknown-os": {
|
||||
"message": "Tuntematon käyttöjärjestelmä"
|
||||
}
|
||||
|
||||
@@ -3167,27 +3167,6 @@
|
||||
"settings.pats.token.never-used": {
|
||||
"message": "Hindi ginamit"
|
||||
},
|
||||
"settings.profile.bio.description": {
|
||||
"message": "Isang maikling paglalarawan upang maipaalam sa lahat ang maliit na sipi ukol sa iyo."
|
||||
},
|
||||
"settings.profile.bio.title": {
|
||||
"message": "Biyograpiya"
|
||||
},
|
||||
"settings.profile.description": {
|
||||
"message": "Makikita ng publiko ang impormasyon ng iyong profile at sa <docs-link>API ng Modrinth</docs-link>."
|
||||
},
|
||||
"settings.profile.head-title": {
|
||||
"message": "Settings ng profile"
|
||||
},
|
||||
"settings.profile.profile-info": {
|
||||
"message": "Impormasyon ng profile"
|
||||
},
|
||||
"settings.profile.profile-picture.title": {
|
||||
"message": "Profile picture"
|
||||
},
|
||||
"settings.profile.username.description": {
|
||||
"message": "Isang natatanging case-insensitive na pangalan upang matukoy ang iyong profile."
|
||||
},
|
||||
"settings.sessions.action.revoke-session": {
|
||||
"message": "Bawiin ang sesyon"
|
||||
},
|
||||
|
||||
@@ -5117,27 +5117,6 @@
|
||||
"settings.pats.token.never-used": {
|
||||
"message": "Jamais utilisé"
|
||||
},
|
||||
"settings.profile.bio.description": {
|
||||
"message": "Une courte description pour indiquer à tout le monde un peu à propos de vous."
|
||||
},
|
||||
"settings.profile.bio.title": {
|
||||
"message": "À propos"
|
||||
},
|
||||
"settings.profile.description": {
|
||||
"message": "Votre information de profil est visible publiquement sur Modrinth et sur la <docs-link>Modrinth API</docs-link>."
|
||||
},
|
||||
"settings.profile.head-title": {
|
||||
"message": "Paramètres du profil"
|
||||
},
|
||||
"settings.profile.profile-info": {
|
||||
"message": "Information du profil"
|
||||
},
|
||||
"settings.profile.profile-picture.title": {
|
||||
"message": "Photo de profil"
|
||||
},
|
||||
"settings.profile.username.description": {
|
||||
"message": "Un nom unique insensible à la casse pour identifier votre profil."
|
||||
},
|
||||
"settings.sessions.action.revoke-session": {
|
||||
"message": "Révoquer la session"
|
||||
},
|
||||
|
||||
@@ -2305,11 +2305,5 @@
|
||||
},
|
||||
"settings.pats.modal.create.name.label": {
|
||||
"message": "שם"
|
||||
},
|
||||
"settings.profile.bio.title": {
|
||||
"message": "תיאור"
|
||||
},
|
||||
"settings.profile.profile-picture.title": {
|
||||
"message": "תמונת פרופיל"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4571,27 +4571,6 @@
|
||||
"settings.pats.token.never-used": {
|
||||
"message": "Sohasem volt használva"
|
||||
},
|
||||
"settings.profile.bio.description": {
|
||||
"message": "Egy rövid leírás, hogy mindenki megismerjen téged."
|
||||
},
|
||||
"settings.profile.bio.title": {
|
||||
"message": "Bemutatkozás"
|
||||
},
|
||||
"settings.profile.description": {
|
||||
"message": "A profiladataid nyilvánosan megtekinthetők a Modrinthon és a <docs-link>Modrinth API</docs-link>-n keresztül."
|
||||
},
|
||||
"settings.profile.head-title": {
|
||||
"message": "Profilbeállítások"
|
||||
},
|
||||
"settings.profile.profile-info": {
|
||||
"message": "Profilinformációk"
|
||||
},
|
||||
"settings.profile.profile-picture.title": {
|
||||
"message": "Profilkép"
|
||||
},
|
||||
"settings.profile.username.description": {
|
||||
"message": "Egyedi, kis- és nagybetűktől független név a profilod azonosításához."
|
||||
},
|
||||
"settings.sessions.action.revoke-session": {
|
||||
"message": "Munkamenet visszavonása"
|
||||
},
|
||||
|
||||
@@ -3185,24 +3185,6 @@
|
||||
"settings.pats.token.never-used": {
|
||||
"message": "Tidak pernah digunakan"
|
||||
},
|
||||
"settings.profile.bio.description": {
|
||||
"message": "Keterangan singkat untuk mengenalkan sedikit tentang diri Anda."
|
||||
},
|
||||
"settings.profile.bio.title": {
|
||||
"message": "Bio"
|
||||
},
|
||||
"settings.profile.description": {
|
||||
"message": "Informasi profil Anda dapat dilihat secara publik di Modrinth dan melalui <docs-link>Modrinth API</docs-link>."
|
||||
},
|
||||
"settings.profile.profile-info": {
|
||||
"message": "Informasi profil"
|
||||
},
|
||||
"settings.profile.profile-picture.title": {
|
||||
"message": "Foto profil"
|
||||
},
|
||||
"settings.profile.username.description": {
|
||||
"message": "Nama unik yang tidak peka huruf besar-kecil untuk mengidentifikasi profil Anda."
|
||||
},
|
||||
"settings.sessions.action.revoke-session": {
|
||||
"message": "Cabut sesi"
|
||||
},
|
||||
|
||||
@@ -5117,27 +5117,6 @@
|
||||
"settings.pats.token.never-used": {
|
||||
"message": "Mai usato"
|
||||
},
|
||||
"settings.profile.bio.description": {
|
||||
"message": "Una breve descrizione per raccontare a tutti qualcosa di te."
|
||||
},
|
||||
"settings.profile.bio.title": {
|
||||
"message": "Bio"
|
||||
},
|
||||
"settings.profile.description": {
|
||||
"message": "Le informazioni del tuo profilo sono visibili pubblicamente su Modrinth e tramite l''<docs-link>API di Modrinth</docs-link>."
|
||||
},
|
||||
"settings.profile.head-title": {
|
||||
"message": "Impostazioni del profilo"
|
||||
},
|
||||
"settings.profile.profile-info": {
|
||||
"message": "Informazioni del profilo"
|
||||
},
|
||||
"settings.profile.profile-picture.title": {
|
||||
"message": "Foto profilo"
|
||||
},
|
||||
"settings.profile.username.description": {
|
||||
"message": "Un nome univoco (maiuscole irrilevanti) per identificare il tuo profilo."
|
||||
},
|
||||
"settings.sessions.action.revoke-session": {
|
||||
"message": "Revoca sessione"
|
||||
},
|
||||
|
||||
@@ -4061,27 +4061,6 @@
|
||||
"settings.pats.token.never-used": {
|
||||
"message": "未使用"
|
||||
},
|
||||
"settings.profile.bio.description": {
|
||||
"message": "あなたのことをみんなに知ってもらうための簡単な自己紹介。"
|
||||
},
|
||||
"settings.profile.bio.title": {
|
||||
"message": "自己紹介"
|
||||
},
|
||||
"settings.profile.description": {
|
||||
"message": "あなたのプロフィール情報は、Modrinth上および<docs-link>Modrinth API</docs-link>を通じて一般公開されます。"
|
||||
},
|
||||
"settings.profile.head-title": {
|
||||
"message": "プロフィール設定"
|
||||
},
|
||||
"settings.profile.profile-info": {
|
||||
"message": "プロフィール情報"
|
||||
},
|
||||
"settings.profile.profile-picture.title": {
|
||||
"message": "プロフィール写真"
|
||||
},
|
||||
"settings.profile.username.description": {
|
||||
"message": "大文字・小文字を区別しない、プロフィールを識別するための固有の名前。"
|
||||
},
|
||||
"settings.sessions.action.revoke-session": {
|
||||
"message": "セッションを取り消す"
|
||||
},
|
||||
|
||||
@@ -5081,27 +5081,6 @@
|
||||
"settings.pats.token.never-used": {
|
||||
"message": "사용된 적 없음"
|
||||
},
|
||||
"settings.profile.bio.description": {
|
||||
"message": "모든 사람에게 당신을 소개하는 간단한 설명입니다."
|
||||
},
|
||||
"settings.profile.bio.title": {
|
||||
"message": "자기소개"
|
||||
},
|
||||
"settings.profile.description": {
|
||||
"message": "당신의 프로필 정보는 Modrinth 나 <docs-link>Modrinth API</docs-link>를 통해 공개될 수 있습니다."
|
||||
},
|
||||
"settings.profile.head-title": {
|
||||
"message": "프로필 설정"
|
||||
},
|
||||
"settings.profile.profile-info": {
|
||||
"message": "프로필 정보"
|
||||
},
|
||||
"settings.profile.profile-picture.title": {
|
||||
"message": "프로필 사진"
|
||||
},
|
||||
"settings.profile.username.description": {
|
||||
"message": "대소문자 구분 없이 프로필을 식별할 수 있는 이름"
|
||||
},
|
||||
"settings.sessions.action.revoke-session": {
|
||||
"message": "세션 제거"
|
||||
},
|
||||
|
||||
@@ -4103,27 +4103,6 @@
|
||||
"settings.pats.token.never-used": {
|
||||
"message": "Tidak pernah digunakan"
|
||||
},
|
||||
"settings.profile.bio.description": {
|
||||
"message": "Keterangan ringkas untuk memberitahu semua orang serba sedikit tentang anda."
|
||||
},
|
||||
"settings.profile.bio.title": {
|
||||
"message": "Bio"
|
||||
},
|
||||
"settings.profile.description": {
|
||||
"message": "Maklumat profil anda boleh dilihat secara terbuka pada Modrinth dan melalui <docs-link>API Modrinth</docs-link>."
|
||||
},
|
||||
"settings.profile.head-title": {
|
||||
"message": "Tetapan profil"
|
||||
},
|
||||
"settings.profile.profile-info": {
|
||||
"message": "Maklumat profil"
|
||||
},
|
||||
"settings.profile.profile-picture.title": {
|
||||
"message": "Gambar profil"
|
||||
},
|
||||
"settings.profile.username.description": {
|
||||
"message": "Nama unik (tidak sensitif huruf besar dan kecil) untuk mengenal pasti profil anda."
|
||||
},
|
||||
"settings.sessions.action.revoke-session": {
|
||||
"message": "Batalkan sesi"
|
||||
},
|
||||
|
||||
@@ -5141,27 +5141,6 @@
|
||||
"settings.pats.token.never-used": {
|
||||
"message": "Nooit gebruikt"
|
||||
},
|
||||
"settings.profile.bio.description": {
|
||||
"message": "Een korte beschrijving om iedereen wat over jou te vertellen."
|
||||
},
|
||||
"settings.profile.bio.title": {
|
||||
"message": "Bio"
|
||||
},
|
||||
"settings.profile.description": {
|
||||
"message": "Je profielgegevens zijn openbaar op Modrinth en zichtbaar via de <docs-link>Modrinth API</docs-link>."
|
||||
},
|
||||
"settings.profile.head-title": {
|
||||
"message": "Profielinstellingen"
|
||||
},
|
||||
"settings.profile.profile-info": {
|
||||
"message": "Profielgegevens"
|
||||
},
|
||||
"settings.profile.profile-picture.title": {
|
||||
"message": "Profielfoto"
|
||||
},
|
||||
"settings.profile.username.description": {
|
||||
"message": "Een unieke hoofdletterongevoelige naam om je profiel mee te identificeren."
|
||||
},
|
||||
"settings.sessions.action.revoke-session": {
|
||||
"message": "Sessie beëindigen"
|
||||
},
|
||||
|
||||
@@ -3974,27 +3974,6 @@
|
||||
"settings.pats.token.never-used": {
|
||||
"message": "Aldri brukt"
|
||||
},
|
||||
"settings.profile.bio.description": {
|
||||
"message": "En kort beskrivelse sånn at alle veit litt om deg."
|
||||
},
|
||||
"settings.profile.bio.title": {
|
||||
"message": "Bio"
|
||||
},
|
||||
"settings.profile.description": {
|
||||
"message": "Profilinformasjonen din er offentlig lesbar på Modrinth og gjennom <docs-link>Modrinth API</docs-link>-en."
|
||||
},
|
||||
"settings.profile.head-title": {
|
||||
"message": "Profilinnstillinger"
|
||||
},
|
||||
"settings.profile.profile-info": {
|
||||
"message": "Profilinformasjon"
|
||||
},
|
||||
"settings.profile.profile-picture.title": {
|
||||
"message": "Profilbilde"
|
||||
},
|
||||
"settings.profile.username.description": {
|
||||
"message": "Et unikt navn (som ikke skiller mellom store og små bokstaver) for å identifisere profilen din."
|
||||
},
|
||||
"settings.sessions.action.revoke-session": {
|
||||
"message": "Tilbakekall økta"
|
||||
},
|
||||
|
||||
@@ -5072,27 +5072,6 @@
|
||||
"settings.pats.token.never-used": {
|
||||
"message": "Nigdy nie użyty"
|
||||
},
|
||||
"settings.profile.bio.description": {
|
||||
"message": "Krótki opis, aby powiedzieć wszystkim trochę o Tobie."
|
||||
},
|
||||
"settings.profile.bio.title": {
|
||||
"message": "O mnie"
|
||||
},
|
||||
"settings.profile.description": {
|
||||
"message": "Twoje informacje profilowe są publicznie dostępnie na Modrinth i poprzez <docs-link>API Modrinth</docs-link>."
|
||||
},
|
||||
"settings.profile.head-title": {
|
||||
"message": "Ustawienia konta"
|
||||
},
|
||||
"settings.profile.profile-info": {
|
||||
"message": "Informacje profilowe"
|
||||
},
|
||||
"settings.profile.profile-picture.title": {
|
||||
"message": "Zdjęcie profilowe"
|
||||
},
|
||||
"settings.profile.username.description": {
|
||||
"message": "Unikatowa bez uwzględniania wielkości liter nazwa identyfikująca Twój profil."
|
||||
},
|
||||
"settings.sessions.action.revoke-session": {
|
||||
"message": "Unieważnij sesję"
|
||||
},
|
||||
|
||||
@@ -5159,27 +5159,6 @@
|
||||
"settings.pats.token.never-used": {
|
||||
"message": "Nunca usado"
|
||||
},
|
||||
"settings.profile.bio.description": {
|
||||
"message": "Uma breve descrição para falar um pouco sobre você para todos."
|
||||
},
|
||||
"settings.profile.bio.title": {
|
||||
"message": "Sobre"
|
||||
},
|
||||
"settings.profile.description": {
|
||||
"message": "As informações do seu perfil são visíveis publicamente no Modrinth e por meio da <docs-link>API do Modrinth</docs-link>."
|
||||
},
|
||||
"settings.profile.head-title": {
|
||||
"message": "Configurações de perfil"
|
||||
},
|
||||
"settings.profile.profile-info": {
|
||||
"message": "Informação do perfil"
|
||||
},
|
||||
"settings.profile.profile-picture.title": {
|
||||
"message": "Foto de perfil"
|
||||
},
|
||||
"settings.profile.username.description": {
|
||||
"message": "Um nome único sem distinção de maiúsculas e minúsculas para identificar o seu perfil."
|
||||
},
|
||||
"settings.sessions.action.revoke-session": {
|
||||
"message": "Encerrar sessão"
|
||||
},
|
||||
|
||||
@@ -3776,27 +3776,6 @@
|
||||
"settings.pats.token.never-used": {
|
||||
"message": "Nunca usado"
|
||||
},
|
||||
"settings.profile.bio.description": {
|
||||
"message": "Uma breve descrição para que todos possam saber mais sobre ti."
|
||||
},
|
||||
"settings.profile.bio.title": {
|
||||
"message": "Biografia"
|
||||
},
|
||||
"settings.profile.description": {
|
||||
"message": "As informações do teu perfil são visíveis publicamente no Modrinth e por meio da <docs-link>Modrinth API</docs-link>."
|
||||
},
|
||||
"settings.profile.head-title": {
|
||||
"message": "Definições do perfil"
|
||||
},
|
||||
"settings.profile.profile-info": {
|
||||
"message": "Informação do perfil"
|
||||
},
|
||||
"settings.profile.profile-picture.title": {
|
||||
"message": "Imagem do perfil"
|
||||
},
|
||||
"settings.profile.username.description": {
|
||||
"message": "Um nome único sem distinção de maiúsculas de minúsculas para identificar o teu perfil."
|
||||
},
|
||||
"settings.sessions.action.revoke-session": {
|
||||
"message": "Revogar sessão"
|
||||
},
|
||||
|
||||
@@ -2039,24 +2039,6 @@
|
||||
"settings.pats.token.never-used": {
|
||||
"message": "N-a fost folosit niciodată"
|
||||
},
|
||||
"settings.profile.bio.description": {
|
||||
"message": "O scurtă descriere pentru a le spune tuturor câte ceva despre tine."
|
||||
},
|
||||
"settings.profile.bio.title": {
|
||||
"message": "Biografie"
|
||||
},
|
||||
"settings.profile.description": {
|
||||
"message": "Informațiile profilului tău sunt vizibile public pe Modrinth și prin intermediul <docs-link>API-ului Modrinth</docs-link>."
|
||||
},
|
||||
"settings.profile.profile-info": {
|
||||
"message": "Informațiile profilului"
|
||||
},
|
||||
"settings.profile.profile-picture.title": {
|
||||
"message": "Imagine de profil"
|
||||
},
|
||||
"settings.profile.username.description": {
|
||||
"message": "Un nume unic care nu ține cont de majuscule, pentru a-ți identifica profilul."
|
||||
},
|
||||
"settings.sessions.action.revoke-session": {
|
||||
"message": "Anulează sesiunea"
|
||||
},
|
||||
|
||||
@@ -5099,27 +5099,6 @@
|
||||
"settings.pats.token.never-used": {
|
||||
"message": "Не использовался"
|
||||
},
|
||||
"settings.profile.bio.description": {
|
||||
"message": "Возможность кратко рассказать всем о себе."
|
||||
},
|
||||
"settings.profile.bio.title": {
|
||||
"message": "О себе"
|
||||
},
|
||||
"settings.profile.description": {
|
||||
"message": "Информация в вашем профиле доступна публично на Modrinth и через <docs-link>API Modrinth</docs-link>."
|
||||
},
|
||||
"settings.profile.head-title": {
|
||||
"message": "Настройки профиля"
|
||||
},
|
||||
"settings.profile.profile-info": {
|
||||
"message": "Информация в профиле"
|
||||
},
|
||||
"settings.profile.profile-picture.title": {
|
||||
"message": "Изображение профиля"
|
||||
},
|
||||
"settings.profile.username.description": {
|
||||
"message": "Уникальное имя для идентификации профиля. Регистр не имеет значения."
|
||||
},
|
||||
"settings.sessions.action.revoke-session": {
|
||||
"message": "Завершить сеанс"
|
||||
},
|
||||
|
||||
@@ -1973,27 +1973,6 @@
|
||||
"settings.pats.token.never-used": {
|
||||
"message": "Nikada korišćen"
|
||||
},
|
||||
"settings.profile.bio.description": {
|
||||
"message": "Kratak opis kojim ćete drugima reći nešto o sebi."
|
||||
},
|
||||
"settings.profile.bio.title": {
|
||||
"message": "Opis"
|
||||
},
|
||||
"settings.profile.description": {
|
||||
"message": "Informacije na vašem profilu su javno vidljive na Modrinthu i putem <docs-link>Modrinth API-ja</docs-link>."
|
||||
},
|
||||
"settings.profile.head-title": {
|
||||
"message": "Podešavanja profila"
|
||||
},
|
||||
"settings.profile.profile-info": {
|
||||
"message": "Informacije o profilu"
|
||||
},
|
||||
"settings.profile.profile-picture.title": {
|
||||
"message": "Profilna slika"
|
||||
},
|
||||
"settings.profile.username.description": {
|
||||
"message": "Jedinstveno ime, bez razlikovanja velikih i malih slova, koje identifikuje vaš profil."
|
||||
},
|
||||
"settings.sessions.action.revoke-session": {
|
||||
"message": "Opozovi sesiju"
|
||||
},
|
||||
|
||||
@@ -4121,27 +4121,6 @@
|
||||
"settings.pats.token.never-used": {
|
||||
"message": "Aldrig använd"
|
||||
},
|
||||
"settings.profile.bio.description": {
|
||||
"message": "En kort beskrivning för att berätta lite om dig själv."
|
||||
},
|
||||
"settings.profile.bio.title": {
|
||||
"message": "Om mig"
|
||||
},
|
||||
"settings.profile.description": {
|
||||
"message": "Din profilinformation visas offentligt på Modrinth och genom <docs-link>Modrinth API:t</docs-link>."
|
||||
},
|
||||
"settings.profile.head-title": {
|
||||
"message": "Profilinställningar"
|
||||
},
|
||||
"settings.profile.profile-info": {
|
||||
"message": "Profilinformation"
|
||||
},
|
||||
"settings.profile.profile-picture.title": {
|
||||
"message": "Profilbild"
|
||||
},
|
||||
"settings.profile.username.description": {
|
||||
"message": "Ett unikt skift-känsligt namn för att identifiera din profil."
|
||||
},
|
||||
"settings.sessions.action.revoke-session": {
|
||||
"message": "Återkalla session"
|
||||
},
|
||||
|
||||
@@ -4568,27 +4568,6 @@
|
||||
"settings.pats.token.never-used": {
|
||||
"message": "Hiç kullanılmadı"
|
||||
},
|
||||
"settings.profile.bio.description": {
|
||||
"message": "Herkese kendinden biraz bahsedebileceğin kısa tanım."
|
||||
},
|
||||
"settings.profile.bio.title": {
|
||||
"message": "Hakkında"
|
||||
},
|
||||
"settings.profile.description": {
|
||||
"message": "Profil bilgin Modrinth'te ve <docs-link>Modrinth API</docs-link> herkese açık görüntülenebilir."
|
||||
},
|
||||
"settings.profile.head-title": {
|
||||
"message": "Profil Ayarları"
|
||||
},
|
||||
"settings.profile.profile-info": {
|
||||
"message": "Profil bilgisi"
|
||||
},
|
||||
"settings.profile.profile-picture.title": {
|
||||
"message": "Profil resmi"
|
||||
},
|
||||
"settings.profile.username.description": {
|
||||
"message": "Profilini tanımlamak için büyük-küçük harf hassasiyetli özel bir ad."
|
||||
},
|
||||
"settings.sessions.action.revoke-session": {
|
||||
"message": "Oturumu iptal et"
|
||||
},
|
||||
|
||||
@@ -5081,27 +5081,6 @@
|
||||
"settings.pats.token.never-used": {
|
||||
"message": "Не використовувався"
|
||||
},
|
||||
"settings.profile.bio.description": {
|
||||
"message": "Короткий опис, щоб розповісти всім трохи про себе."
|
||||
},
|
||||
"settings.profile.bio.title": {
|
||||
"message": "Про себе"
|
||||
},
|
||||
"settings.profile.description": {
|
||||
"message": "Інформація з вашого профілю є загальнодоступною на Modrinth та через <docs-link>Modrinth API</docs-link>."
|
||||
},
|
||||
"settings.profile.head-title": {
|
||||
"message": "Налаштування профілю"
|
||||
},
|
||||
"settings.profile.profile-info": {
|
||||
"message": "Інформація про профіль"
|
||||
},
|
||||
"settings.profile.profile-picture.title": {
|
||||
"message": "Зображення профілю"
|
||||
},
|
||||
"settings.profile.username.description": {
|
||||
"message": "Унікальне ім’я без урахування регістру, для ідентифікації вашого профілю."
|
||||
},
|
||||
"settings.sessions.action.revoke-session": {
|
||||
"message": "Завершити сеанс"
|
||||
},
|
||||
|
||||
@@ -4268,27 +4268,6 @@
|
||||
"settings.pats.token.never-used": {
|
||||
"message": "Chưa từng sử dụng"
|
||||
},
|
||||
"settings.profile.bio.description": {
|
||||
"message": "Mô tả ngắn để giới thiệu đôi chút về bạn."
|
||||
},
|
||||
"settings.profile.bio.title": {
|
||||
"message": "Tiểu sử"
|
||||
},
|
||||
"settings.profile.description": {
|
||||
"message": "Thông tin hồ sơ của bạn được hiển thị công khai trên Modrinth và thông qua <docs-link>API Modrinth</docs-link>."
|
||||
},
|
||||
"settings.profile.head-title": {
|
||||
"message": "Cài đặt hồ sơ"
|
||||
},
|
||||
"settings.profile.profile-info": {
|
||||
"message": "Thông tin hồ sơ"
|
||||
},
|
||||
"settings.profile.profile-picture.title": {
|
||||
"message": "Ảnh hồ sơ"
|
||||
},
|
||||
"settings.profile.username.description": {
|
||||
"message": "Tên duy nhất (không phân biệt chữ hoa/thường) dùng để nhận diện hồ sơ của bạn."
|
||||
},
|
||||
"settings.sessions.action.revoke-session": {
|
||||
"message": "Thu hồi phiên"
|
||||
},
|
||||
|
||||
@@ -5159,27 +5159,6 @@
|
||||
"settings.pats.token.never-used": {
|
||||
"message": "从未使用"
|
||||
},
|
||||
"settings.profile.bio.description": {
|
||||
"message": "做个简短的自我介绍吧。"
|
||||
},
|
||||
"settings.profile.bio.title": {
|
||||
"message": "个人简介"
|
||||
},
|
||||
"settings.profile.description": {
|
||||
"message": "你的个人资料信息在 Modrinth 网站及<docs-link>其 API </docs-link>上均公开可见。"
|
||||
},
|
||||
"settings.profile.head-title": {
|
||||
"message": "个人资料设置"
|
||||
},
|
||||
"settings.profile.profile-info": {
|
||||
"message": "个人资料信息"
|
||||
},
|
||||
"settings.profile.profile-picture.title": {
|
||||
"message": "头像"
|
||||
},
|
||||
"settings.profile.username.description": {
|
||||
"message": "不区分大小写的唯一名称,用于识别你的个人资料。"
|
||||
},
|
||||
"settings.sessions.action.revoke-session": {
|
||||
"message": "登出设备"
|
||||
},
|
||||
|
||||
@@ -5159,27 +5159,6 @@
|
||||
"settings.pats.token.never-used": {
|
||||
"message": "從未使用"
|
||||
},
|
||||
"settings.profile.bio.description": {
|
||||
"message": "簡單介紹一下你自己。"
|
||||
},
|
||||
"settings.profile.bio.title": {
|
||||
"message": "關於我"
|
||||
},
|
||||
"settings.profile.description": {
|
||||
"message": "你的個人檔案資訊會公開顯示在 Modrinth 上,並可透過 <docs-link>Modrinth API</docs-link> 查詢。"
|
||||
},
|
||||
"settings.profile.head-title": {
|
||||
"message": "個人設定"
|
||||
},
|
||||
"settings.profile.profile-info": {
|
||||
"message": "個人檔案資訊"
|
||||
},
|
||||
"settings.profile.profile-picture.title": {
|
||||
"message": "頭貼"
|
||||
},
|
||||
"settings.profile.username.description": {
|
||||
"message": "獨特且不區分大小寫的名稱,用於識別你的個人檔案。"
|
||||
},
|
||||
"settings.sessions.action.revoke-session": {
|
||||
"message": "撤銷工作階段"
|
||||
},
|
||||
|
||||
@@ -36,6 +36,13 @@
|
||||
icon: UserIcon,
|
||||
}
|
||||
: null,
|
||||
auth.user
|
||||
? {
|
||||
link: '/settings/social',
|
||||
label: formatMessage(commonSettingsMessages.social),
|
||||
icon: HeartHandshakeIcon,
|
||||
}
|
||||
: null,
|
||||
auth.user
|
||||
? {
|
||||
link: '/settings/account',
|
||||
@@ -99,6 +106,7 @@
|
||||
import {
|
||||
CardIcon,
|
||||
GridIcon,
|
||||
HeartHandshakeIcon,
|
||||
KeyIcon,
|
||||
LanguagesIcon,
|
||||
MonitorSmartphoneIcon,
|
||||
|
||||
@@ -1,276 +1,77 @@
|
||||
<template>
|
||||
<div>
|
||||
<section class="card">
|
||||
<h2 class="text-2xl">{{ formatMessage(messages.title) }}</h2>
|
||||
<p class="mb-4">
|
||||
<IntlFormatted :message-id="messages.description">
|
||||
<template #docs-link="{ children }">
|
||||
<a href="https://docs.modrinth.com/" target="_blank" class="text-link">
|
||||
<component :is="() => children" />
|
||||
</a>
|
||||
</template>
|
||||
</IntlFormatted>
|
||||
</p>
|
||||
<label>
|
||||
<span class="label__title">{{ formatMessage(messages.profilePicture) }}</span>
|
||||
</label>
|
||||
<div class="avatar-changer">
|
||||
<Avatar
|
||||
:src="previewImage ? previewImage : avatarUrl"
|
||||
size="md"
|
||||
circle
|
||||
:alt="auth.user.username"
|
||||
/>
|
||||
<div class="flex flex-col gap-2">
|
||||
<ButtonStyled>
|
||||
<FileInput
|
||||
:max-size="262144"
|
||||
:show-icon="true"
|
||||
class="button-like"
|
||||
:prompt="formatMessage(commonMessages.uploadImageButton)"
|
||||
accept="image/png,image/jpeg,image/gif,image/webp"
|
||||
@change="showPreviewImage"
|
||||
>
|
||||
<UploadIcon />
|
||||
</FileInput>
|
||||
</ButtonStyled>
|
||||
<ButtonStyled v-if="avatarUrl !== null">
|
||||
<button @click="removePreviewImage">
|
||||
<TrashIcon />
|
||||
{{ formatMessage(commonMessages.removeImageButton) }}
|
||||
</button>
|
||||
</ButtonStyled>
|
||||
<ButtonStyled v-if="previewImage">
|
||||
<button
|
||||
@click="
|
||||
() => {
|
||||
icon = null
|
||||
previewImage = null
|
||||
}
|
||||
"
|
||||
>
|
||||
<UndoIcon />
|
||||
{{ formatMessage(commonMessages.resetButton) }}
|
||||
</button>
|
||||
</ButtonStyled>
|
||||
</div>
|
||||
</div>
|
||||
<label for="username-field">
|
||||
<span class="label__title">{{ formatMessage(commonMessages.usernameLabel) }}</span>
|
||||
<span class="label__description">
|
||||
{{ formatMessage(messages.usernameDescription) }}
|
||||
</span>
|
||||
</label>
|
||||
<StyledInput id="username-field" v-model="current.username" />
|
||||
<div
|
||||
v-if="current.username.length >= 30"
|
||||
id="bio-character-limit"
|
||||
class="inline-block pl-2"
|
||||
:class="{ 'text-red': current.username.length > 39 }"
|
||||
>
|
||||
{{ current.username.length }}/{{ 39 }}
|
||||
</div>
|
||||
<label for="bio-field">
|
||||
<span class="label__title">{{ formatMessage(messages.bioTitle) }}</span>
|
||||
<span class="label__description">
|
||||
{{ formatMessage(messages.bioDescription) }}
|
||||
</span>
|
||||
</label>
|
||||
<StyledInput id="bio-field" v-model="current.bio" multiline />
|
||||
<div id="bio-character-limit" class="pt-2" :class="{ 'text-red': current.bio.length > 160 }">
|
||||
{{ current.bio.length }}/{{ 160 }}
|
||||
</div>
|
||||
<div class="input-group mt-4">
|
||||
<ButtonStyled>
|
||||
<NuxtLink :to="`/user/${auth.user.username}`">
|
||||
<UserIcon /> {{ formatMessage(commonMessages.visitYourProfile) }}
|
||||
</NuxtLink>
|
||||
</ButtonStyled>
|
||||
</div>
|
||||
</section>
|
||||
<UnsavedChangesPopup
|
||||
:original="originalState"
|
||||
:modified="modifiedState"
|
||||
:saving="saving"
|
||||
@reset="reset"
|
||||
@save="save"
|
||||
<section v-if="auth.user" class="universal-card">
|
||||
<AccountProfileSettings
|
||||
ref="profileSettings"
|
||||
:patch-user="patchUser"
|
||||
:change-avatar="changeAvatar"
|
||||
:delete-avatar="deleteAvatar"
|
||||
:get-authenticated-user="getAuthenticatedUser"
|
||||
disclaimer-position="bottom"
|
||||
/>
|
||||
</div>
|
||||
<UnsavedChangesPopup
|
||||
:original="profileSettings?.originalState ?? emptyProfileState"
|
||||
:modified="profileSettings?.modifiedState ?? emptyProfileState"
|
||||
:saving="profileSettings?.saving ?? false"
|
||||
@reset="resetProfileSettings"
|
||||
@save="saveProfileSettings"
|
||||
/>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { TrashIcon, UndoIcon, UploadIcon, UserIcon } from '@modrinth/assets'
|
||||
<script setup lang="ts">
|
||||
import type { Labrinth } from '@modrinth/api-client'
|
||||
import {
|
||||
Avatar,
|
||||
ButtonStyled,
|
||||
commonMessages,
|
||||
defineMessages,
|
||||
FileInput,
|
||||
injectNotificationManager,
|
||||
IntlFormatted,
|
||||
StyledInput,
|
||||
AccountProfileSettings,
|
||||
commonSettingsMessages,
|
||||
injectModrinthClient,
|
||||
UnsavedChangesPopup,
|
||||
useSavable,
|
||||
useVIntl,
|
||||
} from '@modrinth/ui'
|
||||
|
||||
const { addNotification } = injectNotificationManager()
|
||||
const { formatMessage } = useVIntl()
|
||||
|
||||
definePageMeta({
|
||||
middleware: 'auth',
|
||||
})
|
||||
|
||||
const messages = defineMessages({
|
||||
headTitle: {
|
||||
id: 'settings.profile.head-title',
|
||||
defaultMessage: 'Profile settings',
|
||||
},
|
||||
title: {
|
||||
id: 'settings.profile.profile-info',
|
||||
defaultMessage: 'Profile information',
|
||||
},
|
||||
description: {
|
||||
id: 'settings.profile.description',
|
||||
defaultMessage:
|
||||
'Your profile information is publicly viewable on Modrinth and through the <docs-link>Modrinth API</docs-link>.',
|
||||
},
|
||||
profilePicture: {
|
||||
id: 'settings.profile.profile-picture.title',
|
||||
defaultMessage: 'Profile picture',
|
||||
},
|
||||
usernameDescription: {
|
||||
id: 'settings.profile.username.description',
|
||||
defaultMessage: 'A unique case-insensitive name to identify your profile.',
|
||||
},
|
||||
bioTitle: {
|
||||
id: 'settings.profile.bio.title',
|
||||
defaultMessage: 'Bio',
|
||||
},
|
||||
bioDescription: {
|
||||
id: 'settings.profile.bio.description',
|
||||
defaultMessage: 'A short description to tell everyone a little bit about you.',
|
||||
},
|
||||
})
|
||||
const auth = await useAuth()
|
||||
const client = injectModrinthClient()
|
||||
const { formatMessage } = useVIntl()
|
||||
const profileSettings = ref<InstanceType<typeof AccountProfileSettings> | null>(null)
|
||||
const emptyProfileState = {
|
||||
username: '',
|
||||
bio: '',
|
||||
avatarChanged: false,
|
||||
}
|
||||
|
||||
function patchUser(
|
||||
userId: string,
|
||||
patch: Partial<Pick<Labrinth.Users.v2.User, 'bio' | 'username'>>,
|
||||
): Promise<void> {
|
||||
return client.labrinth.users_v2.patch(userId, patch)
|
||||
}
|
||||
|
||||
function changeAvatar(userId: string, file: Blob, extension: string): Promise<void> {
|
||||
return client.labrinth.users_v2.changeIcon(userId, file, extension)
|
||||
}
|
||||
|
||||
function deleteAvatar(userId: string): Promise<void> {
|
||||
return client.labrinth.users_v2.deleteIcon(userId)
|
||||
}
|
||||
|
||||
async function getAuthenticatedUser(): Promise<Labrinth.Users.v3.User> {
|
||||
const user = await client.labrinth.users_v3.getAuthenticated()
|
||||
auth.value.user = user
|
||||
return user
|
||||
}
|
||||
|
||||
function resetProfileSettings(): void {
|
||||
profileSettings.value?.reset()
|
||||
}
|
||||
|
||||
function saveProfileSettings(): void {
|
||||
void profileSettings.value?.save()
|
||||
}
|
||||
|
||||
useHead({
|
||||
title: () => `${formatMessage(messages.headTitle)} - Modrinth`,
|
||||
title: () => `${formatMessage(commonSettingsMessages.profile)} - Modrinth`,
|
||||
})
|
||||
|
||||
const auth = await useAuth()
|
||||
|
||||
// Avatar state (separate from useSavable)
|
||||
const avatarUrl = ref(auth.value.user.avatar_url)
|
||||
const icon = shallowRef(null)
|
||||
const previewImage = shallowRef(null)
|
||||
const pendingAvatarDeletion = ref(false)
|
||||
const saving = ref(false)
|
||||
|
||||
const {
|
||||
saved,
|
||||
current,
|
||||
reset: resetFields,
|
||||
} = useSavable(
|
||||
() => ({
|
||||
username: auth.value.user.username,
|
||||
bio: auth.value.user.bio ?? '',
|
||||
}),
|
||||
async () => {}, // Save is handled manually due to complex icon logic
|
||||
)
|
||||
|
||||
// Combined state for UnsavedChangesPopup
|
||||
const originalState = computed(() => ({
|
||||
...saved.value,
|
||||
avatarChanged: false,
|
||||
}))
|
||||
|
||||
const modifiedState = computed(() => ({
|
||||
...current.value,
|
||||
avatarChanged: !!(previewImage.value || pendingAvatarDeletion.value),
|
||||
}))
|
||||
|
||||
const reset = () => {
|
||||
resetFields()
|
||||
icon.value = null
|
||||
previewImage.value = null
|
||||
pendingAvatarDeletion.value = false
|
||||
}
|
||||
|
||||
function showPreviewImage(files) {
|
||||
const reader = new FileReader()
|
||||
icon.value = files[0]
|
||||
reader.readAsDataURL(icon.value)
|
||||
reader.onload = (event) => {
|
||||
previewImage.value = event.target.result
|
||||
}
|
||||
}
|
||||
|
||||
function removePreviewImage() {
|
||||
pendingAvatarDeletion.value = true
|
||||
previewImage.value = 'https://cdn.modrinth.com/placeholder.png'
|
||||
}
|
||||
|
||||
async function save() {
|
||||
saving.value = true
|
||||
try {
|
||||
if (pendingAvatarDeletion.value) {
|
||||
await useBaseFetch(`user/${auth.value.user.id}/icon`, {
|
||||
method: 'DELETE',
|
||||
})
|
||||
pendingAvatarDeletion.value = false
|
||||
previewImage.value = null
|
||||
}
|
||||
|
||||
if (icon.value) {
|
||||
await useBaseFetch(
|
||||
`user/${auth.value.user.id}/icon?ext=${
|
||||
icon.value.type.split('/')[icon.value.type.split('/').length - 1]
|
||||
}`,
|
||||
{
|
||||
method: 'PATCH',
|
||||
body: icon.value,
|
||||
},
|
||||
)
|
||||
icon.value = null
|
||||
previewImage.value = null
|
||||
}
|
||||
|
||||
const body = {}
|
||||
|
||||
if (auth.value.user.username !== current.value.username) {
|
||||
body.username = current.value.username
|
||||
}
|
||||
|
||||
if (auth.value.user.bio !== current.value.bio) {
|
||||
body.bio = current.value.bio
|
||||
}
|
||||
|
||||
await useBaseFetch(`user/${auth.value.user.id}`, {
|
||||
method: 'PATCH',
|
||||
body,
|
||||
})
|
||||
await useAuth(auth.value.token)
|
||||
avatarUrl.value = auth.value.user.avatar_url
|
||||
} catch (err) {
|
||||
addNotification({
|
||||
title: formatMessage(commonMessages.errorNotificationTitle),
|
||||
text: err
|
||||
? err.data
|
||||
? err.data.description
|
||||
? err.data.description
|
||||
: err.data
|
||||
: err
|
||||
: 'aaaaahhh',
|
||||
type: 'error',
|
||||
})
|
||||
}
|
||||
saving.value = false
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.avatar-changer {
|
||||
display: flex;
|
||||
gap: var(--gap-lg);
|
||||
margin-top: var(--gap-md);
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
<template>
|
||||
<section v-if="auth.user" class="universal-card">
|
||||
<AccountSocialSettings
|
||||
:get-blocked-users="getBlockedUsers"
|
||||
:get-users="getUsers"
|
||||
:unblock-user="unblockUser"
|
||||
/>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import type { Labrinth } from '@modrinth/api-client'
|
||||
import {
|
||||
AccountSocialSettings,
|
||||
commonSettingsMessages,
|
||||
injectModrinthClient,
|
||||
useVIntl,
|
||||
} from '@modrinth/ui'
|
||||
|
||||
definePageMeta({
|
||||
middleware: 'auth',
|
||||
})
|
||||
|
||||
const auth = await useAuth()
|
||||
const client = injectModrinthClient()
|
||||
const { formatMessage } = useVIntl()
|
||||
|
||||
function getBlockedUsers(): Promise<Labrinth.BlockedUsers.v3.BlockedUserId[]> {
|
||||
return client.labrinth.blocked_users_v3.list()
|
||||
}
|
||||
|
||||
function getUsers(userIds: string[]): Promise<Labrinth.Users.v2.User[]> {
|
||||
return client.labrinth.users_v2.getMultiple(userIds)
|
||||
}
|
||||
|
||||
function unblockUser(userId: string): Promise<void> {
|
||||
return client.labrinth.blocked_users_v3.unblock(userId)
|
||||
}
|
||||
|
||||
useHead({
|
||||
title: () => `${formatMessage(commonSettingsMessages.social)} - Modrinth`,
|
||||
})
|
||||
</script>
|
||||
@@ -34,6 +34,9 @@ const userProfile = provideUserProfile({
|
||||
getOrganizations: (userId) => client.labrinth.users_v2.getOrganizations(userId),
|
||||
getCollections: (userId) => client.labrinth.users_v2.getCollections(userId),
|
||||
patchUser: (userId, patch) => client.labrinth.users_v2.patch(userId, patch),
|
||||
getBlockedUsers: () => client.labrinth.blocked_users_v3.list(),
|
||||
blockUser: (userId) => client.labrinth.blocked_users_v3.block(userId),
|
||||
unblockUser: (userId) => client.labrinth.blocked_users_v3.unblock(userId),
|
||||
})
|
||||
const auth = await useAuth()
|
||||
const cosmetics = useCosmetics()
|
||||
|
||||
Reference in New Issue
Block a user