Skip to content

Commit

Permalink
fix(frontend): emby url校验规则修正,支持本地映射地址 #584
Browse files Browse the repository at this point in the history
Signed-off-by: Myon <myon.cn@gmail.com>
  • Loading branch information
iMyon committed Dec 4, 2022
1 parent 8fa1896 commit 9175f1d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 1 addition & 4 deletions frontend/src/pages/settings/SettingsPanelEmby.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@
dense
:rules="[
(val) => (form.enable && !!val) || '不能为空',
(val) =>
val.match(
/^(http|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&amp;:/~\+#]*[\w\-\@?^=%&amp;/~\+#])?$/
) || '请输入正确的URL',
(val) => val.match(/^https?:\/\/\w+(\.\w+)*(:[0-9]+)?\/?(\/[.\w]*)*$/) || '请输入正确的URL',
]"
/>
</q-item-section>
Expand Down
5 changes: 1 addition & 4 deletions frontend/src/pages/setup/EmbySetupForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
dense
:rules="[
(val) => !!val || '不能为空',
(val) =>
val.match(
/^(http|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&amp;:/~\+#]*[\w\-\@?^=%&amp;/~\+#])?$/
) || '请输入正确的URL',
(val) => val.match(/^https?:\/\/\w+(\.\w+)*(:[0-9]+)?\/?(\/[.\w]*)*$/) || '请输入正确的URL',
]"
/>
</q-item-section>
Expand Down

0 comments on commit 9175f1d

Please sign in to comment.