Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add disks page description, change deploy btn #549

Merged
merged 10 commits into from
Jun 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 20 additions & 3 deletions packages/playground/src/components/expandable_layout.vue
Original file line number Diff line number Diff line change
@@ -1,17 +1,33 @@
<template>
<section>
<div class="d-flex mb-6">
<div class="d-flex my-6">
<v-card-subtitle class="text-subtitle-1 mt-3" v-if="title">{{ title }}</v-card-subtitle>
<v-spacer />
<v-btn prepend-icon="mdi-plus" color="primary" @click="$emit('add')"> add </v-btn>
<v-tooltip text="Add">
<template #activator="{ props }">
<v-btn icon="mdi-plus" variant="tonal" color="primary" @click="$emit('add')" v-bind="props" />
</template>
</v-tooltip>
</div>
<v-divider class="my-2" />
<div v-for="(item, index) in modelValue" :key="item">
<div class="d-flex">
<div class="flex-grow-1 mr-4">
<slot :item="item" :index="index" :isRequired="required.includes(index)" />
</div>
<div class="d-flex">
<v-spacer />
<v-btn color="error" icon="mdi-delete-outline" @click="remove(index)" v-if="!required.includes(index)" />
<v-tooltip text="Remove">
<template #activator="{ props }">
<v-btn
color="error"
icon="mdi-delete-outline"
@click="remove(index)"
v-if="!required.includes(index)"
v-bind="props"
/>
</template>
</v-tooltip>
</div>
</div>
<v-divider class="mb-4" v-if="index + 1 < modelValue.length" />
Expand All @@ -31,6 +47,7 @@ const props = defineProps({
type: Array as PropType<number[]>,
default: () => [],
},
title: String,
});
const emits = defineEmits<{
(event: "update:modelValue", value: any[]): void;
Expand Down
7 changes: 6 additions & 1 deletion packages/playground/src/weblets/full_vm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,12 @@
</template>

<template #disks>
<ExpandableLayout v-model="disks" @add="addDisk" #="{ index }">
<ExpandableLayout
v-model="disks"
@add="addDisk"
title="Add additional disk space to your full virtual machine"
#="{ index }"
>
<p class="text-h6 mb-4">Disk #{{ index + 1 }}</p>
<input-validator
:value="disks[index].name"
Expand Down
7 changes: 6 additions & 1 deletion packages/playground/src/weblets/micro_vm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,12 @@
</template>

<template #disks>
<ExpandableLayout v-model="disks" @add="addDisk" #="{ index }">
<ExpandableLayout
v-model="disks"
@add="addDisk"
title="Add additional disk space to your micro virtual machine"
#="{ index }"
>
<p class="text-h6 mb-4">Disk #{{ index + 1 }}</p>
<input-validator
:value="disks[index].name"
Expand Down