mirror of
https://github.com/modrinth/code.git
synced 2026-07-31 13:16:38 +00:00
Replace final usage of legacy modal (#6921)
* Replace final usage of legacy modal * prepr
This commit is contained in:
@@ -1,156 +0,0 @@
|
||||
<template>
|
||||
<div v-if="shown">
|
||||
<div
|
||||
:class="{
|
||||
shown: actuallyShown,
|
||||
noblur: !$orElse(cosmetics.advancedRendering, true),
|
||||
}"
|
||||
class="modal-overlay"
|
||||
@click="hide"
|
||||
/>
|
||||
<div class="modal-container" :class="{ shown: actuallyShown }">
|
||||
<div class="modal-body">
|
||||
<div v-if="header" class="header">
|
||||
<strong>{{ header }}</strong>
|
||||
<ButtonStyled circular type="transparent">
|
||||
<button @click="hide">
|
||||
<XIcon />
|
||||
</button>
|
||||
</ButtonStyled>
|
||||
</div>
|
||||
<div class="content">
|
||||
<slot />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { XIcon } from '@modrinth/assets'
|
||||
import { ButtonStyled } from '@modrinth/ui'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
ButtonStyled,
|
||||
XIcon,
|
||||
},
|
||||
props: {
|
||||
header: {
|
||||
type: String,
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
setup() {
|
||||
const cosmetics = useCosmetics()
|
||||
|
||||
return { cosmetics }
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
shown: false,
|
||||
actuallyShown: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
show() {
|
||||
this.shown = true
|
||||
setTimeout(() => {
|
||||
this.actuallyShown = true
|
||||
}, 50)
|
||||
},
|
||||
hide() {
|
||||
this.actuallyShown = false
|
||||
setTimeout(() => {
|
||||
this.shown = false
|
||||
}, 300)
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.modal-overlay {
|
||||
visibility: hidden;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 20;
|
||||
transition: all 0.3s ease-in-out;
|
||||
|
||||
&.shown {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
background: hsla(0, 0%, 0%, 0.5);
|
||||
backdrop-filter: blur(3px);
|
||||
}
|
||||
|
||||
&.noblur {
|
||||
backdrop-filter: none;
|
||||
}
|
||||
}
|
||||
|
||||
.modal-container {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
z-index: 21;
|
||||
visibility: hidden;
|
||||
pointer-events: none;
|
||||
|
||||
&.shown {
|
||||
visibility: visible;
|
||||
|
||||
.modal-body {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
.modal-body {
|
||||
position: fixed;
|
||||
box-shadow: var(--shadow-raised), var(--shadow-inset);
|
||||
border-radius: var(--size-rounded-lg);
|
||||
max-height: calc(100% - 2 * var(--spacing-card-bg));
|
||||
overflow-y: auto;
|
||||
width: 600px;
|
||||
pointer-events: auto;
|
||||
outline: 3px solid transparent;
|
||||
|
||||
.header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
background-color: var(--color-bg);
|
||||
padding: var(--spacing-card-md) var(--spacing-card-lg);
|
||||
|
||||
strong {
|
||||
font-size: 1.25rem;
|
||||
margin: 0.67em 0;
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
background-color: var(--color-raised-bg);
|
||||
}
|
||||
|
||||
transform: translateY(50vh);
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
transition: all 0.25s ease-in-out;
|
||||
|
||||
@media screen and (max-width: 650px) {
|
||||
width: calc(100% - 2 * var(--spacing-card-bg));
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -2744,24 +2744,15 @@
|
||||
"settings.applications.about": {
|
||||
"message": "O"
|
||||
},
|
||||
"settings.applications.button.cancel": {
|
||||
"message": "Zrušit"
|
||||
},
|
||||
"settings.applications.button.create": {
|
||||
"message": "Vytvořit aplikaci"
|
||||
},
|
||||
"settings.applications.button.delete": {
|
||||
"message": "Smazat"
|
||||
},
|
||||
"settings.applications.button.edit": {
|
||||
"message": "Upravit"
|
||||
},
|
||||
"settings.applications.button.new": {
|
||||
"message": "Nová aplikace"
|
||||
},
|
||||
"settings.applications.button.save-changes": {
|
||||
"message": "Uložit změny"
|
||||
},
|
||||
"settings.applications.button.upload-icon": {
|
||||
"message": "Nahrát ikonu"
|
||||
},
|
||||
|
||||
@@ -2945,24 +2945,15 @@
|
||||
"settings.applications.button.add-more": {
|
||||
"message": "Tilføj mere"
|
||||
},
|
||||
"settings.applications.button.cancel": {
|
||||
"message": "Annuller"
|
||||
},
|
||||
"settings.applications.button.create": {
|
||||
"message": "Opret app"
|
||||
},
|
||||
"settings.applications.button.delete": {
|
||||
"message": "Slet"
|
||||
},
|
||||
"settings.applications.button.edit": {
|
||||
"message": "Rediger"
|
||||
},
|
||||
"settings.applications.button.new": {
|
||||
"message": "Ny applikation"
|
||||
},
|
||||
"settings.applications.button.save-changes": {
|
||||
"message": "Gem ændringer"
|
||||
},
|
||||
"settings.applications.button.upload-icon": {
|
||||
"message": "Upload ikon"
|
||||
},
|
||||
|
||||
@@ -4679,24 +4679,15 @@
|
||||
"settings.applications.button.add-redirect-uri": {
|
||||
"message": "Weiterleitungs-URI hinzufügen"
|
||||
},
|
||||
"settings.applications.button.cancel": {
|
||||
"message": "Abbrechen"
|
||||
},
|
||||
"settings.applications.button.create": {
|
||||
"message": "App erstellen"
|
||||
},
|
||||
"settings.applications.button.delete": {
|
||||
"message": "Löschen"
|
||||
},
|
||||
"settings.applications.button.edit": {
|
||||
"message": "Bearbeiten"
|
||||
},
|
||||
"settings.applications.button.new": {
|
||||
"message": "Neue Anwendung"
|
||||
},
|
||||
"settings.applications.button.save-changes": {
|
||||
"message": "Änderungen speichern"
|
||||
},
|
||||
"settings.applications.button.upload-icon": {
|
||||
"message": "Icon hochladen"
|
||||
},
|
||||
|
||||
@@ -4679,24 +4679,15 @@
|
||||
"settings.applications.button.add-redirect-uri": {
|
||||
"message": "Weiterleitungs-URI hinzufügen"
|
||||
},
|
||||
"settings.applications.button.cancel": {
|
||||
"message": "Abbrechen"
|
||||
},
|
||||
"settings.applications.button.create": {
|
||||
"message": "Anwendung erstellen"
|
||||
},
|
||||
"settings.applications.button.delete": {
|
||||
"message": "Löschen"
|
||||
},
|
||||
"settings.applications.button.edit": {
|
||||
"message": "Bearbeiten"
|
||||
},
|
||||
"settings.applications.button.new": {
|
||||
"message": "Neue Anwendung"
|
||||
},
|
||||
"settings.applications.button.save-changes": {
|
||||
"message": "Änderungen speichern"
|
||||
},
|
||||
"settings.applications.button.upload-icon": {
|
||||
"message": "Icon hochladen"
|
||||
},
|
||||
|
||||
@@ -4709,24 +4709,15 @@
|
||||
"settings.applications.button.add-redirect-uri": {
|
||||
"message": "Add a redirect URI"
|
||||
},
|
||||
"settings.applications.button.cancel": {
|
||||
"message": "Cancel"
|
||||
},
|
||||
"settings.applications.button.create": {
|
||||
"message": "Create app"
|
||||
},
|
||||
"settings.applications.button.delete": {
|
||||
"message": "Delete"
|
||||
},
|
||||
"settings.applications.button.edit": {
|
||||
"message": "Edit"
|
||||
},
|
||||
"settings.applications.button.new": {
|
||||
"message": "New application"
|
||||
},
|
||||
"settings.applications.button.save-changes": {
|
||||
"message": "Save changes"
|
||||
},
|
||||
"settings.applications.button.upload-icon": {
|
||||
"message": "Upload icon"
|
||||
},
|
||||
|
||||
@@ -4187,24 +4187,15 @@
|
||||
"settings.applications.button.add-redirect-uri": {
|
||||
"message": "Agregar un URI de redirección"
|
||||
},
|
||||
"settings.applications.button.cancel": {
|
||||
"message": "Cancelar"
|
||||
},
|
||||
"settings.applications.button.create": {
|
||||
"message": "Crear aplicación"
|
||||
},
|
||||
"settings.applications.button.delete": {
|
||||
"message": "Borrar"
|
||||
},
|
||||
"settings.applications.button.edit": {
|
||||
"message": "Editar"
|
||||
},
|
||||
"settings.applications.button.new": {
|
||||
"message": "Nueva aplicación"
|
||||
},
|
||||
"settings.applications.button.save-changes": {
|
||||
"message": "Guardar cambios"
|
||||
},
|
||||
"settings.applications.button.upload-icon": {
|
||||
"message": "Cargar icono"
|
||||
},
|
||||
|
||||
@@ -3860,24 +3860,15 @@
|
||||
"settings.applications.button.add-redirect-uri": {
|
||||
"message": "Añadir una URI de redirección"
|
||||
},
|
||||
"settings.applications.button.cancel": {
|
||||
"message": "Cancelar"
|
||||
},
|
||||
"settings.applications.button.create": {
|
||||
"message": "Crear aplicación"
|
||||
},
|
||||
"settings.applications.button.delete": {
|
||||
"message": "Eliminar"
|
||||
},
|
||||
"settings.applications.button.edit": {
|
||||
"message": "Editar"
|
||||
},
|
||||
"settings.applications.button.new": {
|
||||
"message": "Nueva aplicación"
|
||||
},
|
||||
"settings.applications.button.save-changes": {
|
||||
"message": "Guardar cambios"
|
||||
},
|
||||
"settings.applications.button.upload-icon": {
|
||||
"message": "Subir icono"
|
||||
},
|
||||
|
||||
@@ -2840,24 +2840,15 @@
|
||||
"settings.applications.button.add-redirect-uri": {
|
||||
"message": "Magdagdag ng redirect URI"
|
||||
},
|
||||
"settings.applications.button.cancel": {
|
||||
"message": "Kanselahin"
|
||||
},
|
||||
"settings.applications.button.create": {
|
||||
"message": "Lumikha ng app"
|
||||
},
|
||||
"settings.applications.button.delete": {
|
||||
"message": "Tanggalin"
|
||||
},
|
||||
"settings.applications.button.edit": {
|
||||
"message": "Baguhin"
|
||||
},
|
||||
"settings.applications.button.new": {
|
||||
"message": "Bagong aplikasyon"
|
||||
},
|
||||
"settings.applications.button.save-changes": {
|
||||
"message": "I-save ang mga pagbabago"
|
||||
},
|
||||
"settings.applications.button.upload-icon": {
|
||||
"message": "I-upload ang ikono"
|
||||
},
|
||||
|
||||
@@ -4667,24 +4667,15 @@
|
||||
"settings.applications.button.add-redirect-uri": {
|
||||
"message": "Ajouter une URI de redirection"
|
||||
},
|
||||
"settings.applications.button.cancel": {
|
||||
"message": "Annuler"
|
||||
},
|
||||
"settings.applications.button.create": {
|
||||
"message": "Créer une appli"
|
||||
},
|
||||
"settings.applications.button.delete": {
|
||||
"message": "Supprimer"
|
||||
},
|
||||
"settings.applications.button.edit": {
|
||||
"message": "Modifier"
|
||||
},
|
||||
"settings.applications.button.new": {
|
||||
"message": "Nouvelle application"
|
||||
},
|
||||
"settings.applications.button.save-changes": {
|
||||
"message": "Sauvegarder les changements"
|
||||
},
|
||||
"settings.applications.button.upload-icon": {
|
||||
"message": "Charger une icône"
|
||||
},
|
||||
|
||||
@@ -2282,9 +2282,6 @@
|
||||
"settings.account.data-export.description": {
|
||||
"message": "תבקש עותק של כל הדאטה האישי שהעלית ל-Modrinth. זה יכול לקחת כמה דקות."
|
||||
},
|
||||
"settings.applications.button.edit": {
|
||||
"message": "ערוך"
|
||||
},
|
||||
"settings.applications.field.name": {
|
||||
"message": "שם"
|
||||
},
|
||||
|
||||
@@ -4130,24 +4130,15 @@
|
||||
"settings.applications.button.add-redirect-uri": {
|
||||
"message": "Átírányítás URI hozzáadása"
|
||||
},
|
||||
"settings.applications.button.cancel": {
|
||||
"message": "Mégse"
|
||||
},
|
||||
"settings.applications.button.create": {
|
||||
"message": "Alkalmazás létrehozása"
|
||||
},
|
||||
"settings.applications.button.delete": {
|
||||
"message": "Törlés"
|
||||
},
|
||||
"settings.applications.button.edit": {
|
||||
"message": "Szerkesztés"
|
||||
},
|
||||
"settings.applications.button.new": {
|
||||
"message": "Új alkalmazás"
|
||||
},
|
||||
"settings.applications.button.save-changes": {
|
||||
"message": "Módosítások mentése"
|
||||
},
|
||||
"settings.applications.button.upload-icon": {
|
||||
"message": "Ikon feltöltése"
|
||||
},
|
||||
|
||||
@@ -2918,24 +2918,15 @@
|
||||
"settings.applications.button.add-redirect-uri": {
|
||||
"message": "Tambah URI pengarahan ulang"
|
||||
},
|
||||
"settings.applications.button.cancel": {
|
||||
"message": "Batal"
|
||||
},
|
||||
"settings.applications.button.create": {
|
||||
"message": "Buat aplikasi"
|
||||
},
|
||||
"settings.applications.button.delete": {
|
||||
"message": "Hapus"
|
||||
},
|
||||
"settings.applications.button.edit": {
|
||||
"message": "Sunting"
|
||||
},
|
||||
"settings.applications.button.new": {
|
||||
"message": "Aplikasi baru"
|
||||
},
|
||||
"settings.applications.button.save-changes": {
|
||||
"message": "Simpan perubahan"
|
||||
},
|
||||
"settings.applications.button.upload-icon": {
|
||||
"message": "Unggah ikon"
|
||||
},
|
||||
|
||||
@@ -4667,24 +4667,15 @@
|
||||
"settings.applications.button.add-redirect-uri": {
|
||||
"message": "Aggiungi reindirizzamento"
|
||||
},
|
||||
"settings.applications.button.cancel": {
|
||||
"message": "Annulla"
|
||||
},
|
||||
"settings.applications.button.create": {
|
||||
"message": "Crea app"
|
||||
},
|
||||
"settings.applications.button.delete": {
|
||||
"message": "Elimina"
|
||||
},
|
||||
"settings.applications.button.edit": {
|
||||
"message": "Modifica"
|
||||
},
|
||||
"settings.applications.button.new": {
|
||||
"message": "Nuova applicazione"
|
||||
},
|
||||
"settings.applications.button.save-changes": {
|
||||
"message": "Salva modifiche"
|
||||
},
|
||||
"settings.applications.button.upload-icon": {
|
||||
"message": "Carica icona"
|
||||
},
|
||||
|
||||
@@ -3620,24 +3620,15 @@
|
||||
"settings.applications.button.add-redirect-uri": {
|
||||
"message": "リダイレクトURIを追加"
|
||||
},
|
||||
"settings.applications.button.cancel": {
|
||||
"message": "キャンセル"
|
||||
},
|
||||
"settings.applications.button.create": {
|
||||
"message": "アプリを作成する"
|
||||
},
|
||||
"settings.applications.button.delete": {
|
||||
"message": "削除"
|
||||
},
|
||||
"settings.applications.button.edit": {
|
||||
"message": "編集"
|
||||
},
|
||||
"settings.applications.button.new": {
|
||||
"message": "新規アプリケーション"
|
||||
},
|
||||
"settings.applications.button.save-changes": {
|
||||
"message": "変更を保存する"
|
||||
},
|
||||
"settings.applications.button.upload-icon": {
|
||||
"message": "アイコンをアップロード"
|
||||
},
|
||||
|
||||
@@ -4631,24 +4631,15 @@
|
||||
"settings.applications.button.add-redirect-uri": {
|
||||
"message": "리디렉션 URI 를 추가하세요"
|
||||
},
|
||||
"settings.applications.button.cancel": {
|
||||
"message": "취소"
|
||||
},
|
||||
"settings.applications.button.create": {
|
||||
"message": "앱 만들기"
|
||||
},
|
||||
"settings.applications.button.delete": {
|
||||
"message": "지우기"
|
||||
},
|
||||
"settings.applications.button.edit": {
|
||||
"message": "편집"
|
||||
},
|
||||
"settings.applications.button.new": {
|
||||
"message": "새 애플리케이션"
|
||||
},
|
||||
"settings.applications.button.save-changes": {
|
||||
"message": "변경사항 저장"
|
||||
},
|
||||
"settings.applications.button.upload-icon": {
|
||||
"message": "아이콘 업로드"
|
||||
},
|
||||
|
||||
@@ -3653,24 +3653,15 @@
|
||||
"settings.applications.button.add-redirect-uri": {
|
||||
"message": "Tambah URI pengubah hala"
|
||||
},
|
||||
"settings.applications.button.cancel": {
|
||||
"message": "Batal"
|
||||
},
|
||||
"settings.applications.button.create": {
|
||||
"message": "Cipta aplikasi"
|
||||
},
|
||||
"settings.applications.button.delete": {
|
||||
"message": "Padam"
|
||||
},
|
||||
"settings.applications.button.edit": {
|
||||
"message": "Sunting"
|
||||
},
|
||||
"settings.applications.button.new": {
|
||||
"message": "Aplikasi baharu"
|
||||
},
|
||||
"settings.applications.button.save-changes": {
|
||||
"message": "Simpan perubahan"
|
||||
},
|
||||
"settings.applications.button.upload-icon": {
|
||||
"message": "Muat naik ikon"
|
||||
},
|
||||
|
||||
@@ -4706,24 +4706,15 @@
|
||||
"settings.applications.button.add-redirect-uri": {
|
||||
"message": "Voeg een URI toe"
|
||||
},
|
||||
"settings.applications.button.cancel": {
|
||||
"message": "Annuleren"
|
||||
},
|
||||
"settings.applications.button.create": {
|
||||
"message": "Maak nieuwe"
|
||||
},
|
||||
"settings.applications.button.delete": {
|
||||
"message": "Verwijder"
|
||||
},
|
||||
"settings.applications.button.edit": {
|
||||
"message": "Bewerk"
|
||||
},
|
||||
"settings.applications.button.new": {
|
||||
"message": "Nieuw project"
|
||||
},
|
||||
"settings.applications.button.save-changes": {
|
||||
"message": "Wijzigingen opslaan"
|
||||
},
|
||||
"settings.applications.button.upload-icon": {
|
||||
"message": "Pictogram uploaden"
|
||||
},
|
||||
|
||||
@@ -3539,24 +3539,15 @@
|
||||
"settings.applications.button.add-redirect-uri": {
|
||||
"message": "Legg til en omdirings-URI"
|
||||
},
|
||||
"settings.applications.button.cancel": {
|
||||
"message": "Avbryt"
|
||||
},
|
||||
"settings.applications.button.create": {
|
||||
"message": "Lag app"
|
||||
},
|
||||
"settings.applications.button.delete": {
|
||||
"message": "Slett"
|
||||
},
|
||||
"settings.applications.button.edit": {
|
||||
"message": "Regiser"
|
||||
},
|
||||
"settings.applications.button.new": {
|
||||
"message": "Ny søknad"
|
||||
},
|
||||
"settings.applications.button.save-changes": {
|
||||
"message": "Lagre endringer"
|
||||
},
|
||||
"settings.applications.button.upload-icon": {
|
||||
"message": "Last opp ikon"
|
||||
},
|
||||
|
||||
@@ -4622,24 +4622,15 @@
|
||||
"settings.applications.button.add-redirect-uri": {
|
||||
"message": "Dodaj URI przekierowywania"
|
||||
},
|
||||
"settings.applications.button.cancel": {
|
||||
"message": "Anuluj"
|
||||
},
|
||||
"settings.applications.button.create": {
|
||||
"message": "Stwórz aplikację"
|
||||
},
|
||||
"settings.applications.button.delete": {
|
||||
"message": "Usuń"
|
||||
},
|
||||
"settings.applications.button.edit": {
|
||||
"message": "Edytuj"
|
||||
},
|
||||
"settings.applications.button.new": {
|
||||
"message": "Nowa aplikacja"
|
||||
},
|
||||
"settings.applications.button.save-changes": {
|
||||
"message": "Zapisz zmiany"
|
||||
},
|
||||
"settings.applications.button.upload-icon": {
|
||||
"message": "Prześlij ikonę"
|
||||
},
|
||||
|
||||
@@ -4709,24 +4709,15 @@
|
||||
"settings.applications.button.add-redirect-uri": {
|
||||
"message": "Adicionar URI de redirecionamento"
|
||||
},
|
||||
"settings.applications.button.cancel": {
|
||||
"message": "Cancelar"
|
||||
},
|
||||
"settings.applications.button.create": {
|
||||
"message": "Criar app"
|
||||
},
|
||||
"settings.applications.button.delete": {
|
||||
"message": "Excluir"
|
||||
},
|
||||
"settings.applications.button.edit": {
|
||||
"message": "Editar"
|
||||
},
|
||||
"settings.applications.button.new": {
|
||||
"message": "Novo aplicativo"
|
||||
},
|
||||
"settings.applications.button.save-changes": {
|
||||
"message": "Salvar alterações"
|
||||
},
|
||||
"settings.applications.button.upload-icon": {
|
||||
"message": "Enviar ícone"
|
||||
},
|
||||
|
||||
@@ -3350,24 +3350,15 @@
|
||||
"settings.applications.button.add-redirect-uri": {
|
||||
"message": "Adicionar um endereço de redirecionamento"
|
||||
},
|
||||
"settings.applications.button.cancel": {
|
||||
"message": "Cancelar"
|
||||
},
|
||||
"settings.applications.button.create": {
|
||||
"message": "Criar app"
|
||||
},
|
||||
"settings.applications.button.delete": {
|
||||
"message": "Apagar"
|
||||
},
|
||||
"settings.applications.button.edit": {
|
||||
"message": "Editar"
|
||||
},
|
||||
"settings.applications.button.new": {
|
||||
"message": "Nova aplicação"
|
||||
},
|
||||
"settings.applications.button.save-changes": {
|
||||
"message": "Guardar alterações"
|
||||
},
|
||||
"settings.applications.button.upload-icon": {
|
||||
"message": "Carregar ícone"
|
||||
},
|
||||
|
||||
@@ -1814,21 +1814,12 @@
|
||||
"settings.applications.about": {
|
||||
"message": "Despre"
|
||||
},
|
||||
"settings.applications.button.cancel": {
|
||||
"message": "Anuleaza"
|
||||
},
|
||||
"settings.applications.button.create": {
|
||||
"message": "Creaza aplicația"
|
||||
},
|
||||
"settings.applications.button.delete": {
|
||||
"message": "Sterge"
|
||||
},
|
||||
"settings.applications.button.edit": {
|
||||
"message": "Editeaza"
|
||||
},
|
||||
"settings.applications.button.save-changes": {
|
||||
"message": "Salvează schimbările"
|
||||
},
|
||||
"settings.applications.client-id": {
|
||||
"message": "ID Client"
|
||||
},
|
||||
|
||||
@@ -4655,24 +4655,15 @@
|
||||
"settings.applications.button.add-redirect-uri": {
|
||||
"message": "Добавить адрес перенаправления"
|
||||
},
|
||||
"settings.applications.button.cancel": {
|
||||
"message": "Отмена"
|
||||
},
|
||||
"settings.applications.button.create": {
|
||||
"message": "Создать приложение"
|
||||
},
|
||||
"settings.applications.button.delete": {
|
||||
"message": "Удалить"
|
||||
},
|
||||
"settings.applications.button.edit": {
|
||||
"message": "Изменить"
|
||||
},
|
||||
"settings.applications.button.new": {
|
||||
"message": "Новое приложение"
|
||||
},
|
||||
"settings.applications.button.save-changes": {
|
||||
"message": "Сохранить изменения"
|
||||
},
|
||||
"settings.applications.button.upload-icon": {
|
||||
"message": "Загрузить иконку"
|
||||
},
|
||||
|
||||
@@ -3713,24 +3713,15 @@
|
||||
"settings.applications.button.add-more": {
|
||||
"message": "Lägg till mer"
|
||||
},
|
||||
"settings.applications.button.cancel": {
|
||||
"message": "Avbryt"
|
||||
},
|
||||
"settings.applications.button.create": {
|
||||
"message": "Skapa app"
|
||||
},
|
||||
"settings.applications.button.delete": {
|
||||
"message": "Ta bort"
|
||||
},
|
||||
"settings.applications.button.edit": {
|
||||
"message": "Redigera"
|
||||
},
|
||||
"settings.applications.button.new": {
|
||||
"message": "Ny applikation"
|
||||
},
|
||||
"settings.applications.button.save-changes": {
|
||||
"message": "Spara ändringar"
|
||||
},
|
||||
"settings.applications.button.upload-icon": {
|
||||
"message": "Ladda upp ikon"
|
||||
},
|
||||
|
||||
@@ -4118,24 +4118,15 @@
|
||||
"settings.applications.button.add-redirect-uri": {
|
||||
"message": "Yönlendirme URI'ları ekle"
|
||||
},
|
||||
"settings.applications.button.cancel": {
|
||||
"message": "İptal"
|
||||
},
|
||||
"settings.applications.button.create": {
|
||||
"message": "Uygulama oluştur"
|
||||
},
|
||||
"settings.applications.button.delete": {
|
||||
"message": "Sil"
|
||||
},
|
||||
"settings.applications.button.edit": {
|
||||
"message": "Düzenle"
|
||||
},
|
||||
"settings.applications.button.new": {
|
||||
"message": "Yeni uygulama"
|
||||
},
|
||||
"settings.applications.button.save-changes": {
|
||||
"message": "Değişiklikleri kaydet"
|
||||
},
|
||||
"settings.applications.button.upload-icon": {
|
||||
"message": "Simge yükle"
|
||||
},
|
||||
|
||||
@@ -4631,24 +4631,15 @@
|
||||
"settings.applications.button.add-redirect-uri": {
|
||||
"message": "Додати переадресацію URI"
|
||||
},
|
||||
"settings.applications.button.cancel": {
|
||||
"message": "Скасувати"
|
||||
},
|
||||
"settings.applications.button.create": {
|
||||
"message": "Створити застосунок"
|
||||
},
|
||||
"settings.applications.button.delete": {
|
||||
"message": "Видалити"
|
||||
},
|
||||
"settings.applications.button.edit": {
|
||||
"message": "Редагувати"
|
||||
},
|
||||
"settings.applications.button.new": {
|
||||
"message": "Новий застосунок"
|
||||
},
|
||||
"settings.applications.button.save-changes": {
|
||||
"message": "Зберегти зміни"
|
||||
},
|
||||
"settings.applications.button.upload-icon": {
|
||||
"message": "Завантажити значок"
|
||||
},
|
||||
|
||||
@@ -3818,24 +3818,15 @@
|
||||
"settings.applications.button.add-redirect-uri": {
|
||||
"message": "Thêm URI chuyển hướng"
|
||||
},
|
||||
"settings.applications.button.cancel": {
|
||||
"message": "Huỷ"
|
||||
},
|
||||
"settings.applications.button.create": {
|
||||
"message": "Tạo ứng dụng"
|
||||
},
|
||||
"settings.applications.button.delete": {
|
||||
"message": "Xoá"
|
||||
},
|
||||
"settings.applications.button.edit": {
|
||||
"message": "Chỉnh sửa"
|
||||
},
|
||||
"settings.applications.button.new": {
|
||||
"message": "Ứng dụng mới"
|
||||
},
|
||||
"settings.applications.button.save-changes": {
|
||||
"message": "Lưu thay đổi"
|
||||
},
|
||||
"settings.applications.button.upload-icon": {
|
||||
"message": "Tải lên biểu tượng"
|
||||
},
|
||||
|
||||
@@ -4709,24 +4709,15 @@
|
||||
"settings.applications.button.add-redirect-uri": {
|
||||
"message": "添加重定向 URI"
|
||||
},
|
||||
"settings.applications.button.cancel": {
|
||||
"message": "取消"
|
||||
},
|
||||
"settings.applications.button.create": {
|
||||
"message": "新建 App"
|
||||
},
|
||||
"settings.applications.button.delete": {
|
||||
"message": "删除"
|
||||
},
|
||||
"settings.applications.button.edit": {
|
||||
"message": "编辑"
|
||||
},
|
||||
"settings.applications.button.new": {
|
||||
"message": "新建应用程序"
|
||||
},
|
||||
"settings.applications.button.save-changes": {
|
||||
"message": "保存更改"
|
||||
},
|
||||
"settings.applications.button.upload-icon": {
|
||||
"message": "上传图标"
|
||||
},
|
||||
|
||||
@@ -4709,24 +4709,15 @@
|
||||
"settings.applications.button.add-redirect-uri": {
|
||||
"message": "新增重新導向 URI"
|
||||
},
|
||||
"settings.applications.button.cancel": {
|
||||
"message": "取消"
|
||||
},
|
||||
"settings.applications.button.create": {
|
||||
"message": "建立應用程式"
|
||||
},
|
||||
"settings.applications.button.delete": {
|
||||
"message": "刪除"
|
||||
},
|
||||
"settings.applications.button.edit": {
|
||||
"message": "編輯"
|
||||
},
|
||||
"settings.applications.button.new": {
|
||||
"message": "新的應用程式"
|
||||
},
|
||||
"settings.applications.button.save-changes": {
|
||||
"message": "儲存變更"
|
||||
},
|
||||
"settings.applications.button.upload-icon": {
|
||||
"message": "上傳圖示"
|
||||
},
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
:proceed-label="formatMessage(messages.deleteConfirmButton)"
|
||||
@proceed="removeApp(editingId)"
|
||||
/>
|
||||
<Modal ref="appModal" :header="formatMessage(messages.modalHeader)">
|
||||
<div class="universal-modal">
|
||||
<label for="app-name"
|
||||
><span class="label__title">{{ formatMessage(messages.nameLabel) }}</span>
|
||||
<NewModal ref="appModal" :header="formatMessage(messages.modalHeader)" width="40rem" scrollable>
|
||||
<div class="flex flex-col">
|
||||
<label for="app-name" class="m-0 mb-2 text-lg font-semibold text-contrast">
|
||||
{{ formatMessage(messages.nameLabel) }}
|
||||
</label>
|
||||
<StyledInput
|
||||
id="app-name"
|
||||
@@ -19,8 +19,12 @@
|
||||
autocomplete="off"
|
||||
:placeholder="formatMessage(messages.namePlaceholder)"
|
||||
/>
|
||||
<label v-if="editingId" for="app-icon"
|
||||
><span class="label__title">{{ formatMessage(messages.iconLabel) }}</span>
|
||||
<label
|
||||
v-if="editingId"
|
||||
for="app-icon"
|
||||
class="mb-2 mt-4 text-lg font-semibold text-contrast"
|
||||
>
|
||||
{{ formatMessage(messages.iconLabel) }}
|
||||
</label>
|
||||
<div v-if="editingId" class="icon-submission">
|
||||
<Avatar size="md" :src="icon" />
|
||||
@@ -36,8 +40,8 @@
|
||||
</FileInput>
|
||||
</ButtonStyled>
|
||||
</div>
|
||||
<label v-if="editingId" for="app-url">
|
||||
<span class="label__title">{{ formatMessage(messages.urlLabel) }}</span>
|
||||
<label v-if="editingId" for="app-url" class="mb-2 mt-4 text-lg font-semibold text-contrast">
|
||||
{{ formatMessage(messages.urlLabel) }}
|
||||
</label>
|
||||
<StyledInput
|
||||
v-if="editingId"
|
||||
@@ -48,8 +52,12 @@
|
||||
autocomplete="off"
|
||||
:placeholder="formatMessage(messages.urlPlaceholder)"
|
||||
/>
|
||||
<label v-if="editingId" for="app-description">
|
||||
<span class="label__title">{{ formatMessage(messages.descriptionLabel) }}</span>
|
||||
<label
|
||||
v-if="editingId"
|
||||
for="app-description"
|
||||
class="mb-2 mt-4 text-lg font-semibold text-contrast"
|
||||
>
|
||||
{{ formatMessage(messages.descriptionLabel) }}
|
||||
</label>
|
||||
<StyledInput
|
||||
v-if="editingId"
|
||||
@@ -61,15 +69,12 @@
|
||||
:placeholder="formatMessage(messages.descriptionPlaceholder)"
|
||||
input-class="h-24 resize-y"
|
||||
/>
|
||||
<label for="app-scopes"
|
||||
><span class="label__title">{{ formatMessage(messages.scopesLabel) }}</span>
|
||||
<label for="app-scopes" class="mb-2 mt-4 text-lg font-semibold text-contrast">
|
||||
{{ formatMessage(messages.scopesLabel) }}
|
||||
</label>
|
||||
<div
|
||||
id="app-scopes"
|
||||
class="scope-items mt-2 grid grid-cols-1 gap-x-6 gap-y-4 min-[600px]:grid-cols-2"
|
||||
>
|
||||
<div id="app-scopes" class="scope-items grid grid-cols-1 gap-6 min-[600px]:grid-cols-2">
|
||||
<div v-for="category in scopeCategories" :key="category.name" class="flex flex-col gap-2">
|
||||
<h4 class="m-0 border-b border-divider pb-1 text-base font-bold text-contrast">
|
||||
<h4 class="m-0 text-base font-medium text-primary">
|
||||
{{ category.name }}
|
||||
</h4>
|
||||
<div class="flex flex-col gap-2">
|
||||
@@ -83,8 +88,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<label for="app-redirect-uris" class="mt-4"
|
||||
><span class="label__title">{{ formatMessage(messages.redirectUrisLabel) }}</span>
|
||||
<label for="app-redirect-uris" class="mb-2 mt-4 text-lg font-semibold text-contrast">
|
||||
{{ formatMessage(messages.redirectUrisLabel) }}
|
||||
</label>
|
||||
<div class="uri-input-list">
|
||||
<div v-for="(_, index) in redirectUris" :key="index">
|
||||
@@ -93,6 +98,7 @@
|
||||
v-model="redirectUris[index]"
|
||||
:maxlength="2048"
|
||||
type="url"
|
||||
class="w-80"
|
||||
autocomplete="off"
|
||||
:placeholder="formatMessage(messages.redirectUriPlaceholder)"
|
||||
/>
|
||||
@@ -116,18 +122,20 @@
|
||||
</ButtonStyled>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="submit-row input-group push-right">
|
||||
<template #actions>
|
||||
<div class="flex justify-end gap-2 p-2">
|
||||
<ButtonStyled>
|
||||
<button @click="$refs.appModal.hide()">
|
||||
<XIcon />
|
||||
{{ formatMessage(messages.cancel) }}
|
||||
{{ formatMessage(commonMessages.cancelButton) }}
|
||||
</button>
|
||||
</ButtonStyled>
|
||||
<ButtonStyled v-if="editingId" color="brand">
|
||||
<button :disabled="!canSubmit" @click="editApp">
|
||||
<SaveIcon />
|
||||
{{ formatMessage(messages.saveChanges) }}
|
||||
{{ formatMessage(commonMessages.saveChangesButton) }}
|
||||
</button>
|
||||
</ButtonStyled>
|
||||
<ButtonStyled v-else color="brand">
|
||||
@@ -137,8 +145,8 @@
|
||||
</button>
|
||||
</ButtonStyled>
|
||||
</div>
|
||||
</div>
|
||||
</Modal>
|
||||
</template>
|
||||
</NewModal>
|
||||
|
||||
<div class="header__row">
|
||||
<div class="header__title">
|
||||
@@ -220,7 +228,7 @@
|
||||
"
|
||||
>
|
||||
<EditIcon />
|
||||
{{ formatMessage(messages.edit) }}
|
||||
{{ formatMessage(commonMessages.editButton) }}
|
||||
</button>
|
||||
</ButtonStyled>
|
||||
<ButtonStyled color="red">
|
||||
@@ -255,6 +263,7 @@ import {
|
||||
injectModrinthClient,
|
||||
injectNotificationManager,
|
||||
IntlFormatted,
|
||||
NewModal,
|
||||
normalizeChildren,
|
||||
StyledInput,
|
||||
useFormatDateTime,
|
||||
@@ -262,7 +271,6 @@ import {
|
||||
} from '@modrinth/ui'
|
||||
import { useQuery } from '@tanstack/vue-query'
|
||||
|
||||
import Modal from '~/components/ui/Modal.vue'
|
||||
import {
|
||||
getScopeValue,
|
||||
hasScope,
|
||||
@@ -355,14 +363,6 @@ const messages = defineMessages({
|
||||
id: 'settings.applications.button.add-redirect-uri',
|
||||
defaultMessage: 'Add a redirect URI',
|
||||
},
|
||||
cancel: {
|
||||
id: 'settings.applications.button.cancel',
|
||||
defaultMessage: 'Cancel',
|
||||
},
|
||||
saveChanges: {
|
||||
id: 'settings.applications.button.save-changes',
|
||||
defaultMessage: 'Save changes',
|
||||
},
|
||||
createApp: {
|
||||
id: 'settings.applications.button.create',
|
||||
defaultMessage: 'Create app',
|
||||
@@ -396,10 +396,6 @@ const messages = defineMessages({
|
||||
id: 'settings.applications.created-on',
|
||||
defaultMessage: 'Created on {date}',
|
||||
},
|
||||
edit: {
|
||||
id: 'settings.applications.button.edit',
|
||||
defaultMessage: 'Edit',
|
||||
},
|
||||
delete: {
|
||||
id: 'settings.applications.button.delete',
|
||||
defaultMessage: 'Delete',
|
||||
|
||||
@@ -1,184 +0,0 @@
|
||||
<template>
|
||||
<div v-if="shown">
|
||||
<div
|
||||
:class="{ shown: actuallyShown }"
|
||||
class="tauri-overlay"
|
||||
data-tauri-drag-region
|
||||
@click="() => (closable ? hide() : {})"
|
||||
/>
|
||||
<div
|
||||
:class="{
|
||||
shown: actuallyShown,
|
||||
noblur: props.noblur,
|
||||
}"
|
||||
class="modal-overlay"
|
||||
@click="() => (closable ? hide() : {})"
|
||||
/>
|
||||
<div class="modal-container" :class="{ shown: actuallyShown }">
|
||||
<div class="modal-body">
|
||||
<div v-if="props.header" class="header">
|
||||
<h1>{{ props.header }}</h1>
|
||||
<button v-if="closable" class="btn icon-only transparent" @click="hide">
|
||||
<XIcon />
|
||||
</button>
|
||||
</div>
|
||||
<div class="content">
|
||||
<slot />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else></div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { XIcon } from '@modrinth/assets'
|
||||
import { ref } from 'vue'
|
||||
|
||||
const props = defineProps({
|
||||
header: {
|
||||
type: String,
|
||||
default: null,
|
||||
},
|
||||
noblur: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
closable: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
onHide: {
|
||||
type: Function,
|
||||
default() {
|
||||
return () => {}
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
const shown = ref(false)
|
||||
const actuallyShown = ref(false)
|
||||
|
||||
function show() {
|
||||
shown.value = true
|
||||
setTimeout(() => {
|
||||
actuallyShown.value = true
|
||||
}, 50)
|
||||
}
|
||||
|
||||
function hide() {
|
||||
props.onHide?.()
|
||||
actuallyShown.value = false
|
||||
setTimeout(() => {
|
||||
shown.value = false
|
||||
}, 300)
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
show,
|
||||
hide,
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.tauri-overlay {
|
||||
position: fixed;
|
||||
visibility: hidden;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
z-index: 20;
|
||||
|
||||
&.shown {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
}
|
||||
}
|
||||
|
||||
.modal-overlay {
|
||||
visibility: hidden;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 19;
|
||||
transition: all 0.3s ease-in-out;
|
||||
|
||||
@media (prefers-reduced-motion) {
|
||||
transition: none !important;
|
||||
}
|
||||
|
||||
&.shown {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
background: hsla(0, 0%, 0%, 0.5);
|
||||
backdrop-filter: blur(3px);
|
||||
}
|
||||
|
||||
&.noblur {
|
||||
backdrop-filter: none;
|
||||
}
|
||||
}
|
||||
|
||||
.modal-container {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
z-index: 21;
|
||||
visibility: hidden;
|
||||
pointer-events: none;
|
||||
|
||||
&.shown {
|
||||
visibility: visible;
|
||||
.modal-body {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
.modal-body {
|
||||
position: fixed;
|
||||
box-shadow: var(--shadow-raised), var(--shadow-inset);
|
||||
border-radius: var(--radius-lg);
|
||||
background-color: var(--color-raised-bg);
|
||||
max-height: calc(100% - 2 * var(--gap-lg));
|
||||
overflow-y: visible;
|
||||
width: 600px;
|
||||
pointer-events: auto;
|
||||
|
||||
.header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
background-color: var(--color-bg);
|
||||
padding: var(--gap-md) var(--gap-lg);
|
||||
|
||||
h1 {
|
||||
font-weight: bold;
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
}
|
||||
|
||||
transform: translateY(50vh);
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
transition: all 0.25s ease-in-out;
|
||||
|
||||
@media (prefers-reduced-motion) {
|
||||
transition: none !important;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 650px) {
|
||||
width: calc(100% - 2 * var(--gap-lg));
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,6 +1,5 @@
|
||||
export { default as ConfirmLeaveModal } from './ConfirmLeaveModal.vue'
|
||||
export { default as ConfirmModal } from './ConfirmModal.vue'
|
||||
export { default as Modal } from './Modal.vue'
|
||||
export { default as NewModal } from './NewModal.vue'
|
||||
export type { ServerProject as OpenInAppModalServerProject } from './OpenInAppModal.vue'
|
||||
export { default as OpenInAppModal } from './OpenInAppModal.vue'
|
||||
|
||||
@@ -153,9 +153,9 @@ For components that need user interaction to show:
|
||||
```typescript
|
||||
export const Default: Story = {
|
||||
render: () => ({
|
||||
components: { Modal, ButtonStyled },
|
||||
components: { NewModal, ButtonStyled },
|
||||
setup() {
|
||||
const modalRef = ref<InstanceType<typeof Modal> | null>(null)
|
||||
const modalRef = ref<InstanceType<typeof NewModal> | null>(null)
|
||||
return { modalRef }
|
||||
},
|
||||
template: /* html */ `
|
||||
@@ -163,9 +163,9 @@ export const Default: Story = {
|
||||
<ButtonStyled @click="modalRef?.show()">
|
||||
<button>Open Modal</button>
|
||||
</ButtonStyled>
|
||||
<Modal ref="modalRef" header="Example Modal">
|
||||
<NewModal ref="modalRef" header="Example Modal">
|
||||
<p>Modal content</p>
|
||||
</Modal>
|
||||
</NewModal>
|
||||
</div>
|
||||
`,
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user