forked from OwnZones/orchestration-gui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from Eyevinn/feat-add-management-lock
feat: add management lock
- Loading branch information
Showing
26 changed files
with
293 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,5 @@ | ||
import { Suspense } from 'react'; | ||
import HeaderNavigation from '../../components/headerNavigation/HeaderNavigation'; | ||
import { useTranslate } from '../../i18n/useTranslate'; | ||
import { LoadingCover } from '../../components/loader/LoadingCover'; | ||
import Inventory from '../../components/inventory/Inventory'; | ||
import { InventoryPageContent } from '../../components/inventory/InventoryPageContent'; | ||
|
||
export default function Page() { | ||
const t = useTranslate(); | ||
|
||
return ( | ||
<> | ||
<HeaderNavigation> | ||
<h1 className="m-2 text-4xl text-p text-center mx-auto"> | ||
{t('inventory')} | ||
</h1> | ||
</HeaderNavigation> | ||
<Suspense fallback={<LoadingCover />}> | ||
<Inventory /> | ||
</Suspense> | ||
</> | ||
); | ||
return <InventoryPageContent />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
'use client'; | ||
import { CreateProduction } from '../createProduction/CreateProduction'; | ||
import { Suspense, useContext } from 'react'; | ||
import { LoadingCover } from '../loader/LoadingCover'; | ||
import ProductionsList from '../productionsList/ProductionsList'; | ||
import { Production } from '../../interfaces/production'; | ||
import { GlobalContext } from '../../contexts/GlobalContext'; | ||
|
||
type HomePageContentProps = { | ||
productions: Production[]; | ||
}; | ||
|
||
export const HomePageContent = ({ productions }: HomePageContentProps) => { | ||
const { locked } = useContext(GlobalContext); | ||
|
||
return ( | ||
<div> | ||
<CreateProduction /> | ||
<div className="flex items-center w-full"> | ||
<Suspense fallback={<LoadingCover />}> | ||
<ProductionsList productions={productions} locked={locked} /> | ||
</Suspense> | ||
</div> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
'use client'; | ||
import { Suspense, useContext } from 'react'; | ||
import { LockButton } from '../lockButton/LockButton'; | ||
import { useTranslate } from '../../i18n/useTranslate'; | ||
import HeaderNavigation from '../headerNavigation/HeaderNavigation'; | ||
import Inventory from './Inventory'; | ||
import { GlobalContext } from '../../contexts/GlobalContext'; | ||
|
||
export const InventoryPageContent = () => { | ||
const t = useTranslate(); | ||
const { locked } = useContext(GlobalContext); | ||
|
||
return ( | ||
<> | ||
<HeaderNavigation> | ||
<div className="flex justify-center items-center w-full"> | ||
<div className="flex space-x-8"> | ||
<h1 className="m-2 text-4xl text-p text-center"> | ||
{t('inventory')} | ||
</h1> | ||
<LockButton /> | ||
</div> | ||
</div> | ||
</HeaderNavigation> | ||
<Suspense> | ||
<Inventory locked={locked} /> | ||
</Suspense> | ||
</> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.