Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
陈曦
sub2api
Commits
c86d445c
Commit
c86d445c
authored
Jan 04, 2026
by
IanShaw027
Browse files
fix(frontend): sync with main and finalize i18n & component optimizations
parents
6c036d7b
e78c8646
Changes
186
Show whitespace changes
Inline
Side-by-side
frontend/src/views/admin/RedeemView.vue
View file @
c86d445c
...
...
@@ -140,7 +140,7 @@
: 'badge-danger'
]"
>
{{
t
(
'
admin.redeem.status
es
.
'
+
value
)
}}
{{
t
(
'
admin.redeem.status.
'
+
value
)
}}
</span>
</
template
>
...
...
frontend/src/views/admin/SettingsView.vue
View file @
c86d445c
...
...
@@ -240,7 +240,7 @@
href=
"https://dash.cloudflare.com/"
target=
"_blank"
class=
"text-primary-600 hover:text-primary-500"
>
C
loudflare
Dashboard
</a
>
{{
t
(
'
admin.settings.turnstile.c
loudflareDashboard
'
)
}}
</a
>
</p>
</div>
...
...
frontend/src/views/auth/LoginView.vue
View file @
c86d445c
...
...
@@ -295,12 +295,12 @@ function onTurnstileVerify(token: string): void {
function
onTurnstileExpire
():
void
{
turnstileToken
.
value
=
''
errors
.
turnstile
=
'
Verification expired, please try again
'
errors
.
turnstile
=
t
(
'
auth.turnstileExpired
'
)
}
function
onTurnstileError
():
void
{
turnstileToken
.
value
=
''
errors
.
turnstile
=
'
Verification failed, please try again
'
errors
.
turnstile
=
t
(
'
auth.turnstileFailed
'
)
}
// ==================== Validation ====================
...
...
@@ -315,25 +315,25 @@ function validateForm(): boolean {
// Email validation
if
(
!
formData
.
email
.
trim
())
{
errors
.
email
=
'
Email is r
equired
'
errors
.
email
=
t
(
'
auth.emailR
equired
'
)
isValid
=
false
}
else
if
(
!
/^
[^\s
@
]
+@
[^\s
@
]
+
\.[^\s
@
]
+$/
.
test
(
formData
.
email
))
{
errors
.
email
=
'
Please enter a
valid
e
mail
address
'
errors
.
email
=
t
(
'
auth.in
valid
E
mail
'
)
isValid
=
false
}
// Password validation
if
(
!
formData
.
password
)
{
errors
.
password
=
'
P
assword
is r
equired
'
errors
.
password
=
t
(
'
auth.p
assword
R
equired
'
)
isValid
=
false
}
else
if
(
formData
.
password
.
length
<
6
)
{
errors
.
password
=
'
Password must be at least 6 characters
'
errors
.
password
=
t
(
'
auth.passwordMinLength
'
)
isValid
=
false
}
// Turnstile validation
if
(
turnstileEnabled
.
value
&&
!
turnstileToken
.
value
)
{
errors
.
turnstile
=
'
Please
complete
the v
erification
'
errors
.
turnstile
=
t
(
'
auth.
complete
V
erification
'
)
isValid
=
false
}
...
...
@@ -362,7 +362,7 @@ async function handleLogin(): Promise<void> {
})
// Show success toast
appStore
.
showSuccess
(
'
L
ogin
s
uccess
ful! Welcome back.
'
)
appStore
.
showSuccess
(
t
(
'
auth.l
ogin
S
uccess
'
)
)
// Redirect to dashboard or intended route
const
redirectTo
=
(
router
.
currentRoute
.
value
.
query
.
redirect
as
string
)
||
'
/dashboard
'
...
...
@@ -382,7 +382,7 @@ async function handleLogin(): Promise<void> {
}
else
if
(
err
.
message
)
{
errorMessage
.
value
=
err
.
message
}
else
{
errorMessage
.
value
=
'
L
ogin
f
ailed
. Please check your credentials and try again.
'
errorMessage
.
value
=
t
(
'
auth.l
ogin
F
ailed
'
)
}
// Also show error toast
...
...
frontend/src/views/auth/RegisterView.vue
View file @
c86d445c
...
...
@@ -340,12 +340,12 @@ function onTurnstileVerify(token: string): void {
function
onTurnstileExpire
():
void
{
turnstileToken
.
value
=
''
errors
.
turnstile
=
'
Verification expired, please try again
'
errors
.
turnstile
=
t
(
'
auth.turnstileExpired
'
)
}
function
onTurnstileError
():
void
{
turnstileToken
.
value
=
''
errors
.
turnstile
=
'
Verification failed, please try again
'
errors
.
turnstile
=
t
(
'
auth.turnstileFailed
'
)
}
// ==================== Validation ====================
...
...
@@ -365,25 +365,25 @@ function validateForm(): boolean {
// Email validation
if
(
!
formData
.
email
.
trim
())
{
errors
.
email
=
'
Email is r
equired
'
errors
.
email
=
t
(
'
auth.emailR
equired
'
)
isValid
=
false
}
else
if
(
!
validateEmail
(
formData
.
email
))
{
errors
.
email
=
'
Please enter a
valid
e
mail
address
'
errors
.
email
=
t
(
'
auth.in
valid
E
mail
'
)
isValid
=
false
}
// Password validation
if
(
!
formData
.
password
)
{
errors
.
password
=
'
P
assword
is r
equired
'
errors
.
password
=
t
(
'
auth.p
assword
R
equired
'
)
isValid
=
false
}
else
if
(
formData
.
password
.
length
<
6
)
{
errors
.
password
=
'
Password must be at least 6 characters
'
errors
.
password
=
t
(
'
auth.passwordMinLength
'
)
isValid
=
false
}
// Turnstile validation
if
(
turnstileEnabled
.
value
&&
!
turnstileToken
.
value
)
{
errors
.
turnstile
=
'
Please
complete
the v
erification
'
errors
.
turnstile
=
t
(
'
auth.
complete
V
erification
'
)
isValid
=
false
}
...
...
@@ -429,7 +429,7 @@ async function handleRegister(): Promise<void> {
}
)
// Show success toast
appStore
.
showSuccess
(
'
A
ccount
c
reated
s
uccess
fully! Welcome to
'
+
siteName
.
value
+
'
.
'
)
appStore
.
showSuccess
(
t
(
'
auth.a
ccount
C
reated
S
uccess
'
,
{
siteName
:
siteName
.
value
}
)
)
// Redirect to dashboard
await
router
.
push
(
'
/dashboard
'
)
...
...
@@ -448,7 +448,7 @@ async function handleRegister(): Promise<void> {
}
else
if
(
err
.
message
)
{
errorMessage
.
value
=
err
.
message
}
else
{
errorMessage
.
value
=
'
R
egistration
f
ailed
. Please try again.
'
errorMessage
.
value
=
t
(
'
auth.r
egistration
F
ailed
'
)
}
// Also show error toast
...
...
frontend/src/views/user/RedeemView.vue
View file @
c86d445c
...
...
@@ -500,7 +500,7 @@ const getHistoryItemTitle = (item: RedeemHistoryItem) => {
}
else
if
(
item
.
type
===
'
subscription
'
)
{
return
t
(
'
redeem.subscriptionAssigned
'
)
}
return
'
U
nknown
'
return
t
(
'
common.u
nknown
'
)
}
const
formatHistoryValue
=
(
item
:
RedeemHistoryItem
)
=>
{
...
...
frontend/src/views/user/SubscriptionsView.vue
View file @
c86d445c
...
...
@@ -279,7 +279,7 @@ async function loadSubscriptions() {
subscriptions
.
value
=
await
subscriptionsAPI
.
getMySubscriptions
()
}
catch
(
error
)
{
console
.
error
(
'
Failed to load subscriptions:
'
,
error
)
appStore
.
showError
(
'
Failed to load subscriptions
'
)
appStore
.
showError
(
t
(
'
userSubscriptions.failedToLoad
'
)
)
}
finally
{
loading
.
value
=
false
}
...
...
Prev
1
…
6
7
8
9
10
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment