From 2a6f6054023c790479f2841cf5a8b70fdc103d45 Mon Sep 17 00:00:00 2001 From: Elihuso Quigley Date: Sat, 18 May 2024 18:37:00 +0800 Subject: [PATCH] [+] dock trigger list in data --- src/logic/helper.ts | 16 +++++++++++++++- src/views/Profile.vue | 18 ++++++++++++++++-- 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/src/logic/helper.ts b/src/logic/helper.ts index 146f4d4b6..5a5740560 100644 --- a/src/logic/helper.ts +++ b/src/logic/helper.ts @@ -153,4 +153,18 @@ export function toast(title: string, text: string, img: string, background: stri timerProgressBar: true, color: color }) -} \ No newline at end of file +} + +export function trim(str: string, ch: string) { + let start = 0 + let end = str.length + + while (start < end && str[start] === ch) + ++start; + + while (end > start && str[end - 1] === ch) + --end; + + return (start > 0 || end < str.length) ? str.substring(start, end) : str; + } + \ No newline at end of file diff --git a/src/views/Profile.vue b/src/views/Profile.vue index 22a92de2d..05b725fd4 100644 --- a/src/views/Profile.vue +++ b/src/views/Profile.vue @@ -13,9 +13,9 @@