mirror of
https://github.com/antebudimir/feishin.git
synced 2025-12-31 18:13:31 +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
|
|
@ -31,15 +31,8 @@ interface AddServerFormProps {
|
|||
|
||||
function ServerIconWithLabel({ icon, label }: { icon: string; label: string }) {
|
||||
return (
|
||||
<Stack
|
||||
align="center"
|
||||
justify="center"
|
||||
>
|
||||
<img
|
||||
height="50"
|
||||
src={icon}
|
||||
width="50"
|
||||
/>
|
||||
<Stack align="center" justify="center">
|
||||
<img height="50" src={icon} width="50" />
|
||||
<Text>{label}</Text>
|
||||
</Stack>
|
||||
);
|
||||
|
|
@ -47,30 +40,15 @@ function ServerIconWithLabel({ icon, label }: { icon: string; label: string }) {
|
|||
|
||||
const SERVER_TYPES = [
|
||||
{
|
||||
label: (
|
||||
<ServerIconWithLabel
|
||||
icon={JellyfinIcon}
|
||||
label="Jellyfin"
|
||||
/>
|
||||
),
|
||||
label: <ServerIconWithLabel icon={JellyfinIcon} label="Jellyfin" />,
|
||||
value: ServerType.JELLYFIN,
|
||||
},
|
||||
{
|
||||
label: (
|
||||
<ServerIconWithLabel
|
||||
icon={NavidromeIcon}
|
||||
label="Navidrome"
|
||||
/>
|
||||
),
|
||||
label: <ServerIconWithLabel icon={NavidromeIcon} label="Navidrome" />,
|
||||
value: ServerType.NAVIDROME,
|
||||
},
|
||||
{
|
||||
label: (
|
||||
<ServerIconWithLabel
|
||||
icon={SubsonicIcon}
|
||||
label="OpenSubsonic"
|
||||
/>
|
||||
),
|
||||
label: <ServerIconWithLabel icon={SubsonicIcon} label="OpenSubsonic" />,
|
||||
value: ServerType.SUBSONIC,
|
||||
},
|
||||
];
|
||||
|
|
@ -174,10 +152,7 @@ export const AddServerForm = ({ onCancel }: AddServerFormProps) => {
|
|||
|
||||
return (
|
||||
<form onSubmit={handleSubmit}>
|
||||
<Stack
|
||||
m={5}
|
||||
ref={focusTrapRef}
|
||||
>
|
||||
<Stack m={5} ref={focusTrapRef}>
|
||||
<SegmentedControl
|
||||
data={SERVER_TYPES}
|
||||
disabled={Boolean(serverLock)}
|
||||
|
|
@ -238,15 +213,9 @@ export const AddServerForm = ({ onCancel }: AddServerFormProps) => {
|
|||
{...form.getInputProps('legacyAuth', { type: 'checkbox' })}
|
||||
/>
|
||||
)}
|
||||
<Group
|
||||
grow
|
||||
justify="flex-end"
|
||||
>
|
||||
<Group grow justify="flex-end">
|
||||
{onCancel && (
|
||||
<Button
|
||||
onClick={onCancel}
|
||||
variant="subtle"
|
||||
>
|
||||
<Button onClick={onCancel} variant="subtle">
|
||||
{t('common.cancel', { postProcess: 'titleCase' })}
|
||||
</Button>
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -33,10 +33,7 @@ interface EditServerFormProps {
|
|||
const ModifiedFieldIndicator = () => {
|
||||
return (
|
||||
<Tooltip label={i18n.t('common.modified', { postProcess: 'titleCase' }) as string}>
|
||||
<Icon
|
||||
color="warn"
|
||||
icon="info"
|
||||
/>
|
||||
<Icon color="warn" icon="info" />
|
||||
</Tooltip>
|
||||
);
|
||||
};
|
||||
|
|
@ -193,17 +190,10 @@ export const EditServerForm = ({ isUpdate, onCancel, password, server }: EditSer
|
|||
/>
|
||||
)}
|
||||
<Group justify="flex-end">
|
||||
<Button
|
||||
onClick={onCancel}
|
||||
variant="subtle"
|
||||
>
|
||||
<Button onClick={onCancel} variant="subtle">
|
||||
{t('common.cancel', { postProcess: 'titleCase' })}
|
||||
</Button>
|
||||
<Button
|
||||
loading={isLoading}
|
||||
type="submit"
|
||||
variant="filled"
|
||||
>
|
||||
<Button loading={isLoading} type="submit" variant="filled">
|
||||
{t('common.save', { postProcess: 'titleCase' })}
|
||||
</Button>
|
||||
</Group>
|
||||
|
|
|
|||
|
|
@ -66,11 +66,7 @@ export const ServerListItem = ({ server }: ServerListItemProps) => {
|
|||
/>
|
||||
) : (
|
||||
<Stack>
|
||||
<Table
|
||||
layout="fixed"
|
||||
variant="vertical"
|
||||
withTableBorder
|
||||
>
|
||||
<Table layout="fixed" variant="vertical" withTableBorder>
|
||||
<Table.Tbody>
|
||||
<Table.Tr>
|
||||
<Table.Th>
|
||||
|
|
|
|||
|
|
@ -73,10 +73,7 @@ export const ServerList = () => {
|
|||
{Object.keys(serverListQuery)?.map((serverId) => {
|
||||
const server = serverListQuery[serverId];
|
||||
return (
|
||||
<Accordion.Item
|
||||
key={server.id}
|
||||
value={server.name}
|
||||
>
|
||||
<Accordion.Item key={server.id} value={server.name}>
|
||||
<Accordion.Control>
|
||||
<Group>
|
||||
<img
|
||||
|
|
@ -103,10 +100,7 @@ export const ServerList = () => {
|
|||
</Accordion.Item>
|
||||
);
|
||||
})}
|
||||
<Group
|
||||
grow
|
||||
pt="md"
|
||||
>
|
||||
<Group grow pt="md">
|
||||
<Button
|
||||
autoFocus
|
||||
leftSection={<Icon icon="add" />}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue