Finalize logging

This commit is contained in:
Tamius Han 2020-02-06 22:29:59 +01:00
parent 435f2890c4
commit 21e24cc226
2 changed files with 8 additions and 4 deletions

View File

@ -8,7 +8,8 @@
<div class="button flex-noshrink button-header"
@click="hidePopup()"
>
Close
<template v-if="logStringified">Finish logging</template>
<template v-else>Hide popup</template>
</div>
<!-- <div class="button flex-noshrink button-header"
@click="stopLogging()"
@ -77,7 +78,7 @@
<div class="button button-bar button-primary"
@click="exportAndQuit()"
>
Export & quit
Export & finish
</div>
</div>
</template>

View File

@ -96,7 +96,6 @@ class Logger {
this.temp_disable = false;
this.stopTime = this.conf.timeout ? performance.now() + (this.conf.timeout * 1000) : undefined;
const ths = this;
const br = currentBrowser.firefox ? browser : chrome;
br.storage.onChanged.addListener( (changes, area) => {
@ -107,7 +106,11 @@ class Logger {
}
}
if (changes['uwLogger'] && changes['uwLogger'].newValue) {
ths.conf = JSON.parse(changes.uwLogger.newValue);
const newConf = JSON.parse(changes.uwLogger.newValue);
if (this.isContentScript && this.conf.allowLogging && !newConf.allowLogging) {
this.saveToVuex();
}
this.conf = newConf;
}
});
}