Skip to content

Commit 5a24079

Browse files
committed
Update Vuetify usage for v4
1 parent 0b91e68 commit 5a24079

4 files changed

Lines changed: 38 additions & 32 deletions

File tree

web/src/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script setup lang="ts">
22
import { watch, onMounted, computed } from "vue";
33
import { oauthClient } from "./api/auth";
4-
import { useTheme } from "vuetify/lib/framework.mjs";
4+
import { useTheme } from "vuetify";
55
66
import ToggleCompareMap from "./components/map/ToggleCompareMap.vue";
77
import SideBars from "./components/sidebars/SideBars.vue";

web/src/components/projects/AccessControl.vue

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -272,15 +272,17 @@ onMounted(() => {
272272
}
273273
"
274274
>
275-
<template v-slot:item="{ props, item }">
275+
<template v-slot:item="{ props, internalItem }">
276276
<v-list-item
277277
v-bind="props"
278278
:title="
279-
item.raw.first_name && item.raw.last_name
280-
? item.raw.first_name + ' ' + item.raw.last_name
281-
: item.raw.username
279+
internalItem.raw.first_name && internalItem.raw.last_name
280+
? internalItem.raw.first_name +
281+
' ' +
282+
internalItem.raw.last_name
283+
: internalItem.raw.username
282284
"
283-
:subtitle="item.raw.email"
285+
:subtitle="internalItem.raw.email"
284286
></v-list-item>
285287
</template>
286288
</v-select>

web/src/components/sidebars/AnalyticsPanel.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,10 +368,10 @@ watch(
368368
hide-details="auto"
369369
class="my-1"
370370
>
371-
<template #item="{ item, props: itemProps }">
371+
<template #item="{ internalItem, props: itemProps }">
372372
<v-list-item
373373
v-bind="itemProps"
374-
v-tooltip="item.title"
374+
v-tooltip="internalItem.title"
375375
style="max-width: 400px"
376376
/>
377377
</template>

web/src/components/sidebars/LayerStyle.vue

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -897,36 +897,39 @@ onMounted(resetCurrentStyle);
897897
(v: Colormap) => setGroupColormap(group.name, v)
898898
"
899899
>
900-
<template v-slot:item="{ props, item }">
900+
<template v-slot:item="{ props, internalItem }">
901901
<v-list-item v-bind="props">
902902
<template v-slot:append>
903903
<v-icon
904904
v-if="
905-
item.raw.project &&
905+
internalItem.raw.project &&
906906
['owner', 'collaborator'].includes(
907907
projectPermission,
908908
)
909909
"
910910
icon="mdi-pencil"
911911
class="ml-2"
912912
@click="
913-
openColormapEditor(group.name, item.raw)
913+
openColormapEditor(
914+
group.name,
915+
internalItem.raw,
916+
)
914917
"
915918
/>
916919
<v-icon
917920
v-if="
918-
item.raw.project &&
921+
internalItem.raw.project &&
919922
['owner', 'collaborator'].includes(
920923
projectPermission,
921924
)
922925
"
923926
icon="mdi-trash-can"
924927
class="ml-2"
925-
@click="delColormap = item.raw"
928+
@click="delColormap = internalItem.raw"
926929
/>
927930
<div style="width: 300px" class="ml-2">
928931
<colormap-preview
929-
:colormap="item.raw"
932+
:colormap="internalItem.raw"
930933
:discrete="
931934
group.colormap?.discrete || false
932935
"
@@ -1302,15 +1305,13 @@ onMounted(resetCurrentStyle);
13021305
}
13031306
"
13041307
>
1305-
<template v-slot:item="{ props, item }">
1308+
<template v-slot:item="{ props, internalItem }">
13061309
<v-list-item v-bind="props">
13071310
<template v-slot:append>
13081311
<v-chip
13091312
size="small"
1310-
v-if="(item.raw as any).sample_label"
1311-
>{{
1312-
(item.raw as any).sample_label
1313-
}}</v-chip
1313+
v-if="internalItem.raw.sample_label"
1314+
>{{ internalItem.raw.sample_label }}</v-chip
13141315
>
13151316
</template>
13161317
</v-list-item>
@@ -1345,36 +1346,39 @@ onMounted(resetCurrentStyle);
13451346
(v: Colormap) => setGroupColormap(group.name, v)
13461347
"
13471348
>
1348-
<template v-slot:item="{ props, item }">
1349+
<template v-slot:item="{ props, internalItem }">
13491350
<v-list-item v-bind="props">
13501351
<template v-slot:append>
13511352
<v-icon
13521353
v-if="
1353-
item.raw.project &&
1354+
internalItem.raw.project &&
13541355
['owner', 'collaborator'].includes(
13551356
projectPermission,
13561357
)
13571358
"
13581359
icon="mdi-pencil"
13591360
class="ml-2"
13601361
@click="
1361-
openColormapEditor(group.name, item.raw)
1362+
openColormapEditor(
1363+
group.name,
1364+
internalItem.raw,
1365+
)
13621366
"
13631367
/>
13641368
<v-icon
13651369
v-if="
1366-
item.raw.project &&
1370+
internalItem.raw.project &&
13671371
['owner', 'collaborator'].includes(
13681372
projectPermission,
13691373
)
13701374
"
13711375
icon="mdi-trash-can"
13721376
class="ml-2"
1373-
@click="delColormap = item.raw"
1377+
@click="delColormap = internalItem.raw"
13741378
/>
13751379
<div style="width: 300px" class="ml-2">
13761380
<colormap-preview
1377-
:colormap="item.raw"
1381+
:colormap="internalItem.raw"
13781382
:discrete="
13791383
group.colormap.discrete || false
13801384
"
@@ -1697,16 +1701,16 @@ onMounted(resetCurrentStyle);
16971701
placeholder="Select property"
16981702
hide-details
16991703
>
1700-
<template v-slot:item="{ props, item }">
1704+
<template v-slot:item="{ props, internalItem }">
17011705
<v-list-item
17021706
v-bind="props"
1703-
:disabled="!(item.raw as any).range"
1707+
:disabled="!internalItem.raw.range"
17041708
>
17051709
<template v-slot:append>
17061710
<v-chip
17071711
size="small"
1708-
v-if="(item.raw as any).sample_label"
1709-
>{{ (item.raw as any).sample_label }}</v-chip
1712+
v-if="internalItem.raw.sample_label"
1713+
>{{ internalItem.raw.sample_label }}</v-chip
17101714
>
17111715
</template>
17121716
</v-list-item>
@@ -1882,13 +1886,13 @@ onMounted(resetCurrentStyle);
18821886
hide-details
18831887
@update:model-value="(v) => updateFilterBy(filter.id, v)"
18841888
>
1885-
<template v-slot:item="{ props, item }">
1889+
<template v-slot:item="{ props, internalItem }">
18861890
<v-list-item v-bind="props">
18871891
<template v-slot:append>
18881892
<v-chip
18891893
size="small"
1890-
v-if="(item.raw as any).sample_label"
1891-
>{{ (item.raw as any).sample_label }}</v-chip
1894+
v-if="internalItem.raw.sample_label"
1895+
>{{ internalItem.raw.sample_label }}</v-chip
18921896
>
18931897
</template>
18941898
</v-list-item>

0 commit comments

Comments
 (0)