mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-10 23:45:48 +01:00
Animations and login page styling
This commit is contained in:
@@ -2,6 +2,7 @@ import { Group, Space, Stack, Text, UnstyledButton } from '@mantine/core';
|
||||
import { closeModal } from '@mantine/modals';
|
||||
import { showNotification } from '@mantine/notifications';
|
||||
import { IconBox, IconBoxAlignTop, IconStack } from '@tabler/icons';
|
||||
import { motion } from 'framer-motion';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import { ReactNode } from 'react';
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
@@ -166,7 +167,12 @@ const ElementItem = ({ name, icon, onClick }: ElementItemProps) => {
|
||||
py="md"
|
||||
>
|
||||
<Stack className={classes.elementStack} align="center" spacing={5}>
|
||||
{icon}
|
||||
<motion.div
|
||||
// On hover zoom in
|
||||
whileHover={{ scale: 1.2 }}
|
||||
>
|
||||
{icon}
|
||||
</motion.div>
|
||||
<Text className={classes.elementName} weight={500} size="sm">
|
||||
{name}
|
||||
</Text>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { Center, Text, UnstyledButton } from '@mantine/core';
|
||||
import { NextLink } from '@mantine/next';
|
||||
import { createStyles } from '@mantine/styles';
|
||||
import { motion } from 'framer-motion';
|
||||
import { AppType } from '../../../../types/app';
|
||||
import { useCardStyles } from '../../../layout/useCardStyles';
|
||||
import { useEditModeStore } from '../../Views/useEditModeStore';
|
||||
@@ -29,7 +30,18 @@ export const AppTile = ({ className, app }: AppTileProps) => {
|
||||
</Text>
|
||||
<Center style={{ height: '75%', flex: 1 }}>
|
||||
{/* eslint-disable-next-line @next/next/no-img-element */}
|
||||
<img className={classes.image} src={app.appearance.iconUrl} alt="" />
|
||||
<motion.img
|
||||
className={classes.image}
|
||||
src={app.appearance.iconUrl}
|
||||
alt=""
|
||||
animate={{
|
||||
scale: [0.8, 1.15, 1],
|
||||
rotate: [0, 15, -15, 0],
|
||||
}}
|
||||
transition={{
|
||||
duration: 0.5,
|
||||
}}
|
||||
/>
|
||||
</Center>
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import axios from 'axios';
|
||||
import Consola from 'consola';
|
||||
import { ActionIcon, Button, Group, Popover, Stack, Text, Tooltip } from '@mantine/core';
|
||||
import { ActionIcon, Button, Group, Paper, Popover, Space, Text } from '@mantine/core';
|
||||
import { IconEditCircle, IconEditCircleOff, IconX } from '@tabler/icons';
|
||||
import { getCookie } from 'cookies-next';
|
||||
import { Trans, useTranslation } from 'next-i18next';
|
||||
@@ -61,33 +61,31 @@ export const ToggleEditModeAction = () => {
|
||||
return (
|
||||
<Popover
|
||||
opened={enabled && !smallerThanSm && !popoverManuallyHidden}
|
||||
width={250}
|
||||
width="target"
|
||||
transition="scale"
|
||||
zIndex={199}
|
||||
withArrow
|
||||
>
|
||||
<Popover.Target>
|
||||
<Tooltip label={t('tooltip')} withinPortal>
|
||||
{smallerThanSm ? (
|
||||
enabled ? (
|
||||
<Group style={{ flexWrap: 'nowrap' }}>
|
||||
<AddElementAction type="action-icon" />
|
||||
<ToggleActionIconMobile />
|
||||
</Group>
|
||||
) : (
|
||||
{smallerThanSm ? (
|
||||
enabled ? (
|
||||
<Group style={{ flexWrap: 'nowrap' }}>
|
||||
<AddElementAction type="action-icon" />
|
||||
<ToggleActionIconMobile />
|
||||
)
|
||||
) : enabled ? (
|
||||
<Button.Group>
|
||||
<ToggleButtonDesktop />
|
||||
{enabled && <AddElementAction type="button" />}
|
||||
</Button.Group>
|
||||
</Group>
|
||||
) : (
|
||||
<ToggleActionIconMobile />
|
||||
)
|
||||
) : enabled ? (
|
||||
<Button.Group>
|
||||
<ToggleButtonDesktop />
|
||||
)}
|
||||
</Tooltip>
|
||||
{enabled && <AddElementAction type="button" />}
|
||||
</Button.Group>
|
||||
) : (
|
||||
<ToggleButtonDesktop />
|
||||
)}
|
||||
</Popover.Target>
|
||||
|
||||
<Popover.Dropdown p={4} px={6}>
|
||||
<Popover.Dropdown p={4} px={6} mt={-5}>
|
||||
<div style={{ position: 'absolute', top: 2, right: 2 }}>
|
||||
<ActionIcon onClick={() => setPopoverManuallyHidden(true)}>
|
||||
<IconX size={18} />
|
||||
|
||||
Reference in New Issue
Block a user