-
-
+
+
+
+
+
+ {ChatViewToggleButton(
+ translations.chatPage.pages.calendar,
+ "calendar_month",
+ ChatPageType.Calendar,
+ chatViewModel
+ )}
+ {ChatViewToggleButton(
+ translations.chatPage.pages.progress,
+ "window",
+ ChatPageType.Progress,
+ chatViewModel
+ )}
+ {ChatViewToggleButton(
+ translations.chatPage.pages.kanban,
+ "view_kanban",
+ ChatPageType.Kanban,
+ chatViewModel
+ )}
+ {ChatViewToggleButton(
+ translations.chatPage.pages.allObjects,
+ "deployed_code",
+ ChatPageType.AllObjects,
+ chatViewModel
+ )}
+ {ChatViewToggleButton(
+ translations.chatPage.pages.messages,
+ "forum",
+ ChatPageType.Messages,
+ chatViewModel
+ )}
+ {ChatViewToggleButton(
+ translations.chatPage.pages.settings,
+ "settings",
+ ChatPageType.Settings,
+ chatViewModel
+ )}
+
diff --git a/src/View/translations.ts b/src/View/translations.ts
index 8dc33edb..777f9228 100644
--- a/src/View/translations.ts
+++ b/src/View/translations.ts
@@ -15,15 +15,7 @@ const englishTranslations = {
"Friday",
"Saturday",
],
- abbreviated: [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat",
- ],
+ abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
},
},
@@ -41,8 +33,10 @@ const englishTranslations = {
manageConnectionsAudioLabel: "manage connections",
mailboxHeadline: "Server Mailbox",
- mailboxDisabled: "Mailbox disabled. You will miss out on messages sent while you're away",
- mailboxEnabled: "Mailbox enabled. If you disconnect, the server will keep your messages temporarily",
+ mailboxDisabled:
+ "Mailbox disabled. You will miss out on messages sent while you're away",
+ mailboxEnabled:
+ "Mailbox enabled. If you disconnect, the server will keep your messages temporarily",
outboxHeadline: "Outbox",
outboxAllItemsSent: "All items sent",
@@ -76,7 +70,16 @@ const englishTranslations = {
chatPage: {
closeChatAudioLabe: "close chat",
chatSettingsAudioLabel: "chat settings",
- }
+
+ pages: {
+ settings: "Settings",
+ messages: "Messages",
+ allObjects: "All objects",
+ kanban: "Kanban",
+ calendar: "Calendar",
+ progress: "Progress",
+ },
+ },
};
const allTranslations: { [language: string]: typeof englishTranslations } = {
diff --git a/src/ViewModel/chatViewModel.tsx b/src/ViewModel/chatViewModel.tsx
index c6884f43..fa74e59c 100644
--- a/src/ViewModel/chatViewModel.tsx
+++ b/src/ViewModel/chatViewModel.tsx
@@ -12,6 +12,10 @@ export default class ChatViewModel {
primaryChannel: React.State
= new React.State("");
primaryChannelInput: React.State = new React.State("");
+ selectedPage: React.State = new React.State(
+ ChatPageType.Messages
+ );
+
// guards
cannotSetPrimaryChannel: React.State = React.createProxyState(
[this.primaryChannel, this.primaryChannelInput],
@@ -23,11 +27,11 @@ export default class ChatViewModel {
// methods
open = () => {
this.chatListViewModel.openChat(this);
- }
+ };
close = () => {
this.chatListViewModel.closeChat();
- }
+ };
// init
constructor(chatListViewModel: ChatListViewModel, chatModel: ChatModel) {
@@ -38,3 +42,13 @@ export default class ChatViewModel {
this.primaryChannelInput.value = chatModel.info.primaryChannel;
}
}
+
+// types
+export enum ChatPageType {
+ Settings,
+ Messages,
+ AllObjects,
+ Kanban,
+ Calendar,
+ Progress,
+}