mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-22 19:14:52 +01:00
add button to export logs
This commit is contained in:
parent
48569c28bc
commit
7dc3707871
@ -110,5 +110,10 @@ export class SettingsViewModel extends ViewModel {
|
||||
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"),
|
||||
row(vm.i18n`Version`, version),
|
||||
row(vm.i18n`Storage usage`, vm => `${vm.storageUsage} / ${vm.storageQuota}`),
|
||||
row(vm.i18n`Export logs`, t.button({onClick: () => vm.exportLogs()}, "Export")),
|
||||
])
|
||||
]);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user