Skip to content

Preserve dark mode setting is not working properly #49

Open
@vquelque

Description

@vquelque

Currently, the "preserve dark mode" setting is not working properly, even by uncommenting the required lines in main.js and darkMode.js
The reason is that the value used to set the darkMode key in darkMode.js::localStorage.setItem() should be this.isEnabled ? '1' : '0' instead of this.darkMode ? '1' : '0'.
Indeed, the darkMode ref does not exist.

// You can persist dark mode setting
// if (typeof localStorage !== 'undefined') {
// localStorage.setItem('darkMode', this.darkMode ? '1' : '0')
// }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions