mirror of
https://github.com/m1k1o/neko-rooms.git
synced 2026-11-03 07:01:35 -06:00
client: multiple mount types.
This commit is contained in:
@@ -212,8 +212,14 @@
|
||||
<h2> Mounts </h2>
|
||||
<v-btn @click="data.mounts = [ ...data.mounts, { type: 'private', host_path: '', container_path: '' }]" icon color="green"><v-icon>mdi-plus</v-icon></v-btn>
|
||||
</v-row>
|
||||
<v-row align="center" v-for="({ host_path, container_path }, index) in data.mounts" :key="index">
|
||||
<v-col class="py-0">
|
||||
<v-row align="center" class="mb-2" v-for="({ host_path, container_path }, index) in data.mounts" :key="index">
|
||||
<v-col class="py-0" cols="2">
|
||||
<v-select
|
||||
label="Type"
|
||||
:items="mountTypes"
|
||||
></v-select>
|
||||
</v-col>
|
||||
<v-col class="py-0 pl-0">
|
||||
<v-text-field
|
||||
label="Host path"
|
||||
:value="host_path"
|
||||
@@ -236,8 +242,12 @@
|
||||
<v-btn @click="$delete(data.mounts, index)" icon color="red"><v-icon>mdi-close</v-icon></v-btn>
|
||||
</div>
|
||||
</v-row>
|
||||
<v-row align="center" no-gutters class="mt-3" v-if="data.mounts.length > 0">
|
||||
Mounts are custom for every room. Host path is relative to <code class="mx-1"><storage path>/room/<room name></code>.
|
||||
<v-row align="center" no-gutters v-if="data.mounts.length > 0">
|
||||
<p>
|
||||
<strong>Private</strong>: Host path is relative to <code class="mx-1"><storage path>/rooms/<room name>/</code>. <br />
|
||||
<strong>Template</strong>: Host path is relative to <code class="mx-1"><storage path>/templates/</code> and is readonly. <br />
|
||||
<strong>Public</strong>: Host path must be whitelisted in config and exists on the host.
|
||||
</p>
|
||||
</v-row>
|
||||
</template>
|
||||
</v-form>
|
||||
@@ -340,6 +350,23 @@ export default class RoomsCreate extends Vue {
|
||||
return this.$store.state.availableScreens
|
||||
}
|
||||
|
||||
get mountTypes() {
|
||||
return [
|
||||
{
|
||||
text: 'Private',
|
||||
value: 'private',
|
||||
},
|
||||
{
|
||||
text: 'Template',
|
||||
value: 'template',
|
||||
},
|
||||
{
|
||||
text: 'Public',
|
||||
value: 'public',
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
addEnv() {
|
||||
Vue.set(this, 'envList', [ ...this.envList, { key: '', val: '' } ])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user