mirror of
https://github.com/defnull/fediwall.git
synced 2024-11-25 00:53:15 +01:00
fix: Unable do configure fully qualified accounts
This commit is contained in:
parent
f59515adf9
commit
61af1d552c
@ -27,9 +27,10 @@ const formTags = computed({
|
||||
set: (value) => config.value.tags = (value || "").replace(/[^a-z0-9]+/ig, " ").split(" ").filter(t => t.length),
|
||||
});
|
||||
|
||||
const accountPattern = /\b([A-Z0-9._%+-]+)(@([A-Z0-9.-]+\.[A-Z]{2,}))?\b/ig;
|
||||
const formAccounts = computed({
|
||||
get: () => config.value.accounts.map(t => "@" + t).join(" "),
|
||||
set: (value) => config.value.accounts = (value || "").replace(/[^a-z0-9]+/ig, " ").split(" ").filter(t => t.length),
|
||||
set: (value) => config.value.accounts = [...(value || "").matchAll(accountPattern)].map(m => m[0]).filter(t => t.length),
|
||||
});
|
||||
|
||||
const formLimit = computed({
|
||||
@ -44,7 +45,7 @@ const formInterval = computed({
|
||||
|
||||
const formInfo = computed({
|
||||
get: () => config.value.info,
|
||||
set: (value) => config.value.info = value === "top" ? "top" : "hidden",
|
||||
set: (value) => config.value.info = value === "top" ? "top" : "hide",
|
||||
});
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user