Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjut maximum size and icons in dialog #7201

Merged
merged 1 commit into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/theme/styles/dialogs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions packages/ui/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
"Submit": "Submit",
"NextStep": "Next step",
"TypeHere": "Type here...",
"NormalSize": "Normal size",
"FullSize": "Full size",
"UseMaxWidth": "Max width",
"Sidebar": "Sidebar",
Expand Down
1 change: 1 addition & 0 deletions packages/ui/lang/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions packages/ui/lang/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions packages/ui/lang/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
"Submit": "Invia",
"NextStep": "Prossimo passo",
"TypeHere": "Scrivi qui...",
"NormalSize": "Dimensioni normali",
"FullSize": "Dimensione intera",
"UseMaxWidth": "Larghezza massima",
"Sidebar": "Barra laterale",
Expand Down
1 change: 1 addition & 0 deletions packages/ui/lang/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions packages/ui/lang/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
"Submit": "Отправить",
"NextStep": "Следующий шаг",
"TypeHere": "Вводите здесь...",
"NormalSize": "Обычный размер",
"FullSize": "Полный размер",
"UseMaxWidth": "Максимальная ширина",
"Sidebar": "Боковая панель",
Expand Down
1 change: 1 addition & 0 deletions packages/ui/lang/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
"Submit": "提交",
"NextStep": "下一步",
"TypeHere": "在此输入...",
"NormalSize": "正常尺寸",
"FullSize": "全尺寸",
"UseMaxWidth": "使用最大宽度",
"Sidebar": "侧边栏",
Expand Down
8 changes: 5 additions & 3 deletions packages/ui/src/components/Dialog.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -69,11 +70,12 @@
{#if isFullSize && !needFullSize}
<Button
focusIndex={100010}
icon={fullSize ? IconScale : IconScaleFull}
icon={fullSize ? IconMinimize : IconMaximize}
kind={'ghost'}
size={'medium'}
selected={fullSize}
id={'btnDialogFullScreen'}
showTooltip={{ label: fullSize ? ui.string.NormalSize : ui.string.FullSize }}
on:click={() => (toggleFullSize = !toggleFullSize)}
/>
{/if}
Expand Down
4 changes: 3 additions & 1 deletion packages/ui/src/components/icons/Maximize.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,7 @@
</script>

<svg class="svg-{size}" {fill} xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
<path d="M7 3V2H2V7H3V3.707L12.293 13H9V14H14V9H13V12.293L3.707 3H7Z" />
<g transform="translate(16 0) scale(-1 1)">
<path d="M7 3V2H2V7H3V3.707L12.293 13H9V14H14V9H13V12.293L3.707 3H7Z" />
</g>
</svg>
1 change: 1 addition & 0 deletions packages/ui/src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ export const uis = plugin(uiId, {
NextStep: '' as IntlString,
TypeHere: '' as IntlString,

NormalSize: '' as IntlString,
FullSize: '' as IntlString,
UseMaxWidth: '' as IntlString,
Sidebar: '' as IntlString,
Expand Down