diff --git a/client/src/components/MainWindow.tsx b/client/src/components/MainWindow.tsx index d3b73f1..a63d73e 100644 --- a/client/src/components/MainWindow.tsx +++ b/client/src/components/MainWindow.tsx @@ -9,6 +9,7 @@ import ArtistWindow from './windows/ArtistWindow'; import AlbumWindow from './windows/AlbumWindow'; import TagWindow from './windows/TagWindow'; import SongWindow from './windows/SongWindow'; +import ManageTagsWindow from './windows/ManageTagsWindow'; var _ = require('lodash'); const darkTheme = createMuiTheme({ @@ -76,6 +77,7 @@ export default function MainWindow(props: any) { newWindowState[WindowType.Album](), newWindowState[WindowType.Artist](), newWindowState[WindowType.Tag](), + newWindowState[WindowType.ManageTags](), ], tabReducers: [ newWindowReducer[WindowType.Query], @@ -83,6 +85,7 @@ export default function MainWindow(props: any) { newWindowReducer[WindowType.Album], newWindowReducer[WindowType.Artist], newWindowReducer[WindowType.Tag], + newWindowReducer[WindowType.ManageTags], ], tabTypes: [ WindowType.Query, @@ -90,6 +93,7 @@ export default function MainWindow(props: any) { WindowType.Album, WindowType.Artist, WindowType.Tag, + WindowType.ManageTags, ], activeTab: 0 }) @@ -134,6 +138,12 @@ export default function MainWindow(props: any) { dispatch={tabDispatch} mainDispatch={dispatch} /> + case WindowType.ManageTags: + return default: throw new Error("Unimplemented window type"); } diff --git a/client/src/components/windows/ManageTagsWindow.tsx b/client/src/components/windows/ManageTagsWindow.tsx new file mode 100644 index 0000000..81c3d2e --- /dev/null +++ b/client/src/components/windows/ManageTagsWindow.tsx @@ -0,0 +1,26 @@ +import React from 'react'; +import { WindowState } from './Windows'; +var _ = require('lodash'); + +export interface ManageTagsWindowState extends WindowState { +} + +export enum ManageTagsWindowActions { +} + +export function ManageTagsWindowReducer(state: ManageTagsWindowState, action: any) { + switch (action.type) { + default: + throw new Error("Unimplemented ManageTagsWindow state update.") + } +} + +export interface IProps { + state: ManageTagsWindowState, + dispatch: (action: any) => void, + mainDispatch: (action: any) => void, +} + +export default function ManageTagsWindow(props: IProps) { + return <>Hi! +} \ No newline at end of file diff --git a/client/src/components/windows/Windows.tsx b/client/src/components/windows/Windows.tsx index d5840e5..f78d620 100644 --- a/client/src/components/windows/Windows.tsx +++ b/client/src/components/windows/Windows.tsx @@ -6,10 +6,12 @@ import PersonIcon from '@material-ui/icons/Person'; import AlbumIcon from '@material-ui/icons/Album'; import LocalOfferIcon from '@material-ui/icons/LocalOffer'; import AudiotrackIcon from '@material-ui/icons/Audiotrack'; +import LoyaltyIcon from '@material-ui/icons/Loyalty'; import { SongWindowReducer } from './SongWindow'; import { AlbumWindowReducer } from './AlbumWindow'; import { TagWindowReducer } from './TagWindow'; import { songGetters } from '../../lib/songGetters'; +import { ManageTagsWindowReducer } from './ManageTagsWindow'; export enum WindowType { Query = "Query", @@ -17,6 +19,7 @@ export enum WindowType { Album = "Album", Tag = "Tag", Song = "Song", + ManageTags = "ManageTags", } export interface WindowState { @@ -29,6 +32,7 @@ export const newWindowReducer = { [WindowType.Album]: AlbumWindowReducer, [WindowType.Song]: SongWindowReducer, [WindowType.Tag]: TagWindowReducer, + [WindowType.ManageTags]: ManageTagsWindowReducer, } export const newWindowState = { @@ -78,4 +82,9 @@ export const newWindowState = { songsWithTag: null, } }, + [WindowType.ManageTags]: () => { + return { + tabLabel: <>Manage Tags, + } + } } \ No newline at end of file