Skip to content

Commit 61cced3

Browse files
committed
Update Vuetify usage for v4
1 parent b3e3685 commit 61cced3

4 files changed

Lines changed: 33 additions & 33 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: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -272,15 +272,15 @@ 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 + ' ' + internalItem.raw.last_name
281+
: internalItem.raw.username
282282
"
283-
:subtitle="item.raw.email"
283+
:subtitle="internalItem.raw.email"
284284
></v-list-item>
285285
</template>
286286
</v-select>

web/src/components/sidebars/AnalyticsPanel.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,8 +276,8 @@ watch(
276276
<v-select v-else-if="value.length" v-model="selectedInputs[key]" :label="key.replaceAll('_', ' ')"
277277
:items="value" :rules="inputSelectionRules" item-value="id" item-title="name" density="compact"
278278
hide-details="auto" class="my-1">
279-
<template #item="{ item, props: itemProps }">
280-
<v-list-item v-bind="itemProps" v-tooltip="item.title" style="max-width: 400px;" />
279+
<template #item="{ internalItem, props: itemProps }">
280+
<v-list-item v-bind="itemProps" v-tooltip="internalItem.title" style="max-width: 400px;" />
281281
</template>
282282
</v-select>
283283
</div>

web/src/components/sidebars/LayerStyle.vue

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -715,36 +715,36 @@ onMounted(resetCurrentStyle)
715715
:disabled="!group.visible"
716716
@update:model-value="(v: Colormap) => setGroupColormap(group.name, v)"
717717
>
718-
<template v-slot:item="{ props, item }">
718+
<template v-slot:item="{ props, internalItem }">
719719
<v-list-item v-bind="props">
720720
<template v-slot:append>
721721
<v-icon
722-
v-if="item.raw.project && ['owner', 'collaborator'].includes(projectPermission)"
722+
v-if="internalItem.raw.project && ['owner', 'collaborator'].includes(projectPermission)"
723723
icon="mdi-pencil"
724724
class="ml-2"
725-
@click="openColormapEditor(group.name, item.raw)"
725+
@click="openColormapEditor(group.name, internalItem.raw)"
726726
/>
727727
<v-icon
728-
v-if="item.raw.project && ['owner', 'collaborator'].includes(projectPermission)"
728+
v-if="internalItem.raw.project && ['owner', 'collaborator'].includes(projectPermission)"
729729
icon="mdi-trash-can"
730730
class="ml-2"
731-
@click="delColormap = item.raw"
731+
@click="delColormap = internalItem.raw"
732732
/>
733733
<div style="width: 300px" class="ml-2">
734734
<colormap-preview
735-
:colormap="item.raw"
735+
:colormap="internalItem.raw"
736736
:discrete="group.colormap?.discrete || false"
737737
:nColors="group.colormap?.n_colors || -1"
738738
/>
739739
</div>
740740
</template>
741741
</v-list-item>
742742
</template>
743-
<template v-slot:selection="{ item }">
744-
<span class="pr-15" v-if="getColormap(group.colormap)?.markers">{{ item.title }}</span>
743+
<template v-slot:selection="{ internalItem }">
744+
<span class="pr-15" v-if="getColormap(group.colormap)?.markers">{{ internalItem.title }}</span>
745745
<div style="width: 300px" class="ml-2" v-if="group.colormap && getColormap(group.colormap)?.markers">
746746
<colormap-preview
747-
:colormap="item.raw"
747+
:colormap="internalItem.raw"
748748
:discrete="group.colormap.discrete || false"
749749
:nColors="group.colormap.n_colors || -1"
750750
/>
@@ -960,10 +960,10 @@ onMounted(resetCurrentStyle)
960960
group.colormap.discrete = !vectorProperties?.find((p) => p.name === v)?.range;
961961
}}"
962962
>
963-
<template v-slot:item="{ props, item }">
963+
<template v-slot:item="{ props, internalItem }">
964964
<v-list-item v-bind="props">
965965
<template v-slot:append>
966-
<v-chip size="small" v-if="(item.raw as Record<string, any>).sample_label">{{ (item.raw as Record<string, any>).sample_label }}</v-chip>
966+
<v-chip size="small" v-if="(internalItem.raw as Record<string, any>).sample_label">{{ (internalItem.raw as Record<string, any>).sample_label }}</v-chip>
967967
</template>
968968
</v-list-item>
969969
</template>
@@ -984,36 +984,36 @@ onMounted(resetCurrentStyle)
984984
return-object
985985
@update:model-value="(v: Colormap) => setGroupColormap(group.name, v)"
986986
>
987-
<template v-slot:item="{ props, item }">
987+
<template v-slot:item="{ props, internalItem }">
988988
<v-list-item v-bind="props">
989989
<template v-slot:append>
990990
<v-icon
991-
v-if="item.raw.project && ['owner', 'collaborator'].includes(projectPermission)"
991+
v-if="internalItem.raw.project && ['owner', 'collaborator'].includes(projectPermission)"
992992
icon="mdi-pencil"
993993
class="ml-2"
994-
@click="openColormapEditor(group.name, item.raw)"
994+
@click="openColormapEditor(group.name, internalItem.raw)"
995995
/>
996996
<v-icon
997-
v-if="item.raw.project && ['owner', 'collaborator'].includes(projectPermission)"
997+
v-if="internalItem.raw.project && ['owner', 'collaborator'].includes(projectPermission)"
998998
icon="mdi-trash-can"
999999
class="ml-2"
1000-
@click="delColormap = item.raw"
1000+
@click="delColormap = internalItem.raw"
10011001
/>
10021002
<div style="width: 300px" class="ml-2">
10031003
<colormap-preview
1004-
:colormap="item.raw"
1004+
:colormap="internalItem.raw"
10051005
:discrete="group.colormap.discrete || false"
10061006
:nColors="group.colormap.n_colors || -1"
10071007
/>
10081008
</div>
10091009
</template>
10101010
</v-list-item>
10111011
</template>
1012-
<template v-slot:selection="{ item }">
1013-
<span class="pr-15" v-if="getColormap(group.colormap)?.markers">{{ item.title }}</span>
1012+
<template v-slot:selection="{ internalItem }">
1013+
<span class="pr-15" v-if="getColormap(group.colormap)?.markers">{{ internalItem.title }}</span>
10141014
<div style="width: 300px" class="ml-2" v-if="getColormap(group.colormap)?.markers">
10151015
<colormap-preview
1016-
:colormap="item.raw"
1016+
:colormap="internalItem.raw"
10171017
:discrete="group.colormap.discrete || false"
10181018
:nColors="group.colormap.n_colors || -1"
10191019
/>
@@ -1206,10 +1206,10 @@ onMounted(resetCurrentStyle)
12061206
placeholder="Select property"
12071207
hide-details
12081208
>
1209-
<template v-slot:item="{ props, item }">
1210-
<v-list-item v-bind="props" :disabled="!(item.raw as Record<string, any>).range">
1209+
<template v-slot:item="{ props, internalItem }">
1210+
<v-list-item v-bind="props" :disabled="!(internalItem.raw as Record<string, any>).range">
12111211
<template v-slot:append>
1212-
<v-chip size="small" v-if="(item.raw as Record<string, any>).sample_label">{{ (item.raw as Record<string, any>).sample_label }}</v-chip>
1212+
<v-chip size="small" v-if="(internalItem.raw as Record<string, any>).sample_label">{{ (internalItem.raw as Record<string, any>).sample_label }}</v-chip>
12131213
</template>
12141214
</v-list-item>
12151215
</template>
@@ -1325,10 +1325,10 @@ onMounted(resetCurrentStyle)
13251325
hide-details
13261326
@update:model-value="(v) => updateFilterBy(filter.id, v)"
13271327
>
1328-
<template v-slot:item="{ props, item }">
1328+
<template v-slot:item="{ props, internalItem }">
13291329
<v-list-item v-bind="props">
13301330
<template v-slot:append>
1331-
<v-chip size="small" v-if="(item.raw as Record<string, any>).sample_label">{{ (item.raw as Record<string, any>).sample_label }}</v-chip>
1331+
<v-chip size="small" v-if="(internalItem.raw as Record<string, any>).sample_label">{{ (internalItem.raw as Record<string, any>).sample_label }}</v-chip>
13321332
</template>
13331333
</v-list-item>
13341334
</template>

0 commit comments

Comments
 (0)