Skip to content

Commit

Permalink
Update Settings UI. (#803)
Browse files Browse the repository at this point in the history
  • Loading branch information
ElementalCrisis authored Jan 24, 2024
1 parent bb28054 commit bf0603b
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 7 deletions.
3 changes: 3 additions & 0 deletions src/css/theme-shoko-gray.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
--panel-icon-important: #10c469;
--panel-icon-warning: #f9c851;
--panel-input: #1e2027;
--panel-menu-item-background: #85c3ff1a;
--panel-menu-item-background-hover: #bacfe41a;
--panel-menu-item-text: #a9d5ff;
--panel-tags: #3f4762;
--panel-text: #cfd8e3;
--panel-text-danger: #ff6c6c;
Expand Down
2 changes: 1 addition & 1 deletion src/pages/login/LoginPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ function LoginPage() {
position="bottom-right"
autoClose={4000}
transition={Slide}
className="mt-20 !w-[29.5rem]"
className="mt-20 w-auto"
closeButton={false}
icon={false}
/>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/main/MainPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function MainPage() {
position={toastPosition}
autoClose={4000}
transition={Slide}
className="mt-20 !w-[29.5rem]"
className="mt-20 w-auto"
closeButton={false}
icon={false}
/>
Expand Down
6 changes: 3 additions & 3 deletions src/pages/settings/SettingsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,13 @@ function SettingsPage() {
<div className="relative top-0 z-10 flex w-72 flex-col gap-y-4 rounded-md border border-panel-border bg-panel-background-transparent p-8 font-semibold">
<div className="sticky top-8">
<div className="mb-8 text-center text-xl opacity-100">Settings</div>
<div className="flex flex-col items-center">
<div className="flex flex-col items-center gap-y-2">
{items.map(item => (
<NavLink
to={item.path}
className={({ isActive }) => (isActive
? 'w-full text-center bg-button-primary text-button-primary-text border-2 !border-button-primary-border rounded-md hover:bg-button-primary-hover py-4 px-2'
: 'w-full text-center py-4 px-2')}
? 'w-full text-center bg-panel-menu-item-background py-2 px-2 rounded-md text-panel-menu-item-text'
: 'w-full text-center py-2 px-2 rounded-md hover:bg-panel-menu-item-background-hover')}
key={item.path}
>
{item.name}
Expand Down
4 changes: 2 additions & 2 deletions src/pages/settings/tabs/ApiKeys.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const UserApiTokens = ({ token }: { token: AuthToken }) => {

return (
<div className="flex flex-row items-center justify-between">
<div className="flex w-[90%] flex-col gap-y-1">
<div className="flex w-[90%] flex-col">
{token.Device}
</div>
<Button buttonType="danger" className="px-2 py-1 text-sm" onClick={onDeleteClick} loading={isPending}>
Expand Down Expand Up @@ -92,7 +92,7 @@ const ApiKeys = () => {

<div className="flex flex-col gap-y-4">
<div className="font-semibold">Generate API Key</div>
<div className="flex flex-row justify-between gap-x-2 border-b-2 border-panel-border pb-8">
<div className="flex flex-row justify-between gap-x-2 border-b border-panel-border pb-8">
<Input
id="key-input"
endIcons={createdToken
Expand Down
3 changes: 3 additions & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ module.exports = {
'panel-icon-important': 'var(--panel-icon-important)',
'panel-icon-warning': 'var(--panel-icon-warning)',
'panel-input': 'var(--panel-input)',
'panel-menu-item-background': 'var(--panel-menu-item-background)',
'panel-menu-item-background-hover': 'var(--panel-menu-item-background-hover)',
'panel-menu-item-text': 'var(--panel-menu-item-text)',
'panel-tags': 'var(--panel-tags)',
'panel-text': 'var(--panel-text)',
'panel-text-danger': 'var(--panel-text-danger)',
Expand Down

0 comments on commit bf0603b

Please sign in to comment.