Skip to content

Commit

Permalink
app: Rename nowplaying theme modern to tracklist
Browse files Browse the repository at this point in the history
  • Loading branch information
evanpurkhiser committed Nov 19, 2020
1 parent 18d7638 commit ffe4bae
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/main/configMigrations.ts
Expand Up @@ -24,6 +24,6 @@ export function runConfigMigrations() {
}

set(overlay, {type: 'nowPlaying'});
set(overlay.config, {theme: 'modern'});
set(overlay.config, {theme: 'tracklist'});
})();
}
11 changes: 7 additions & 4 deletions src/overlay/overlays/nowPlaying/index.tsx
Expand Up @@ -17,7 +17,7 @@ import {Tags, availableTags} from './tags';
import ThemeModern from './ThemeModern';

const themes = {
modern: {label: 'Modern', component: ThemeModern},
tracklist: {label: 'Track List', component: ThemeModern},
} as const;

type Theme = keyof typeof themes;
Expand Down Expand Up @@ -56,14 +56,17 @@ const Example: React.FC<{config?: NowPlayingConfig}> = observer(({config}) => {

const history = liveHistory.length === 0 ? demoHistory : liveHistory;

const theme = config?.theme ?? 'modern';
const theme = config?.theme ?? 'tracklist';
const Overlay = themes[theme].component;

const example =
history.length === 0 ? (
<EmptyExample />
) : (
<Overlay config={config ?? {theme: 'modern'}} history={history.slice().reverse()} />
<Overlay
config={config ?? {theme: 'tracklist'}}
history={history.slice().reverse()}
/>
);

return (
Expand Down Expand Up @@ -169,7 +172,7 @@ const descriptor: OverlayDescriptor<TaggedNowPlaying> = {
example: Example,
configInterface: ConfigInterface,
defaultConfig: {
theme: 'modern',
theme: 'tracklist',
historyCount: 4,
tags: ['album', 'label', 'comment'],
},
Expand Down

0 comments on commit ffe4bae

Please sign in to comment.