-
-
Notifications
You must be signed in to change notification settings - Fork 106
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 #445 from karrioapi/karrio-admin
[feat] karrio admin
- Loading branch information
Showing
161 changed files
with
35,016 additions
and
1,344 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 +1 @@ | ||
2023.9.3 | ||
2023.9.4 |
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
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,58 @@ | ||
import { ModeIndicator } from '@karrio/ui/components/mode-indicator'; | ||
import { AdminSidebar } from '@karrio/ui/components/admin-sidebar'; | ||
import { AdminNavbar } from '@karrio/ui/components/admin-navbar'; | ||
import { Notifier } from '@karrio/ui/components/notifier'; | ||
import { AppLink } from '@karrio/ui/components/app-link'; | ||
import React from 'react'; | ||
|
||
|
||
export const AdminLayout: React.FC<{ showModeIndicator?: boolean, children?: React.ReactNode }> = ({ children, ...props }) => { | ||
return ( | ||
<> | ||
|
||
<div className="is-flex is-flex-direction-column" style={{ minHeight: '100vh' }}> | ||
{props.showModeIndicator && <ModeIndicator />} | ||
|
||
<Notifier /> | ||
<AdminNavbar /> | ||
|
||
<div className="is-flex is-flex-grow-1" style={{ paddingTop: 0, height: '100%' }}> | ||
<div className="modal-background"></div> | ||
<div className="modal-card admin-modal" style={{ width: '100%' }}> | ||
|
||
<section className="modal-card-body modal-form p-0 pt-5"> | ||
<header className="form-floating-header p-2 is-flex is-justify-content-space-between"> | ||
<span className="icon-text has-text-weight-bold is-size-6"> | ||
<span className="icon"> | ||
<i className="fas fa-tools"></i> | ||
</span> | ||
<span>Administration</span> | ||
</span> | ||
<div> | ||
<AppLink href="/" className="button is-small is-white" shallow={false} prefetch={false}> | ||
<span className="icon is-size-6"> | ||
<i className="fa fa-times"></i> | ||
</span> | ||
</AppLink> | ||
</div> | ||
</header> | ||
|
||
<div className="admin-wrapper is-relative mt-6 p-0"> | ||
|
||
<AdminSidebar /> | ||
|
||
<div className="plex-wrapper" style={{ background: 'inherit', marginLeft: '260px', minHeight: '70vh' }}> | ||
{children} | ||
</div> | ||
|
||
</div> | ||
|
||
</section> | ||
|
||
</div> | ||
</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,20 @@ | ||
import { ExpandedSidebar } from '@karrio/ui/components/expanded-sidebar'; | ||
import { ModeIndicator } from '@karrio/ui/components/mode-indicator'; | ||
import React from 'react'; | ||
|
||
|
||
export const EmbedLayout: React.FC<{ showModeIndicator?: boolean, children?: React.ReactNode }> = ({ children, ...props }) => { | ||
return ( | ||
<> | ||
{props.showModeIndicator && <ModeIndicator />} | ||
<ExpandedSidebar /> | ||
|
||
<div className="plex-wrapper is-relative p-0"> | ||
|
||
{children} | ||
|
||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { AuthenticatedPage } from "@/layouts/authenticated-page"; | ||
import { AdminLayout } from "@/layouts/admin-layout"; | ||
import Head from "next/head"; | ||
|
||
export { getServerSideProps } from "@/context/main"; | ||
|
||
|
||
export default function Page(pageProps: any) { | ||
const { APP_NAME } = (pageProps as any).metadata || {}; | ||
|
||
const Component: React.FC = () => { | ||
|
||
return ( | ||
<> | ||
<header className="px-0 pb-5 pt-1 mb-1"> | ||
<span className="title is-4 has-text-weight-bold">Carrier connections</span> | ||
</header> | ||
</> | ||
); | ||
}; | ||
|
||
return AuthenticatedPage(( | ||
<AdminLayout showModeIndicator={true}> | ||
<Head><title>{`Carriers - ${APP_NAME}`}</title></Head> | ||
|
||
<Component /> | ||
|
||
</AdminLayout> | ||
), pageProps) | ||
} |
Oops, something went wrong.