refactor: streamline navbar and settings tab cues
This commit is contained in:
parent
c1259f0bf5
commit
d62564fd0d
@ -8,11 +8,9 @@ import HouseholdSwitcher from "../household/HouseholdSwitcher";
|
|||||||
|
|
||||||
export default function Navbar() {
|
export default function Navbar() {
|
||||||
const { role, logout, username } = useContext(AuthContext);
|
const { role, logout, username } = useContext(AuthContext);
|
||||||
const [showNavMenu, setShowNavMenu] = useState(false);
|
|
||||||
const [showUserMenu, setShowUserMenu] = useState(false);
|
const [showUserMenu, setShowUserMenu] = useState(false);
|
||||||
|
|
||||||
const closeMenus = () => {
|
const closeMenus = () => {
|
||||||
setShowNavMenu(false);
|
|
||||||
setShowUserMenu(false);
|
setShowUserMenu(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -30,51 +28,52 @@ export default function Navbar() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<nav className="navbar">
|
<nav className="navbar">
|
||||||
{/* Left: Navigation Menu */}
|
<div className="navbar-section navbar-spacer" aria-hidden="true"></div>
|
||||||
<div className="navbar-section navbar-left">
|
|
||||||
<button
|
|
||||||
className="navbar-menu-btn"
|
|
||||||
onClick={() => {
|
|
||||||
setShowNavMenu(!showNavMenu);
|
|
||||||
setShowUserMenu(false);
|
|
||||||
}}
|
|
||||||
aria-label="Navigation menu"
|
|
||||||
>
|
|
||||||
<span className="hamburger-icon">
|
|
||||||
<span></span>
|
|
||||||
<span></span>
|
|
||||||
<span></span>
|
|
||||||
</span>
|
|
||||||
</button>
|
|
||||||
|
|
||||||
{showNavMenu && (
|
{/* Center: Home + Household + Manage */}
|
||||||
<>
|
|
||||||
<div className="menu-overlay" onClick={closeMenus}></div>
|
|
||||||
<div className="navbar-dropdown nav-dropdown">
|
|
||||||
<Link to="/" onClick={closeMenus}>Home</Link>
|
|
||||||
<Link to="/manage" onClick={closeMenus}>Manage</Link>
|
|
||||||
<Link to="/settings" onClick={closeMenus}>Settings</Link>
|
|
||||||
{role === "system_admin" && <Link to="/admin" onClick={closeMenus}>Admin</Link>}
|
|
||||||
</div>
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Center: Household Switcher */}
|
|
||||||
<div className="navbar-section navbar-center">
|
<div className="navbar-section navbar-center">
|
||||||
|
<div className="navbar-center-nav">
|
||||||
|
<Link
|
||||||
|
to="/"
|
||||||
|
className="navbar-icon-link navbar-icon-left"
|
||||||
|
title="Home"
|
||||||
|
aria-label="Home"
|
||||||
|
onClick={closeMenus}
|
||||||
|
>
|
||||||
|
<span aria-hidden="true">⌂</span>
|
||||||
|
</Link>
|
||||||
|
|
||||||
|
<div className="navbar-household-wrap">
|
||||||
<HouseholdSwitcher />
|
<HouseholdSwitcher />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<Link
|
||||||
|
to="/manage"
|
||||||
|
className="navbar-icon-link navbar-icon-right"
|
||||||
|
title="Manage"
|
||||||
|
aria-label="Manage"
|
||||||
|
onClick={closeMenus}
|
||||||
|
>
|
||||||
|
<span aria-hidden="true">⚙</span>
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
{/* Right: User Menu */}
|
{/* Right: User Menu */}
|
||||||
<div className="navbar-section navbar-right">
|
<div className="navbar-section navbar-right">
|
||||||
<button
|
<button
|
||||||
className="navbar-user-btn"
|
className="navbar-user-btn"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setShowUserMenu(!showUserMenu);
|
setShowUserMenu(!showUserMenu);
|
||||||
setShowNavMenu(false);
|
|
||||||
}}
|
}}
|
||||||
|
aria-label="User menu"
|
||||||
>
|
>
|
||||||
{username}
|
<span className="navbar-user-icon" aria-hidden="true">
|
||||||
|
<svg viewBox="0 0 24 24" focusable="false" aria-hidden="true">
|
||||||
|
<path d="M12 12a5 5 0 1 0-5-5 5 5 0 0 0 5 5Zm0 2c-4.14 0-7.5 2.69-7.5 6v1h15v-1c0-3.31-3.36-6-7.5-6Z" />
|
||||||
|
</svg>
|
||||||
|
</span>
|
||||||
|
<span className="navbar-user-name">{username}</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
{showUserMenu && (
|
{showUserMenu && (
|
||||||
@ -85,6 +84,14 @@ export default function Navbar() {
|
|||||||
<span className="user-dropdown-username">{username}</span>
|
<span className="user-dropdown-username">{username}</span>
|
||||||
<span className="user-dropdown-role">{role}</span>
|
<span className="user-dropdown-role">{role}</span>
|
||||||
</div>
|
</div>
|
||||||
|
<Link to="/settings" className="user-dropdown-link" onClick={closeMenus}>
|
||||||
|
User Settings
|
||||||
|
</Link>
|
||||||
|
{role === "system_admin" && (
|
||||||
|
<Link to="/admin" className="user-dropdown-link" onClick={closeMenus}>
|
||||||
|
Admin Settings
|
||||||
|
</Link>
|
||||||
|
)}
|
||||||
<button className="user-dropdown-logout" onClick={handleLogout}>
|
<button className="user-dropdown-logout" onClick={handleLogout}>
|
||||||
Logout
|
Logout
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@ -86,7 +86,6 @@ export default function ManageStores() {
|
|||||||
<div className="store-info">
|
<div className="store-info">
|
||||||
<h3>{store.name}</h3>
|
<h3>{store.name}</h3>
|
||||||
{store.location && <p className="store-location">{store.location}</p>}
|
{store.location && <p className="store-location">{store.location}</p>}
|
||||||
{store.is_default && <span className="default-badge">Default</span>}
|
|
||||||
</div>
|
</div>
|
||||||
{isAdmin && (
|
{isAdmin && (
|
||||||
<div className="store-actions">
|
<div className="store-actions">
|
||||||
|
|||||||
@ -26,7 +26,6 @@ export default function StoreTabs() {
|
|||||||
disabled={loading}
|
disabled={loading}
|
||||||
>
|
>
|
||||||
<span className="store-name">{store.name}</span>
|
<span className="store-name">{store.name}</span>
|
||||||
{store.is_default && <span className="default-badge">Default</span>}
|
|
||||||
</button>
|
</button>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { useContext, useEffect, useState } from "react";
|
import { useContext, useEffect, useRef, useState } from "react";
|
||||||
import { changePassword, getCurrentUser, updateCurrentUser } from "../api/users";
|
import { changePassword, getCurrentUser, updateCurrentUser } from "../api/users";
|
||||||
import { SettingsContext } from "../context/SettingsContext";
|
import { SettingsContext } from "../context/SettingsContext";
|
||||||
import "../styles/pages/Settings.css";
|
import "../styles/pages/Settings.css";
|
||||||
@ -7,6 +7,9 @@ import "../styles/pages/Settings.css";
|
|||||||
export default function Settings() {
|
export default function Settings() {
|
||||||
const { settings, updateSettings, resetSettings } = useContext(SettingsContext);
|
const { settings, updateSettings, resetSettings } = useContext(SettingsContext);
|
||||||
const [activeTab, setActiveTab] = useState("appearance");
|
const [activeTab, setActiveTab] = useState("appearance");
|
||||||
|
const tabsRef = useRef(null);
|
||||||
|
const [showLeftArrow, setShowLeftArrow] = useState(false);
|
||||||
|
const [showRightArrow, setShowRightArrow] = useState(false);
|
||||||
|
|
||||||
// Account management state
|
// Account management state
|
||||||
const [displayName, setDisplayName] = useState("");
|
const [displayName, setDisplayName] = useState("");
|
||||||
@ -30,6 +33,35 @@ export default function Settings() {
|
|||||||
loadProfile();
|
loadProfile();
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
const tabsElement = tabsRef.current;
|
||||||
|
if (!tabsElement) return;
|
||||||
|
|
||||||
|
const updateArrowVisibility = () => {
|
||||||
|
const hasOverflow = tabsElement.scrollWidth > tabsElement.clientWidth + 1;
|
||||||
|
|
||||||
|
if (!hasOverflow) {
|
||||||
|
setShowLeftArrow(false);
|
||||||
|
setShowRightArrow(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
setShowLeftArrow(tabsElement.scrollLeft > 4);
|
||||||
|
setShowRightArrow(
|
||||||
|
tabsElement.scrollLeft + tabsElement.clientWidth < tabsElement.scrollWidth - 4
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
updateArrowVisibility();
|
||||||
|
|
||||||
|
tabsElement.addEventListener("scroll", updateArrowVisibility, { passive: true });
|
||||||
|
window.addEventListener("resize", updateArrowVisibility);
|
||||||
|
|
||||||
|
return () => {
|
||||||
|
tabsElement.removeEventListener("scroll", updateArrowVisibility);
|
||||||
|
window.removeEventListener("resize", updateArrowVisibility);
|
||||||
|
};
|
||||||
|
}, []);
|
||||||
|
|
||||||
const handleThemeChange = (theme) => {
|
const handleThemeChange = (theme) => {
|
||||||
updateSettings({ theme });
|
updateSettings({ theme });
|
||||||
@ -114,7 +146,15 @@ export default function Settings() {
|
|||||||
<div className="card" style={{ maxWidth: '800px', margin: '0 auto' }}>
|
<div className="card" style={{ maxWidth: '800px', margin: '0 auto' }}>
|
||||||
<h1 className="text-2xl font-semibold mb-4">Settings</h1>
|
<h1 className="text-2xl font-semibold mb-4">Settings</h1>
|
||||||
|
|
||||||
<div className="settings-tabs">
|
<div className="settings-tabs-wrapper">
|
||||||
|
<div
|
||||||
|
className={`settings-tabs-arrow settings-tabs-arrow-left ${showLeftArrow ? "visible" : ""}`}
|
||||||
|
aria-hidden="true"
|
||||||
|
>
|
||||||
|
‹
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="settings-tabs" ref={tabsRef}>
|
||||||
<button
|
<button
|
||||||
className={`settings-tab ${activeTab === "appearance" ? "active" : ""}`}
|
className={`settings-tab ${activeTab === "appearance" ? "active" : ""}`}
|
||||||
onClick={() => setActiveTab("appearance")}
|
onClick={() => setActiveTab("appearance")}
|
||||||
@ -141,6 +181,14 @@ export default function Settings() {
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div
|
||||||
|
className={`settings-tabs-arrow settings-tabs-arrow-right ${showRightArrow ? "visible" : ""}`}
|
||||||
|
aria-hidden="true"
|
||||||
|
>
|
||||||
|
›
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className="settings-content">
|
<div className="settings-content">
|
||||||
{/* Appearance Tab */}
|
{/* Appearance Tab */}
|
||||||
{activeTab === "appearance" && (
|
{activeTab === "appearance" && (
|
||||||
|
|||||||
@ -6,8 +6,8 @@
|
|||||||
background: #343a40;
|
background: #343a40;
|
||||||
color: white;
|
color: white;
|
||||||
padding: 0.75rem 1rem;
|
padding: 0.75rem 1rem;
|
||||||
display: flex;
|
display: grid;
|
||||||
justify-content: space-between;
|
grid-template-columns: 1fr auto 1fr;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 1rem;
|
gap: 1rem;
|
||||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||||
@ -19,52 +19,86 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-left {
|
|
||||||
flex: 0 0 auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.navbar-center {
|
.navbar-center {
|
||||||
flex: 1 1 auto;
|
grid-column: 2;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
max-width: 80%;
|
min-width: 0;
|
||||||
margin: 0 auto;
|
justify-self: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-right {
|
.navbar-right {
|
||||||
|
grid-column: 3;
|
||||||
|
justify-self: end;
|
||||||
flex: 0 0 auto;
|
flex: 0 0 auto;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Hamburger Menu Button */
|
.navbar-spacer {
|
||||||
.navbar-menu-btn {
|
grid-column: 1;
|
||||||
background: transparent;
|
}
|
||||||
border: none;
|
|
||||||
cursor: pointer;
|
.navbar-center-nav {
|
||||||
padding: 0.5rem;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
gap: 0;
|
||||||
|
width: 100%;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hamburger-icon {
|
.navbar-household-wrap {
|
||||||
display: flex;
|
position: relative;
|
||||||
flex-direction: column;
|
width: 17rem;
|
||||||
gap: 4px;
|
flex: 0 0 17rem;
|
||||||
width: 24px;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hamburger-icon span {
|
.navbar .household-switcher {
|
||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 3px;
|
|
||||||
background: white;
|
|
||||||
border-radius: 2px;
|
|
||||||
transition: all 0.3s;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-menu-btn:hover .hamburger-icon span {
|
.navbar-icon-link {
|
||||||
background: #ddd;
|
width: 48px;
|
||||||
|
height: 40px;
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
text-decoration: none;
|
||||||
|
color: #ffffff;
|
||||||
|
background: #495057;
|
||||||
|
border: 1px solid #5a6268;
|
||||||
|
border-radius: 0;
|
||||||
|
font-size: 1.2rem;
|
||||||
|
line-height: 1;
|
||||||
|
transition: background 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-icon-link:hover {
|
||||||
|
background: #5a6268;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-icon-link:focus-visible {
|
||||||
|
outline: 2px solid #9ec5fe;
|
||||||
|
outline-offset: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-icon-left {
|
||||||
|
margin-right: 0;
|
||||||
|
border-radius: 8px 0 0 8px;
|
||||||
|
border-right: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-icon-right {
|
||||||
|
margin-left: 0;
|
||||||
|
border-radius: 0 8px 8px 0;
|
||||||
|
border-left: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar .household-switcher-toggle {
|
||||||
|
border-radius: 0;
|
||||||
|
height: 40px;
|
||||||
|
padding: 0 0.75rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* User Button */
|
/* User Button */
|
||||||
@ -79,12 +113,33 @@
|
|||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
transition: background 0.2s;
|
transition: background 0.2s;
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-user-btn:hover {
|
.navbar-user-btn:hover {
|
||||||
background: #5a6268;
|
background: #5a6268;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.navbar-user-icon {
|
||||||
|
width: 18px;
|
||||||
|
height: 18px;
|
||||||
|
display: none;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-user-icon svg {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
fill: currentColor;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-user-name {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
/* Dropdown Overlay */
|
/* Dropdown Overlay */
|
||||||
.menu-overlay {
|
.menu-overlay {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
@ -110,31 +165,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Navigation Dropdown */
|
/* Navigation Dropdown */
|
||||||
.nav-dropdown {
|
|
||||||
left: 0;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-dropdown a {
|
|
||||||
color: #343a40;
|
|
||||||
text-decoration: none;
|
|
||||||
padding: 0.75rem 1.25rem;
|
|
||||||
font-size: 1rem;
|
|
||||||
transition: background 0.2s;
|
|
||||||
border-bottom: 1px solid #f0f0f0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-dropdown a:last-child {
|
|
||||||
border-bottom: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-dropdown a:hover {
|
|
||||||
background: #f8f9fa;
|
|
||||||
color: var(--color-primary);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* User Dropdown */
|
|
||||||
.user-dropdown {
|
.user-dropdown {
|
||||||
right: 0;
|
right: 0;
|
||||||
min-width: 200px;
|
min-width: 200px;
|
||||||
@ -161,6 +191,20 @@
|
|||||||
text-transform: capitalize;
|
text-transform: capitalize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.user-dropdown-link {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
padding: 0.75rem 1.25rem;
|
||||||
|
color: #343a40;
|
||||||
|
text-decoration: none;
|
||||||
|
border-bottom: 1px solid #f0f0f0;
|
||||||
|
transition: background 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.user-dropdown-link:hover {
|
||||||
|
background: #f8f9fa;
|
||||||
|
}
|
||||||
|
|
||||||
.user-dropdown-logout {
|
.user-dropdown-logout {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background: #dc3545;
|
background: #dc3545;
|
||||||
@ -177,12 +221,6 @@
|
|||||||
background: #c82333;
|
background: #c82333;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Household Switcher - Centered with max width */
|
|
||||||
.navbar-center > * {
|
|
||||||
width: 100%;
|
|
||||||
max-width: 24ch; /* 24 characters max width */
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Mobile Responsive */
|
/* Mobile Responsive */
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
.navbar {
|
.navbar {
|
||||||
@ -190,8 +228,23 @@
|
|||||||
gap: 0.5rem;
|
gap: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-center {
|
.navbar-household-wrap {
|
||||||
max-width: 60%;
|
width: 14rem;
|
||||||
|
flex: 0 0 14rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-icon-link {
|
||||||
|
width: 42px;
|
||||||
|
height: 40px;
|
||||||
|
font-size: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-icon-left {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-icon-right {
|
||||||
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-user-btn {
|
.navbar-user-btn {
|
||||||
@ -199,10 +252,6 @@
|
|||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-dropdown {
|
|
||||||
min-width: 160px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.user-dropdown {
|
.user-dropdown {
|
||||||
min-width: 180px;
|
min-width: 180px;
|
||||||
}
|
}
|
||||||
@ -211,22 +260,43 @@
|
|||||||
@media (max-width: 480px) {
|
@media (max-width: 480px) {
|
||||||
.navbar {
|
.navbar {
|
||||||
padding: 0.5rem;
|
padding: 0.5rem;
|
||||||
|
grid-template-columns: auto 1fr auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-center {
|
.navbar-household-wrap {
|
||||||
max-width: 50%;
|
width: 11rem;
|
||||||
|
flex: 0 0 11rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-user-btn {
|
.navbar-icon-left {
|
||||||
padding: 0.4rem 0.6rem;
|
margin-right: 0;
|
||||||
font-size: 0.85rem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.hamburger-icon {
|
.navbar-icon-right {
|
||||||
width: 20px;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
.hamburger-icon span {
|
|
||||||
height: 2.5px;
|
@media (max-width: 360px) {
|
||||||
|
.navbar-household-wrap {
|
||||||
|
width: 10rem;
|
||||||
|
flex: 0 0 10rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 900px) {
|
||||||
|
.navbar-user-btn {
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
padding: 0;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-user-icon {
|
||||||
|
display: inline-flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-user-name {
|
||||||
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,10 +7,19 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Tabs */
|
/* Tabs */
|
||||||
|
.settings-tabs-wrapper {
|
||||||
|
position: relative;
|
||||||
|
margin-bottom: var(--spacing-xl);
|
||||||
|
padding: 0 0.8rem;
|
||||||
|
}
|
||||||
|
|
||||||
.settings-tabs {
|
.settings-tabs {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: var(--spacing-sm);
|
gap: 0rem;
|
||||||
margin-bottom: var(--spacing-xl);
|
flex-wrap: nowrap;
|
||||||
|
overflow-x: auto;
|
||||||
|
overflow-y: hidden;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
border-bottom: 2px solid var(--color-border-light);
|
border-bottom: 2px solid var(--color-border-light);
|
||||||
touch-action: pan-x; /* Lock Y-axis, allow only horizontal scrolling */
|
touch-action: pan-x; /* Lock Y-axis, allow only horizontal scrolling */
|
||||||
scrollbar-width: none; /* Firefox */
|
scrollbar-width: none; /* Firefox */
|
||||||
@ -22,7 +31,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.settings-tab {
|
.settings-tab {
|
||||||
padding: var(--spacing-md) var(--spacing-lg);
|
flex: 0 0 max-content;
|
||||||
|
white-space: nowrap;
|
||||||
|
width: max-content;
|
||||||
|
padding: 0rem 1.4rem;
|
||||||
background: none;
|
background: none;
|
||||||
border: none;
|
border: none;
|
||||||
border-bottom: 3px solid transparent;
|
border-bottom: 3px solid transparent;
|
||||||
@ -34,6 +46,41 @@
|
|||||||
margin-bottom: -2px;
|
margin-bottom: -2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.settings-tabs-arrow {
|
||||||
|
position: absolute;
|
||||||
|
top: calc(50% - 0.2rem);
|
||||||
|
transform: translateY(-50%);
|
||||||
|
width: 2.6rem;
|
||||||
|
height: 2.6rem;
|
||||||
|
border-radius: 999px;
|
||||||
|
border: none;
|
||||||
|
background: transparent;
|
||||||
|
color: var(--color-primary);
|
||||||
|
font-size: 2rem;
|
||||||
|
font-weight: 700;
|
||||||
|
line-height: 1;
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
z-index: 2;
|
||||||
|
opacity: 0;
|
||||||
|
pointer-events: none;
|
||||||
|
user-select: none;
|
||||||
|
transition: opacity 0.2s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.settings-tabs-arrow.visible {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.settings-tabs-arrow-left {
|
||||||
|
left: -1.6rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.settings-tabs-arrow-right {
|
||||||
|
right: -1.6rem;
|
||||||
|
}
|
||||||
|
|
||||||
.settings-tab:hover {
|
.settings-tab:hover {
|
||||||
color: var(--color-primary);
|
color: var(--color-primary);
|
||||||
background: var(--color-bg-hover);
|
background: var(--color-bg-hover);
|
||||||
@ -180,14 +227,30 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.settings-tabs {
|
.settings-tabs {
|
||||||
flex-wrap: nowrap;
|
padding: 0 0.1rem;
|
||||||
overflow-x: auto;
|
|
||||||
-webkit-overflow-scrolling: touch;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.settings-tab {
|
.settings-tab {
|
||||||
padding: var(--spacing-sm) var(--spacing-md);
|
padding: 0.4rem 0.35rem;
|
||||||
white-space: nowrap;
|
}
|
||||||
|
|
||||||
|
.settings-tabs-wrapper {
|
||||||
|
padding: 0 0.55rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.settings-tabs-arrow {
|
||||||
|
top: calc(50% - 0.15rem);
|
||||||
|
width: 2.2rem;
|
||||||
|
height: 2.2rem;
|
||||||
|
font-size: 1.65rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.settings-tabs-arrow-left {
|
||||||
|
left: -1.2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.settings-tabs-arrow-right {
|
||||||
|
right: -1.2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.settings-theme-options {
|
.settings-theme-options {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user