Skip to content

Commit e80d937

Browse files
committed
fix(css): fix reactive view for small screens
1 parent af71738 commit e80d937

File tree

8 files changed

+47
-9
lines changed

8 files changed

+47
-9
lines changed

src/components/common/navbar/NavbarComponent.vue

+5
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ const navElement = ref<HTMLElement>();
8686
>
8787
<template v-for="_route in enabledRoutes" :key="_route">
8888
<NTab
89+
class="tab"
8990
:style="
9091
_route === activeRoute
9192
? { '--n-tab-text-color-hover': 'var(--navbar-text-color-hover-active)' }
@@ -159,6 +160,10 @@ nav {
159160
height: calc(#{layout.$header-navbar-height} - 0.75rem) !important;
160161
border-radius: 0.5rem !important;
161162
}
163+
164+
:deep(.tab) {
165+
padding: 0 0.25rem;
166+
}
162167
}
163168
}
164169
</style>

src/components/views/calendar/CalendarNavbar.vue

+5-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const open = ref(false);
5050
</script>
5151

5252
<template>
53-
<NFlex class="row" align="center" justify="space-evenly" :vertical="false">
53+
<NFlex class="row" align="center" justify="space-evenly" :wrap="false">
5454
<NDatePicker
5555
v-model:show="open"
5656
v-model:value="pickerValue"
@@ -98,13 +98,17 @@ const open = ref(false);
9898
.row {
9999
width: 100%;
100100
padding: 0 0.5rem;
101+
overflow-x: auto;
102+
scrollbar-width: none;
101103
102104
.date-picker {
103105
flex: 0 1 33%;
106+
min-width: fit-content;
104107
}
105108
106109
.search-input {
107110
flex: 1 1 33%;
111+
min-width: 12rem;
108112
}
109113
}
110114
</style>

src/components/views/history/HistoryNavbar.vue

+10-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const open = ref(false);
5555
</script>
5656

5757
<template>
58-
<NFlex class="row" align="center" justify="space-evenly" :vertical="false">
58+
<NFlex class="row" align="center" justify="space-evenly" :wrap="false">
5959
<NDatePicker
6060
v-model:show="open"
6161
class="date-picker"
@@ -99,20 +99,29 @@ const open = ref(false);
9999
.row {
100100
width: 100%;
101101
padding: 0 0.5rem;
102+
overflow-x: auto;
103+
scrollbar-width: none;
102104
103105
.date-picker {
104106
flex: 0 1 33%;
107+
min-width: 14rem;
105108
}
106109
107110
.search-input {
108111
flex: 1 1 calc(46% - 5rem);
112+
min-width: 12rem;
109113
}
110114
}
111115
</style>
112116

113117
<style lang="scss">
114118
.n-date-panel {
119+
display: inline-flex;
120+
flex-wrap: wrap;
121+
justify-content: center;
122+
max-width: min(36.5rem, 100dvw);
115123
margin-top: 12px;
116124
margin-left: -16px;
125+
scrollbar-width: thin;
117126
}
118127
</style>

src/components/views/releases/ReleasesNavbar.vue

+6-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ onBeforeMount(() => fetchRegions());
5151
</script>
5252

5353
<template>
54-
<NFlex class="row" align="center" justify="space-evenly" :vertical="false">
54+
<NFlex class="row" align="center" justify="space-evenly" :wrap="false">
5555
<NSelect
5656
v-model:value="releaseType"
5757
class="type-select"
@@ -92,17 +92,22 @@ onBeforeMount(() => fetchRegions());
9292
.row {
9393
width: 100%;
9494
padding: 0 0.5rem;
95+
overflow-x: auto;
96+
scrollbar-width: none;
9597
9698
.type-select {
9799
flex: 0 0 10rem;
100+
min-width: fit-content;
98101
}
99102
100103
.region-select {
101104
flex: 1 0 10rem;
105+
min-width: fit-content;
102106
}
103107
104108
.date-picker {
105109
flex: 2 1 48%;
110+
min-width: fit-content;
106111
}
107112
}
108113
</style>

src/components/views/search/SearchNavbar.vue

+5-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ onActivated(() => {
167167
</script>
168168

169169
<template>
170-
<NFlex class="row" align="center" justify="center" :vertical="false">
170+
<NFlex class="row" align="center" justify="space-evenly" :wrap="false">
171171
<NSelect
172172
v-model:value="selectedValues"
173173
v-model:show="open"
@@ -308,13 +308,17 @@ onActivated(() => {
308308
.row {
309309
width: 100%;
310310
padding: 0 0.5rem;
311+
overflow-x: auto;
312+
scrollbar-width: none;
311313
312314
.types-select {
313315
flex: 0 1 12rem;
316+
min-width: fit-content;
314317
}
315318
316319
.search-input {
317320
flex: 1 1 30%;
321+
min-width: 12rem;
318322
}
319323
}
320324
</style>

src/components/views/settings/SettingsAccount.vue

+9-2
Original file line numberDiff line numberDiff line change
@@ -394,16 +394,23 @@ useWatchActivated(
394394
}
395395
}
396396
397+
.limit-card,
398+
.stats-card {
399+
overflow: auto;
400+
401+
:deep(.detail) {
402+
min-width: max-content;
403+
}
404+
}
405+
397406
.limit-card {
398407
:deep(.detail) {
399408
flex-basis: 31%;
400-
min-width: max-content;
401409
}
402410
}
403411
404412
.stats-card {
405413
:deep(.detail) {
406-
flex-basis: 42%;
407414
min-width: max-content;
408415
}
409416
}

src/components/views/settings/SettingsConnect.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ useWatchActivated(
8585
:style="{ '--n-border-color': 'var(--border-color)' }"
8686
hoverable
8787
>
88-
<NFlex align="center" size="large" :wrap="false">
88+
<NFlex align="center" size="large" wrap>
8989
<NButton text @click="onClick">
9090
<NAvatar
9191
v-if="avatar"

src/components/views/watchlist/WatchlistNavbar.vue

+6-2
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ const renderTag = ({ option }: { option: SelectOption }) => option.label?.toStri
102102
</script>
103103

104104
<template>
105-
<NFlex class="row" align="center" justify="center" :vertical="false">
105+
<NFlex class="row" align="center" justify="space-evenly" :wrap="false">
106106
<NSelect
107107
v-model:value="selectValue"
108108
v-model:show="open"
@@ -142,13 +142,17 @@ const renderTag = ({ option }: { option: SelectOption }) => option.label?.toStri
142142
.row {
143143
width: 100%;
144144
padding: 0 0.5rem;
145+
overflow-x: auto;
146+
scrollbar-width: none;
145147
146148
.list-select {
147149
flex: 0 1 33%;
150+
min-width: fit-content;
148151
}
149152
150153
.search-input {
151-
flex: 1 1 calc(56% - 5rem);
154+
flex: 1 1 auto;
155+
min-width: 12rem;
152156
}
153157
}
154158
</style>

0 commit comments

Comments
 (0)