mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-03 03:11:40 +00:00
disable single attribute per line
This commit is contained in:
parent
92ed8e20c9
commit
8b141d652c
154 changed files with 390 additions and 1800 deletions
|
|
@ -20,16 +20,8 @@ export const ActionBar = () => {
|
|||
const { open } = useCommandPalette();
|
||||
|
||||
return (
|
||||
<div
|
||||
className={styles.container}
|
||||
ref={cq.ref}
|
||||
>
|
||||
<Grid
|
||||
display="flex"
|
||||
gutter="sm"
|
||||
px="1rem"
|
||||
w="100%"
|
||||
>
|
||||
<div className={styles.container} ref={cq.ref}>
|
||||
<Grid display="flex" gutter="sm" px="1rem" w="100%">
|
||||
<Grid.Col span={6}>
|
||||
<TextInput
|
||||
leftSection={<Icon icon="search" />}
|
||||
|
|
@ -44,11 +36,7 @@ export const ActionBar = () => {
|
|||
/>
|
||||
</Grid.Col>
|
||||
<Grid.Col span={6}>
|
||||
<Group
|
||||
gap="sm"
|
||||
grow
|
||||
wrap="nowrap"
|
||||
>
|
||||
<Group gap="sm" grow wrap="nowrap">
|
||||
<DropdownMenu position="bottom-start">
|
||||
<DropdownMenu.Target>
|
||||
<Button p="0.5rem">
|
||||
|
|
@ -59,16 +47,10 @@ export const ActionBar = () => {
|
|||
<AppMenu />
|
||||
</DropdownMenu.Dropdown>
|
||||
</DropdownMenu>
|
||||
<Button
|
||||
onClick={() => navigate(-1)}
|
||||
p="0.5rem"
|
||||
>
|
||||
<Button onClick={() => navigate(-1)} p="0.5rem">
|
||||
<Icon icon="arrowLeftS" />
|
||||
</Button>
|
||||
<Button
|
||||
onClick={() => navigate(1)}
|
||||
p="0.5rem"
|
||||
>
|
||||
<Button onClick={() => navigate(1)} p="0.5rem">
|
||||
<Icon icon="arrowRightS" />
|
||||
</Button>
|
||||
</Group>
|
||||
|
|
|
|||
|
|
@ -9,12 +9,7 @@ interface CollapsedSidebarButtonProps extends ActionIconProps {}
|
|||
export const CollapsedSidebarButton = forwardRef<HTMLButtonElement, CollapsedSidebarButtonProps>(
|
||||
({ children, ...props }: CollapsedSidebarButtonProps, ref) => {
|
||||
return (
|
||||
<ActionIcon
|
||||
className={styles.button}
|
||||
ref={ref}
|
||||
variant="subtle"
|
||||
{...props}
|
||||
>
|
||||
<ActionIcon className={styles.button} ref={ref} variant="subtle" {...props}>
|
||||
{children}
|
||||
</ActionIcon>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -69,21 +69,12 @@ export const CollapsedSidebar = () => {
|
|||
>
|
||||
<ScrollArea>
|
||||
{sidebarCollapsedNavigation && (
|
||||
<Group
|
||||
gap={0}
|
||||
grow
|
||||
>
|
||||
<Group gap={0} grow>
|
||||
<CollapsedSidebarButton onClick={() => navigate(-1)}>
|
||||
<Icon
|
||||
icon="arrowLeftS"
|
||||
size="xl"
|
||||
/>
|
||||
<Icon icon="arrowLeftS" size="xl" />
|
||||
</CollapsedSidebarButton>
|
||||
<CollapsedSidebarButton onClick={() => navigate(1)}>
|
||||
<Icon
|
||||
icon="arrowRightS"
|
||||
size="xl"
|
||||
/>
|
||||
<Icon icon="arrowRightS" size="xl" />
|
||||
</CollapsedSidebarButton>
|
||||
</Group>
|
||||
)}
|
||||
|
|
@ -92,13 +83,7 @@ export const CollapsedSidebar = () => {
|
|||
<CollapsedSidebarItem
|
||||
activeIcon={null}
|
||||
component={Flex}
|
||||
icon={
|
||||
<Icon
|
||||
fill="muted"
|
||||
icon="menu"
|
||||
size="3xl"
|
||||
/>
|
||||
}
|
||||
icon={<Icon fill="muted" icon="menu" size="3xl" />}
|
||||
label={t('common.menu', { postProcess: 'titleCase' })}
|
||||
style={{
|
||||
cursor: 'pointer',
|
||||
|
|
@ -112,20 +97,9 @@ export const CollapsedSidebar = () => {
|
|||
</DropdownMenu>
|
||||
{sidebarItemsWithRoute.map((item) => (
|
||||
<CollapsedSidebarItem
|
||||
activeIcon={
|
||||
<SidebarIcon
|
||||
active
|
||||
route={item.route}
|
||||
size="25"
|
||||
/>
|
||||
}
|
||||
activeIcon={<SidebarIcon active route={item.route} size="25" />}
|
||||
component={NavLink}
|
||||
icon={
|
||||
<SidebarIcon
|
||||
route={item.route}
|
||||
size="25"
|
||||
/>
|
||||
}
|
||||
icon={<SidebarIcon route={item.route} size="25" />}
|
||||
key={item.id}
|
||||
label={item.label}
|
||||
route={item.route}
|
||||
|
|
|
|||
|
|
@ -53,12 +53,7 @@ const PlaylistRowButton = ({ name, onPlay, to, ...props }: PlaylistRowButtonProp
|
|||
>
|
||||
{name}
|
||||
</SidebarItem>
|
||||
{isHovered && (
|
||||
<RowControls
|
||||
id={to}
|
||||
onPlay={onPlay}
|
||||
/>
|
||||
)}
|
||||
{isHovered && <RowControls id={to} onPlay={onPlay} />}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
|
@ -73,11 +68,7 @@ const RowControls = ({
|
|||
const { t } = useTranslation();
|
||||
|
||||
return (
|
||||
<Group
|
||||
className={styles.controls}
|
||||
gap="xs"
|
||||
wrap="nowrap"
|
||||
>
|
||||
<Group className={styles.controls} gap="xs" wrap="nowrap">
|
||||
<ActionIcon
|
||||
icon="mediaPlay"
|
||||
iconProps={{
|
||||
|
|
@ -205,15 +196,8 @@ export const SidebarPlaylistList = () => {
|
|||
|
||||
return (
|
||||
<Accordion.Item value="playlists">
|
||||
<Accordion.Control
|
||||
component="div"
|
||||
role="button"
|
||||
style={{ userSelect: 'none' }}
|
||||
>
|
||||
<Group
|
||||
justify="space-between"
|
||||
pr="var(--theme-spacing-md)"
|
||||
>
|
||||
<Accordion.Control component="div" role="button" style={{ userSelect: 'none' }}>
|
||||
<Group justify="space-between" pr="var(--theme-spacing-md)">
|
||||
<Text fw={600}>
|
||||
{t('page.sidebar.playlists', {
|
||||
postProcess: 'titleCase',
|
||||
|
|
@ -323,10 +307,7 @@ export const SidebarSharedPlaylistList = () => {
|
|||
return (
|
||||
<Accordion.Item value="shared-playlists">
|
||||
<Accordion.Control>
|
||||
<Text
|
||||
fw={600}
|
||||
variant="secondary"
|
||||
>
|
||||
<Text fw={600} variant="secondary">
|
||||
{t('page.sidebar.shared', {
|
||||
postProcess: 'titleCase',
|
||||
})}
|
||||
|
|
|
|||
|
|
@ -109,10 +109,7 @@ export const Sidebar = () => {
|
|||
})}
|
||||
id="left-sidebar"
|
||||
>
|
||||
<Group
|
||||
grow
|
||||
id="global-search-container"
|
||||
>
|
||||
<Group grow id="global-search-container">
|
||||
<ActionBar />
|
||||
</Group>
|
||||
<ScrollArea
|
||||
|
|
@ -134,10 +131,7 @@ export const Sidebar = () => {
|
|||
>
|
||||
<Accordion.Item value="library">
|
||||
<Accordion.Control>
|
||||
<Text
|
||||
fw={600}
|
||||
variant="secondary"
|
||||
>
|
||||
<Text fw={600} variant="secondary">
|
||||
{t('page.sidebar.myLibrary', {
|
||||
postProcess: 'titleCase',
|
||||
})}
|
||||
|
|
@ -146,10 +140,7 @@ export const Sidebar = () => {
|
|||
<Accordion.Panel>
|
||||
{sidebarItemsWithRoute.map((item) => {
|
||||
return (
|
||||
<SidebarItem
|
||||
key={`sidebar-${item.route}`}
|
||||
to={item.route}
|
||||
>
|
||||
<SidebarItem key={`sidebar-${item.route}`} to={item.route}>
|
||||
<Group gap="sm">
|
||||
<SidebarIcon
|
||||
active={location.pathname === item.route}
|
||||
|
|
@ -170,10 +161,7 @@ export const Sidebar = () => {
|
|||
)}
|
||||
</Accordion>
|
||||
</ScrollArea>
|
||||
<AnimatePresence
|
||||
initial={false}
|
||||
mode="popLayout"
|
||||
>
|
||||
<AnimatePresence initial={false} mode="popLayout">
|
||||
{showImage && (
|
||||
<motion.div
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue