chore: tweak detail style

This commit is contained in:
Steven 2023-07-29 14:59:16 +08:00
parent 4139520181
commit 1ce4b91433
9 changed files with 33 additions and 37 deletions

View File

@ -40,18 +40,18 @@ const Header: React.FC = () => {
<> <>
<Link <Link
to="/setting" to="/setting"
className="w-full flex flex-row justify-start items-center px-3 leading-10 text-left cursor-pointer rounded whitespace-nowrap hover:bg-gray-100" className="w-full px-2 flex flex-row justify-start items-center text-left leading-8 cursor-pointer rounded hover:bg-gray-100 disabled:cursor-not-allowed disabled:bg-gray-100 disabled:opacity-60"
> >
<Icon.Settings className="w-4 h-auto mr-2" /> Setting <Icon.Settings className="w-4 h-auto mr-2" /> Setting
</Link> </Link>
<button <button
className="w-full flex flex-row justify-start items-center px-3 leading-10 text-left cursor-pointer rounded whitespace-nowrap hover:bg-gray-100" className="w-full px-2 flex flex-row justify-start items-center text-left leading-8 cursor-pointer rounded hover:bg-gray-100 disabled:cursor-not-allowed disabled:bg-gray-100 disabled:opacity-60"
onClick={() => setShowAboutDialog(true)} onClick={() => setShowAboutDialog(true)}
> >
<Icon.Info className="w-4 h-auto mr-2" /> About <Icon.Info className="w-4 h-auto mr-2" /> About
</button> </button>
<button <button
className="w-full flex flex-row justify-start items-center px-3 leading-10 text-left cursor-pointer rounded whitespace-nowrap hover:bg-gray-100" className="w-full px-2 flex flex-row justify-start items-center text-left leading-8 cursor-pointer rounded hover:bg-gray-100 disabled:cursor-not-allowed disabled:bg-gray-100 disabled:opacity-60"
onClick={() => handleSignOutButtonClick()} onClick={() => handleSignOutButtonClick()}
> >
<Icon.LogOut className="w-4 h-auto mr-2" /> Sign out <Icon.LogOut className="w-4 h-auto mr-2" /> Sign out

View File

@ -1,4 +1,4 @@
import { Tooltip } from "@mui/joy"; import { Divider, Tooltip } from "@mui/joy";
import copy from "copy-to-clipboard"; import copy from "copy-to-clipboard";
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
@ -115,6 +115,7 @@ const ShortcutView = (props: Props) => {
> >
<Icon.BarChart2 className="w-4 h-auto mr-2" /> Analytics <Icon.BarChart2 className="w-4 h-auto mr-2" /> Analytics
</button> </button>
<Divider className="!my-1" />
<button <button
className="w-full px-2 flex flex-row justify-start items-center text-left leading-8 cursor-pointer rounded text-red-600 hover:bg-gray-100 disabled:cursor-not-allowed disabled:bg-gray-100 disabled:opacity-60" className="w-full px-2 flex flex-row justify-start items-center text-left leading-8 cursor-pointer rounded text-red-600 hover:bg-gray-100 disabled:cursor-not-allowed disabled:bg-gray-100 disabled:opacity-60"
onClick={() => { onClick={() => {

View File

@ -27,8 +27,6 @@ const ShortcutsContainer: React.FC<Props> = (props: Props) => {
})} })}
</div> </div>
<p className="w-full text-center text-gray-400 text-sm mt-2 mb-4 italic">Total {shortcutList.length} data</p>
{editingShortcutId && ( {editingShortcutId && (
<CreateShortcutDialog <CreateShortcutDialog
shortcutId={editingShortcutId} shortcutId={editingShortcutId}

View File

@ -18,11 +18,11 @@ const ViewSetting = () => {
return ( return (
<Dropdown <Dropdown
trigger={ trigger={
<button className="p-1"> <button>
<Icon.ListFilter className="w-5 h-auto text-gray-500" /> <Icon.Settings2 className="w-4 h-auto text-gray-500" />
</button> </button>
} }
actionsClassName="right-10 translate-x-full" actionsClassName="top-7 !-right-2"
actions={ actions={
<div className="w-52 p-2 pt-0 gap-2 flex flex-col justify-start items-start" onClick={(e) => e.stopPropagation()}> <div className="w-52 p-2 pt-0 gap-2 flex flex-col justify-start items-start" onClick={(e) => e.stopPropagation()}>
<div className="w-full flex flex-row justify-between items-center mt-1"> <div className="w-full flex flex-row justify-between items-center mt-1">

View File

@ -18,7 +18,7 @@ const Root: React.FC = () => {
return ( return (
<> <>
{currentUser && ( {currentUser && (
<div className="w-full h-full flex flex-col justify-start items-start"> <div className="w-full h-auto flex flex-col justify-start items-start">
<Header /> <Header />
<Outlet /> <Outlet />
</div> </div>

View File

@ -47,26 +47,23 @@ const Home: React.FC = () => {
<Navigator /> <Navigator />
<div className="w-full flex flex-row justify-between items-center mb-4"> <div className="w-full flex flex-row justify-between items-center mb-4">
<div className="flex flex-row justify-start items-center"> <div className="flex flex-row justify-start items-center">
<Input
className="w-32 mr-2"
type="text"
size="sm"
placeholder="Search"
startDecorator={<Icon.Search className="w-4 h-auto" />}
endDecorator={
filter.search && <Icon.X className="w-4 h-auto cursor-pointer" onClick={() => viewStore.setFilter({ search: "" })} />
}
value={filter.search}
onChange={(e) => viewStore.setFilter({ search: e.target.value })}
/>
<ViewSetting />
</div>
<div className="flex flex-row justify-end items-center">
<Button className="hover:shadow" variant="soft" size="sm" onClick={() => setShowCreateShortcutDialog(true)}> <Button className="hover:shadow" variant="soft" size="sm" onClick={() => setShowCreateShortcutDialog(true)}>
<Icon.Plus className="w-5 h-auto" /> <Icon.Plus className="w-5 h-auto" />
<span className="hidden sm:block ml-0.5">Create</span> <span className="hidden sm:block ml-0.5">Create</span>
</Button> </Button>
</div> </div>
<div className="flex flex-row justify-end items-center">
<Input
className="w-32 ml-2"
type="text"
size="sm"
placeholder="Search"
startDecorator={<Icon.Search className="w-4 h-auto" />}
endDecorator={<ViewSetting />}
value={filter.search}
onChange={(e) => viewStore.setFilter({ search: e.target.value })}
/>
</div>
</div> </div>
<FilterView /> <FilterView />
{loadingState.isLoading ? ( {loadingState.isLoading ? (

View File

@ -69,14 +69,14 @@ const SignIn: React.FC = () => {
}; };
return ( return (
<div className="flex flex-row justify-center items-center w-full h-screen bg-white"> <div className="flex flex-row justify-center items-center w-full h-auto mt-12 sm:mt-24 bg-white">
<div className="w-80 max-w-full h-full py-4 flex flex-col justify-start items-center"> <div className="w-80 max-w-full h-full py-4 flex flex-col justify-start items-center">
<div className="w-full py-4 grow flex flex-col justify-center items-center"> <div className="w-full py-4 grow flex flex-col justify-center items-center">
<div className="flex flex-col justify-start items-center w-full gap-y-2 mb-4"> <div className="flex flex-row justify-start items-center w-auto mx-auto gap-y-2 mb-4">
<img src="/logo.png" className="w-16 h-auto" alt="logo" /> <img src="/logo.png" className="w-12 h-auto mr-2 -mt-1" alt="logo" />
<span className="text-2xl font-medium font-mono opacity-80">Slash</span> <span className="text-3xl font-medium font-mono opacity-80">Slash</span>
</div> </div>
<form className="w-full" onSubmit={handleSigninBtnClick}> <form className="w-full mt-6" onSubmit={handleSigninBtnClick}>
<div className={`flex flex-col justify-start items-start w-full ${actionBtnLoadingState.isLoading ? "opacity-80" : ""}`}> <div className={`flex flex-col justify-start items-start w-full ${actionBtnLoadingState.isLoading ? "opacity-80" : ""}`}>
<div className="w-full flex flex-col mb-2"> <div className="w-full flex flex-col mb-2">
<span className="leading-8 mb-1 text-gray-600">Email</span> <span className="leading-8 mb-1 text-gray-600">Email</span>

View File

@ -73,15 +73,15 @@ const SignUp: React.FC = () => {
}; };
return ( return (
<div className="flex flex-row justify-center items-center w-full h-screen bg-white"> <div className="flex flex-row justify-center items-center w-full h-auto mt-12 sm:mt-24 bg-white">
<div className="w-80 max-w-full h-full py-4 flex flex-col justify-start items-center"> <div className="w-80 max-w-full h-full py-4 flex flex-col justify-start items-center">
<div className="w-full py-4 grow flex flex-col justify-center items-center"> <div className="w-full py-4 grow flex flex-col justify-center items-center">
<div className="flex flex-col justify-start items-center w-full gap-y-2 mb-4"> <div className="flex flex-row justify-start items-center w-auto mx-auto gap-y-2 mb-4">
<img src="/logo.png" className="w-16 h-auto" alt="logo" /> <img src="/logo.png" className="w-12 h-auto mr-2 -mt-1" alt="logo" />
<span className="text-2xl font-medium font-mono opacity-80">Slash</span> <span className="text-3xl font-medium font-mono opacity-80">Slash</span>
</div> </div>
<p className="w-full text-center mb-4 text-2xl">Create your account</p> <p className="w-full text-2xl mt-6">Create your account</p>
<form className="w-full" onSubmit={handleSignupBtnClick}> <form className="w-full mt-4" onSubmit={handleSignupBtnClick}>
<div className={`flex flex-col justify-start items-start w-full ${actionBtnLoadingState.isLoading ? "opacity-80" : ""}`}> <div className={`flex flex-col justify-start items-start w-full ${actionBtnLoadingState.isLoading ? "opacity-80" : ""}`}>
<div className="w-full flex flex-col mb-2"> <div className="w-full flex flex-col mb-2">
<span className="leading-8 mb-1 text-gray-600">Email</span> <span className="leading-8 mb-1 text-gray-600">Email</span>

View File

@ -5,7 +5,7 @@ module.exports = {
fontSize: { fontSize: {
xs: ".75rem", xs: ".75rem",
sm: ".875rem", sm: ".875rem",
base: "1rem", base: "0.95rem",
lg: "1.125rem", lg: "1.125rem",
xl: "1.25rem", xl: "1.25rem",
"2xl": "1.5rem", "2xl": "1.5rem",