mirror of
https://github.com/jeffvli/feishin.git
synced 2026-08-10 06:12:59 +02:00
Replace @emotion/styled with styled-components
This commit is contained in:
Generated
+408
-315
File diff suppressed because it is too large
Load Diff
+17
-19
@@ -165,16 +165,17 @@
|
|||||||
"@testing-library/jest-dom": "^5.16.4",
|
"@testing-library/jest-dom": "^5.16.4",
|
||||||
"@testing-library/react": "^13.0.0",
|
"@testing-library/react": "^13.0.0",
|
||||||
"@types/jest": "^27.4.1",
|
"@types/jest": "^27.4.1",
|
||||||
"@types/lodash": "^4.14.182",
|
"@types/lodash": "^4.14.188",
|
||||||
"@types/md5": "^2.3.2",
|
"@types/md5": "^2.3.2",
|
||||||
"@types/node": "^17.0.23",
|
"@types/node": "^17.0.23",
|
||||||
"@types/react": "^17.0.43",
|
"@types/react": "^18.0.25",
|
||||||
"@types/react-dom": "^17.0.14",
|
"@types/react-dom": "^18.0.8",
|
||||||
"@types/react-slider": "^1.3.1",
|
"@types/react-slider": "^1.3.1",
|
||||||
"@types/react-test-renderer": "^17.0.1",
|
"@types/react-test-renderer": "^17.0.1",
|
||||||
"@types/react-virtualized-auto-sizer": "^1.0.1",
|
"@types/react-virtualized-auto-sizer": "^1.0.1",
|
||||||
"@types/react-window": "^1.8.5",
|
"@types/react-window": "^1.8.5",
|
||||||
"@types/react-window-infinite-loader": "^1.0.6",
|
"@types/react-window-infinite-loader": "^1.0.6",
|
||||||
|
"@types/styled-components": "^5.1.26",
|
||||||
"@types/terser-webpack-plugin": "^5.0.4",
|
"@types/terser-webpack-plugin": "^5.0.4",
|
||||||
"@types/webpack-bundle-analyzer": "^4.4.1",
|
"@types/webpack-bundle-analyzer": "^4.4.1",
|
||||||
"@types/webpack-env": "^1.16.3",
|
"@types/webpack-env": "^1.16.3",
|
||||||
@@ -247,24 +248,21 @@
|
|||||||
"webpack-merge": "^5.8.0"
|
"webpack-merge": "^5.8.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@dnd-kit/core": "^6.0.5",
|
|
||||||
"@dnd-kit/modifiers": "^6.0.0",
|
|
||||||
"@emotion/react": "^11.10.4",
|
"@emotion/react": "^11.10.4",
|
||||||
"@emotion/styled": "^11.10.4",
|
|
||||||
"@jellyfin/client-axios": "^10.7.8",
|
"@jellyfin/client-axios": "^10.7.8",
|
||||||
"@mantine/core": "^5.6.0",
|
"@mantine/core": "^5.7.1",
|
||||||
"@mantine/dates": "^5.6.0",
|
"@mantine/dates": "^5.7.1",
|
||||||
"@mantine/form": "^5.6.0",
|
"@mantine/form": "^5.7.1",
|
||||||
"@mantine/hooks": "^5.6.0",
|
"@mantine/hooks": "^5.7.1",
|
||||||
"@mantine/modals": "^5.6.0",
|
"@mantine/modals": "^5.7.1",
|
||||||
"@mantine/notifications": "^5.6.0",
|
"@mantine/notifications": "^5.7.1",
|
||||||
"@mantine/spotlight": "^5.6.0",
|
"@mantine/spotlight": "^5.7.1",
|
||||||
"@tanstack/react-query": "^4.12.0",
|
"@tanstack/react-query": "^4.14.3",
|
||||||
"@tanstack/react-query-devtools": "^4.13.7",
|
"@tanstack/react-query-devtools": "^4.14.3",
|
||||||
"ag-grid-community": "^28.0.2",
|
"ag-grid-community": "^28.2.1",
|
||||||
"ag-grid-react": "^28.0.0",
|
"ag-grid-react": "^28.2.1",
|
||||||
"axios": "^0.26.1",
|
"axios": "^0.26.1",
|
||||||
"dayjs": "^1.11.5",
|
"dayjs": "^1.11.6",
|
||||||
"electron-debug": "^3.2.0",
|
"electron-debug": "^3.2.0",
|
||||||
"electron-log": "^4.4.6",
|
"electron-log": "^4.4.6",
|
||||||
"electron-store": "^8.1.0",
|
"electron-store": "^8.1.0",
|
||||||
@@ -288,11 +286,11 @@
|
|||||||
"react-router": "^6.3.0",
|
"react-router": "^6.3.0",
|
||||||
"react-router-dom": "^6.3.0",
|
"react-router-dom": "^6.3.0",
|
||||||
"react-slider": "^2.0.0",
|
"react-slider": "^2.0.0",
|
||||||
"react-spaces": "^0.3.4",
|
|
||||||
"react-virtualized-auto-sizer": "^1.0.6",
|
"react-virtualized-auto-sizer": "^1.0.6",
|
||||||
"react-window": "^1.8.7",
|
"react-window": "^1.8.7",
|
||||||
"react-window-infinite-loader": "^1.0.8",
|
"react-window-infinite-loader": "^1.0.8",
|
||||||
"socket.io-client": "^4.5.3",
|
"socket.io-client": "^4.5.3",
|
||||||
|
"styled-components": "^5.3.6",
|
||||||
"zod": "^3.19.1",
|
"zod": "^3.19.1",
|
||||||
"zustand": "^4.0.0-rc.1"
|
"zustand": "^4.0.0-rc.1"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import React, { forwardRef, Ref } from 'react';
|
import React, { forwardRef, Ref } from 'react';
|
||||||
import styled from '@emotion/styled';
|
|
||||||
import {
|
import {
|
||||||
Button as MantineButton,
|
Button as MantineButton,
|
||||||
ButtonProps as MantineButtonProps,
|
ButtonProps as MantineButtonProps,
|
||||||
createPolymorphicComponent,
|
createPolymorphicComponent,
|
||||||
TooltipProps,
|
TooltipProps,
|
||||||
} from '@mantine/core';
|
} from '@mantine/core';
|
||||||
|
import styled from 'styled-components';
|
||||||
import { Tooltip } from '@/renderer/components/tooltip';
|
import { Tooltip } from '@/renderer/components/tooltip';
|
||||||
|
|
||||||
interface ButtonProps extends MantineButtonProps {
|
interface ButtonProps extends MantineButtonProps {
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import styled from '@emotion/styled';
|
|
||||||
import {
|
import {
|
||||||
DatePicker as MantineDatePicker,
|
DatePicker as MantineDatePicker,
|
||||||
DatePickerProps as MantineDatePickerProps,
|
DatePickerProps as MantineDatePickerProps,
|
||||||
} from '@mantine/dates';
|
} from '@mantine/dates';
|
||||||
|
import styled from 'styled-components';
|
||||||
|
|
||||||
interface DatePickerProps extends MantineDatePickerProps {
|
interface DatePickerProps extends MantineDatePickerProps {
|
||||||
maxWidth?: number | string;
|
maxWidth?: number | string;
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import styled from '@emotion/styled';
|
|
||||||
import {
|
import {
|
||||||
Menu as MantineMenu,
|
Menu as MantineMenu,
|
||||||
MenuProps as MantineMenuProps,
|
MenuProps as MantineMenuProps,
|
||||||
@@ -9,12 +8,13 @@ import {
|
|||||||
createPolymorphicComponent,
|
createPolymorphicComponent,
|
||||||
} from '@mantine/core';
|
} from '@mantine/core';
|
||||||
import { RiArrowLeftLine } from 'react-icons/ri';
|
import { RiArrowLeftLine } from 'react-icons/ri';
|
||||||
|
import styled from 'styled-components';
|
||||||
|
|
||||||
type MenuProps = MantineMenuProps;
|
type MenuProps = MantineMenuProps;
|
||||||
type MenuLabelProps = MantineMenuLabelProps;
|
type MenuLabelProps = MantineMenuLabelProps;
|
||||||
interface MenuItemProps extends MantineMenuItemProps {
|
interface MenuItemProps extends MantineMenuItemProps {
|
||||||
|
$isActive?: boolean;
|
||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
isActive?: boolean;
|
|
||||||
}
|
}
|
||||||
type MenuDividerProps = MantineMenuDividerProps;
|
type MenuDividerProps = MantineMenuDividerProps;
|
||||||
type MenuDropdownProps = MantineMenuDropdownProps;
|
type MenuDropdownProps = MantineMenuDropdownProps;
|
||||||
@@ -40,7 +40,7 @@ const StyledMenuItem = styled(MantineMenu.Item)<MenuItemProps>`
|
|||||||
}
|
}
|
||||||
|
|
||||||
& .mantine-Menu-itemLabel {
|
& .mantine-Menu-itemLabel {
|
||||||
color: ${({ isActive }) => isActive && 'var(--primary-color)'};
|
color: ${({ $isActive }) => $isActive && 'var(--primary-color)'};
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
}
|
}
|
||||||
@@ -70,12 +70,12 @@ const MenuLabel = ({ children, ...props }: MenuLabelProps) => {
|
|||||||
return <StyledMenuLabel {...props}>{children}</StyledMenuLabel>;
|
return <StyledMenuLabel {...props}>{children}</StyledMenuLabel>;
|
||||||
};
|
};
|
||||||
|
|
||||||
const pMenuItem = ({ isActive, children, ...props }: MenuItemProps) => {
|
const pMenuItem = ({ $isActive, children, ...props }: MenuItemProps) => {
|
||||||
return (
|
return (
|
||||||
<StyledMenuItem
|
<StyledMenuItem
|
||||||
isActive={isActive && isActive}
|
$isActive={$isActive}
|
||||||
rightSection={
|
rightSection={
|
||||||
isActive && <RiArrowLeftLine color="var(--primary-color)" />
|
$isActive && <RiArrowLeftLine color="var(--primary-color)" />
|
||||||
}
|
}
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import React, { forwardRef } from 'react';
|
import React, { forwardRef } from 'react';
|
||||||
import styled from '@emotion/styled';
|
|
||||||
import {
|
import {
|
||||||
TextInput as MantineTextInput,
|
TextInput as MantineTextInput,
|
||||||
TextInputProps as MantineTextInputProps,
|
TextInputProps as MantineTextInputProps,
|
||||||
@@ -10,6 +9,7 @@ import {
|
|||||||
FileInput as MantineFileInput,
|
FileInput as MantineFileInput,
|
||||||
FileInputProps as MantineFileInputProps,
|
FileInputProps as MantineFileInputProps,
|
||||||
} from '@mantine/core';
|
} from '@mantine/core';
|
||||||
|
import styled from 'styled-components';
|
||||||
|
|
||||||
interface TextInputProps extends MantineTextInputProps {
|
interface TextInputProps extends MantineTextInputProps {
|
||||||
children?: React.ReactNode;
|
children?: React.ReactNode;
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import styled from '@emotion/styled';
|
|
||||||
import {
|
import {
|
||||||
Paper as MantinePaper,
|
Paper as MantinePaper,
|
||||||
PaperProps as MantinePaperProps,
|
PaperProps as MantinePaperProps,
|
||||||
} from '@mantine/core';
|
} from '@mantine/core';
|
||||||
|
import styled from 'styled-components';
|
||||||
|
|
||||||
export interface PaperProps extends MantinePaperProps {
|
export interface PaperProps extends MantinePaperProps {
|
||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import styled from '@emotion/styled';
|
|
||||||
import {
|
import {
|
||||||
Popover as MantinePopover,
|
Popover as MantinePopover,
|
||||||
PopoverProps as MantinePopoverProps,
|
PopoverProps as MantinePopoverProps,
|
||||||
PopoverDropdownProps as MantinePopoverDropdownProps,
|
PopoverDropdownProps as MantinePopoverDropdownProps,
|
||||||
} from '@mantine/core';
|
} from '@mantine/core';
|
||||||
|
import styled from 'styled-components';
|
||||||
|
|
||||||
type PopoverProps = MantinePopoverProps;
|
type PopoverProps = MantinePopoverProps;
|
||||||
type PopoverDropdownProps = MantinePopoverDropdownProps;
|
type PopoverDropdownProps = MantinePopoverDropdownProps;
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import styled from '@emotion/styled';
|
|
||||||
import {
|
import {
|
||||||
ScrollArea as MantineScrollArea,
|
ScrollArea as MantineScrollArea,
|
||||||
ScrollAreaProps as MantineScrollAreaProps,
|
ScrollAreaProps as MantineScrollAreaProps,
|
||||||
} from '@mantine/core';
|
} from '@mantine/core';
|
||||||
|
import styled from 'styled-components';
|
||||||
|
|
||||||
interface ScrollAreaProps extends MantineScrollAreaProps {
|
interface ScrollAreaProps extends MantineScrollAreaProps {
|
||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import { forwardRef } from 'react';
|
import { forwardRef } from 'react';
|
||||||
import styled from '@emotion/styled';
|
|
||||||
import {
|
import {
|
||||||
SegmentedControl as MantineSegmentedControl,
|
SegmentedControl as MantineSegmentedControl,
|
||||||
SegmentedControlProps as MantineSegmentedControlProps,
|
SegmentedControlProps as MantineSegmentedControlProps,
|
||||||
} from '@mantine/core';
|
} from '@mantine/core';
|
||||||
|
import styled from 'styled-components';
|
||||||
|
|
||||||
type SegmentedControlProps = MantineSegmentedControlProps;
|
type SegmentedControlProps = MantineSegmentedControlProps;
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import styled from '@emotion/styled';
|
|
||||||
import {
|
import {
|
||||||
Select as MantineSelect,
|
Select as MantineSelect,
|
||||||
SelectProps as MantineSelectProps,
|
SelectProps as MantineSelectProps,
|
||||||
} from '@mantine/core';
|
} from '@mantine/core';
|
||||||
|
import styled from 'styled-components';
|
||||||
|
|
||||||
interface SelectProps extends MantineSelectProps {
|
interface SelectProps extends MantineSelectProps {
|
||||||
maxWidth?: number | string;
|
maxWidth?: number | string;
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import styled from '@emotion/styled';
|
|
||||||
import {
|
import {
|
||||||
Switch as MantineSwitch,
|
Switch as MantineSwitch,
|
||||||
SwitchProps as MantineSwitchProps,
|
SwitchProps as MantineSwitchProps,
|
||||||
} from '@mantine/core';
|
} from '@mantine/core';
|
||||||
|
import styled from 'styled-components';
|
||||||
|
|
||||||
type SwitchProps = MantineSwitchProps;
|
type SwitchProps = MantineSwitchProps;
|
||||||
|
|
||||||
|
|||||||
@@ -1,34 +1,34 @@
|
|||||||
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
||||||
import styled from '@emotion/styled';
|
|
||||||
import {
|
import {
|
||||||
createPolymorphicComponent,
|
createPolymorphicComponent,
|
||||||
Text as MantineText,
|
Text as MantineText,
|
||||||
TextProps as MantineTextProps,
|
TextProps as MantineTextProps,
|
||||||
} from '@mantine/core';
|
} from '@mantine/core';
|
||||||
|
import styled from 'styled-components';
|
||||||
import { Font, textEllipsis } from '@/renderer/styles';
|
import { Font, textEllipsis } from '@/renderer/styles';
|
||||||
|
|
||||||
type MantineTextDivProps = MantineTextProps & ComponentPropsWithoutRef<'div'>;
|
type MantineTextDivProps = MantineTextProps & ComponentPropsWithoutRef<'div'>;
|
||||||
|
|
||||||
interface TextProps extends MantineTextDivProps {
|
interface TextProps extends MantineTextDivProps {
|
||||||
|
$link?: boolean;
|
||||||
|
$noSelect?: boolean;
|
||||||
|
$secondary?: boolean;
|
||||||
children: ReactNode;
|
children: ReactNode;
|
||||||
font?: Font;
|
font?: Font;
|
||||||
link?: boolean;
|
|
||||||
noSelect?: boolean;
|
|
||||||
overflow?: 'hidden' | 'visible';
|
overflow?: 'hidden' | 'visible';
|
||||||
secondary?: boolean;
|
|
||||||
to?: string;
|
to?: string;
|
||||||
weight?: number;
|
weight?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
const BaseText = styled(MantineText)<any>`
|
const BaseText = styled(MantineText)<TextProps>`
|
||||||
color: ${(props) =>
|
color: ${(props) =>
|
||||||
props.secondary ? 'var(--main-fg-secondary)' : 'var(--main-fg)'};
|
props.$secondary ? 'var(--main-fg-secondary)' : 'var(--main-fg)'};
|
||||||
font-family: ${(props) => props.font};
|
font-family: ${(props) => props.font};
|
||||||
user-select: ${(props) => (props.noSelect ? 'none' : 'auto')};
|
user-select: ${(props) => (props.$noSelect ? 'none' : 'auto')};
|
||||||
${(props) => props.overflow === 'hidden' && textEllipsis}
|
${(props) => props.overflow === 'hidden' && textEllipsis}
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
text-decoration: ${(props) => (props.link ? 'underline' : 'none')};
|
text-decoration: ${(props) => (props.$link ? 'underline' : 'none')};
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
@@ -36,18 +36,18 @@ const StyledText = styled(BaseText)<TextProps>``;
|
|||||||
|
|
||||||
export const _Text = ({
|
export const _Text = ({
|
||||||
children,
|
children,
|
||||||
secondary,
|
$secondary,
|
||||||
overflow,
|
overflow,
|
||||||
font,
|
font,
|
||||||
noSelect,
|
$noSelect,
|
||||||
...rest
|
...rest
|
||||||
}: TextProps) => {
|
}: TextProps) => {
|
||||||
return (
|
return (
|
||||||
<StyledText
|
<StyledText
|
||||||
|
$noSelect={$noSelect}
|
||||||
|
$secondary={$secondary}
|
||||||
font={font}
|
font={font}
|
||||||
noSelect={noSelect && noSelect}
|
|
||||||
overflow={overflow}
|
overflow={overflow}
|
||||||
secondary={secondary && secondary}
|
|
||||||
{...rest}
|
{...rest}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
@@ -58,11 +58,11 @@ export const _Text = ({
|
|||||||
export const Text = createPolymorphicComponent<'div', TextProps>(_Text);
|
export const Text = createPolymorphicComponent<'div', TextProps>(_Text);
|
||||||
|
|
||||||
_Text.defaultProps = {
|
_Text.defaultProps = {
|
||||||
|
$link: false,
|
||||||
|
$noSelect: false,
|
||||||
|
$secondary: false,
|
||||||
font: undefined,
|
font: undefined,
|
||||||
link: false,
|
|
||||||
noSelect: false,
|
|
||||||
overflow: 'visible',
|
overflow: 'visible',
|
||||||
secondary: false,
|
|
||||||
to: '',
|
to: '',
|
||||||
weight: 500,
|
weight: 500,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import styled from '@emotion/styled';
|
|
||||||
import { Tooltip as MantineTooltip, TooltipProps } from '@mantine/core';
|
import { Tooltip as MantineTooltip, TooltipProps } from '@mantine/core';
|
||||||
|
import styled from 'styled-components';
|
||||||
|
|
||||||
const StyledTooltip = styled(MantineTooltip)`
|
const StyledTooltip = styled(MantineTooltip)`
|
||||||
& .mantine-Tooltip-tooltip {
|
& .mantine-Tooltip-tooltip {
|
||||||
|
|||||||
@@ -117,14 +117,14 @@ const DetailSection = styled.div`
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const Row = styled.div<{ secondary?: boolean }>`
|
const Row = styled.div<{ $secondary?: boolean }>`
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
height: 25px;
|
height: 25px;
|
||||||
padding: 0 0.2rem;
|
padding: 0 0.2rem;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
color: ${({ secondary }) =>
|
color: ${({ $secondary }) =>
|
||||||
secondary ? 'var(--main-fg-secondary)' : 'var(--main-fg)'};
|
$secondary ? 'var(--main-fg-secondary)' : 'var(--main-fg)'};
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
`;
|
`;
|
||||||
@@ -216,7 +216,7 @@ export const DefaultCard = ({
|
|||||||
return (
|
return (
|
||||||
<Row
|
<Row
|
||||||
key={`row-${row.property}-${columnIndex}`}
|
key={`row-${row.property}-${columnIndex}`}
|
||||||
secondary={index > 0}
|
$secondary={index > 0}
|
||||||
>
|
>
|
||||||
{data[row.property].map(
|
{data[row.property].map(
|
||||||
(item: any, itemIndex: number) => (
|
(item: any, itemIndex: number) => (
|
||||||
@@ -345,7 +345,7 @@ export const DefaultCard = ({
|
|||||||
return (
|
return (
|
||||||
<Row
|
<Row
|
||||||
key={`row-${row.property}-${columnIndex}`}
|
key={`row-${row.property}-${columnIndex}`}
|
||||||
secondary={index > 0}
|
$secondary={index > 0}
|
||||||
>
|
>
|
||||||
{data[row.property].map((item: any, itemIndex: number) => (
|
{data[row.property].map((item: any, itemIndex: number) => (
|
||||||
<React.Fragment key={`${data.id}-${item.id}`}>
|
<React.Fragment key={`${data.id}-${item.id}`}>
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import React, { MouseEvent } from 'react';
|
import React, { MouseEvent } from 'react';
|
||||||
import styled from '@emotion/styled';
|
|
||||||
import { Group, UnstyledButtonProps } from '@mantine/core';
|
import { Group, UnstyledButtonProps } from '@mantine/core';
|
||||||
import { motion } from 'framer-motion';
|
import { motion } from 'framer-motion';
|
||||||
import {
|
import {
|
||||||
@@ -8,6 +7,7 @@ import {
|
|||||||
RiHeartFill,
|
RiHeartFill,
|
||||||
RiHeartLine,
|
RiHeartLine,
|
||||||
} from 'react-icons/ri';
|
} from 'react-icons/ri';
|
||||||
|
import styled from 'styled-components';
|
||||||
import { Button } from '@/renderer/components/button';
|
import { Button } from '@/renderer/components/button';
|
||||||
import { DropdownMenu } from '@/renderer/components/dropdown-menu';
|
import { DropdownMenu } from '@/renderer/components/dropdown-menu';
|
||||||
import { Play } from '@/renderer/types';
|
import { Play } from '@/renderer/types';
|
||||||
|
|||||||
@@ -112,14 +112,14 @@ const DetailSection = styled.div`
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const Row = styled.div<{ secondary?: boolean }>`
|
const Row = styled.div<{ $secondary?: boolean }>`
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
height: 25px;
|
height: 25px;
|
||||||
padding: 0 0.2rem;
|
padding: 0 0.2rem;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
color: ${({ secondary }) =>
|
color: ${({ $secondary }) =>
|
||||||
secondary ? 'var(--main-fg-secondary)' : 'var(--main-fg)'};
|
$secondary ? 'var(--main-fg-secondary)' : 'var(--main-fg)'};
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
`;
|
`;
|
||||||
@@ -235,7 +235,7 @@ export const PosterCard = ({
|
|||||||
return (
|
return (
|
||||||
<Row
|
<Row
|
||||||
key={`row-${row.property}-${columnIndex}`}
|
key={`row-${row.property}-${columnIndex}`}
|
||||||
secondary={index > 0}
|
$secondary={index > 0}
|
||||||
>
|
>
|
||||||
{data[row.property].map((item: any, itemIndex: number) => (
|
{data[row.property].map((item: any, itemIndex: number) => (
|
||||||
<React.Fragment key={`${data.id}-${item.id}`}>
|
<React.Fragment key={`${data.id}-${item.id}`}>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { Ref, useMemo } from 'react';
|
import { Ref, useMemo } from 'react';
|
||||||
import styled from '@emotion/styled';
|
|
||||||
import { FixedSizeList, FixedSizeListProps } from 'react-window';
|
import { FixedSizeList, FixedSizeListProps } from 'react-window';
|
||||||
|
import styled from 'styled-components';
|
||||||
import { GridCard } from '@/renderer/components/virtual-grid/grid-card';
|
import { GridCard } from '@/renderer/components/virtual-grid/grid-card';
|
||||||
import { usePlayQueueHandler } from '@/renderer/features/player/hooks/use-playqueue-handler';
|
import { usePlayQueueHandler } from '@/renderer/features/player/hooks/use-playqueue-handler';
|
||||||
import {
|
import {
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ export const AlbumListRoute = () => {
|
|||||||
<VirtualGridContainer>
|
<VirtualGridContainer>
|
||||||
<Group m={10} position="apart">
|
<Group m={10} position="apart">
|
||||||
<Group>
|
<Group>
|
||||||
<Text noSelect size="lg">
|
<Text $noSelect size="lg">
|
||||||
Albums
|
Albums
|
||||||
</Text>
|
</Text>
|
||||||
<DropdownMenu position="bottom-start">
|
<DropdownMenu position="bottom-start">
|
||||||
@@ -189,7 +189,7 @@ export const AlbumListRoute = () => {
|
|||||||
{FILTERS.map((filter) => (
|
{FILTERS.map((filter) => (
|
||||||
<DropdownMenu.Item
|
<DropdownMenu.Item
|
||||||
key={`filter-${filter.value}`}
|
key={`filter-${filter.value}`}
|
||||||
isActive={filter.value === filters.sortBy}
|
$isActive={filter.value === filters.sortBy}
|
||||||
onClick={() => setFilters({ sortBy: filter.value })}
|
onClick={() => setFilters({ sortBy: filter.value })}
|
||||||
>
|
>
|
||||||
{filter.name}
|
{filter.name}
|
||||||
@@ -197,7 +197,7 @@ export const AlbumListRoute = () => {
|
|||||||
))}
|
))}
|
||||||
<DropdownMenu.Divider />
|
<DropdownMenu.Divider />
|
||||||
<DropdownMenu.Item
|
<DropdownMenu.Item
|
||||||
isActive={isAdvFilter}
|
$isActive={isAdvFilter}
|
||||||
onClick={() => toggleAdvFilter()}
|
onClick={() => toggleAdvFilter()}
|
||||||
>
|
>
|
||||||
Advanced Filters
|
Advanced Filters
|
||||||
@@ -217,7 +217,7 @@ export const AlbumListRoute = () => {
|
|||||||
{ORDER.map((sort) => (
|
{ORDER.map((sort) => (
|
||||||
<DropdownMenu.Item
|
<DropdownMenu.Item
|
||||||
key={`sort-${sort.value}`}
|
key={`sort-${sort.value}`}
|
||||||
isActive={sort.value === filters.orderBy}
|
$isActive={sort.value === filters.orderBy}
|
||||||
onClick={() => setFilters({ orderBy: sort.value })}
|
onClick={() => setFilters({ orderBy: sort.value })}
|
||||||
>
|
>
|
||||||
{sort.name}
|
{sort.name}
|
||||||
@@ -237,8 +237,8 @@ export const AlbumListRoute = () => {
|
|||||||
{serverFolders?.map((folder) => (
|
{serverFolders?.map((folder) => (
|
||||||
<DropdownMenu.Item
|
<DropdownMenu.Item
|
||||||
key={folder.id}
|
key={folder.id}
|
||||||
|
$isActive={filters.serverFolderId.includes(folder.id)}
|
||||||
closeMenuOnClick={false}
|
closeMenuOnClick={false}
|
||||||
isActive={filters.serverFolderId.includes(folder.id)}
|
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (filters.serverFolderId.includes(folder.id)) {
|
if (filters.serverFolderId.includes(folder.id)) {
|
||||||
setFilters({
|
setFilters({
|
||||||
@@ -279,7 +279,7 @@ export const AlbumListRoute = () => {
|
|||||||
</DropdownMenu.Item>
|
</DropdownMenu.Item>
|
||||||
<DropdownMenu.Divider />
|
<DropdownMenu.Divider />
|
||||||
<DropdownMenu.Item
|
<DropdownMenu.Item
|
||||||
isActive={
|
$isActive={
|
||||||
page.list.type === 'grid' &&
|
page.list.type === 'grid' &&
|
||||||
page.list.display === CardDisplayType.CARD
|
page.list.display === CardDisplayType.CARD
|
||||||
}
|
}
|
||||||
@@ -297,7 +297,7 @@ export const AlbumListRoute = () => {
|
|||||||
Card
|
Card
|
||||||
</DropdownMenu.Item>
|
</DropdownMenu.Item>
|
||||||
<DropdownMenu.Item
|
<DropdownMenu.Item
|
||||||
isActive={
|
$isActive={
|
||||||
page.list.type === 'grid' &&
|
page.list.type === 'grid' &&
|
||||||
page.list.display === CardDisplayType.POSTER
|
page.list.display === CardDisplayType.POSTER
|
||||||
}
|
}
|
||||||
@@ -316,7 +316,7 @@ export const AlbumListRoute = () => {
|
|||||||
</DropdownMenu.Item>
|
</DropdownMenu.Item>
|
||||||
<DropdownMenu.Item
|
<DropdownMenu.Item
|
||||||
disabled
|
disabled
|
||||||
isActive={page.list.type === 'list'}
|
$isActive={page.list.type === 'list'}
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
setPage('albums', {
|
setPage('albums', {
|
||||||
...page,
|
...page,
|
||||||
@@ -366,7 +366,7 @@ export const AlbumListRoute = () => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Group>
|
<Group>
|
||||||
<Text noSelect>Advanced Filters</Text>
|
<Text $noSelect>Advanced Filters</Text>
|
||||||
<NumberInput
|
<NumberInput
|
||||||
disabled
|
disabled
|
||||||
min={1}
|
min={1}
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import styled from '@emotion/styled';
|
|
||||||
import {
|
import {
|
||||||
TextInput,
|
TextInput,
|
||||||
PasswordInput,
|
PasswordInput,
|
||||||
@@ -14,6 +13,7 @@ import { useDebouncedValue } from '@mantine/hooks';
|
|||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { RiCheckboxCircleFill } from 'react-icons/ri';
|
import { RiCheckboxCircleFill } from 'react-icons/ri';
|
||||||
import { useSearchParams } from 'react-router-dom';
|
import { useSearchParams } from 'react-router-dom';
|
||||||
|
import styled from 'styled-components';
|
||||||
import { useLogin } from '@/renderer/features/auth/queries/use-login';
|
import { useLogin } from '@/renderer/features/auth/queries/use-login';
|
||||||
import { usePingServer } from '@/renderer/features/auth/queries/use-ping-server';
|
import { usePingServer } from '@/renderer/features/auth/queries/use-ping-server';
|
||||||
import { normalizeServerUrl } from '@/renderer/utils';
|
import { normalizeServerUrl } from '@/renderer/utils';
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
import styled from '@emotion/styled';
|
|
||||||
import format from 'format-duration';
|
import format from 'format-duration';
|
||||||
import isElectron from 'is-electron';
|
import isElectron from 'is-electron';
|
||||||
import { IoIosPause } from 'react-icons/io';
|
import { IoIosPause } from 'react-icons/io';
|
||||||
@@ -10,6 +9,7 @@ import {
|
|||||||
RiSkipBackFill,
|
RiSkipBackFill,
|
||||||
RiSkipForwardFill,
|
RiSkipForwardFill,
|
||||||
} from 'react-icons/ri';
|
} from 'react-icons/ri';
|
||||||
|
import styled from 'styled-components';
|
||||||
import { Text } from '@/renderer/components';
|
import { Text } from '@/renderer/components';
|
||||||
import { usePlayerStore } from '@/renderer/store';
|
import { usePlayerStore } from '@/renderer/store';
|
||||||
import { Font } from '@/renderer/styles';
|
import { Font } from '@/renderer/styles';
|
||||||
@@ -137,7 +137,7 @@ export const CenterControls = ({ playersRef }: CenterControlsProps) => {
|
|||||||
</ControlsContainer>
|
</ControlsContainer>
|
||||||
<SliderContainer>
|
<SliderContainer>
|
||||||
<SliderValueWrapper position="left">
|
<SliderValueWrapper position="left">
|
||||||
<Text noSelect secondary font={Font.POPPINS} size="xs" weight={600}>
|
<Text $noSelect $secondary font={Font.POPPINS} size="xs" weight={600}>
|
||||||
{formattedTime}
|
{formattedTime}
|
||||||
</Text>
|
</Text>
|
||||||
</SliderValueWrapper>
|
</SliderValueWrapper>
|
||||||
@@ -155,7 +155,7 @@ export const CenterControls = ({ playersRef }: CenterControlsProps) => {
|
|||||||
/>
|
/>
|
||||||
</SliderWrapper>
|
</SliderWrapper>
|
||||||
<SliderValueWrapper position="right">
|
<SliderValueWrapper position="right">
|
||||||
<Text noSelect secondary font={Font.POPPINS} size="xs" weight={600}>
|
<Text $noSelect $secondary font={Font.POPPINS} size="xs" weight={600}>
|
||||||
{duration}
|
{duration}
|
||||||
</Text>
|
</Text>
|
||||||
</SliderValueWrapper>
|
</SliderValueWrapper>
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import styled from '@emotion/styled';
|
|
||||||
import { Center, Group } from '@mantine/core';
|
import { Center, Group } from '@mantine/core';
|
||||||
import { motion, AnimatePresence, LayoutGroup } from 'framer-motion';
|
import { motion, AnimatePresence, LayoutGroup } from 'framer-motion';
|
||||||
import { RiArrowUpSLine, RiDiscLine } from 'react-icons/ri';
|
import { RiArrowUpSLine, RiDiscLine } from 'react-icons/ri';
|
||||||
import { generatePath, Link } from 'react-router-dom';
|
import { generatePath, Link } from 'react-router-dom';
|
||||||
|
import styled from 'styled-components';
|
||||||
import { Button, Text } from '@/renderer/components';
|
import { Button, Text } from '@/renderer/components';
|
||||||
import { AppRoute } from '@/renderer/router/routes';
|
import { AppRoute } from '@/renderer/router/routes';
|
||||||
import { useAppStore, usePlayerStore } from '@/renderer/store';
|
import { useAppStore, usePlayerStore } from '@/renderer/store';
|
||||||
@@ -56,17 +56,17 @@ const PlayerbarImage = styled.img`
|
|||||||
background-size: cover;
|
background-size: cover;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const LineItem = styled.div<{ secondary?: boolean }>`
|
const LineItem = styled.div<{ $secondary?: boolean }>`
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 95%;
|
width: 95%;
|
||||||
max-width: 30vw;
|
max-width: 30vw;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
color: ${(props) => props.secondary && 'var(--main-fg-secondary)'};
|
color: ${(props) => props.$secondary && 'var(--main-fg-secondary)'};
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: ${(props) => props.secondary && 'var(--text-secondary)'};
|
color: ${(props) => props.$secondary && 'var(--text-secondary)'};
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
@@ -129,7 +129,7 @@ export const LeftControls = () => {
|
|||||||
<MetadataStack layout>
|
<MetadataStack layout>
|
||||||
<LineItem>
|
<LineItem>
|
||||||
<Text
|
<Text
|
||||||
link
|
$link
|
||||||
component={Link}
|
component={Link}
|
||||||
overflow="hidden"
|
overflow="hidden"
|
||||||
size="sm"
|
size="sm"
|
||||||
@@ -140,16 +140,16 @@ export const LeftControls = () => {
|
|||||||
{title || '—'}
|
{title || '—'}
|
||||||
</Text>
|
</Text>
|
||||||
</LineItem>
|
</LineItem>
|
||||||
<LineItem secondary>
|
<LineItem $secondary>
|
||||||
{artists?.map((artist, index) => (
|
{artists?.map((artist, index) => (
|
||||||
<>
|
<>
|
||||||
{index > 0 && (
|
{index > 0 && (
|
||||||
<Text secondary style={{ display: 'inline-block' }}>
|
<Text $secondary style={{ display: 'inline-block' }}>
|
||||||
,
|
,
|
||||||
</Text>
|
</Text>
|
||||||
)}{' '}
|
)}{' '}
|
||||||
<Text
|
<Text
|
||||||
link
|
$link
|
||||||
component={Link}
|
component={Link}
|
||||||
overflow="hidden"
|
overflow="hidden"
|
||||||
size="sm"
|
size="sm"
|
||||||
@@ -167,9 +167,9 @@ export const LeftControls = () => {
|
|||||||
</>
|
</>
|
||||||
))}
|
))}
|
||||||
</LineItem>
|
</LineItem>
|
||||||
<LineItem secondary>
|
<LineItem $secondary>
|
||||||
<Text
|
<Text
|
||||||
link
|
$link
|
||||||
component={Link}
|
component={Link}
|
||||||
overflow="hidden"
|
overflow="hidden"
|
||||||
size="sm"
|
size="sm"
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
/* stylelint-disable no-descending-specificity */
|
/* stylelint-disable no-descending-specificity */
|
||||||
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
||||||
import { css } from '@emotion/react';
|
|
||||||
import styled from '@emotion/styled';
|
|
||||||
import {
|
import {
|
||||||
TooltipProps,
|
TooltipProps,
|
||||||
UnstyledButton,
|
UnstyledButton,
|
||||||
UnstyledButtonProps,
|
UnstyledButtonProps,
|
||||||
} from '@mantine/core';
|
} from '@mantine/core';
|
||||||
import { motion } from 'framer-motion';
|
import { motion } from 'framer-motion';
|
||||||
|
import styled, { css } from 'styled-components';
|
||||||
import { Tooltip } from '@/renderer/components';
|
import { Tooltip } from '@/renderer/components';
|
||||||
|
|
||||||
type MantineButtonProps = UnstyledButtonProps &
|
type MantineButtonProps = UnstyledButtonProps &
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useRef } from 'react';
|
import { useRef } from 'react';
|
||||||
import styled from '@emotion/styled';
|
|
||||||
import isElectron from 'is-electron';
|
import isElectron from 'is-electron';
|
||||||
|
import styled from 'styled-components';
|
||||||
import { PlaybackType } from '@/renderer/types';
|
import { PlaybackType } from '@/renderer/types';
|
||||||
import { AudioPlayer } from '../../../components';
|
import { AudioPlayer } from '../../../components';
|
||||||
import { usePlayerStore } from '../../../store';
|
import { usePlayerStore } from '../../../store';
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import styled from '@emotion/styled';
|
|
||||||
import { Group } from '@mantine/core';
|
import { Group } from '@mantine/core';
|
||||||
import {
|
import {
|
||||||
RiVolumeUpFill,
|
RiVolumeUpFill,
|
||||||
RiVolumeMuteFill,
|
RiVolumeMuteFill,
|
||||||
RiPlayListFill,
|
RiPlayListFill,
|
||||||
} from 'react-icons/ri';
|
} from 'react-icons/ri';
|
||||||
|
import styled from 'styled-components';
|
||||||
import { usePlayerStore, useAppStore } from '@/renderer/store';
|
import { usePlayerStore, useAppStore } from '@/renderer/store';
|
||||||
import { useRightControls } from '../hooks/use-right-controls';
|
import { useRightControls } from '../hooks/use-right-controls';
|
||||||
import { PlayerButton } from './player-button';
|
import { PlayerButton } from './player-button';
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { useMemo, useState } from 'react';
|
import { useMemo, useState } from 'react';
|
||||||
import styled from '@emotion/styled';
|
|
||||||
import format from 'format-duration';
|
import format from 'format-duration';
|
||||||
import ReactSlider, { ReactSliderProps } from 'react-slider';
|
import ReactSlider, { ReactSliderProps } from 'react-slider';
|
||||||
|
import styled from 'styled-components';
|
||||||
|
|
||||||
interface SliderProps extends ReactSliderProps {
|
interface SliderProps extends ReactSliderProps {
|
||||||
hasTooltip?: boolean;
|
hasTooltip?: boolean;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import styled from '@emotion/styled';
|
import styled from 'styled-components';
|
||||||
import { Text } from '@/renderer/components';
|
import { Text } from '@/renderer/components';
|
||||||
import { Font } from '@/renderer/styles';
|
import { Font } from '@/renderer/styles';
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { ReactNode } from 'react';
|
import { ReactNode } from 'react';
|
||||||
import styled from '@emotion/styled';
|
import styled from 'styled-components';
|
||||||
import { motion } from 'framer-motion';
|
import { motion } from 'framer-motion';
|
||||||
|
|
||||||
interface AnimatedPageProps {
|
interface AnimatedPageProps {
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import { ReactNode } from 'react';
|
import { ReactNode } from 'react';
|
||||||
import { css } from '@emotion/react';
|
|
||||||
import styled from '@emotion/styled';
|
|
||||||
import { Link, LinkProps } from 'react-router-dom';
|
import { Link, LinkProps } from 'react-router-dom';
|
||||||
|
import styled, { css } from 'styled-components';
|
||||||
|
|
||||||
interface ListItemProps {
|
interface ListItemProps {
|
||||||
children: ReactNode;
|
children: ReactNode;
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import styled from '@emotion/styled';
|
|
||||||
import { Stack, Group, Grid, Accordion, Center } from '@mantine/core';
|
import { Stack, Group, Grid, Accordion, Center } from '@mantine/core';
|
||||||
import { SpotlightProvider } from '@mantine/spotlight';
|
import { SpotlightProvider } from '@mantine/spotlight';
|
||||||
import { AnimatePresence, motion } from 'framer-motion';
|
import { AnimatePresence, motion } from 'framer-motion';
|
||||||
@@ -18,6 +17,7 @@ import {
|
|||||||
RiUserVoiceLine,
|
RiUserVoiceLine,
|
||||||
} from 'react-icons/ri';
|
} from 'react-icons/ri';
|
||||||
import { useNavigate, Link } from 'react-router-dom';
|
import { useNavigate, Link } from 'react-router-dom';
|
||||||
|
import styled from 'styled-components';
|
||||||
import { Button, TextInput } from '@/renderer/components';
|
import { Button, TextInput } from '@/renderer/components';
|
||||||
import { AppRoute } from '@/renderer/router/routes';
|
import { AppRoute } from '@/renderer/router/routes';
|
||||||
import { useAppStore, usePlayerStore } from '@/renderer/store';
|
import { useAppStore, usePlayerStore } from '@/renderer/store';
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
import styled from '@emotion/styled';
|
|
||||||
import { Group } from '@mantine/core';
|
import { Group } from '@mantine/core';
|
||||||
import { useQueryClient } from '@tanstack/react-query';
|
import { useQueryClient } from '@tanstack/react-query';
|
||||||
import { FiActivity } from 'react-icons/fi';
|
import { FiActivity } from 'react-icons/fi';
|
||||||
import { RiRefreshLine } from 'react-icons/ri';
|
import { RiRefreshLine } from 'react-icons/ri';
|
||||||
|
import styled from 'styled-components';
|
||||||
import { socket } from '@/renderer/api';
|
import { socket } from '@/renderer/api';
|
||||||
import { queryKeys } from '@/renderer/api/query-keys';
|
import { queryKeys } from '@/renderer/api/query-keys';
|
||||||
import { Button, Popover, Text } from '@/renderer/components';
|
import { Button, Popover, Text } from '@/renderer/components';
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import {
|
|||||||
ServerList,
|
ServerList,
|
||||||
useServerList,
|
useServerList,
|
||||||
} from '@/renderer/features/servers';
|
} from '@/renderer/features/servers';
|
||||||
|
import { Settings } from '@/renderer/features/settings';
|
||||||
import { usePermissions } from '@/renderer/features/shared';
|
import { usePermissions } from '@/renderer/features/shared';
|
||||||
import { useAuthStore } from '@/renderer/store';
|
import { useAuthStore } from '@/renderer/store';
|
||||||
|
|
||||||
@@ -51,6 +52,15 @@ export const AppMenu = () => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleSettingsModal = () => {
|
||||||
|
openModal({
|
||||||
|
centered: true,
|
||||||
|
children: <Settings />,
|
||||||
|
size: 'xl',
|
||||||
|
title: 'Settings',
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
const handleSetCurrentServer = (serverId: string) => {
|
const handleSetCurrentServer = (serverId: string) => {
|
||||||
const server = servers?.data.find((s) => s.id === serverId);
|
const server = servers?.data.find((s) => s.id === serverId);
|
||||||
if (!server) return;
|
if (!server) return;
|
||||||
@@ -80,8 +90,8 @@ export const AppMenu = () => {
|
|||||||
return (
|
return (
|
||||||
<DropdownMenu.Item
|
<DropdownMenu.Item
|
||||||
key={`server-${s.id}`}
|
key={`server-${s.id}`}
|
||||||
|
$isActive={s.id === currentServer?.id}
|
||||||
disabled={requiresCredential}
|
disabled={requiresCredential}
|
||||||
isActive={s.id === currentServer?.id}
|
|
||||||
onClick={() => handleSetCurrentServer(s.id)}
|
onClick={() => handleSetCurrentServer(s.id)}
|
||||||
>
|
>
|
||||||
<Group>
|
<Group>
|
||||||
@@ -95,7 +105,9 @@ export const AppMenu = () => {
|
|||||||
})}
|
})}
|
||||||
<DropdownMenu.Divider />
|
<DropdownMenu.Divider />
|
||||||
<DropdownMenu.Item disabled>Search</DropdownMenu.Item>
|
<DropdownMenu.Item disabled>Search</DropdownMenu.Item>
|
||||||
<DropdownMenu.Item>Settings</DropdownMenu.Item>
|
<DropdownMenu.Item onClick={handleSettingsModal}>
|
||||||
|
Settings
|
||||||
|
</DropdownMenu.Item>
|
||||||
<DropdownMenu.Divider />
|
<DropdownMenu.Divider />
|
||||||
{permissions.createServer && (
|
{permissions.createServer && (
|
||||||
<DropdownMenu.Item onClick={handleAddServerModal}>
|
<DropdownMenu.Item onClick={handleAddServerModal}>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { ReactNode } from 'react';
|
import { ReactNode } from 'react';
|
||||||
import styled from '@emotion/styled';
|
|
||||||
import { Group } from '@mantine/core';
|
import { Group } from '@mantine/core';
|
||||||
|
import styled from 'styled-components';
|
||||||
import { Text } from '@/renderer/components';
|
import { Text } from '@/renderer/components';
|
||||||
import { ActivityMenu } from '@/renderer/features/titlebar/components/activity-menu';
|
import { ActivityMenu } from '@/renderer/features/titlebar/components/activity-menu';
|
||||||
import { AppMenu } from '@/renderer/features/titlebar/components/app-menu';
|
import { AppMenu } from '@/renderer/features/titlebar/components/app-menu';
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import styled from '@emotion/styled';
|
|
||||||
import isElectron from 'is-electron';
|
import isElectron from 'is-electron';
|
||||||
import {
|
import {
|
||||||
RiCheckboxBlankLine,
|
RiCheckboxBlankLine,
|
||||||
RiCloseLine,
|
RiCloseLine,
|
||||||
RiSubtractLine,
|
RiSubtractLine,
|
||||||
} from 'react-icons/ri';
|
} from 'react-icons/ri';
|
||||||
|
import styled from 'styled-components';
|
||||||
|
|
||||||
interface WindowControlsProps {
|
interface WindowControlsProps {
|
||||||
style?: 'macos' | 'windows' | 'linux';
|
style?: 'macos' | 'windows' | 'linux';
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import styled from '@emotion/styled';
|
|
||||||
import { Outlet } from 'react-router-dom';
|
import { Outlet } from 'react-router-dom';
|
||||||
|
import styled from 'styled-components';
|
||||||
import { Titlebar } from '@/renderer/features/titlebar/components/titlebar';
|
import { Titlebar } from '@/renderer/features/titlebar/components/titlebar';
|
||||||
|
|
||||||
const WindowsTitlebarContainer = styled.div`
|
const WindowsTitlebarContainer = styled.div`
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { useCallback, useEffect, useRef, useState } from 'react';
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
||||||
import styled from '@emotion/styled';
|
|
||||||
import { motion } from 'framer-motion';
|
import { motion } from 'framer-motion';
|
||||||
import { Outlet } from 'react-router';
|
import { Outlet } from 'react-router';
|
||||||
|
import styled from 'styled-components';
|
||||||
import { SideQueue } from '@/renderer/features/side-queue/components/side-queue';
|
import { SideQueue } from '@/renderer/features/side-queue/components/side-queue';
|
||||||
import { Titlebar } from '@/renderer/features/titlebar/components/titlebar';
|
import { Titlebar } from '@/renderer/features/titlebar/components/titlebar';
|
||||||
import { useAppStore } from '@/renderer/store';
|
import { useAppStore } from '@/renderer/store';
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { css } from '@emotion/react';
|
import { css } from 'styled-components';
|
||||||
|
|
||||||
export enum Font {
|
export enum Font {
|
||||||
EPILOGUE = 'Epilogue',
|
EPILOGUE = 'Epilogue',
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { css } from '@emotion/react';
|
import { css } from 'styled-components';
|
||||||
|
|
||||||
export const textEllipsis = css`
|
export const textEllipsis = css`
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|||||||
Reference in New Issue
Block a user