Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
VCCI-News
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Văn Hoàng
VCCI-News
Commits
998b966b
Commit
998b966b
authored
Aug 25, 2026
by
Lê Bảo Hồng Đức
☄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixnews
parent
0a8e85f9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
15 deletions
+9
-15
page.tsx
src/app/admin/login/page.tsx
+3
-15
rich-text-editor.tsx
src/components/admin/rich-text-editor.tsx
+6
-0
No files found.
src/app/admin/login/page.tsx
View file @
998b966b
...
...
@@ -22,11 +22,8 @@ import { Button } from "@/components/ui/button";
import
{
Checkbox
}
from
"@/components/ui/checkbox"
;
import
{
Input
}
from
"@/components/ui/input"
;
import
{
Label
}
from
"@/components/ui/label"
;
import
logo
from
"@/assets/VCCI-HCM-logo-VN-2025.png"
;
import
links
,
{
resolveUploadUrl
}
from
"@/links"
;
import
{
loginAdmin
}
from
"@/lib/auth/admin-auth"
;
import
useAuthStore
from
"@/store/useAuthStore"
;
import
{
fetchCmsFileById
,
resolveCmsFileUrl
}
from
"@/lib/api/files"
;
type
AuthMode
=
"login"
|
"forgot"
;
...
...
@@ -121,18 +118,9 @@ function AuthShell({
}
);
// Resolve logo URL: prefer logo_url, otherwise fetch file by file_id.
const
{
data
:
logoFile
}
=
useQuery
({
queryKey
:
[
"cms-file"
,
logoData
?.
file_id
],
queryFn
:
()
=>
fetchCmsFileById
(
logoData
!
.
file_id
),
enabled
:
!!
logoData
?.
file_id
&&
!
logoData
?.
logo_url
,
});
const
logoSrc
=
logoData
?.
logo_url
?
resolveUploadUrl
(
logoData
.
logo_url
)
:
logoFile
?
resolveCmsFileUrl
(
logoFile
.
path
)
:
logo
;
// Always use the static /logo.png from public/ for the login screen so the
// logo renders reliably regardless of backend logo/upload state.
const
logoSrc
=
"/logo.png"
;
const
title
=
mode
===
"login"
...
...
src/components/admin/rich-text-editor.tsx
View file @
998b966b
...
...
@@ -385,8 +385,14 @@ export function AdminRichTextEditor({
""
;
// Resolve to a full URL so the image preview renders inside the editor.
const
resolvedUrl
=
rawUrl
?
resolveUploadUrl
(
rawUrl
)
:
""
;
// isImages tells Jodit's defaultHandlerSuccess to insert an <img>
// tag instead of an <a> link. Without it, uploaded images render as
// plain text links inside the editor and on the client.
const
mime
=
typeof
responseData
?.
mime
===
"string"
?
responseData
.
mime
:
""
;
const
isImage
=
mime
.
startsWith
(
"image/"
)
||
/
\.(
png|jpe
?
g|gif|webp|svg|bmp|avif
)
$/i
.
test
(
resolvedUrl
);
return
{
files
:
resolvedUrl
?
[
resolvedUrl
]
:
[],
isImages
:
resolvedUrl
?
[
isImage
]
:
[],
baseurl
:
""
,
error
:
resolvedUrl
?
undefined
:
(
r
.
message
as
string
)
||
"Upload failed"
,
msg
:
(
r
.
message
as
string
)
||
""
,
...
...
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