From 2a892d267fce2d3931e185c7112e29c47dfa5a24 Mon Sep 17 00:00:00 2001 From: ajnart Date: Mon, 2 Jan 2023 02:52:12 +0900 Subject: [PATCH] Animations and login page styling --- .../header/actions/toggle-edit-mode.json | 1 - .../Overview/AvailableElementsOverview.tsx | 8 +++- .../Dashboard/Tiles/Apps/AppTile.tsx | 14 ++++++- .../Actions/ToggleEditMode/ToggleEditMode.tsx | 38 +++++++++---------- src/pages/login.tsx | 23 +++++------ 5 files changed, 48 insertions(+), 36 deletions(-) diff --git a/public/locales/en/layout/header/actions/toggle-edit-mode.json b/public/locales/en/layout/header/actions/toggle-edit-mode.json index 046d259f5..7fce83076 100644 --- a/public/locales/en/layout/header/actions/toggle-edit-mode.json +++ b/public/locales/en/layout/header/actions/toggle-edit-mode.json @@ -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.", "button": { "disabled": "Enter Edit Mode", diff --git a/src/components/Dashboard/Modals/SelectElement/Components/Overview/AvailableElementsOverview.tsx b/src/components/Dashboard/Modals/SelectElement/Components/Overview/AvailableElementsOverview.tsx index 3fb523569..5c45e4f03 100644 --- a/src/components/Dashboard/Modals/SelectElement/Components/Overview/AvailableElementsOverview.tsx +++ b/src/components/Dashboard/Modals/SelectElement/Components/Overview/AvailableElementsOverview.tsx @@ -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" > - {icon} + + {icon} + {name} diff --git a/src/components/Dashboard/Tiles/Apps/AppTile.tsx b/src/components/Dashboard/Tiles/Apps/AppTile.tsx index 1bb038db7..1e9f94d32 100644 --- a/src/components/Dashboard/Tiles/Apps/AppTile.tsx +++ b/src/components/Dashboard/Tiles/Apps/AppTile.tsx @@ -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) => {
{/* eslint-disable-next-line @next/next/no-img-element */} - +
); diff --git a/src/components/layout/header/Actions/ToggleEditMode/ToggleEditMode.tsx b/src/components/layout/header/Actions/ToggleEditMode/ToggleEditMode.tsx index 087352a7b..39d5f78a2 100644 --- a/src/components/layout/header/Actions/ToggleEditMode/ToggleEditMode.tsx +++ b/src/components/layout/header/Actions/ToggleEditMode/ToggleEditMode.tsx @@ -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 ( - - {smallerThanSm ? ( - enabled ? ( - - - - - ) : ( + {smallerThanSm ? ( + enabled ? ( + + - ) - ) : enabled ? ( - - - {enabled && } - + ) : ( + + ) + ) : enabled ? ( + - )} - + {enabled && } + + ) : ( + + )} - +
setPopoverManuallyHidden(true)}> diff --git a/src/pages/login.tsx b/src/pages/login.tsx index ef3eda1bd..cdaf72600 100644 --- a/src/pages/login.tsx +++ b/src/pages/login.tsx @@ -32,19 +32,6 @@ export default function AuthenticationTitle() { justifyContent: 'center', }} > - - ({ fontFamily: `Greycliff CF, ${theme.fontFamily}`, fontWeight: 900 })} - > - {t('title')} - - - - - {t('text')} - - + ({ fontFamily: `Greycliff CF, ${theme.fontFamily}`, fontWeight: 900 })} + > + {t('title')} + + + + {t('text')} +
{ setCookie('password', values.password, {