fix: remove top-bar class on sel manager destruction
Signed-off-by: Varun Patil <radialapps@gmail.com>pull/653/head
parent
395b3aacb5
commit
10002e3686
|
@ -203,14 +203,13 @@ export default defineComponent({
|
|||
];
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
this.setHasTopBar(false);
|
||||
},
|
||||
|
||||
watch: {
|
||||
show() {
|
||||
const klass = 'has-top-bar';
|
||||
if (this.show) {
|
||||
document.body.classList.add(klass);
|
||||
} else {
|
||||
document.body.classList.remove(klass);
|
||||
}
|
||||
show(value: boolean) {
|
||||
this.setHasTopBar(value);
|
||||
},
|
||||
},
|
||||
|
||||
|
@ -269,6 +268,11 @@ export default defineComponent({
|
|||
this.size = this.selection.size;
|
||||
},
|
||||
|
||||
/** Set the has-top-bar class on the body */
|
||||
setHasTopBar(has: boolean) {
|
||||
document.body.classList.toggle('has-top-bar', has);
|
||||
},
|
||||
|
||||
/** Is this fileid (or anything if not specified) selected */
|
||||
has(fileid?: number) {
|
||||
if (fileid === undefined) {
|
||||
|
|
Loading…
Reference in New Issue