init
This commit is contained in:
commit
d761a10bf7
102 changed files with 4761 additions and 0 deletions
113
lib/models/modal.ts
Normal file
113
lib/models/modal.ts
Normal file
|
@ -0,0 +1,113 @@
|
|||
import Account from '$lib/components/dashboard/modal/types/Account.svelte';
|
||||
import ChangePassword from '$lib/components/dashboard/modal/types/ChangePassword.svelte';
|
||||
import Customization from '$lib/components/dashboard/modal/types/Customization.svelte';
|
||||
import DeleteWidget from '$lib/components/dashboard/modal/types/DeleteWidget.svelte';
|
||||
import DiscardChanges from '$lib/components/dashboard/modal/types/DiscardChanges.svelte';
|
||||
import EditWidget from '$lib/components/dashboard/modal/types/EditWidget.svelte';
|
||||
import Home from '$lib/components/dashboard/modal/types/Home.svelte';
|
||||
import NewWidget from '$lib/components/dashboard/modal/types/NewWidget.svelte';
|
||||
import NsfwWarning from '$lib/components/dashboard/modal/types/NsfwWarning.svelte';
|
||||
import User from '$lib/components/dashboard/modal/types/User.svelte';
|
||||
import UserPanel from '$lib/components/dashboard/modal/types/UserPanel.svelte';
|
||||
|
||||
enum Align {
|
||||
left = 'LEFT',
|
||||
center = 'CENTER',
|
||||
right = 'RIGHT',
|
||||
unknown = 'UNKNOWN',
|
||||
}
|
||||
|
||||
enum Modal {
|
||||
NsfwWarning,
|
||||
User,
|
||||
NewWidget,
|
||||
EditWidget,
|
||||
DeleteWidget,
|
||||
DiscardChanges,
|
||||
Account,
|
||||
Home,
|
||||
ChangePassword,
|
||||
UserPanel,
|
||||
Customization,
|
||||
}
|
||||
|
||||
export interface ModalType {
|
||||
component:
|
||||
| typeof NsfwWarning
|
||||
| typeof User
|
||||
| typeof NewWidget
|
||||
| typeof EditWidget
|
||||
| typeof DeleteWidget
|
||||
| typeof DiscardChanges
|
||||
| typeof Account
|
||||
| typeof Home
|
||||
| typeof ChangePassword
|
||||
| typeof UserPanel
|
||||
| typeof Customization;
|
||||
container?: {
|
||||
invisible?: boolean;
|
||||
verticalEnd?: boolean;
|
||||
align?: Align;
|
||||
};
|
||||
transition?: {
|
||||
x?: number;
|
||||
y?: number;
|
||||
};
|
||||
path?: string;
|
||||
navbarMount?: boolean;
|
||||
}
|
||||
|
||||
export const type: ModalType[] = [
|
||||
{ component: NsfwWarning },
|
||||
{
|
||||
component: User,
|
||||
container: {
|
||||
invisible: true,
|
||||
verticalEnd: true,
|
||||
align: Align.left,
|
||||
},
|
||||
transition: {
|
||||
x: -25,
|
||||
y: 0,
|
||||
},
|
||||
},
|
||||
{
|
||||
component: NewWidget,
|
||||
path: '/dashboard/editor',
|
||||
navbarMount: true,
|
||||
},
|
||||
{
|
||||
component: EditWidget,
|
||||
path: '/dashboard/editor',
|
||||
navbarMount: true,
|
||||
},
|
||||
{ component: DeleteWidget, path: '/dashboard/editor' },
|
||||
{ component: DiscardChanges, path: '/dashboard/editor' },
|
||||
{
|
||||
component: Account,
|
||||
path: '/dashboard/editor',
|
||||
navbarMount: true,
|
||||
},
|
||||
{
|
||||
component: Home,
|
||||
path: '/dashboard/editor',
|
||||
navbarMount: true,
|
||||
},
|
||||
{
|
||||
component: ChangePassword,
|
||||
path: '/dashboard/editor',
|
||||
navbarMount: true,
|
||||
},
|
||||
{
|
||||
component: UserPanel,
|
||||
path: '/dashboard/editor',
|
||||
navbarMount: true,
|
||||
},
|
||||
{
|
||||
component: Customization,
|
||||
path: '/dashboard/editor',
|
||||
navbarMount: true,
|
||||
},
|
||||
];
|
||||
|
||||
export default Modal;
|
Loading…
Add table
Add a link
Reference in a new issue