Skip to content

Commit

Permalink
fix: theme page
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanWalker committed Aug 3, 2016
1 parent 109baea commit 6cbc4ad
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions app/pages/themes-vm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export class ThemesModel extends Observable {

constructor() {
super();
this.set('btnText', 'Default');
this.set('btnText', 'Nina');
}

public switchTheme() {
Expand All @@ -18,11 +18,12 @@ export class ThemesModel extends Observable {
let appPath = knownFolders.currentApp().path + '/';

if (this._toggled) {
this.set('btnText', 'Default');
themes.applyTheme(`${appPath}theme-nina.css`);

} else {
this.set('btnText', 'Nina');
themes.applyTheme(`${appPath}app.css`);
} else {
this.set('btnText', 'Default');
themes.applyTheme(`${appPath}nina-theme.css`);
}

}
Expand Down
2 changes: 1 addition & 1 deletion app/pages/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</ActionBar>
</Page.actionBar>
<StackLayout>
<Button text="{{ 'Change Theme (' + btnText + ')'}}" tap="{{ switchTheme }}" />
<Button text="{{ 'Change Theme to ' + btnText}}" tap="{{ switchTheme }}" />
<Label text="TO DO :)" textWrap="true" />
</StackLayout>
</Page>

0 comments on commit 6cbc4ad

Please sign in to comment.