Fix naming.
This commit is contained in:
parent
a4497739fa
commit
dd03075831
@ -10,8 +10,8 @@ import { tplMUCNoteApp } from '../templates/muc-note-app.js'
|
|||||||
* Custom Element to display the Notes Application.
|
* Custom Element to display the Notes Application.
|
||||||
*/
|
*/
|
||||||
export default class MUCNoteApp extends MUCApp {
|
export default class MUCNoteApp extends MUCApp {
|
||||||
enableSettingName = 'livechat_note_app_restore'
|
restoreSettingName = 'livechat_note_app_restore'
|
||||||
sessionStorangeShowKey = 'livechat-converse-note-app-show'
|
sessionStorageRestoreKey = 'livechat-converse-note-app-show'
|
||||||
|
|
||||||
render () {
|
render () {
|
||||||
return tplMUCNoteApp(this, this.model)
|
return tplMUCNoteApp(this, this.model)
|
||||||
|
@ -10,8 +10,8 @@ import { tplMUCTaskApp } from '../templates/muc-task-app.js'
|
|||||||
* Custom Element to display the Task Application.
|
* Custom Element to display the Task Application.
|
||||||
*/
|
*/
|
||||||
export default class MUCTaskApp extends MUCApp {
|
export default class MUCTaskApp extends MUCApp {
|
||||||
enableSettingName = 'livechat_task_app_restore'
|
restoreSettingName = 'livechat_task_app_restore'
|
||||||
sessionStorangeShowKey = 'livechat-converse-task-app-show'
|
sessionStorageRestoreKey = 'livechat-converse-task-app-show'
|
||||||
|
|
||||||
render () {
|
render () {
|
||||||
return tplMUCTaskApp(this, this.model)
|
return tplMUCTaskApp(this, this.model)
|
||||||
|
@ -11,8 +11,8 @@ import './styles/muc-app.scss'
|
|||||||
* This is an abstract class, should not be called directly.
|
* This is an abstract class, should not be called directly.
|
||||||
*/
|
*/
|
||||||
export class MUCApp extends CustomElement {
|
export class MUCApp extends CustomElement {
|
||||||
enableSettingName = undefined // must be overloaded
|
restoreSettingName = undefined // must be overloaded
|
||||||
sessionStorangeShowKey = undefined // must be overloaded
|
sessionStorageRestoreKey = undefined // must be overloaded
|
||||||
|
|
||||||
static get properties () {
|
static get properties () {
|
||||||
return {
|
return {
|
||||||
@ -23,10 +23,10 @@ export class MUCApp extends CustomElement {
|
|||||||
|
|
||||||
async initialize () {
|
async initialize () {
|
||||||
this.classList.add('livechat-converse-muc-app')
|
this.classList.add('livechat-converse-muc-app')
|
||||||
this.show = this.enableSettingName &&
|
this.show = this.restoreSettingName &&
|
||||||
api.settings.get(this.enableSettingName) &&
|
api.settings.get(this.restoreSettingName) &&
|
||||||
this.sessionStorangeShowKey &&
|
this.sessionStorageRestoreKey &&
|
||||||
(window.sessionStorage?.getItem?.(this.sessionStorangeShowKey) === '1')
|
(window.sessionStorage?.getItem?.(this.sessionStorageRestoreKey) === '1')
|
||||||
|
|
||||||
// we listen for livechatSizeChanged event,
|
// we listen for livechatSizeChanged event,
|
||||||
// and close all apps except the first if small or medium width.
|
// and close all apps except the first if small or medium width.
|
||||||
@ -63,8 +63,8 @@ export class MUCApp extends CustomElement {
|
|||||||
|
|
||||||
toggleApp () {
|
toggleApp () {
|
||||||
this.show = !this.show
|
this.show = !this.show
|
||||||
if (this.sessionStorangeShowKey) {
|
if (this.sessionStorageRestoreKey) {
|
||||||
window.sessionStorage?.setItem?.(this.sessionStorangeShowKey, this.show ? '1' : '')
|
window.sessionStorage?.setItem?.(this.sessionStorageRestoreKey, this.show ? '1' : '')
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user