Skip to content

Commit 47145ce

Browse files
authored
[Manager] Modal UI Adjustment (Align with Design) (#4222)
1 parent 6cf77a9 commit 47145ce

File tree

7 files changed

+71
-35
lines changed

7 files changed

+71
-35
lines changed

src/components/common/ContentDivider.vue

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
<template>
2-
<hr
2+
<div
33
:class="{
4-
'm-0': true,
5-
'border-t': orientation === 'horizontal',
6-
'border-l': orientation === 'vertical',
7-
'h-full': orientation === 'vertical',
8-
'w-full': orientation === 'horizontal'
4+
'content-divider': true,
5+
'content-divider--horizontal': orientation === 'horizontal',
6+
'content-divider--vertical': orientation === 'vertical'
97
}"
108
:style="{
11-
borderColor: isLightTheme ? '#DCDAE1' : '#2C2C2C',
12-
borderWidth: `${width}px !important`
9+
backgroundColor: isLightTheme ? '#DCDAE1' : '#2C2C2C'
1310
}"
1411
/>
1512
</template>
@@ -29,3 +26,25 @@ const isLightTheme = computed(
2926
() => colorPaletteStore.completedActivePalette.light_theme
3027
)
3128
</script>
29+
30+
<style scoped>
31+
.content-divider {
32+
display: inline-block;
33+
margin: 0;
34+
padding: 0;
35+
border: none;
36+
flex-shrink: 0;
37+
position: relative;
38+
z-index: 1;
39+
}
40+
41+
.content-divider--horizontal {
42+
width: 100%;
43+
height: v-bind('width + "px"');
44+
}
45+
46+
.content-divider--vertical {
47+
height: 100%;
48+
width: v-bind('width + "px"');
49+
}
50+
</style>

src/components/dialog/GlobalDialog.vue

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,17 @@ const dialogStore = useDialogStore()
5050
@apply p-2 2xl:p-[var(--p-dialog-content-padding)];
5151
@apply pt-0;
5252
}
53+
54+
.manager-dialog {
55+
height: 80vh;
56+
max-width: 1724px;
57+
max-height: 1026px;
58+
}
59+
60+
@media (min-width: 3000px) {
61+
.manager-dialog {
62+
max-width: 2200px;
63+
max-height: 1320px;
64+
}
65+
}
5366
</style>

src/components/dialog/content/manager/ManagerDialogContent.vue

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
<template>
22
<div
3-
class="flex flex-col mx-auto overflow-hidden h-[83vh] relative"
3+
class="h-full flex flex-col mx-auto overflow-hidden"
44
:aria-label="$t('manager.title')"
55
>
6+
<ContentDivider :width="0.3" />
67
<Button
78
v-if="isSmallScreen"
89
:icon="isSideNavOpen ? 'pi pi-chevron-left' : 'pi pi-chevron-right'"
9-
text
10+
severity="secondary"
11+
filled
1012
class="absolute top-1/2 -translate-y-1/2 z-10"
11-
:class="isSideNavOpen ? 'left-[19rem]' : 'left-2'"
13+
:class="isSideNavOpen ? 'left-[12rem]' : 'left-2'"
1214
@click="toggleSideNav"
1315
/>
1416
<div class="flex flex-1 relative overflow-hidden">
@@ -18,14 +20,12 @@
1820
:tabs="tabs"
1921
/>
2022
<div
21-
class="flex-1 overflow-auto pr-80"
23+
class="flex-1 overflow-auto bg-gray-50 dark-theme:bg-neutral-900"
2224
:class="{
23-
'transition-all duration-300': isSmallScreen,
24-
'pl-80': isSideNavOpen || !isSmallScreen,
25-
'pl-8': !isSideNavOpen && isSmallScreen
25+
'transition-all duration-300': isSmallScreen
2626
}"
2727
>
28-
<div class="px-6 pt-6 flex flex-col h-full">
28+
<div class="px-6 flex flex-col h-full">
2929
<RegistrySearchBar
3030
v-model:searchQuery="searchQuery"
3131
v-model:searchMode="searchMode"
@@ -77,9 +77,9 @@
7777
</div>
7878
</div>
7979
</div>
80-
<div class="w-80 border-l-0 absolute right-0 top-0 bottom-0 flex z-20">
80+
<div class="w-[clamp(250px,33%,306px)] border-l-0 flex z-20">
8181
<ContentDivider orientation="vertical" :width="0.2" />
82-
<div class="flex-1 flex flex-col isolate">
82+
<div class="w-full flex flex-col isolate">
8383
<InfoPanel
8484
v-if="!hasMultipleSelections && selectedNodePack"
8585
:node-pack="selectedNodePack"
Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
<template>
22
<div class="w-full">
3-
<div class="px-6 py-4">
3+
<div class="flex items-center">
44
<h2 class="text-lg font-normal text-left">
55
{{ $t('manager.discoverCommunityContent') }}
66
</h2>
77
</div>
8-
<ContentDivider :width="0.3" />
98
</div>
109
</template>
11-
12-
<script setup lang="ts">
13-
import ContentDivider from '@/components/common/ContentDivider.vue'
14-
</script>

src/components/dialog/content/manager/ManagerNavSidebar.vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
<template>
22
<aside
3-
class="absolute translate-x-0 top-0 left-0 h-full w-80 shadow-md z-5 transition-transform duration-300 ease-in-out flex"
3+
class="flex translate-x-0 max-w-[250px] w-3/12 z-5 transition-transform duration-300 ease-in-out"
44
>
5-
<ScrollPanel class="w-80 mt-7">
5+
<ScrollPanel class="flex-1">
66
<Listbox
77
v-model="selectedTab"
88
:options="tabs"
99
option-label="label"
1010
list-style="max-height:unset"
1111
class="w-full border-0 bg-transparent shadow-none"
1212
:pt="{
13-
list: { class: 'p-5' },
14-
option: { class: 'px-8 py-3 text-lg rounded-xl' },
13+
list: { class: 'p-3 gap-2' },
14+
option: { class: 'px-4 py-2 text-lg rounded-lg' },
1515
optionGroup: { class: 'p-0 text-left text-inherit' }
1616
}"
1717
>
1818
<template #option="slotProps">
1919
<div class="text-left flex items-center">
20-
<i :class="['pi', slotProps.option.icon, 'mr-3']" />
21-
<span class="text-lg">{{ slotProps.option.label }}</span>
20+
<i :class="['pi', slotProps.option.icon, 'text-sm mr-2']" />
21+
<span class="text-sm">{{ slotProps.option.label }}</span>
2222
</div>
2323
</template>
2424
</Listbox>
2525
</ScrollPanel>
26-
<ContentDivider orientation="vertical" />
26+
<ContentDivider orientation="vertical" :width="0.3" />
2727
</aside>
2828
</template>
2929

src/components/dialog/content/manager/infoPanel/InfoPanel.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<template v-if="nodePack">
3-
<div class="flex flex-col h-full z-40 w-80 overflow-hidden relative">
3+
<div class="flex flex-col h-full z-40 overflow-hidden relative">
44
<div class="top-0 z-10 px-6 pt-6 w-full">
55
<InfoPanelHeader :node-packs="[nodePack]" />
66
</div>
@@ -42,7 +42,7 @@
4242
</div>
4343
</template>
4444
<template v-else>
45-
<div class="mt-4 mx-8 flex-1 overflow-hidden text-sm">
45+
<div class="pt-4 px-8 flex-1 overflow-hidden text-sm">
4646
{{ $t('manager.infoPanelEmpty') }}
4747
</div>
4848
</template>

src/services/dialogService.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,17 @@ export const useDialogService = () => {
137137
dialogComponentProps: {
138138
closable: true,
139139
pt: {
140-
header: { class: '!p-0 !m-0' },
141-
content: { class: '!px-0 h-[83vh] w-[90vw] overflow-y-hidden' }
140+
pcCloseButton: {
141+
root: {
142+
class:
143+
'bg-gray-500 dark-theme:bg-neutral-700 w-9 h-9 p-1.5 rounded-full text-white'
144+
}
145+
},
146+
header: { class: '!py-0 px-6 !m-0 h-[68px]' },
147+
content: {
148+
class: '!p-0 h-full w-[90vw] max-w-full flex-1 overflow-hidden'
149+
},
150+
root: { class: 'manager-dialog' }
142151
}
143152
},
144153
props

0 commit comments

Comments
 (0)