From 50a3eb55928ede7550876dc75eb114ba4462668e Mon Sep 17 00:00:00 2001 From: Peng-YM <1048217874pengym@gmail.com> Date: Tue, 21 Jun 2022 17:02:27 +0800 Subject: [PATCH] fix: unable to delete subscription with trailing spaces #build --- web/src/components/TypeFilter.vue | 16 ++++++++++++++-- web/src/views/Cloud.vue | 6 +----- web/src/views/Subscription.vue | 10 +++------- 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/web/src/components/TypeFilter.vue b/web/src/components/TypeFilter.vue index 968ba88..63004b9 100644 --- a/web/src/components/TypeFilter.vue +++ b/web/src/components/TypeFilter.vue @@ -56,16 +56,28 @@ const types = [ value: "ssr" }, { - name: "V2Ray", + name: "VMess", value: "vmess" }, + { + name: "VLess", + value: "vless" + }, { name: "Trojan", value: "trojan" }, { - name: "HTTP", + name: "HTTP(s)", value: "http" + }, + { + name: "Socks5", + value: "socks5" + }, + { + name: "Snell", + value: "snell" } ]; export default { diff --git a/web/src/views/Cloud.vue b/web/src/views/Cloud.vue index 707f3b6..2279780 100644 --- a/web/src/views/Cloud.vue +++ b/web/src/views/Cloud.vue @@ -296,7 +296,7 @@ export default { copy(artifact) { if (artifact.url) { - this.$clipboard(artifact.url + (isPlainName(artifact.name) ? '' : `#${artifact.name}`)); + this.$clipboard(artifact.url); this.$store.commit("SET_SUCCESS_MESSAGE", "成功复制配置链接"); } }, @@ -357,10 +357,6 @@ export default { } } } - -function isPlainName(name) { - return /^[0-9a-zA-Z-_]*$/.test(name); -}