mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-07 01:15:28 +00:00
feat(theme): add transparency effects toggle
This commit is contained in:
@@ -212,7 +212,7 @@ export default class State {
|
||||
return;
|
||||
}
|
||||
} catch (err) {
|
||||
reportError(err, "redux_migration");
|
||||
reportError(err as any, "redux_migration");
|
||||
}
|
||||
|
||||
// Load MobX store.
|
||||
|
||||
@@ -29,6 +29,7 @@ export interface ISettings {
|
||||
"appearance:emoji": EmojiPack;
|
||||
"appearance:ligatures": boolean;
|
||||
"appearance:seasonal": boolean;
|
||||
"appearance:transparency": boolean;
|
||||
|
||||
"appearance:theme:base": "dark" | "light";
|
||||
"appearance:theme:overrides": Partial<Overrides>;
|
||||
@@ -140,6 +141,7 @@ export default class Settings
|
||||
if (key === "appearance") {
|
||||
this.remove("appearance:emoji");
|
||||
this.remove("appearance:seasonal");
|
||||
this.remove("appearance:transparency");
|
||||
} else {
|
||||
this.remove("appearance:ligatures");
|
||||
this.remove("appearance:theme:base");
|
||||
@@ -169,6 +171,7 @@ export default class Settings
|
||||
appearance: this.pullKeys([
|
||||
"appearance:emoji",
|
||||
"appearance:seasonal",
|
||||
"appearance:transparency",
|
||||
]),
|
||||
theme: this.pullKeys([
|
||||
"appearance:ligatures",
|
||||
|
||||
@@ -95,7 +95,9 @@ export default class STheme {
|
||||
...this.settings.get("appearance:theme:overrides"),
|
||||
light: this.isLight(),
|
||||
|
||||
"min-opacity": 0,
|
||||
"min-opacity": this.settings.get("appearance:transparency", true)
|
||||
? 0
|
||||
: 1,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user