mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-10 07:25:48 +01:00
Animations and login page styling
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
{
|
{
|
||||||
"tooltip": "The edit mode enables you to configure your dashboard",
|
|
||||||
"description": "In edit mode, you can adjust the size and position of your tiles.",
|
"description": "In edit mode, you can adjust the size and position of your tiles.",
|
||||||
"button": {
|
"button": {
|
||||||
"disabled": "Enter Edit Mode",
|
"disabled": "Enter Edit Mode",
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import { Group, Space, Stack, Text, UnstyledButton } from '@mantine/core';
|
|||||||
import { closeModal } from '@mantine/modals';
|
import { closeModal } from '@mantine/modals';
|
||||||
import { showNotification } from '@mantine/notifications';
|
import { showNotification } from '@mantine/notifications';
|
||||||
import { IconBox, IconBoxAlignTop, IconStack } from '@tabler/icons';
|
import { IconBox, IconBoxAlignTop, IconStack } from '@tabler/icons';
|
||||||
|
import { motion } from 'framer-motion';
|
||||||
import { useTranslation } from 'next-i18next';
|
import { useTranslation } from 'next-i18next';
|
||||||
import { ReactNode } from 'react';
|
import { ReactNode } from 'react';
|
||||||
import { v4 as uuidv4 } from 'uuid';
|
import { v4 as uuidv4 } from 'uuid';
|
||||||
@@ -166,7 +167,12 @@ const ElementItem = ({ name, icon, onClick }: ElementItemProps) => {
|
|||||||
py="md"
|
py="md"
|
||||||
>
|
>
|
||||||
<Stack className={classes.elementStack} align="center" spacing={5}>
|
<Stack className={classes.elementStack} align="center" spacing={5}>
|
||||||
|
<motion.div
|
||||||
|
// On hover zoom in
|
||||||
|
whileHover={{ scale: 1.2 }}
|
||||||
|
>
|
||||||
{icon}
|
{icon}
|
||||||
|
</motion.div>
|
||||||
<Text className={classes.elementName} weight={500} size="sm">
|
<Text className={classes.elementName} weight={500} size="sm">
|
||||||
{name}
|
{name}
|
||||||
</Text>
|
</Text>
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import { Center, Text, UnstyledButton } from '@mantine/core';
|
import { Center, Text, UnstyledButton } from '@mantine/core';
|
||||||
import { NextLink } from '@mantine/next';
|
import { NextLink } from '@mantine/next';
|
||||||
import { createStyles } from '@mantine/styles';
|
import { createStyles } from '@mantine/styles';
|
||||||
|
import { motion } from 'framer-motion';
|
||||||
import { AppType } from '../../../../types/app';
|
import { AppType } from '../../../../types/app';
|
||||||
import { useCardStyles } from '../../../layout/useCardStyles';
|
import { useCardStyles } from '../../../layout/useCardStyles';
|
||||||
import { useEditModeStore } from '../../Views/useEditModeStore';
|
import { useEditModeStore } from '../../Views/useEditModeStore';
|
||||||
@@ -29,7 +30,18 @@ export const AppTile = ({ className, app }: AppTileProps) => {
|
|||||||
</Text>
|
</Text>
|
||||||
<Center style={{ height: '75%', flex: 1 }}>
|
<Center style={{ height: '75%', flex: 1 }}>
|
||||||
{/* eslint-disable-next-line @next/next/no-img-element */}
|
{/* 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>
|
</Center>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import Consola from 'consola';
|
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 { IconEditCircle, IconEditCircleOff, IconX } from '@tabler/icons';
|
||||||
import { getCookie } from 'cookies-next';
|
import { getCookie } from 'cookies-next';
|
||||||
import { Trans, useTranslation } from 'next-i18next';
|
import { Trans, useTranslation } from 'next-i18next';
|
||||||
@@ -61,12 +61,11 @@ export const ToggleEditModeAction = () => {
|
|||||||
return (
|
return (
|
||||||
<Popover
|
<Popover
|
||||||
opened={enabled && !smallerThanSm && !popoverManuallyHidden}
|
opened={enabled && !smallerThanSm && !popoverManuallyHidden}
|
||||||
width={250}
|
width="target"
|
||||||
|
transition="scale"
|
||||||
zIndex={199}
|
zIndex={199}
|
||||||
withArrow
|
|
||||||
>
|
>
|
||||||
<Popover.Target>
|
<Popover.Target>
|
||||||
<Tooltip label={t('tooltip')} withinPortal>
|
|
||||||
{smallerThanSm ? (
|
{smallerThanSm ? (
|
||||||
enabled ? (
|
enabled ? (
|
||||||
<Group style={{ flexWrap: 'nowrap' }}>
|
<Group style={{ flexWrap: 'nowrap' }}>
|
||||||
@@ -84,10 +83,9 @@ export const ToggleEditModeAction = () => {
|
|||||||
) : (
|
) : (
|
||||||
<ToggleButtonDesktop />
|
<ToggleButtonDesktop />
|
||||||
)}
|
)}
|
||||||
</Tooltip>
|
|
||||||
</Popover.Target>
|
</Popover.Target>
|
||||||
|
|
||||||
<Popover.Dropdown p={4} px={6}>
|
<Popover.Dropdown p={4} px={6} mt={-5}>
|
||||||
<div style={{ position: 'absolute', top: 2, right: 2 }}>
|
<div style={{ position: 'absolute', top: 2, right: 2 }}>
|
||||||
<ActionIcon onClick={() => setPopoverManuallyHidden(true)}>
|
<ActionIcon onClick={() => setPopoverManuallyHidden(true)}>
|
||||||
<IconX size={18} />
|
<IconX size={18} />
|
||||||
|
|||||||
@@ -32,19 +32,6 @@ export default function AuthenticationTitle() {
|
|||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Group>
|
|
||||||
<Title
|
|
||||||
align="center"
|
|
||||||
sx={(theme) => ({ fontFamily: `Greycliff CF, ${theme.fontFamily}`, fontWeight: 900 })}
|
|
||||||
>
|
|
||||||
{t('title')}
|
|
||||||
</Title>
|
|
||||||
</Group>
|
|
||||||
|
|
||||||
<Text color="dimmed" size="sm" align="center" mt={5}>
|
|
||||||
{t('text')}
|
|
||||||
</Text>
|
|
||||||
|
|
||||||
<Paper
|
<Paper
|
||||||
withBorder
|
withBorder
|
||||||
shadow="md"
|
shadow="md"
|
||||||
@@ -53,6 +40,16 @@ export default function AuthenticationTitle() {
|
|||||||
radius="md"
|
radius="md"
|
||||||
style={{ width: '100%', maxWidth: 420 }}
|
style={{ width: '100%', maxWidth: 420 }}
|
||||||
>
|
>
|
||||||
|
<Title
|
||||||
|
align="center"
|
||||||
|
sx={(theme) => ({ fontFamily: `Greycliff CF, ${theme.fontFamily}`, fontWeight: 900 })}
|
||||||
|
>
|
||||||
|
{t('title')}
|
||||||
|
</Title>
|
||||||
|
|
||||||
|
<Text color="dimmed" size="sm" align="center" mt={5}>
|
||||||
|
{t('text')}
|
||||||
|
</Text>
|
||||||
<form
|
<form
|
||||||
onSubmit={form.onSubmit((values) => {
|
onSubmit={form.onSubmit((values) => {
|
||||||
setCookie('password', values.password, {
|
setCookie('password', values.password, {
|
||||||
|
|||||||
Reference in New Issue
Block a user