rename all enums to plural
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import * as React from "bloatless-react";
|
||||
|
||||
import BoardViewModel, {
|
||||
BoardPageType,
|
||||
BoardPageTypes,
|
||||
} from "../../ViewModel/Pages/boardViewModel";
|
||||
|
||||
import { BoardKanbanPage } from "./boardKanbanPage";
|
||||
@@ -22,10 +22,10 @@ export function BoardPage(boardViewModel: BoardViewModel) {
|
||||
[boardViewModel.selectedPage],
|
||||
() => {
|
||||
switch (boardViewModel.selectedPage.value) {
|
||||
case BoardPageType.Kanban: {
|
||||
case BoardPageTypes.Kanban: {
|
||||
return BoardKanbanPage(boardViewModel);
|
||||
}
|
||||
case BoardPageType.StatusGrid: {
|
||||
case BoardPageTypes.StatusGrid: {
|
||||
return BoardStatusGridPage(boardViewModel);
|
||||
}
|
||||
default: {
|
||||
@@ -102,19 +102,19 @@ export function BoardPage(boardViewModel: BoardViewModel) {
|
||||
{BoardViewToggleButton(
|
||||
translations.chatPage.task.listViewButtonAudioLabel,
|
||||
"view_list",
|
||||
BoardPageType.List,
|
||||
BoardPageTypes.List,
|
||||
boardViewModel,
|
||||
)}
|
||||
{BoardViewToggleButton(
|
||||
translations.chatPage.task.kanbanViewButtonAudioLabel,
|
||||
"view_kanban",
|
||||
BoardPageType.Kanban,
|
||||
BoardPageTypes.Kanban,
|
||||
boardViewModel,
|
||||
)}
|
||||
{BoardViewToggleButton(
|
||||
translations.chatPage.task.statusViewButtonAudioLabel,
|
||||
"grid_view",
|
||||
BoardPageType.StatusGrid,
|
||||
BoardPageTypes.StatusGrid,
|
||||
boardViewModel,
|
||||
)}
|
||||
</span>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as React from "bloatless-react";
|
||||
|
||||
import { Color } from "../../colors";
|
||||
import { Colors } from "../../colors";
|
||||
import { ColorPicker } from "../Components/colorPicker";
|
||||
import { DangerousActionButton } from "../Components/dangerousActionButton";
|
||||
import { DeletableListItem } from "../Components/deletableListItem";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import * as React from "bloatless-react";
|
||||
|
||||
import BoardViewModel, {
|
||||
BoardPageType,
|
||||
BoardPageTypes,
|
||||
} from "../../ViewModel/Pages/boardViewModel";
|
||||
|
||||
import { RibbonButton } from "./ribbonButton";
|
||||
@@ -9,7 +9,7 @@ import { RibbonButton } from "./ribbonButton";
|
||||
export function BoardViewToggleButton(
|
||||
label: string,
|
||||
icon: string,
|
||||
page: BoardPageType,
|
||||
page: BoardPageTypes,
|
||||
boardViewModel: BoardViewModel,
|
||||
) {
|
||||
function select() {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import * as React from "bloatless-react";
|
||||
|
||||
import { ChatMessageInfoModal } from "../Modals/chatMessageInfoModal";
|
||||
import { ChatMessageStatus } from "../../Model/Chat/chatModel";
|
||||
import { ChatMessageStatuses } from "../../Model/Chat/chatModel";
|
||||
import ChatMessageViewModel from "../../ViewModel/Chat/chatMessageViewModel";
|
||||
import { translations } from "../translations";
|
||||
import { MessageReactionButtonRow } from "./messageReactionButtonRow";
|
||||
@@ -11,11 +11,11 @@ export function ChatMessage(chatMessageViewModel: ChatMessageViewModel) {
|
||||
[chatMessageViewModel.status],
|
||||
() => {
|
||||
switch (chatMessageViewModel.status.value) {
|
||||
case ChatMessageStatus.Outbox:
|
||||
case ChatMessageStatuses.Outbox:
|
||||
return "hourglass_top";
|
||||
case ChatMessageStatus.Sent:
|
||||
case ChatMessageStatuses.Sent:
|
||||
return "check";
|
||||
case ChatMessageStatus.Received:
|
||||
case ChatMessageStatuses.Received:
|
||||
return "done_all";
|
||||
default:
|
||||
return "warning";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import * as React from "bloatless-react";
|
||||
|
||||
import ChatViewModel, {
|
||||
ChatPageType,
|
||||
ChatPageTypes,
|
||||
} from "../../ViewModel/Chat/chatViewModel";
|
||||
|
||||
import { RibbonButton } from "./ribbonButton";
|
||||
@@ -9,7 +9,7 @@ import { RibbonButton } from "./ribbonButton";
|
||||
export function ChatViewToggleButton(
|
||||
label: string,
|
||||
icon: string,
|
||||
page: ChatPageType,
|
||||
page: ChatPageTypes,
|
||||
chatViewModel: ChatViewModel,
|
||||
) {
|
||||
function select() {
|
||||
@@ -22,7 +22,7 @@ export function ChatViewToggleButton(
|
||||
);
|
||||
|
||||
const isHighlighted = new React.State(false);
|
||||
if (page == ChatPageType.Messages) {
|
||||
if (page == ChatPageTypes.Messages) {
|
||||
chatViewModel.hasUnreadMessages.subscribe(
|
||||
(hasUnreadMessages) => (isHighlighted.value = hasUnreadMessages),
|
||||
);
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import * as React from "bloatless-react";
|
||||
|
||||
import { Color } from "../../colors";
|
||||
import { Colors } from "../../colors";
|
||||
|
||||
export function ColorPicker(selectedColor: React.State<Color>) {
|
||||
export function ColorPicker(selectedColor: React.State<Colors>) {
|
||||
return (
|
||||
<div class="flex-row gap width-input">
|
||||
{...Object.values(Color).map((color) => {
|
||||
{...Object.values(Colors).map((color) => {
|
||||
const isSelected = React.createProxyState(
|
||||
[selectedColor],
|
||||
() => selectedColor.value == color,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import * as React from "bloatless-react";
|
||||
|
||||
import BoardViewModel, {
|
||||
BoardPageType,
|
||||
BoardPageTypes,
|
||||
} from "../../ViewModel/Pages/boardViewModel";
|
||||
|
||||
export function RibbonButton(
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import * as React from "bloatless-react";
|
||||
|
||||
import FileTransferViewModel, {
|
||||
FileTransferModal,
|
||||
FileTransferModals,
|
||||
FileTransferOption,
|
||||
} from "../../ViewModel/Global/fileTransferViewModel";
|
||||
|
||||
@@ -38,7 +38,7 @@ function DirectionSelectionModal(
|
||||
[fileTransferViewModel.presentedModal],
|
||||
() =>
|
||||
fileTransferViewModel.presentedModal.value ==
|
||||
FileTransferModal.DirectionSelection,
|
||||
FileTransferModals.DirectionSelection,
|
||||
);
|
||||
|
||||
const isDisconnected = React.createProxyState(
|
||||
@@ -156,7 +156,7 @@ function FileSelectionModal(fileTransferViewModel: FileTransferViewModel) {
|
||||
[fileTransferViewModel.presentedModal],
|
||||
() =>
|
||||
fileTransferViewModel.presentedModal.value ==
|
||||
FileTransferModal.FileSelection,
|
||||
FileTransferModals.FileSelection,
|
||||
);
|
||||
|
||||
return (
|
||||
@@ -222,7 +222,7 @@ function TransferDataDisplayModal(
|
||||
[fileTransferViewModel.presentedModal],
|
||||
() =>
|
||||
fileTransferViewModel.presentedModal.value ==
|
||||
FileTransferModal.TransferDataDisplay,
|
||||
FileTransferModals.TransferDataDisplay,
|
||||
);
|
||||
|
||||
return (
|
||||
@@ -295,7 +295,7 @@ function TransferDisplayModal(fileTransferViewModel: FileTransferViewModel) {
|
||||
[fileTransferViewModel.presentedModal],
|
||||
() =>
|
||||
fileTransferViewModel.presentedModal.value ==
|
||||
FileTransferModal.TransferDisplay,
|
||||
FileTransferModals.TransferDisplay,
|
||||
);
|
||||
|
||||
return (
|
||||
@@ -361,7 +361,7 @@ function TransferDataInputModal(fileTransferViewModel: FileTransferViewModel) {
|
||||
[fileTransferViewModel.presentedModal],
|
||||
() =>
|
||||
fileTransferViewModel.presentedModal.value ==
|
||||
FileTransferModal.TransferDataInput,
|
||||
FileTransferModals.TransferDataInput,
|
||||
);
|
||||
|
||||
return (
|
||||
@@ -446,7 +446,7 @@ function DataReceptionModal(fileTransferViewModel: FileTransferViewModel) {
|
||||
[fileTransferViewModel.presentedModal],
|
||||
() =>
|
||||
fileTransferViewModel.presentedModal.value ==
|
||||
FileTransferModal.ReceptionDisplay,
|
||||
FileTransferModals.ReceptionDisplay,
|
||||
);
|
||||
|
||||
return (
|
||||
|
||||
@@ -2,7 +2,7 @@ import "./homePage.css";
|
||||
|
||||
import * as React from "bloatless-react";
|
||||
|
||||
import ChatViewModel, { ChatPageType } from "../ViewModel/Chat/chatViewModel";
|
||||
import ChatViewModel, { ChatPageTypes } from "../ViewModel/Chat/chatViewModel";
|
||||
|
||||
import { CalendarPage } from "./ChatPages/calendarPage";
|
||||
import { ChatViewToggleButton } from "./Components/chatViewToggleButton";
|
||||
@@ -18,13 +18,13 @@ export function ChatPage(chatViewModel: ChatViewModel) {
|
||||
chatViewModel.closeSubPages();
|
||||
|
||||
switch (chatViewModel.selectedPage.value) {
|
||||
case ChatPageType.Settings: {
|
||||
case ChatPageTypes.Settings: {
|
||||
return SettingsPage(chatViewModel.settingsPageViewModel);
|
||||
}
|
||||
case ChatPageType.Tasks: {
|
||||
case ChatPageTypes.Tasks: {
|
||||
return TaskPage(chatViewModel.taskPageViewModel);
|
||||
}
|
||||
case ChatPageType.Calendar: {
|
||||
case ChatPageTypes.Calendar: {
|
||||
return CalendarPage(chatViewModel.calendarViewModel);
|
||||
}
|
||||
default: {
|
||||
@@ -88,25 +88,25 @@ export function ChatPage(chatViewModel: ChatViewModel) {
|
||||
{ChatViewToggleButton(
|
||||
translations.chatPage.pages.calendar,
|
||||
"calendar_month",
|
||||
ChatPageType.Calendar,
|
||||
ChatPageTypes.Calendar,
|
||||
chatViewModel,
|
||||
)}
|
||||
{ChatViewToggleButton(
|
||||
translations.chatPage.pages.tasks,
|
||||
"task_alt",
|
||||
ChatPageType.Tasks,
|
||||
ChatPageTypes.Tasks,
|
||||
chatViewModel,
|
||||
)}
|
||||
{ChatViewToggleButton(
|
||||
translations.chatPage.pages.messages,
|
||||
"forum",
|
||||
ChatPageType.Messages,
|
||||
ChatPageTypes.Messages,
|
||||
chatViewModel,
|
||||
)}
|
||||
{ChatViewToggleButton(
|
||||
translations.chatPage.pages.settings,
|
||||
"settings",
|
||||
ChatPageType.Settings,
|
||||
ChatPageTypes.Settings,
|
||||
chatViewModel,
|
||||
)}
|
||||
</span>
|
||||
|
||||
Reference in New Issue
Block a user