2023-08-11 11:48:33 +00:00
|
|
|
// mobx lite
|
|
|
|
import { enableStaticRendering } from "mobx-react-lite";
|
|
|
|
// store imports
|
2024-05-07 11:54:45 +00:00
|
|
|
import { IInstanceStore, InstanceStore } from "@/store/instance.store";
|
|
|
|
import { IProjectStore, ProjectStore } from "@/store/project";
|
|
|
|
import { IUserStore, UserStore } from "@/store/user/index.store";
|
|
|
|
import { IProfileStore, ProfileStore } from "@/store/user/profile.store";
|
|
|
|
|
2023-09-01 11:12:30 +00:00
|
|
|
import IssueStore, { IIssueStore } from "./issue";
|
|
|
|
import IssueDetailStore, { IIssueDetailStore } from "./issue_details";
|
2023-12-05 11:56:57 +00:00
|
|
|
import { IIssuesFilterStore, IssuesFilterStore } from "./issues/issue-filters.store";
|
2024-04-29 06:42:33 +00:00
|
|
|
import { IMentionsStore, MentionsStore } from "./mentions.store";
|
2023-08-11 11:48:33 +00:00
|
|
|
|
|
|
|
enableStaticRendering(typeof window === "undefined");
|
|
|
|
|
|
|
|
export class RootStore {
|
2024-05-07 11:54:45 +00:00
|
|
|
instance: IInstanceStore;
|
|
|
|
user: IUserStore;
|
|
|
|
profile: IProfileStore;
|
|
|
|
project: IProjectStore;
|
|
|
|
|
2023-08-11 11:48:33 +00:00
|
|
|
issue: IIssueStore;
|
2023-09-01 11:12:30 +00:00
|
|
|
issueDetails: IIssueDetailStore;
|
2023-11-06 15:12:24 +00:00
|
|
|
mentionsStore: IMentionsStore;
|
2023-12-05 11:56:57 +00:00
|
|
|
issuesFilter: IIssuesFilterStore;
|
2023-08-11 11:48:33 +00:00
|
|
|
|
|
|
|
constructor() {
|
2024-05-07 11:54:45 +00:00
|
|
|
this.instance = new InstanceStore(this);
|
2023-08-11 11:48:33 +00:00
|
|
|
this.user = new UserStore(this);
|
2024-04-29 06:42:33 +00:00
|
|
|
this.profile = new ProfileStore(this);
|
2023-08-11 11:48:33 +00:00
|
|
|
this.project = new ProjectStore(this);
|
2024-05-07 11:54:45 +00:00
|
|
|
|
|
|
|
this.issue = new IssueStore(this);
|
2023-09-01 11:12:30 +00:00
|
|
|
this.issueDetails = new IssueDetailStore(this);
|
2023-11-06 15:12:24 +00:00
|
|
|
this.mentionsStore = new MentionsStore(this);
|
2023-12-05 11:56:57 +00:00
|
|
|
this.issuesFilter = new IssuesFilterStore(this);
|
2023-08-11 11:48:33 +00:00
|
|
|
}
|
2024-05-07 11:54:45 +00:00
|
|
|
|
|
|
|
resetOnSignOut = () => {
|
|
|
|
localStorage.setItem("theme", "system");
|
|
|
|
|
|
|
|
this.instance = new InstanceStore(this);
|
|
|
|
this.user = new UserStore(this);
|
|
|
|
this.profile = new ProfileStore(this);
|
|
|
|
this.project = new ProjectStore(this);
|
|
|
|
|
|
|
|
this.issue = new IssueStore(this);
|
|
|
|
this.issueDetails = new IssueDetailStore(this);
|
|
|
|
this.mentionsStore = new MentionsStore(this);
|
|
|
|
this.issuesFilter = new IssuesFilterStore(this);
|
|
|
|
};
|
2023-08-11 11:48:33 +00:00
|
|
|
}
|