mirror of
https://github.com/thelounge/thelounge
synced 2024-11-23 04:23:13 +00:00
Merge pull request #3977 from thelounge/xpaw/allow-private-lock-name
Allow changing network name in private mode with lockNetwork
This commit is contained in:
commit
d0d3a205b9
2 changed files with 39 additions and 2 deletions
|
@ -11,7 +11,9 @@
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
Connect
|
Connect
|
||||||
<template v-if="config.lockNetwork">to {{ defaults.name }}</template>
|
<template v-if="config.lockNetwork && $store.state.serverConfiguration.public">
|
||||||
|
to {{ defaults.name }}
|
||||||
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</h1>
|
</h1>
|
||||||
<template v-if="!config.lockNetwork">
|
<template v-if="!config.lockNetwork">
|
||||||
|
@ -97,6 +99,36 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
<template v-else-if="config.lockNetwork && !$store.state.serverConfiguration.public">
|
||||||
|
<h2>Network settings</h2>
|
||||||
|
<div class="connect-row">
|
||||||
|
<label for="connect:name">Name</label>
|
||||||
|
<input
|
||||||
|
id="connect:name"
|
||||||
|
v-model="defaults.name"
|
||||||
|
class="input"
|
||||||
|
name="name"
|
||||||
|
maxlength="100"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="connect-row">
|
||||||
|
<label for="connect:password">Password</label>
|
||||||
|
<RevealPassword
|
||||||
|
v-slot:default="slotProps"
|
||||||
|
class="input-wrap password-container"
|
||||||
|
>
|
||||||
|
<input
|
||||||
|
id="connect:password"
|
||||||
|
v-model="defaults.password"
|
||||||
|
class="input"
|
||||||
|
:type="slotProps.isVisible ? 'text' : 'password'"
|
||||||
|
placeholder="Server password (optional)"
|
||||||
|
name="password"
|
||||||
|
maxlength="300"
|
||||||
|
/>
|
||||||
|
</RevealPassword>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
<h2>User preferences</h2>
|
<h2>User preferences</h2>
|
||||||
<div class="connect-row">
|
<div class="connect-row">
|
||||||
|
|
|
@ -120,7 +120,12 @@ Network.prototype.validate = function (client) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.name = Helper.config.defaults.name;
|
if (Helper.config.public) {
|
||||||
|
this.name = Helper.config.defaults.name;
|
||||||
|
// Sync lobby channel name
|
||||||
|
this.channels[0].name = Helper.config.defaults.name;
|
||||||
|
}
|
||||||
|
|
||||||
this.host = Helper.config.defaults.host;
|
this.host = Helper.config.defaults.host;
|
||||||
this.port = Helper.config.defaults.port;
|
this.port = Helper.config.defaults.port;
|
||||||
this.tls = Helper.config.defaults.tls;
|
this.tls = Helper.config.defaults.tls;
|
||||||
|
|
Loading…
Reference in a new issue