Localization + bugfixes

This commit is contained in:
2023-01-18 16:36:29 +01:00
parent 136ad48a5e
commit 878cd62bbe
6 changed files with 27 additions and 11 deletions

View File

@@ -326,11 +326,21 @@ export default class API {
}
async confirmGpgToken(token) {
return this.apiCall("user/confirmGPG", { token: token });
let res = await this.apiCall("user/confirmGPG", { token: token });
if (res.success) {
this.user.gpgKey.confirmed = true;
}
return res;
}
async removeGPG(password) {
return this.apiCall("user/removeGPG", { password: password });
let res = await this.apiCall("user/removeGPG", { password: password });
if (res.success) {
this.user.gpgKey = null;
}
return res;
}
async downloadGPG(userId) {

View File

@@ -215,13 +215,13 @@ export class BoolColumn extends DataColumn {
renderData(L, entry, index) {
let data = super.renderData(L, entry);
return L(data ? "general.true" : "general.false");
return L(data ? "general.yes" : "general.no");
}
}
export class ControlsColumn extends DataColumn {
constructor(buttons = [], params = {}) {
super("general.controls", null, { align: "center", ...params, sortable: false });
constructor(label, buttons = [], params = {}) {
super(label, null, { align: "center", ...params, sortable: false });
this.buttons = buttons;
}