mirror of
https://github.com/m1k1o/neko-rooms.git
synced 2026-11-02 22:51:34 -06:00
max connections 0 when using mux.
This commit is contained in:
@@ -25,10 +25,10 @@
|
||||
:rotate="270"
|
||||
:size="100"
|
||||
:width="15"
|
||||
:value="usesMux ? 100 : ((stats.connections / settings.max_connections) * 100)"
|
||||
:value="settings.max_connections == 0 ? 100 : ((stats.connections / settings.max_connections) * 100)"
|
||||
color="blue"
|
||||
>
|
||||
{{ stats.connections }} <template v-if="!usesMux">/ {{ settings.max_connections }}</template>
|
||||
{{ stats.connections }} <template v-if="settings.max_connections > 0">/ {{ settings.max_connections }}</template>
|
||||
</v-progress-circular>
|
||||
</div>
|
||||
</v-col>
|
||||
@@ -99,7 +99,10 @@
|
||||
<span>Invite link for admins</span>
|
||||
</v-tooltip>
|
||||
</td></tr>
|
||||
<tr v-if="!usesMux"><th> Max connections </th><td>{{ settings.max_connections }}</td></tr>
|
||||
<tr v-if="!usesMux"><th> Max connections </th><td>
|
||||
<template v-if="settings.max_connections > 0">{{ settings.max_connections }}</template>
|
||||
<i v-else>not limited because uses mux</i>
|
||||
</td></tr>
|
||||
<tr><th> Control protection </th><td>{{ settings.control_protection }}</td></tr>
|
||||
<tr><th> Implicit Control </th><td>{{ settings.implicit_control }}</td></tr>
|
||||
</tbody>
|
||||
@@ -275,8 +278,7 @@ export default class RoomInfo extends Vue {
|
||||
}
|
||||
|
||||
get usesMux() {
|
||||
// old rooms might not use mux despite enabled server wide, simple check for that
|
||||
return this.$store.state.roomsConfig.uses_mux && this.settings?.max_connections == 1
|
||||
return this.$store.state.roomsConfig.uses_mux
|
||||
}
|
||||
|
||||
get allBrowserExtensions() {
|
||||
|
||||
@@ -604,7 +604,7 @@ export default class RoomsCreate extends Vue {
|
||||
// eslint-disable-next-line
|
||||
admin_pass: this.data.admin_pass || randomPassword(),
|
||||
// eslint-disable-next-line
|
||||
max_connections: Number(this.data.max_connections), // not needed when uses mux
|
||||
max_connections: Number(this.data.max_connections), // ignored when uses mux
|
||||
// eslint-disable-next-line
|
||||
control_protection: Boolean(this.data.control_protection),
|
||||
// eslint-disable-next-line
|
||||
|
||||
@@ -33,8 +33,8 @@
|
||||
</v-tooltip>
|
||||
</template>
|
||||
<template v-slot:[`item.max_connections`]="{ item }">
|
||||
<span v-if="item.max_connections">{{ item.max_connections }}</span>
|
||||
<i v-else>--not-specified--</i>
|
||||
<span v-if="item.max_connections > 0">{{ item.max_connections }}</span>
|
||||
<i v-else>uses mux</i>
|
||||
</template>
|
||||
<template v-slot:[`item.status`]="{ item }">
|
||||
<v-chip :color="item.running ? 'green' : 'red'" dark small> {{ item.status }} </v-chip>
|
||||
|
||||
@@ -101,7 +101,7 @@ export default class Home extends Vue {
|
||||
|
||||
get usedConnections() {
|
||||
// eslint-disable-next-line
|
||||
return this.$store.state.rooms.reduce((sum: number, { max_connections }: RoomEntry) => sum + (max_connections || 0), 0)
|
||||
return this.$store.state.rooms.reduce((sum: number, { max_connections }: RoomEntry) => sum + (max_connections || 1/* 0 when using mux */), 0)
|
||||
}
|
||||
|
||||
async LoadRooms() {
|
||||
|
||||
Reference in New Issue
Block a user