Skip to content

Commit

Permalink
fix mount reactiveness, #128.
Browse files Browse the repository at this point in the history
  • Loading branch information
m1k1o committed Jun 17, 2024
1 parent 76c0d28 commit e61f6bf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion client/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
</template>

<script lang="ts">
import { Vue, Component, Prop } from 'vue-property-decorator'
import { Vue, Component } from 'vue-property-decorator'
import Home from './views/Home.vue'
@Component({
Expand Down
8 changes: 4 additions & 4 deletions client/src/components/RoomsCreate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@
<h2> Environment variables </h2>
<v-btn @click="addEnv" icon color="green"><v-icon>mdi-plus</v-icon></v-btn>
</v-row>
<v-row align="center" v-for="({ key, val }, index) in envList" :key="index">
<v-row align="center" v-for="({ key, val }, index) in envList" :key="'env-'+index">
<v-col class="py-0">
<v-text-field
label="Key"
Expand All @@ -251,7 +251,7 @@
<h2> Mounts </h2>
<v-btn @click="addMount" icon color="green"><v-icon>mdi-plus</v-icon></v-btn>
</v-row>
<v-row align="center" class="mb-2" v-for="({ type, host_path, container_path }, index) in data.mounts" :key="index">
<v-row align="center" class="mb-2" v-for="({ type, host_path, container_path }, index) in data.mounts" :key="'mount-'+index">
<v-col class="py-0" cols="2">
<v-select
label="Type"
Expand Down Expand Up @@ -726,13 +726,13 @@ export default class RoomsCreate extends Vue {
} else {
mounts[index] = data
}
Vue.set(this.data, 'mounts', mounts)
Vue.set(this.data, 'mounts', [ ...mounts])
}
delMount(index: number) {
const mounts = this.data.mounts || []
mounts.splice(index, 1)
Vue.set(this.data, 'mounts', mounts)
Vue.set(this.data, 'mounts', [ ...mounts])
}
async CreateAndStart() {
Expand Down

0 comments on commit e61f6bf

Please sign in to comment.