From 58ac299ba676407e5686746ca193b8f0e94131f8 Mon Sep 17 00:00:00 2001 From: Nikolay Chunosov Date: Wed, 20 Nov 2024 13:02:16 +0700 Subject: [PATCH] adjut maximum size and icons in dialog Signed-off-by: Nikolay Chunosov --- packages/theme/styles/dialogs.scss | 8 ++++---- packages/ui/lang/en.json | 1 + packages/ui/lang/es.json | 1 + packages/ui/lang/fr.json | 1 + packages/ui/lang/it.json | 1 + packages/ui/lang/pt.json | 1 + packages/ui/lang/ru.json | 1 + packages/ui/lang/zh.json | 1 + packages/ui/src/components/Dialog.svelte | 8 +++++--- packages/ui/src/components/icons/Maximize.svelte | 4 +++- packages/ui/src/plugin.ts | 1 + 11 files changed, 20 insertions(+), 8 deletions(-) diff --git a/packages/theme/styles/dialogs.scss b/packages/theme/styles/dialogs.scss index 15e9d3b89f..c18964c47a 100644 --- a/packages/theme/styles/dialogs.scss +++ b/packages/theme/styles/dialogs.scss @@ -322,10 +322,10 @@ box-shadow: var(--theme-popup-shadow); } &.fullsize { - width: 100%; - height: 100%; - max-width: 100%; - max-height: 100%; + width: calc(100vw - 3rem); + height: calc(100vh - 4rem); + max-width: calc(100vw - 3rem); + max-height: calc(100vh - 4rem); } .header { diff --git a/packages/ui/lang/en.json b/packages/ui/lang/en.json index 6706aefcb7..780ff758bf 100644 --- a/packages/ui/lang/en.json +++ b/packages/ui/lang/en.json @@ -92,6 +92,7 @@ "Submit": "Submit", "NextStep": "Next step", "TypeHere": "Type here...", + "NormalSize": "Normal size", "FullSize": "Full size", "UseMaxWidth": "Max width", "Sidebar": "Sidebar", diff --git a/packages/ui/lang/es.json b/packages/ui/lang/es.json index 7052c5c193..152fca1663 100644 --- a/packages/ui/lang/es.json +++ b/packages/ui/lang/es.json @@ -92,6 +92,7 @@ "Submit": "Enviar", "NextStep": "Siguiente paso", "TypeHere": "Escribe aquí...", + "NormalSize": "Tamaño normal", "FullSize": "Tamaño completo", "UseMaxWidth": "Ancho máximo", "Sidebar": "Barra lateral", diff --git a/packages/ui/lang/fr.json b/packages/ui/lang/fr.json index 0b4daa13a8..a91e537305 100644 --- a/packages/ui/lang/fr.json +++ b/packages/ui/lang/fr.json @@ -92,6 +92,7 @@ "Submit": "Soumettre", "NextStep": "Étape suivante", "TypeHere": "Tapez ici...", + "NormalSize": "Taille normale", "FullSize": "Taille réelle", "UseMaxWidth": "Largeur maximale", "Sidebar": "Barre latérale", diff --git a/packages/ui/lang/it.json b/packages/ui/lang/it.json index f424b56c29..868fbfe243 100644 --- a/packages/ui/lang/it.json +++ b/packages/ui/lang/it.json @@ -92,6 +92,7 @@ "Submit": "Invia", "NextStep": "Prossimo passo", "TypeHere": "Scrivi qui...", + "NormalSize": "Dimensioni normali", "FullSize": "Dimensione intera", "UseMaxWidth": "Larghezza massima", "Sidebar": "Barra laterale", diff --git a/packages/ui/lang/pt.json b/packages/ui/lang/pt.json index b60d5a9794..6750502192 100644 --- a/packages/ui/lang/pt.json +++ b/packages/ui/lang/pt.json @@ -92,6 +92,7 @@ "Submit": "Enviar", "NextStep": "Seguinte passo", "TypeHere": "Escreva aqui...", + "NormalSize": "Tamanho normal", "FullSize": "Tamanho completo", "UseMaxWidth": "Largura máxima", "Sidebar": "Barra lateral", diff --git a/packages/ui/lang/ru.json b/packages/ui/lang/ru.json index 9b2ae680e6..b7c1b4cb48 100644 --- a/packages/ui/lang/ru.json +++ b/packages/ui/lang/ru.json @@ -92,6 +92,7 @@ "Submit": "Отправить", "NextStep": "Следующий шаг", "TypeHere": "Вводите здесь...", + "NormalSize": "Обычный размер", "FullSize": "Полный размер", "UseMaxWidth": "Максимальная ширина", "Sidebar": "Боковая панель", diff --git a/packages/ui/lang/zh.json b/packages/ui/lang/zh.json index 26320c8627..305c002319 100644 --- a/packages/ui/lang/zh.json +++ b/packages/ui/lang/zh.json @@ -92,6 +92,7 @@ "Submit": "提交", "NextStep": "下一步", "TypeHere": "在此输入...", + "NormalSize": "正常尺寸", "FullSize": "全尺寸", "UseMaxWidth": "使用最大宽度", "Sidebar": "侧边栏", diff --git a/packages/ui/src/components/Dialog.svelte b/packages/ui/src/components/Dialog.svelte index 9cc185ad8f..ef8f85087d 100644 --- a/packages/ui/src/components/Dialog.svelte +++ b/packages/ui/src/components/Dialog.svelte @@ -20,13 +20,14 @@ Button, Label, IconClose, - IconScale, - IconScaleFull, + IconMaximize, + IconMinimize, resizeObserver, tooltip, deviceOptionsStore as deviceInfo, checkAdaptiveMatching } from '..' + import ui from '../plugin' export let label: IntlString | undefined = undefined export let isFullSize: boolean = false @@ -69,11 +70,12 @@ {#if isFullSize && !needFullSize}