From 9b9e6b7f6267525e354feea864795ab9ed2ecc7a Mon Sep 17 00:00:00 2001 From: NI Date: Sat, 26 Dec 2020 21:22:52 +0800 Subject: [PATCH] Preset: Switch to "Unknown remotes" tab on the Connector window if `OnlyAllowPresetRemotes` is on --- ui/home.vue | 4 +--- ui/widgets/connect.vue | 2 +- ui/widgets/connect_known.vue | 4 ++-- ui/widgets/connect_switch.vue | 10 +++++----- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/ui/home.vue b/ui/home.vue index 8d57d7e..d81d979 100644 --- a/ui/home.vue +++ b/ui/home.vue @@ -68,9 +68,7 @@ @updated="tabUpdated" >
-

- Hi, this is Sshwifty -

+

Hi, this is Sshwifty

An Open Source Web SSH Client that enables you to connect to SSH diff --git a/ui/widgets/connect.vue b/ui/widgets/connect.vue index b2e17aa..7bf87cb 100644 --- a/ui/widgets/connect.vue +++ b/ui/widgets/connect.vue @@ -138,7 +138,7 @@ export default { }, data() { return { - tab: "new", + tab: !this.restrictedToPresets ? "new" : "known", canSelect: true, }; }, diff --git a/ui/widgets/connect_known.vue b/ui/widgets/connect_known.vue index a9e2cf5..d10b747 100644 --- a/ui/widgets/connect_known.vue +++ b/ui/widgets/connect_known.vue @@ -112,8 +112,8 @@

- The operator has disabled outgoing access to all remote hosts except - those been defined as preset. + The operator has restricted the outgoing connections. You can only + connect to remotes from the pre-defined presets.
diff --git a/ui/widgets/connect_switch.vue b/ui/widgets/connect_switch.vue index c24f148..cc4ffc8 100644 --- a/ui/widgets/connect_switch.vue +++ b/ui/widgets/connect_switch.vue @@ -36,17 +36,17 @@ export default { props: { tab: { type: String, - default: "new" + default: "new", }, knownsLength: { type: Number, - default: 0 - } + default: 0, + }, }, methods: { switchTab(to) { this.$emit("switch", to); - } - } + }, + }, };