* Comment model * Framework, model, policy, presenter, api endpoint etc * Iteration, first pass of UI * fixes, refactors * Comment commands * comment socket support * typing indicators * comment component, styling * wip * right sidebar resize * fix: CMD+Enter submit * Add usePersistedState fix: Main page scrolling on comment highlight * drafts * Typing indicator * refactor * policies * Click thread to highlight Improve comment timestamps * padding * Comment menu v1 * Change comments to use editor * Basic comment editing * fix: Hide commenting button when disabled at team level * Enable opening sidebar without mark * Move selected comment to location state * Add comment delete confirmation * Add comment count to document meta * fix: Comment sidebar togglable Add copy link to comment * stash * Restore History changes * Refactor right sidebar to allow for comment animation * Update to new router best practices * stash * Various improvements * stash * Handle click outside * Fix incorrect placeholder in input fix: Input box appearing on other sessions erroneously * stash * fix: Don't leave orphaned child comments * styling * stash * Enable comment toggling again * Edit styling, merge conflicts * fix: Cannot navigate from insights to comments * Remove draft comment mark on click outside * Fix: Empty comment sidebar, tsc * Remove public toggle * fix: All comments are recessed fix: Comments should not be printed * fix: Associated mark should be removed on comment delete * Revert unused changes * Empty state, basic RTL support * Create dont toggle comment mark * Make it feel more snappy * Highlight active comment in text * fix animation * RTL support * Add reply CTA * Translations
121 lines
4.5 KiB
TypeScript
121 lines
4.5 KiB
TypeScript
import ApiKeysStore from "./ApiKeysStore";
|
|
import AuthStore from "./AuthStore";
|
|
import AuthenticationProvidersStore from "./AuthenticationProvidersStore";
|
|
import CollectionGroupMembershipsStore from "./CollectionGroupMembershipsStore";
|
|
import CollectionsStore from "./CollectionsStore";
|
|
import CommentsStore from "./CommentsStore";
|
|
import DialogsStore from "./DialogsStore";
|
|
import DocumentPresenceStore from "./DocumentPresenceStore";
|
|
import DocumentsStore from "./DocumentsStore";
|
|
import EventsStore from "./EventsStore";
|
|
import FileOperationsStore from "./FileOperationsStore";
|
|
import GroupMembershipsStore from "./GroupMembershipsStore";
|
|
import GroupsStore from "./GroupsStore";
|
|
import IntegrationsStore from "./IntegrationsStore";
|
|
import MembershipsStore from "./MembershipsStore";
|
|
import NotificationSettingsStore from "./NotificationSettingsStore";
|
|
import PinsStore from "./PinsStore";
|
|
import PoliciesStore from "./PoliciesStore";
|
|
import RevisionsStore from "./RevisionsStore";
|
|
import SearchesStore from "./SearchesStore";
|
|
import SharesStore from "./SharesStore";
|
|
import StarsStore from "./StarsStore";
|
|
import SubscriptionsStore from "./SubscriptionsStore";
|
|
import ToastsStore from "./ToastsStore";
|
|
import UiStore from "./UiStore";
|
|
import UsersStore from "./UsersStore";
|
|
import ViewsStore from "./ViewsStore";
|
|
import WebhookSubscriptionsStore from "./WebhookSubscriptionStore";
|
|
|
|
export default class RootStore {
|
|
apiKeys: ApiKeysStore;
|
|
auth: AuthStore;
|
|
authenticationProviders: AuthenticationProvidersStore;
|
|
collections: CollectionsStore;
|
|
collectionGroupMemberships: CollectionGroupMembershipsStore;
|
|
comments: CommentsStore;
|
|
dialogs: DialogsStore;
|
|
documents: DocumentsStore;
|
|
events: EventsStore;
|
|
groups: GroupsStore;
|
|
groupMemberships: GroupMembershipsStore;
|
|
integrations: IntegrationsStore;
|
|
memberships: MembershipsStore;
|
|
notificationSettings: NotificationSettingsStore;
|
|
presence: DocumentPresenceStore;
|
|
pins: PinsStore;
|
|
policies: PoliciesStore;
|
|
revisions: RevisionsStore;
|
|
searches: SearchesStore;
|
|
shares: SharesStore;
|
|
ui: UiStore;
|
|
stars: StarsStore;
|
|
subscriptions: SubscriptionsStore;
|
|
users: UsersStore;
|
|
views: ViewsStore;
|
|
toasts: ToastsStore;
|
|
fileOperations: FileOperationsStore;
|
|
webhookSubscriptions: WebhookSubscriptionsStore;
|
|
|
|
constructor() {
|
|
// PoliciesStore must be initialized before AuthStore
|
|
this.policies = new PoliciesStore(this);
|
|
this.apiKeys = new ApiKeysStore(this);
|
|
this.authenticationProviders = new AuthenticationProvidersStore(this);
|
|
this.auth = new AuthStore(this);
|
|
this.collections = new CollectionsStore(this);
|
|
this.collectionGroupMemberships = new CollectionGroupMembershipsStore(this);
|
|
this.comments = new CommentsStore(this);
|
|
this.dialogs = new DialogsStore();
|
|
this.documents = new DocumentsStore(this);
|
|
this.events = new EventsStore(this);
|
|
this.groups = new GroupsStore(this);
|
|
this.groupMemberships = new GroupMembershipsStore(this);
|
|
this.integrations = new IntegrationsStore(this);
|
|
this.memberships = new MembershipsStore(this);
|
|
this.pins = new PinsStore(this);
|
|
this.notificationSettings = new NotificationSettingsStore(this);
|
|
this.presence = new DocumentPresenceStore();
|
|
this.revisions = new RevisionsStore(this);
|
|
this.searches = new SearchesStore(this);
|
|
this.shares = new SharesStore(this);
|
|
this.stars = new StarsStore(this);
|
|
this.subscriptions = new SubscriptionsStore(this);
|
|
this.ui = new UiStore();
|
|
this.users = new UsersStore(this);
|
|
this.views = new ViewsStore(this);
|
|
this.fileOperations = new FileOperationsStore(this);
|
|
this.toasts = new ToastsStore();
|
|
this.webhookSubscriptions = new WebhookSubscriptionsStore(this);
|
|
}
|
|
|
|
logout() {
|
|
this.apiKeys.clear();
|
|
this.authenticationProviders.clear();
|
|
// this.auth omitted for reasons...
|
|
this.collections.clear();
|
|
this.collectionGroupMemberships.clear();
|
|
this.comments.clear();
|
|
this.documents.clear();
|
|
this.events.clear();
|
|
this.groups.clear();
|
|
this.groupMemberships.clear();
|
|
this.integrations.clear();
|
|
this.memberships.clear();
|
|
this.notificationSettings.clear();
|
|
this.presence.clear();
|
|
this.pins.clear();
|
|
this.policies.clear();
|
|
this.revisions.clear();
|
|
this.searches.clear();
|
|
this.shares.clear();
|
|
this.stars.clear();
|
|
this.subscriptions.clear();
|
|
this.fileOperations.clear();
|
|
// this.ui omitted to keep ui settings between sessions
|
|
this.users.clear();
|
|
this.views.clear();
|
|
this.webhookSubscriptions.clear();
|
|
}
|
|
}
|