Fix removing networks
This commit is contained in:
parent
c8b22b2df3
commit
c4d6afe3d6
@ -46,22 +46,11 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
close() {
|
||||
let cmd = "/close";
|
||||
|
||||
if (this.channel.type === "lobby") {
|
||||
cmd = "/quit";
|
||||
|
||||
// eslint-disable-next-line no-alert
|
||||
if (!confirm(`Are you sure you want to remove ${this.channel.name}?`)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
this.closed = true;
|
||||
|
||||
socket.emit("input", {
|
||||
target: Number(this.channel.id),
|
||||
text: cmd,
|
||||
text: "/close",
|
||||
});
|
||||
},
|
||||
getAriaLabel() {
|
||||
|
@ -42,11 +42,13 @@
|
||||
@click.stop="$emit('toggleJoinChannel')"
|
||||
/>
|
||||
</span>
|
||||
<button class="close" hidden @click="close" />
|
||||
</ChannelWrapper>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ChannelWrapper from "./ChannelWrapper.vue";
|
||||
import socket from "../js/socket";
|
||||
const storage = require("../js/localStorage");
|
||||
|
||||
export default {
|
||||
@ -68,6 +70,17 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
close() {
|
||||
// eslint-disable-next-line no-alert
|
||||
if (!confirm(`Are you sure you want to remove ${this.channel.name}?`)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
socket.emit("input", {
|
||||
target: Number(this.channel.id),
|
||||
text: "/quit",
|
||||
});
|
||||
},
|
||||
onCollapseClick() {
|
||||
const networks = new Set(JSON.parse(storage.get("thelounge.networks.collapsed")));
|
||||
this.network.isCollapsed = !this.network.isCollapsed;
|
||||
|
Loading…
Reference in New Issue
Block a user