Fix naming.

This commit is contained in:
John Livingston 2024-08-01 17:14:07 +02:00
parent a4497739fa
commit dd03075831
No known key found for this signature in database
GPG Key ID: B17B5640CE66CDBC
3 changed files with 12 additions and 12 deletions

View File

@ -10,8 +10,8 @@ import { tplMUCNoteApp } from '../templates/muc-note-app.js'
* Custom Element to display the Notes Application.
*/
export default class MUCNoteApp extends MUCApp {
enableSettingName = 'livechat_note_app_restore'
sessionStorangeShowKey = 'livechat-converse-note-app-show'
restoreSettingName = 'livechat_note_app_restore'
sessionStorageRestoreKey = 'livechat-converse-note-app-show'
render () {
return tplMUCNoteApp(this, this.model)

View File

@ -10,8 +10,8 @@ import { tplMUCTaskApp } from '../templates/muc-task-app.js'
* Custom Element to display the Task Application.
*/
export default class MUCTaskApp extends MUCApp {
enableSettingName = 'livechat_task_app_restore'
sessionStorangeShowKey = 'livechat-converse-task-app-show'
restoreSettingName = 'livechat_task_app_restore'
sessionStorageRestoreKey = 'livechat-converse-task-app-show'
render () {
return tplMUCTaskApp(this, this.model)

View File

@ -11,8 +11,8 @@ import './styles/muc-app.scss'
* This is an abstract class, should not be called directly.
*/
export class MUCApp extends CustomElement {
enableSettingName = undefined // must be overloaded
sessionStorangeShowKey = undefined // must be overloaded
restoreSettingName = undefined // must be overloaded
sessionStorageRestoreKey = undefined // must be overloaded
static get properties () {
return {
@ -23,10 +23,10 @@ export class MUCApp extends CustomElement {
async initialize () {
this.classList.add('livechat-converse-muc-app')
this.show = this.enableSettingName &&
api.settings.get(this.enableSettingName) &&
this.sessionStorangeShowKey &&
(window.sessionStorage?.getItem?.(this.sessionStorangeShowKey) === '1')
this.show = this.restoreSettingName &&
api.settings.get(this.restoreSettingName) &&
this.sessionStorageRestoreKey &&
(window.sessionStorage?.getItem?.(this.sessionStorageRestoreKey) === '1')
// we listen for livechatSizeChanged event,
// and close all apps except the first if small or medium width.
@ -63,8 +63,8 @@ export class MUCApp extends CustomElement {
toggleApp () {
this.show = !this.show
if (this.sessionStorangeShowKey) {
window.sessionStorage?.setItem?.(this.sessionStorangeShowKey, this.show ? '1' : '')
if (this.sessionStorageRestoreKey) {
window.sessionStorage?.setItem?.(this.sessionStorageRestoreKey, this.show ? '1' : '')
}
if (