diff --git a/public/PoetsenOne-Regular.ttf b/public/PoetsenOne-Regular.ttf
new file mode 100644
index 000000000..1a89422d7
Binary files /dev/null and b/public/PoetsenOne-Regular.ttf differ
diff --git a/public/imgs/2340450-2.png b/public/imgs/2340450-2.png
new file mode 100644
index 000000000..3d3e6ca12
Binary files /dev/null and b/public/imgs/2340450-2.png differ
diff --git a/src/components/UpgradeModal/CheckUpgradeModal.tsx b/src/components/UpgradeModal/CheckUpgradeModal.tsx
new file mode 100644
index 000000000..c22de6c62
--- /dev/null
+++ b/src/components/UpgradeModal/CheckUpgradeModal.tsx
@@ -0,0 +1,81 @@
+import { Anchor, Button, Group, Image, List, Modal, Text, ThemeIcon, Title } from '@mantine/core';
+import { IconBrandAbstract, IconLock, IconPlug, IconTestPipe } from '@tabler/icons-react';
+import { getCookie, setCookie } from 'cookies-next';
+import localFont from 'next/font/local';
+import { useState } from 'react';
+
+const poetsenOne = localFont({ src: '../../../public/PoetsenOne-Regular.ttf' });
+
+export const CheckUpgradeModal = () => {
+ const [isDismissed, setIsDismissed] = useState(getCookie('dismissed-upgrade-modal'));
+
+ const close = () => {
+ const sevenDays = 7 * 24 * 60 * 60; // 7 days in seconds
+ setCookie('dismissed-upgrade-modal', 'true', {
+ maxAge: sevenDays,
+ path: '/',
+ });
+ setIsDismissed(true);
+ };
+
+ return (
+
+
+ Taking
+ dashboards to
the next
+ level 🚀
+
+ Homarr just got the biggest update ever. It is a complete rewrite. Here's a short summary
+ of it:
+
+
+
+
+ }>
+ Improved integrations system with asynchronous fetching
+ system
+
+
+ }>
+ Detailed permission system
+
+
+ }>
+ Automatic integration testing and centralized management of apps and integrations
+
+
+ }>
+ Reimagined widgets with better design, better UX and more options.
+
+
+
+ Since 1.0 is a breaking
+ release, we require you to manually upgrade to 1.0 and migrate your data over.
+ Please read the migration guide carefully to avoid data loss. Depending in your installation method, you may
+ need to check the migration guides of them respectively. Please backup your data before attempting the
+ migration. This message will not be displayed for the next 7 days, if you acknowledge and close.
+
+
+
+
+
+
+
+ You can permanently disable this message by setting the DISABLE_UPGRADE_MODAL environment variable to true.
+
+
+ );
+};
\ No newline at end of file
diff --git a/src/components/layout/Templates/ManageLayout.tsx b/src/components/layout/Templates/ManageLayout.tsx
index 9ed446e27..07cf897ea 100644
--- a/src/components/layout/Templates/ManageLayout.tsx
+++ b/src/components/layout/Templates/ManageLayout.tsx
@@ -9,7 +9,7 @@ import {
NavLink,
Navbar,
Text,
- ThemeIcon,
+ ThemeIcon, Alert, Anchor,
} from '@mantine/core';
import { useDisclosure } from '@mantine/hooks';
import {
@@ -44,6 +44,7 @@ import { ConditionalWrapper } from '~/utils/security';
import { REPO_URL } from '../../../../data/constants';
import { type navigation } from '../../../../public/locales/en/layout/manage.json';
import { MainHeader } from '../header/Header';
+import { deleteCookie } from "cookies-next";
interface ManageLayoutProps {
children: ReactNode;
@@ -61,6 +62,7 @@ export const ManageLayout = ({ children }: ManageLayoutProps) => {
}).then((res) => res.json()),
});
const { attributes } = usePackageAttributesStore();
+ const router = useRouter();
const newVersionAvailable =
newVersion?.tag_name > `v${attributes.packageVersion}` ? newVersion?.tag_name : undefined;
@@ -247,6 +249,11 @@ export const ManageLayout = ({ children }: ManageLayoutProps) => {
const burgerMenu = screenLargerThanMd ? undefined : (
);
+
+ const showUpgradeInfo = () => {
+ deleteCookie('dismissed-upgrade-modal');
+ router.reload();
+ }
return (
<>
@@ -256,6 +263,11 @@ export const ManageLayout = ({ children }: ManageLayoutProps) => {
{navigationLinkComponents}
+
+
+ This old version of Homarr no longer receives updates. Migrate for updates. Click here for further details
+
+
}
header={}
diff --git a/src/env.js b/src/env.js
index 662856e5d..d85282e62 100644
--- a/src/env.js
+++ b/src/env.js
@@ -40,6 +40,7 @@ const env = createEnv({
DOCKER_HOST: z.string().optional(),
DOCKER_PORT: portSchema,
DEMO_MODE: z.string().optional(),
+ DISABLE_UPGRADE_MODAL: zodParsedBoolean().default('false'),
HOSTNAME: z.string().optional(),
//regex allows number with extra letter as time multiplier, applied with secondsFromTimeString
@@ -165,6 +166,7 @@ const env = createEnv({
AUTH_LOGOUT_REDIRECT_URL: process.env.AUTH_LOGOUT_REDIRECT_URL,
AUTH_SESSION_EXPIRY_TIME: process.env.AUTH_SESSION_EXPIRY_TIME,
DEMO_MODE: process.env.DEMO_MODE,
+ DISABLE_UPGRADE_MODAL: process.env.DISABLE_UPGRADE_MODAL,
},
skipValidation: !!process.env.SKIP_ENV_VALIDATION,
});
diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx
index d3296d752..53442d51d 100644
--- a/src/pages/_app.tsx
+++ b/src/pages/_app.tsx
@@ -34,6 +34,7 @@ import { ConfigType } from '~/types/config';
import { api } from '~/utils/api';
import { colorSchemeParser } from '~/validations/user';
+import { CheckUpgradeModal } from '~/components/UpgradeModal/CheckUpgradeModal';
import { COOKIE_COLOR_SCHEME_KEY, COOKIE_LOCALE_KEY } from '../../data/constants';
import nextI18nextConfig from '../../next-i18next.config.js';
import '../styles/global.scss';
@@ -50,6 +51,7 @@ function App(
editModeEnabled: boolean;
logoutUrl?: string;
analyticsEnabled: boolean;
+ disableUpgradeModal: boolean;
config?: ConfigType;
primaryColor?: MantineTheme['primaryColor'];
secondaryColor?: MantineTheme['primaryColor'];
@@ -103,6 +105,7 @@ function App(
return (
<>
+ {!pageProps.disableUpgradeModal && }
{pageProps.session && pageProps.session.user.language === 'cr' && (
<>
@@ -184,6 +187,7 @@ App.getInitialProps = async ({ ctx }: { ctx: GetServerSidePropsContext }) => {
packageAttributes: getServiceSidePackageAttributes(),
logoutUrl: env.AUTH_LOGOUT_REDIRECT_URL,
analyticsEnabled,
+ disableUpgradeModal: env.DISABLE_UPGRADE_MODAL,
session,
locale: ctx.locale ?? 'en',
},