Store sort order and explicit setting to localStorage
This commit is contained in:
parent
d8c92800f3
commit
8853f9882b
30
src/App.vue
30
src/App.vue
|
@ -340,6 +340,9 @@ export default {
|
||||||
});
|
});
|
||||||
LocalStorage.set('videoScale', this.webcam.videoScale);
|
LocalStorage.set('videoScale', this.webcam.videoScale);
|
||||||
},
|
},
|
||||||
|
whoSort() {
|
||||||
|
LocalStorage.set('whoSort', this.whoSort);
|
||||||
|
},
|
||||||
fontSizeClass() {
|
fontSizeClass() {
|
||||||
// Store the setting persistently.
|
// Store the setting persistently.
|
||||||
LocalStorage.set('fontSizeClass', this.fontSizeClass);
|
LocalStorage.set('fontSizeClass', this.fontSizeClass);
|
||||||
|
@ -650,34 +653,40 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Webcam mutality preferences from last broadcast.
|
// Webcam mutality preferences from last broadcast.
|
||||||
if (settings.videoMutual === "true") {
|
if (settings.videoMutual === true) {
|
||||||
this.webcam.mutual = true;
|
this.webcam.mutual = true;
|
||||||
}
|
}
|
||||||
if (settings.videoMutualOpen === "true") {
|
if (settings.videoMutualOpen === true) {
|
||||||
this.webcam.mutualOpen = true;
|
this.webcam.mutualOpen = true;
|
||||||
}
|
}
|
||||||
if (settings.videoAutoMute === "true") {
|
if (settings.videoAutoMute === true) {
|
||||||
this.webcam.autoMute = true;
|
this.webcam.autoMute = true;
|
||||||
}
|
}
|
||||||
if (settings.videoVipOnly === "true") {
|
if (settings.videoVipOnly === true) {
|
||||||
this.webcam.vipOnly = true;
|
this.webcam.vipOnly = true;
|
||||||
}
|
}
|
||||||
|
if (settings.videoExplicit === true) {
|
||||||
|
this.webcam.nsfw = true;
|
||||||
|
}
|
||||||
|
|
||||||
// Misc preferences
|
// Misc preferences
|
||||||
if (settings.joinMessages != undefined) {
|
if (settings.joinMessages != undefined) {
|
||||||
this.prefs.joinMessages = settings.joinMessages === "true";
|
this.prefs.joinMessages = settings.joinMessages === true;
|
||||||
}
|
}
|
||||||
if (settings.exitMessages != undefined) {
|
if (settings.exitMessages != undefined) {
|
||||||
this.prefs.exitMessages = settings.exitMessages === "true";
|
this.prefs.exitMessages = settings.exitMessages === true;
|
||||||
}
|
}
|
||||||
if (settings.watchNotif != undefined) {
|
if (settings.watchNotif != undefined) {
|
||||||
this.prefs.watchNotif = settings.watchNotif === "true";
|
this.prefs.watchNotif = settings.watchNotif === true;
|
||||||
}
|
}
|
||||||
if (settings.muteSounds != undefined) {
|
if (settings.muteSounds != undefined) {
|
||||||
this.prefs.muteSounds = settings.muteSounds === "true";
|
this.prefs.muteSounds = settings.muteSounds === true;
|
||||||
}
|
}
|
||||||
if (settings.closeDMs != undefined) {
|
if (settings.closeDMs != undefined) {
|
||||||
this.prefs.closeDMs = settings.closeDMs === "true";
|
this.prefs.closeDMs = settings.closeDMs === true;
|
||||||
|
}
|
||||||
|
if (settings.whoSort != undefined) {
|
||||||
|
this.whoSort = settings.whoSort;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -850,7 +859,7 @@ export default {
|
||||||
// The server can set our webcam NSFW flag.
|
// The server can set our webcam NSFW flag.
|
||||||
let myNSFW = this.webcam.nsfw;
|
let myNSFW = this.webcam.nsfw;
|
||||||
let theirNSFW = (msg.video & this.VideoFlag.NSFW) > 0;
|
let theirNSFW = (msg.video & this.VideoFlag.NSFW) > 0;
|
||||||
if (myNSFW != theirNSFW) {
|
if (this.webcam.active && myNSFW != theirNSFW) {
|
||||||
this.webcam.nsfw = theirNSFW;
|
this.webcam.nsfw = theirNSFW;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1693,6 +1702,7 @@ export default {
|
||||||
LocalStorage.set('videoMutualOpen', this.webcam.mutualOpen);
|
LocalStorage.set('videoMutualOpen', this.webcam.mutualOpen);
|
||||||
LocalStorage.set('videoAutoMute', this.webcam.autoMute);
|
LocalStorage.set('videoAutoMute', this.webcam.autoMute);
|
||||||
LocalStorage.set('videoVipOnly', this.webcam.vipOnly);
|
LocalStorage.set('videoVipOnly', this.webcam.vipOnly);
|
||||||
|
LocalStorage.set('videoExplicit', this.webcam.nsfw);
|
||||||
|
|
||||||
// Auto-mute our camera? Two use cases:
|
// Auto-mute our camera? Two use cases:
|
||||||
// 1. The user marked their cam as muted but then changed video device,
|
// 1. The user marked their cam as muted but then changed video device,
|
||||||
|
|
|
@ -5,12 +5,14 @@ const keys = {
|
||||||
'imageDisplaySetting': String, // Show/hide/expand image preference
|
'imageDisplaySetting': String, // Show/hide/expand image preference
|
||||||
'scrollback': Number, // Scrollback buffer (int)
|
'scrollback': Number, // Scrollback buffer (int)
|
||||||
'preferredDeviceNames': Object, // Webcam/mic device names (object, keys video,audio)
|
'preferredDeviceNames': Object, // Webcam/mic device names (object, keys video,audio)
|
||||||
|
'whoSort': String, // user's preferred sort order for the Who List
|
||||||
|
|
||||||
// Webcam settings (booleans)
|
// Webcam settings (booleans)
|
||||||
'videoMutual': Boolean,
|
'videoMutual': Boolean,
|
||||||
'videoMutualOpen': Boolean,
|
'videoMutualOpen': Boolean,
|
||||||
'videoAutoMute': Boolean,
|
'videoAutoMute': Boolean,
|
||||||
'videoVipOnly': Boolean,
|
'videoVipOnly': Boolean,
|
||||||
|
'videoExplicit': Boolean, // whether the user turns explicit on by default
|
||||||
|
|
||||||
// Booleans
|
// Booleans
|
||||||
'joinMessages': Boolean,
|
'joinMessages': Boolean,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user