enable back ability to switch theme from leftpane

pull/1315/head
Audric Ackermann 5 years ago
parent 103962f1eb
commit 39463d2f93
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -368,7 +368,7 @@
// These make key operations available to IPC handlers created in preload.js // These make key operations available to IPC handlers created in preload.js
window.Events = { window.Events = {
getThemeSetting: () => 'dark', // storage.get('theme-setting', 'dark') getThemeSetting: () => storage.get('theme-setting', 'dark'),
setThemeSetting: value => { setThemeSetting: value => {
storage.put('theme-setting', value); storage.put('theme-setting', value);
onChangeTheme(); onChangeTheme();

@ -25,7 +25,7 @@
}, },
applyTheme() { applyTheme() {
const iOS = storage.get('userAgent') === 'OWI'; const iOS = storage.get('userAgent') === 'OWI';
const theme = 'dark'; // storage.get('theme-setting') || 'dark'; const theme = storage.get('theme-setting') || 'dark';
this.$el this.$el
.removeClass('light-theme') .removeClass('light-theme')
.removeClass('dark-theme') .removeClass('dark-theme')

@ -166,7 +166,6 @@ $session-compose-margin: 20px;
&:last-child { &:last-child {
margin: auto auto 0px auto; margin: auto auto 0px auto;
/* Hide theme icon until light theme is ready */ /* Hide theme icon until light theme is ready */
display: none;
} }
&:first-child { &:first-child {

@ -93,11 +93,15 @@ export class ActionsPanel extends React.Component<Props, State> {
}) => { }) => {
const handleClick = onSelect const handleClick = onSelect
? () => { ? () => {
type === SectionType.Profile /* tslint:disable:no-void-expression */
? /* tslint:disable-next-line:no-void-expression */ if (type === SectionType.Profile) {
this.editProfileHandle() this.editProfileHandle()
: /* tslint:disable-next-line:no-void-expression */ } else if (type === SectionType.Moon) {
onSelect(type); window.toggleTheme();
} else {
onSelect(type);
}
/* tslint:enable:no-void-expression */
} }
: undefined; : undefined;

Loading…
Cancel
Save