|
@@ -4,6 +4,7 @@ import { getUserFromCookie } from '@/server/common/session.helpers';
|
|
import { SystemServiceClass } from '@/server/services/system';
|
|
import { SystemServiceClass } from '@/server/services/system';
|
|
import semver from 'semver';
|
|
import semver from 'semver';
|
|
import clsx from 'clsx';
|
|
import clsx from 'clsx';
|
|
|
|
+import { AppServiceClass } from '@/server/services/apps/apps.service';
|
|
import { Header } from './components/Header';
|
|
import { Header } from './components/Header';
|
|
import { PageTitle } from './components/PageTitle';
|
|
import { PageTitle } from './components/PageTitle';
|
|
import styles from './layout.module.scss';
|
|
import styles from './layout.module.scss';
|
|
@@ -12,6 +13,8 @@ import { LayoutActions } from './components/LayoutActions/LayoutActions';
|
|
export default async function DashboardLayout({ children }: { children: React.ReactNode }) {
|
|
export default async function DashboardLayout({ children }: { children: React.ReactNode }) {
|
|
const user = await getUserFromCookie();
|
|
const user = await getUserFromCookie();
|
|
|
|
|
|
|
|
+ const { apps } = await AppServiceClass.listApps();
|
|
|
|
+
|
|
if (!user) {
|
|
if (!user) {
|
|
redirect('/login');
|
|
redirect('/login');
|
|
}
|
|
}
|
|
@@ -28,7 +31,7 @@ export default async function DashboardLayout({ children }: { children: React.Re
|
|
<div className="container-xl">
|
|
<div className="container-xl">
|
|
<div className={clsx(styles.title, 'align-items-stretch align-items-md-center d-flex flex-column flex-md-row ')}>
|
|
<div className={clsx(styles.title, 'align-items-stretch align-items-md-center d-flex flex-column flex-md-row ')}>
|
|
<div className="me-3 text-white">
|
|
<div className="me-3 text-white">
|
|
- <PageTitle />
|
|
|
|
|
|
+ <PageTitle apps={apps} />
|
|
</div>
|
|
</div>
|
|
<div className="flex-fill">
|
|
<div className="flex-fill">
|
|
<LayoutActions />
|
|
<LayoutActions />
|