Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
canifa_note
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ũ Hoàng Anh
canifa_note
Commits
013ea525
Unverified
Commit
013ea525
authored
Jan 07, 2026
by
Om vataliya
Committed by
GitHub
Jan 07, 2026
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: apply theme and locale changes immediately on login screen (#5440) (#5442)
parent
7c3fcc29
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
LocaleSelect.tsx
web/src/components/LocaleSelect.tsx
+4
-1
ThemeSelect.tsx
web/src/components/ThemeSelect.tsx
+4
-1
No files found.
web/src/components/LocaleSelect.tsx
View file @
013ea525
...
@@ -2,7 +2,7 @@ import { GlobeIcon } from "lucide-react";
...
@@ -2,7 +2,7 @@ import { GlobeIcon } from "lucide-react";
import
{
FC
}
from
"react"
;
import
{
FC
}
from
"react"
;
import
{
Select
,
SelectContent
,
SelectItem
,
SelectTrigger
,
SelectValue
}
from
"@/components/ui/select"
;
import
{
Select
,
SelectContent
,
SelectItem
,
SelectTrigger
,
SelectValue
}
from
"@/components/ui/select"
;
import
{
locales
}
from
"@/i18n"
;
import
{
locales
}
from
"@/i18n"
;
import
{
getLocaleDisplayName
}
from
"@/utils/i18n"
;
import
{
getLocaleDisplayName
,
loadLocale
}
from
"@/utils/i18n"
;
interface
Props
{
interface
Props
{
value
:
Locale
;
value
:
Locale
;
...
@@ -13,6 +13,9 @@ const LocaleSelect: FC<Props> = (props: Props) => {
...
@@ -13,6 +13,9 @@ const LocaleSelect: FC<Props> = (props: Props) => {
const
{
onChange
,
value
}
=
props
;
const
{
onChange
,
value
}
=
props
;
const
handleSelectChange
=
async
(
locale
:
Locale
)
=>
{
const
handleSelectChange
=
async
(
locale
:
Locale
)
=>
{
// Apply locale globally immediately
loadLocale
(
locale
);
// Also notify parent component
onChange
(
locale
);
onChange
(
locale
);
};
};
...
...
web/src/components/ThemeSelect.tsx
View file @
013ea525
import
{
Monitor
,
Moon
,
MoonStar
,
Palette
,
Sun
,
Wallpaper
}
from
"lucide-react"
;
import
{
Monitor
,
Moon
,
MoonStar
,
Palette
,
Sun
,
Wallpaper
}
from
"lucide-react"
;
import
{
Select
,
SelectContent
,
SelectItem
,
SelectTrigger
,
SelectValue
}
from
"@/components/ui/select"
;
import
{
Select
,
SelectContent
,
SelectItem
,
SelectTrigger
,
SelectValue
}
from
"@/components/ui/select"
;
import
{
THEME_OPTIONS
}
from
"@/utils/theme"
;
import
{
loadTheme
,
THEME_OPTIONS
}
from
"@/utils/theme"
;
interface
ThemeSelectProps
{
interface
ThemeSelectProps
{
value
?:
string
;
value
?:
string
;
...
@@ -21,6 +21,9 @@ const ThemeSelect = ({ value, onValueChange, className }: ThemeSelectProps = {})
...
@@ -21,6 +21,9 @@ const ThemeSelect = ({ value, onValueChange, className }: ThemeSelectProps = {})
const
currentTheme
=
value
||
"system"
;
const
currentTheme
=
value
||
"system"
;
const
handleThemeChange
=
(
newTheme
:
string
)
=>
{
const
handleThemeChange
=
(
newTheme
:
string
)
=>
{
// Apply theme globally immediately
loadTheme
(
newTheme
);
// Also notify parent component if callback is provided
if
(
onValueChange
)
{
if
(
onValueChange
)
{
onValueChange
(
newTheme
);
onValueChange
(
newTheme
);
}
}
...
...
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