Skip to content

Commit 9f7ec8c

Browse files
committed
fix(responsive): adjust navbar element to fit smaller screens
1 parent 8b3033d commit 9f7ec8c

File tree

6 files changed

+76
-2
lines changed

6 files changed

+76
-2
lines changed

src/components/common/navbar/NavbarPageSizeSelect.vue

+4
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ const pageIcon = computed(() => (pageSize.value > 200 ? IconPageDouble : IconPag
8181
<style scoped lang="scss">
8282
.page-select {
8383
flex: 0 0 5rem;
84+
85+
@media (width < 600px) {
86+
max-width: 2.125rem;
87+
}
8488
}
8589
</style>
8690

src/components/views/calendar/CalendarNavbar.vue

+5
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,11 @@ const open = ref(false);
115115
.date-picker {
116116
flex: 0 1 33%;
117117
min-width: fit-content;
118+
119+
@media (width < 600px) {
120+
flex: 0 0 8rem;
121+
min-width: auto;
122+
}
118123
}
119124
120125
.search-input {

src/components/views/history/HistoryNavbar.vue

+20-1
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,15 @@ const open = ref(false);
116116
.date-picker {
117117
flex: 0 1 33%;
118118
min-width: 14rem;
119+
120+
@media (width < 600px) {
121+
flex: 1 0 9rem;
122+
min-width: auto;
123+
}
119124
}
120125
121126
.search-input {
122-
flex: 1 1 calc(46% - 5rem);
127+
flex: 2 1 calc(46% - 5rem);
123128
min-width: 12rem;
124129
}
125130
}
@@ -142,6 +147,20 @@ const open = ref(false);
142147
max-height: calc(var(--full-height) - #{layout.$safe-header-open-drawer-height});
143148
overflow: auto;
144149
scrollbar-width: thin;
150+
151+
@media (width < 600px) {
152+
.n-date-panel-calendar--start {
153+
margin-right: 5.0625rem;
154+
}
155+
156+
.n-date-panel-actions {
157+
flex: 0 1 auto;
158+
159+
.n-date-panel-actions__suffix {
160+
flex-direction: column;
161+
}
162+
}
163+
}
145164
}
146165
}
147166
</style>

src/components/views/releases/ReleasesNavbar.vue

+16
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ useActiveAndDocumentVisible({
9393
:options="regionOptions"
9494
:loading="regionLoading"
9595
:disabled="loading || regionLoading || !regionOptions.length"
96+
:consistent-menu-width="false"
9697
:to="parentElement"
9798
filterable
9899
clearable
@@ -110,16 +111,31 @@ useActiveAndDocumentVisible({
110111
.type-select {
111112
flex: 0 0 10rem;
112113
min-width: fit-content;
114+
115+
@media (width < 600px) {
116+
flex: 0 0 7rem;
117+
min-width: auto;
118+
}
113119
}
114120
115121
.region-select {
116122
flex: 1 0 10rem;
117123
min-width: fit-content;
124+
125+
@media (width < 600px) {
126+
flex: 2 0 6rem;
127+
min-width: auto;
128+
}
118129
}
119130
120131
.date-picker {
121132
flex: 2 1 48%;
122133
min-width: fit-content;
134+
135+
@media (width < 600px) {
136+
flex: 1 0 8rem;
137+
min-width: auto;
138+
}
123139
}
124140
}
125141
</style>

src/components/views/search/SearchNavbar.vue

+25-1
Original file line numberDiff line numberDiff line change
@@ -327,11 +327,20 @@ onActivated(() => {
327327
.types-select {
328328
flex: 0 1 12rem;
329329
min-width: fit-content;
330+
331+
@media (width < 600px) {
332+
flex: 0 2 8rem;
333+
min-width: auto;
334+
}
330335
}
331336
332337
.search-input {
333-
flex: 1 1 30%;
338+
flex: 2 1 30%;
334339
min-width: 12rem;
340+
341+
@media (width < 600px) {
342+
min-width: auto;
343+
}
335344
}
336345
}
337346
</style>
@@ -340,4 +349,19 @@ onActivated(() => {
340349
.search-tooltip.search-tooltip {
341350
margin-top: 12px;
342351
}
352+
353+
@media (width < 400px) {
354+
.n-auto-complete.search-input .n-input-wrapper .n-base-loading.n-base-suffix {
355+
display: none;
356+
background-color: red;
357+
}
358+
}
359+
360+
@media (width < 600px) {
361+
.n-select.types-select
362+
.n-base-selection-tags
363+
.n-base-selection-tag-wrapper:nth-child(2) {
364+
display: none;
365+
}
366+
}
343367
</style>

src/components/views/watchlist/WatchlistNavbar.vue

+6
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ const renderTag = ({ option }: { option: SelectOption }) => option.label?.toStri
125125
:render-tag="renderTag"
126126
filterable
127127
:placement="placement"
128+
:consistent-menu-width="false"
128129
>
129130
<template #arrow>
130131
<NIcon :component="open ? IconLoop : selectedIcon" />
@@ -165,6 +166,11 @@ const renderTag = ({ option }: { option: SelectOption }) => option.label?.toStri
165166
.list-select {
166167
flex: 0 1 33%;
167168
min-width: fit-content;
169+
170+
@media (width < 600px) {
171+
flex: 0 0 8rem;
172+
min-width: auto;
173+
}
168174
}
169175
170176
.search-input {

0 commit comments

Comments
 (0)