1
Fork 0
tildes-shepherd/source/tours/exports.ts

55 lines
1.1 KiB
TypeScript
Raw Normal View History

import {
accountSettingsEventHandlers,
accountSettingsSteps,
homepageEventHandlers,
homepageSteps,
} from "./interface/exports.js";
import {introductionSteps} from "./introduction.js";
export * from "./shared/exports.js";
2023-07-01 10:41:54 +00:00
export enum TourId {
InterfaceAccountSettings = "interface-account-settings",
2023-07-01 10:41:54 +00:00
InterfaceHomepage = "interface-homepage",
Introduction = "introduction",
}
export type TourRequirement = {
mustBeLoggedIn: boolean;
path: string;
};
export type TourIdsAndSteps = Array<
[TourId, TourStepOptions[], TourStepEventHandler[], TourRequirement]
>;
export const tourIdsAndSteps: TourIdsAndSteps = [
[
TourId.Introduction,
introductionSteps,
[],
{
mustBeLoggedIn: false,
path: "/",
},
],
[
TourId.InterfaceAccountSettings,
accountSettingsSteps,
accountSettingsEventHandlers,
{
mustBeLoggedIn: true,
path: "/settings",
},
],
[
TourId.InterfaceHomepage,
homepageSteps,
homepageEventHandlers,
{
mustBeLoggedIn: false,
path: "/",
},
],
];