feat: Add RTL support for header navigation
This commit is contained in:
parent
3ddb7f1ad8
commit
db3a80c081
@ -2,6 +2,7 @@ import { useStorage } from "@plasmohq/storage/hook"
|
|||||||
import {
|
import {
|
||||||
BrainCog,
|
BrainCog,
|
||||||
ChevronLeft,
|
ChevronLeft,
|
||||||
|
ChevronRight,
|
||||||
CogIcon,
|
CogIcon,
|
||||||
ComputerIcon,
|
ComputerIcon,
|
||||||
GithubIcon,
|
GithubIcon,
|
||||||
@ -31,7 +32,9 @@ export const Header: React.FC<Props> = ({
|
|||||||
setOpenModelSettings,
|
setOpenModelSettings,
|
||||||
setSidebarOpen
|
setSidebarOpen
|
||||||
}) => {
|
}) => {
|
||||||
const { t } = useTranslation(["option", "common"])
|
const { t, i18n } = useTranslation(["option", "common"])
|
||||||
|
const isRTL = i18n?.dir() === "rtl"
|
||||||
|
|
||||||
const [shareModeEnabled] = useStorage("shareMode", false)
|
const [shareModeEnabled] = useStorage("shareMode", false)
|
||||||
const [hideCurrentChatModelSettings] = useStorage(
|
const [hideCurrentChatModelSettings] = useStorage(
|
||||||
"hideCurrentChatModelSettings",
|
"hideCurrentChatModelSettings",
|
||||||
@ -97,7 +100,11 @@ export const Header: React.FC<Props> = ({
|
|||||||
<NavLink
|
<NavLink
|
||||||
to="/"
|
to="/"
|
||||||
className="text-gray-500 items-center dark:text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 transition-colors">
|
className="text-gray-500 items-center dark:text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 transition-colors">
|
||||||
<ChevronLeft className="w-8 h-8" />
|
{isRTL ? (
|
||||||
|
<ChevronRight className={`w-8 h-8`} />
|
||||||
|
) : (
|
||||||
|
<ChevronLeft className={`w-8 h-8`} />
|
||||||
|
)}
|
||||||
</NavLink>
|
</NavLink>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
@ -9,8 +9,7 @@ export const OptionRouting = () => {
|
|||||||
return (
|
return (
|
||||||
<div className={`${mode === "dark" ? "dark" : "light"} arimo`}>
|
<div className={`${mode === "dark" ? "dark" : "light"} arimo`}>
|
||||||
<Suspense fallback={<PageAssistLoader />}>
|
<Suspense fallback={<PageAssistLoader />}>
|
||||||
|
<OptionRoutingFirefox />
|
||||||
<OptionRoutingFirefox />
|
|
||||||
</Suspense>
|
</Suspense>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
@ -22,8 +21,7 @@ export const SidepanelRouting = () => {
|
|||||||
return (
|
return (
|
||||||
<div className={`${mode === "dark" ? "dark" : "light"} arimo`}>
|
<div className={`${mode === "dark" ? "dark" : "light"} arimo`}>
|
||||||
<Suspense fallback={<PageAssistLoader />}>
|
<Suspense fallback={<PageAssistLoader />}>
|
||||||
|
<SidepanelRoutingFirefox />
|
||||||
<SidepanelRoutingFirefox />
|
|
||||||
</Suspense>
|
</Suspense>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user