refactor: split strm page hooks

This commit is contained in:
ShukeBta
2026-06-24 12:31:51 +08:00
parent aec5914846
commit ea34d7578e
5 changed files with 331 additions and 288 deletions
+7
View File
@@ -0,0 +1,7 @@
export function apiErrorMessage(err: unknown, fallback: string): string {
return (err as { response?: { data?: { error?: string } } })?.response?.data?.error ?? fallback
}
export function isHTTPURL(value: string): boolean {
return /^https?:\/\//i.test(value)
}