forked from mystiq/hydrogen-web
add button to export logs
This commit is contained in:
parent
48569c28bc
commit
7dc3707871
2 changed files with 6 additions and 0 deletions
|
@ -110,5 +110,10 @@ export class SettingsViewModel extends ViewModel {
|
||||||
return this.i18n`unknown`;
|
return this.i18n`unknown`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async exportLogs() {
|
||||||
|
const logExport = await this.logger.export();
|
||||||
|
this.platform.saveFileAs(logExport.asBlob(), "logs.json");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,6 +51,7 @@ export class SettingsView extends TemplateView {
|
||||||
t.h3("Application"),
|
t.h3("Application"),
|
||||||
row(vm.i18n`Version`, version),
|
row(vm.i18n`Version`, version),
|
||||||
row(vm.i18n`Storage usage`, vm => `${vm.storageUsage} / ${vm.storageQuota}`),
|
row(vm.i18n`Storage usage`, vm => `${vm.storageUsage} / ${vm.storageQuota}`),
|
||||||
|
row(vm.i18n`Export logs`, t.button({onClick: () => vm.exportLogs()}, "Export")),
|
||||||
])
|
])
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue