Skip to content

Commit

Permalink
Fixed some linting complaints
Browse files Browse the repository at this point in the history
  • Loading branch information
MrMatAP committed Dec 30, 2023
1 parent abc84c7 commit 03a2f71
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 13 deletions.
2 changes: 2 additions & 0 deletions src/frontend/src/components/IdentityDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@ const title = computed( () => {
case DialogKind.create: return 'Create Identity'
case DialogKind.modify: return 'Modify Identity'
case DialogKind.remove: return 'Remove Identity'
default: return 'OK'
}
})
const acceptLabel = computed( () => {
switch(props.kind) {
case DialogKind.create: return 'Save'
case DialogKind.modify: return 'Modify'
case DialogKind.remove: return 'Remove'
default: return 'OK'
}
})
const legalIdentityKinds = computed(() => [
Expand Down
2 changes: 2 additions & 0 deletions src/frontend/src/components/ImageDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@ const title = computed( () => {
case DialogKind.create: return 'Create Image'
case DialogKind.modify: return 'Modify Image'
case DialogKind.remove: return 'Remove Image'
default: return 'OK'
}
})
const acceptLabel = computed( () => {
switch(props.kind) {
case DialogKind.create: return 'Save'
case DialogKind.modify: return 'Modify'
case DialogKind.remove: return 'Remove'
default: return 'OK'
}
})
Expand Down
5 changes: 4 additions & 1 deletion src/frontend/src/components/InstanceCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ let expand = ref()
<v-expand-transition>
<div v-if="expand">
<v-list class="bg-transparent" density="compact">
<v-list-item title="MAC"><template v-slot:append>{{ instance.mac }}</template></v-list-item>
<v-list-item>
<template v-slot:title>{{instance.mac}}</template>
<template v-slot:subtitle>MAC</template>
</v-list-item>
</v-list>
</div>
</v-expand-transition>
Expand Down
4 changes: 2 additions & 2 deletions src/frontend/src/views/Identities.vue
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ onMounted( () => {
</v-btn>
</v-toolbar>
</template>
<template v-slot:item.kind="{ value }">
<template v-slot:[`item.kind`]="{value}">
{{ Identity.displayKind(value) }}
</template>
<template v-slot:item.actions="{ item }">
<template v-slot:[`item.actions`]="{ item }">
<v-btn density="compact" :rounded="true" variant="plain">
<v-icon size="small">mdi-pencil</v-icon>
<identity-dialog :kind="DialogKind.modify" :input="item" @accept="modifyIdentity"/>
Expand Down
5 changes: 2 additions & 3 deletions src/frontend/src/views/Images-Grid.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<script setup lang="ts">
import {useImagesStore} from "@/store/images";
import ImageCard from "@/components/ImageCard.vue";
const imagesStore = useImagesStore()
</script>
Expand All @@ -9,9 +10,7 @@ const imagesStore = useImagesStore()
<v-container class="fill-height">
<v-responsive class="fill-height">
<v-row>
<v-col v-for="instance in instanceStore.instances">
<InstanceCard :instance="instance"/>
</v-col>
<ImageCard v-for="image in imagesStore.images" :key="image.image_id" :image="image"/>
</v-row>
</v-responsive>
</v-container>
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/views/Images.vue
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ onMounted( () => {
</v-btn>
</v-toolbar>
</template>
<template v-slot:item.actions="{item}">
<template v-slot:[`item.actions`]="{item}">
<v-btn density="compact" :rounded="true" variant="plain">
<v-icon size="small">mdi-pencil</v-icon>
<image-dialog :kind="DialogKind.modify" :input="item" :predefined="imagesStore.predefined_images" @accept="modifyImage"/>
Expand Down
4 changes: 1 addition & 3 deletions src/frontend/src/views/Instances.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ onMounted( () => {
<v-container class="fill-height">
<v-responsive class="fill-height">
<v-row>
<v-col v-for="instance in instanceStore.instances">
<InstanceCard :instance="instance"/>
</v-col>
<InstanceCard v-for="instance in instanceStore.instances" :key="instance.instance_id" :instance="instance"/>
</v-row>
</v-responsive>
</v-container>
Expand Down
4 changes: 1 addition & 3 deletions src/frontend/src/views/Networks.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ onMounted(() => {
<v-container class="fill-height">
<v-responsive class="fill-height">
<v-row>
<v-col v-for="net in networksStore.networks">
<NetworkCard :net="net"/>
</v-col>
<NetworkCard v-for="net in networksStore.networks" :key="net.network_id" :net="net"/>
</v-row>
</v-responsive>
</v-container>
Expand Down

0 comments on commit 03a2f71

Please sign in to comment.