Skip to content

Commit 4e5bc2f

Browse files
committed
Fix style issues, trying to remove code where possible
1 parent b6a4941 commit 4e5bc2f

File tree

6 files changed

+64
-62
lines changed

6 files changed

+64
-62
lines changed

web/src/components/DatasetList.vue

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ watch(filteredDatasets, expandAllGroups);
8181
</v-expansion-panel-text>
8282
</v-expansion-panel>
8383
</v-expansion-panels>
84-
<v-card
84+
<v-divider v-if="props.datasets?.length" class="mb-2" />
85+
<div
8586
:class="
8687
showFilter
8788
? 'panel-content-inner with-tag-filter-open'
@@ -91,9 +92,7 @@ watch(filteredDatasets, expandAllGroups);
9192
<v-expansion-panels
9293
v-if="props.datasets?.length"
9394
v-model="expandedGroups"
94-
variant="accordion"
9595
class="dataset-list"
96-
style="height: fit-content"
9796
multiple
9897
flat
9998
>
@@ -115,17 +114,15 @@ watch(filteredDatasets, expandAllGroups);
115114
v-else-if="projectStore.loadingDatasets"
116115
indeterminate
117116
></v-progress-linear>
118-
<v-card-text class="help-text" v-else>No available Datasets.</v-card-text>
119-
</v-card>
117+
<div class="help-text pa-4" v-else>No available Datasets.</div>
118+
</div>
120119
</div>
121120
</template>
122121

123122
<style>
124123
.dataset-list {
125124
height: 100%;
126-
width: calc(100% - 20px) !important;
127125
overflow-y: auto;
128-
overflow-x: hidden;
129126
}
130127
.dataset-list .v-expansion-panel-title {
131128
min-height: 0 !important;
@@ -162,7 +159,6 @@ watch(filteredDatasets, expandAllGroups);
162159
justify-content: space-between;
163160
font-size: 0.875rem;
164161
margin-left: 24px;
165-
width: 100%;
166162
}
167163
.item-title + .v-expansion-panel-title__icon {
168164
position: absolute !important;

web/src/components/projects/AccessControl.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ onMounted(() => {
165165
<v-list-item
166166
v-if="!project.collaborators.length"
167167
subtitle="No collaborators"
168-
class="mx-4"
168+
class="mx-4 help-text"
169169
/>
170170
<v-list-subheader>
171171
Followers
@@ -212,7 +212,7 @@ onMounted(() => {
212212
<v-list-item
213213
v-if="!project.followers.length"
214214
subtitle="No followers"
215-
class="mx-4"
215+
class="mx-4 help-text"
216216
/>
217217
</v-list>
218218
<v-btn

web/src/components/projects/DatasetSelect.vue

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ function submitDelete() {
6868
<template v-slot:list="{ data }">
6969
<v-expansion-panels
7070
multiple
71+
flat
7172
variant="accordion"
72-
elevation="0"
7373
bg-color="transparent"
7474
@update:model-value="expandDataset"
7575
>
@@ -79,10 +79,8 @@ function submitDelete() {
7979
:value="dataset.id"
8080
>
8181
<v-expansion-panel-title>
82-
<div
83-
style="display: flex; justify-content: space-between; width: 100%"
84-
>
85-
<div class="d-flex">
82+
<div class="d-flex justify-space-between w-100">
83+
<div class="d-flex align-center">
8684
<div style="min-width: 24px">
8785
<v-icon
8886
v-if="
@@ -129,16 +127,24 @@ function submitDelete() {
129127
size="24"
130128
indeterminate
131129
/>
132-
<v-icon
130+
<v-btn
133131
v-else-if="
134132
!props.addedIds || !props.addedIds.includes(dataset.id)
135133
"
136134
:icon="props.buttonIcon"
137135
color="primary"
138-
class="icon-button"
136+
variant="tonal"
137+
size="x-small"
139138
@click.stop="emit('buttonClick', dataset)"
140139
/>
141-
<v-icon v-else icon="mdi-check" color="success" @click.stop />
140+
<v-btn
141+
v-else
142+
icon="mdi-check"
143+
color="success"
144+
variant="tonal"
145+
size="x-small"
146+
@click.stop
147+
/>
142148
</div>
143149
{{ dataset.name }}
144150
</div>
@@ -151,13 +157,15 @@ function submitDelete() {
151157
size="small"
152158
v-tooltip="dataset.n_layers + ' layers'"
153159
class="ml-2"
160+
color="secondary-text"
154161
></v-icon>
155162
<span class="secondary-text">{{ dataset.n_layers }}</span>
156163
<v-icon
157164
icon="mdi-information-outline"
158165
size="small"
159166
v-tooltip="dataset.description"
160167
class="mx-1"
168+
color="secondary-text"
161169
></v-icon>
162170
<DetailView
163171
v-if="dataset"
@@ -167,12 +175,13 @@ function submitDelete() {
167175
</div>
168176
</v-expansion-panel-title>
169177
<v-expansion-panel-text class="pb-2">
170-
<div class="mb-2 ml-2">
178+
<div class="d-flex flex-wrap ga-1 mb-1 ml-6">
171179
<v-chip
172180
v-for="tag in dataset.tags"
173181
:text="tag"
174182
variant="outlined"
175183
size="small"
184+
color="grey"
176185
/>
177186
</div>
178187
<div v-for="layer in dataset.layers" class="item-title">
@@ -230,10 +239,3 @@ function submitDelete() {
230239
</template>
231240
</DatasetList>
232241
</template>
233-
234-
<style>
235-
.icon-button {
236-
background-color: rgb(var(--v-theme-secondary));
237-
border-radius: 4px;
238-
}
239-
</style>

web/src/components/projects/ProjectConfig.vue

Lines changed: 33 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,8 @@ watch(
239239
</script>
240240

241241
<template>
242-
<div>
243-
<div class="project-row">
242+
<div class="mx-2">
243+
<div class="project-row my-5">
244244
<v-select
245245
placeholder="Select a Project"
246246
no-data-text="No available projects."
@@ -292,17 +292,32 @@ watch(
292292
</v-card>
293293
<div class="project-row" v-if="projectStore.currentProject">
294294
<span class="item-counts">
295-
<v-icon icon="mdi-database-outline" v-tooltip="'Datasets'"></v-icon>
295+
<v-icon
296+
icon="mdi-database-outline"
297+
v-tooltip="'Datasets'"
298+
color="secondary-text"
299+
></v-icon>
296300
{{ projectStore.currentProject.item_counts.datasets || 0 }}
297301
<v-icon
298302
icon="mdi-border-none-variant"
299303
v-tooltip="'Regions'"
300304
class="ml-3"
305+
color="secondary-text"
301306
></v-icon>
302307
{{ projectStore.currentProject.item_counts.regions || 0 }}
303-
<v-icon icon="mdi-poll" v-tooltip="'Charts'" class="ml-3"></v-icon>
308+
<v-icon
309+
icon="mdi-poll"
310+
v-tooltip="'Charts'"
311+
class="ml-3"
312+
color="secondary-text"
313+
></v-icon>
304314
{{ projectStore.currentProject.item_counts.charts || 0 }}
305-
<v-icon icon="mdi-earth" v-tooltip="'Analyses'" class="ml-3"></v-icon>
315+
<v-icon
316+
icon="mdi-earth"
317+
v-tooltip="'Analyses'"
318+
class="ml-3"
319+
color="secondary-text"
320+
></v-icon>
306321
{{ projectStore.currentProject.item_counts.analyses || 0 }}
307322
</span>
308323
<v-menu
@@ -464,11 +479,15 @@ watch(
464479
</div>
465480
<v-btn
466481
v-else
467-
variant="tonal"
482+
color="background"
483+
class="text-primary"
484+
flat
468485
width="100%"
469486
@click="projectStore.projectConfigMode = 'new'"
470-
>+ New</v-btn
471487
>
488+
<v-icon icon="mdi-plus" color="primary" />
489+
New
490+
</v-btn>
472491
<v-btn
473492
v-if="selectedProject"
474493
class="options"
@@ -491,8 +510,8 @@ watch(
491510
"
492511
indeterminate
493512
></v-progress-linear>
494-
<div v-else class="py-3 px-6 d-flex">
495-
<div style="width: 45%">
513+
<v-row v-else class="py-3 px-6" :gap="4">
514+
<v-col class="border-e">
496515
<v-card-text>Project Datasets</v-card-text>
497516
<div class="dataset-card">
498517
<DatasetSelect
@@ -504,9 +523,8 @@ watch(
504523
@onDelete="refreshProjectDatasets"
505524
/>
506525
</div>
507-
</div>
508-
<v-divider class="mx-5" vertical></v-divider>
509-
<div style="width: 45%">
526+
</v-col>
527+
<v-col>
510528
<div class="d-flex">
511529
<v-card-text>All Datasets</v-card-text>
512530
<DatasetUpload
@@ -527,8 +545,8 @@ watch(
527545
@onDelete="refreshProjectDatasets"
528546
/>
529547
</div>
530-
</div>
531-
</div>
548+
</v-col>
549+
</v-row>
532550
</div>
533551
<div v-if="currentTab === 'users'" class="py-3 px-6">
534552
<AccessControl
@@ -574,7 +592,6 @@ watch(
574592
<style>
575593
.project-row {
576594
display: flex;
577-
margin: 20px 8px;
578595
align-items: center;
579596
justify-content: space-between;
580597
}
@@ -626,5 +643,6 @@ watch(
626643
max-height: calc(100vh - 300px);
627644
overflow: auto !important;
628645
position: relative;
646+
padding: 0 12px;
629647
}
630648
</style>

web/src/components/sidebars/DatasetsPanel.vue

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ function toggleSelected(items: Layer[]) {
4646
multiple
4747
flat
4848
variant="accordion"
49-
elevation="0"
5049
bg-color="transparent"
5150
@update:model-value="expandDataset"
5251
>
@@ -59,7 +58,7 @@ function toggleSelected(items: Layer[]) {
5958
<div
6059
style="display: flex; justify-content: space-between; width: 100%"
6160
>
62-
<div class="item-title" style="margin-left: 12px">
61+
<div class="item-title flex-grow-1">
6362
<div>
6463
<div
6564
v-if="
@@ -93,36 +92,35 @@ function toggleSelected(items: Layer[]) {
9392
</div>
9493
{{ dataset.name }}
9594
</div>
96-
<div
97-
style="min-width: 75px; text-align: right"
98-
v-if="dataset.layers"
99-
>
95+
<div v-if="dataset.layers" class="text-no-wrap flex-shrink-0">
10096
<v-icon
10197
icon="mdi-layers-outline"
10298
size="small"
10399
v-tooltip="dataset.n_layers + ' layers'"
104100
class="ml-2"
101+
color="secondary-text"
105102
></v-icon>
106103
<span class="secondary-text">{{ dataset.n_layers }}</span>
107104
<v-icon
108105
icon="mdi-information-outline"
109106
size="small"
110107
v-tooltip="dataset.description"
111108
class="mx-1"
109+
color="secondary-text"
112110
></v-icon>
113111
</div>
114112
</div>
115113
<DetailView :details="{ ...dataset, type: 'dataset' }" />
116114
</div>
117115
</v-expansion-panel-title>
118116
<v-expansion-panel-text class="pb-2">
119-
<div>
117+
<div class="d-flex flex-wrap ga-1 ml-6 mb-1">
120118
<v-chip
121119
v-for="tag in dataset.tags"
122120
:text="tag"
123121
variant="outlined"
124122
size="small"
125-
class="ml-3 mb-2"
123+
color="grey"
126124
/>
127125
</div>
128126
<div v-for="layer in dataset.layers" class="item-title">

web/src/components/sidebars/SideBars.vue

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -297,19 +297,7 @@ function togglePanelVisibility(id: string) {
297297
display: flex;
298298
flex-direction: column;
299299
flex-grow: 1;
300-
max-height: calc(100% - 175px);
301-
}
302-
303-
.right .panel-set {
304-
max-height: calc(100% - 100px);
305-
}
306-
307-
.v-icon {
308-
color: rgb(var(--v-theme-secondary-text)) !important;
309-
}
310-
311-
.v-btn.bg-primary .v-icon {
312-
color: rgb(var(--v-theme-button-text)) !important;
300+
min-height: 0;
313301
}
314302
315303
.v-text-field {

0 commit comments

Comments
 (0)