diff --git a/images/calendar_placeholder.png b/images/calendar_placeholder.png new file mode 100644 index 000000000..5ae490b6c Binary files /dev/null and b/images/calendar_placeholder.png differ diff --git a/src/routes/Calendar/Calendar.tsx b/src/routes/Calendar/Calendar.tsx index c42c8c809..d13d1fcf5 100644 --- a/src/routes/Calendar/Calendar.tsx +++ b/src/routes/Calendar/Calendar.tsx @@ -6,6 +6,7 @@ import useCalendar from './useCalendar'; import useSelectableInputs from './useSelectableInputs'; import Table from './Table/Table'; import List from './List/List'; +import Placeholder from './Placeholder/Placeholder'; import styles from './Calendar.less'; type Props = { @@ -22,29 +23,34 @@ const Calendar = ({ urlParams }: Props) => { return ( -
-
-
- { - paginationInput !== null ? - - : - null - } + { + profile.auth !== null ? +
+
+
+ { + paginationInput !== null ? + + : + null + } +
+ + + -
- - - + : + + } ); }; diff --git a/src/routes/Calendar/Placeholder/Placeholder.less b/src/routes/Calendar/Placeholder/Placeholder.less new file mode 100644 index 000000000..c57bd958e --- /dev/null +++ b/src/routes/Calendar/Placeholder/Placeholder.less @@ -0,0 +1,90 @@ +// Copyright (C) 2017-2024 Smart code 203358507 + +@import (reference) '~stremio/common/screen-sizes.less'; + +.placeholder { + position: relative; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + height: 100%; + width: 100%; + overflow-y: auto; + + .title { + flex: none; + font-size: 1.75rem; + font-weight: 400; + text-align: center; + color: var(--primary-foreground-color); + margin-bottom: 1rem; + opacity: 0.5; + } + + .image { + flex: none; + height: 14rem; + margin: 1.5rem 0; + } + + .overview { + flex: none; + display: flex; + flex-direction: row; + align-items: center; + gap: 4rem; + margin-bottom: 3rem; + + .point { + display: flex; + flex-direction: row; + align-items: center; + gap: 1.5rem; + width: 18rem; + + .icon { + flex: none; + height: 3.25rem; + width: 3.25rem; + color: var(--primary-foreground-color); + opacity: 0.3; + } + + .text { + flex: auto; + font-size: 1.1rem; + font-size: 500; + color: var(--primary-foreground-color); + opacity: 0.9; + } + } + } + + .button { + flex: none; + justify-content: center; + height: 4rem; + line-height: 4rem; + padding: 0 5rem; + font-size: 1.1rem; + color: var(--primary-foreground-color); + border-radius: 3.5rem; + background-color: var(--overlay-color); + + &:hover { + outline: var(--focus-outline-size) solid var(--primary-foreground-color); + background-color: transparent; + } + } +} + +@media only screen and (max-width: @minimum) { + .placeholder { + padding: 1rem; + + .overview { + flex-direction: column; + } + } +} \ No newline at end of file diff --git a/src/routes/Calendar/Placeholder/Placeholder.tsx b/src/routes/Calendar/Placeholder/Placeholder.tsx new file mode 100644 index 000000000..b514c2295 --- /dev/null +++ b/src/routes/Calendar/Placeholder/Placeholder.tsx @@ -0,0 +1,43 @@ +// Copyright (C) 2017-2024 Smart code 203358507 + +import React from 'react'; +import { useTranslation } from 'react-i18next'; +import Icon from '@stremio/stremio-icons/react'; +import { Button, Image } from 'stremio/common'; +import styles from './Placeholder.less'; + +const Placeholder = () => { + const { t } = useTranslation(); + + return ( +
+
+ {t('CALENDAR_NOT_LOGGED_IN')} +
+ +
+
+ +
+ {t('NOT_LOGGED_IN_NOTIFICATIONS')} +
+
+
+ +
+ {t('NOT_LOGGED_IN_CALENDAR')} +
+
+
+ +
+ ); +}; + +export default Placeholder;