mirror of
https://github.com/m1k1o/neko-rooms.git
synced 2026-11-03 07:01:35 -06:00
storage enabled in rooms config.
This commit is contained in:
@@ -234,6 +234,9 @@ components:
|
||||
items:
|
||||
type: string
|
||||
example: m1k1o/neko:latest
|
||||
storage_enabled:
|
||||
type: boolean
|
||||
example: true
|
||||
|
||||
RoomEntry:
|
||||
type: object
|
||||
|
||||
@@ -374,6 +374,12 @@ export interface RoomsConfig {
|
||||
* @memberof RoomsConfig
|
||||
*/
|
||||
neko_images?: Array<string>;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof RoomsConfig
|
||||
*/
|
||||
storage_enabled?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -210,8 +210,16 @@
|
||||
</v-row>
|
||||
<v-row align="center" no-gutters class="my-3">
|
||||
<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-btn :disabled="!storageEnabled" @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-alert
|
||||
border="left"
|
||||
type="warning"
|
||||
v-if="!storageEnabled"
|
||||
>
|
||||
<p><strong>Not available!</strong></p>
|
||||
<p class="mb-0">Mounts are not available, because storage is not enabled.</p>
|
||||
</v-alert>
|
||||
<v-row align="center" class="mb-2" v-for="({ type, host_path, container_path }, index) in data.mounts" :key="index">
|
||||
<v-col class="py-0" cols="2">
|
||||
<v-select
|
||||
@@ -261,13 +269,21 @@
|
||||
</h2>
|
||||
<v-checkbox
|
||||
v-model="browserPolicyEnabled"
|
||||
:disabled="!browserPolicyConfig"
|
||||
:disabled="!browserPolicyConfig || !storageEnabled"
|
||||
hide-details
|
||||
class="shrink ml-2 mt-0"
|
||||
></v-checkbox>
|
||||
</v-row>
|
||||
|
||||
<template v-if="browserPolicyConfig">
|
||||
<v-alert
|
||||
border="left"
|
||||
type="warning"
|
||||
v-if="!storageEnabled"
|
||||
>
|
||||
<p><strong>Not available!</strong></p>
|
||||
<p class="mb-0">Browser policy is not available, because storage is not enabled.</p>
|
||||
</v-alert>
|
||||
<template v-else-if="browserPolicyConfig">
|
||||
<v-row align="center" no-gutters class="mt-0">
|
||||
<v-col>
|
||||
<v-select
|
||||
@@ -403,6 +419,10 @@ export default class RoomsCreate extends Vue {
|
||||
return this.$store.state.roomsConfig.neko_images
|
||||
}
|
||||
|
||||
get storageEnabled() {
|
||||
return this.$store.state.roomsConfig.storage_enabled
|
||||
}
|
||||
|
||||
get videoCodecs() {
|
||||
return this.$store.state.videoCodecs
|
||||
}
|
||||
|
||||
@@ -59,8 +59,9 @@ type RoomManagerCtx struct {
|
||||
|
||||
func (manager *RoomManagerCtx) Config() types.RoomsConfig {
|
||||
return types.RoomsConfig{
|
||||
Connections: manager.config.EprMax - manager.config.EprMin + 1,
|
||||
NekoImages: manager.config.NekoImages,
|
||||
Connections: manager.config.EprMax - manager.config.EprMin + 1,
|
||||
NekoImages: manager.config.NekoImages,
|
||||
StorageEnabled: manager.config.StorageEnabled,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -24,8 +24,9 @@ var blacklistedEnvs = []string{
|
||||
}
|
||||
|
||||
type RoomsConfig struct {
|
||||
Connections uint16 `json:"connections"`
|
||||
NekoImages []string `json:"neko_images"`
|
||||
Connections uint16 `json:"connections"`
|
||||
NekoImages []string `json:"neko_images"`
|
||||
StorageEnabled bool `json:"storage_enabled"`
|
||||
}
|
||||
|
||||
type RoomEntry struct {
|
||||
|
||||
Reference in New Issue
Block a user