Merge branch 'feat-no-privateKey' into feat/clients-without-privatekey

This commit is contained in:
Philip H
2024-03-02 14:12:38 +01:00
committed by GitHub
19 changed files with 620 additions and 211 deletions
+7
View File
@@ -43,6 +43,13 @@ class API {
});
}
async getuiTrafficStats() {
return this.call({
method: 'get',
path: '/ui-traffic-stats',
});
}
async getSession() {
return this.call({
method: 'get',
+12 -2
View File
@@ -53,6 +53,7 @@ new Vue({
latestRelease: null,
isDark: null,
uiTrafficStats: false,
chartOptions: {
chart: {
@@ -138,7 +139,7 @@ new Vue({
const clients = await this.api.getClients();
this.clients = clients.map((client) => {
if (client.name.includes('@') && client.name.includes('.')) {
client.avatar = `https://www.gravatar.com/avatar/${sha512(client.name)}?d=blank`;
client.avatar = `https://gravatar.com/avatar/${sha256(client.name.toLowerCase().trim())}.jpg`;
}
if (!this.clientsPersist[client.id]) {
@@ -292,6 +293,15 @@ new Vue({
}).catch(console.error);
}, 1000);
this.api.getuiTrafficStats()
.then((res) => {
this.uiTrafficStats = res;
})
.catch(() => {
console.log('Failed to get ui-traffic-stats');
this.uiTrafficStats = false;
});
Promise.resolve().then(async () => {
const lang = await this.api.getLang();
if (lang !== localStorage.getItem('lang') && i18n.availableLocales.includes(lang)) {
@@ -321,6 +331,6 @@ new Vue({
this.currentRelease = currentRelease;
this.latestRelease = latestRelease;
}).catch(console.error);
}).catch((err) => console.error(err));
},
});
+216
View File
@@ -29,6 +29,33 @@ const messages = { // eslint-disable-line no-unused-vars
madeBy: 'Made by',
donate: 'Donate',
},
ua: {
name: 'Ім`я',
password: 'Пароль',
signIn: 'Увійти',
logout: 'Вихід',
updateAvailable: 'Доступне оновлення!',
update: 'Оновити',
clients: 'Клієнти',
new: 'Новий',
deleteClient: 'Видалити клієнта',
deleteDialog1: 'Ви впевнені, що бажаєте видалити',
deleteDialog2: 'Цю дію неможливо скасувати.',
cancel: 'Скасувати',
create: 'Створити',
createdOn: 'Створено ',
lastSeen: 'Останнє підключення в ',
totalDownload: 'Всього завантажено: ',
totalUpload: 'Всього відправлено: ',
newClient: 'Новий клієнт',
disableClient: 'Вимкнути клієнта',
enableClient: 'Увімкнути клієнта',
noClients: 'Ще немає клієнтів.',
showQR: 'Показати QR-код',
downloadConfig: 'Завантажити конфігурацію',
madeBy: 'Зроблено',
donate: 'Пожертвувати',
},
ru: {
name: 'Имя',
password: 'Пароль',
@@ -301,4 +328,193 @@ const messages = { // eslint-disable-line no-unused-vars
madeBy: 'Được tạo bởi',
donate: 'Ủng hộ',
},
nl: {
name: 'Naam',
password: 'Wachtwoord',
signIn: 'Inloggen',
logout: 'Uitloggen',
updateAvailable: 'Nieuw update beschikbaar!',
update: 'update',
clients: 'clients',
new: 'Nieuw',
deleteClient: 'client verwijderen',
deleteDialog1: 'Weet je zeker dat je wilt verwijderen',
deleteDialog2: 'Deze actie kan niet ongedaan worden gemaakt.',
cancel: 'Annuleren',
create: 'Creëren',
createdOn: 'Gemaakt op ',
lastSeen: 'Laatst gezien op ',
totalDownload: 'Totaal Gedownload: ',
totalUpload: 'Totaal Geupload: ',
newClient: 'Nieuwe client',
disableClient: 'client uitschakelen',
enableClient: 'client inschakelen',
noClients: 'Er zijn nog geen clients.',
showQR: 'QR-code weergeven',
downloadConfig: 'Configuratie downloaden',
madeBy: 'Gemaakt door',
donate: 'Doneren',
},
is: {
name: 'Nafn',
password: 'Lykilorð',
signIn: 'Skrá inn',
logout: 'Útskráning',
updateAvailable: 'Það er uppfærsla í boði!',
update: 'Uppfæra',
clients: 'Viðskiptavinir',
new: 'Nýtt',
deleteClient: 'Eyða viðskiptavin',
deleteDialog1: 'Ertu viss um að þú viljir eyða',
deleteDialog2: 'Þessi aðgerð getur ekki verið afturkallað.',
cancel: 'Hætta við',
create: 'Búa til',
createdOn: 'Búið til á ',
lastSeen: 'Síðast séð á ',
totalDownload: 'Samtals Niðurhlaða: ',
totalUpload: 'Samtals Upphlaða: ',
newClient: 'Nýr Viðskiptavinur',
disableClient: 'Gera viðskiptavin óvirkan',
enableClient: 'Gera viðskiptavin virkan',
noClients: 'Engir viðskiptavinir ennþá.',
showQR: 'Sýna QR-kóða',
downloadConfig: 'Niðurhal Stillingar',
madeBy: 'Gert af',
donate: 'Gefa',
},
pt: {
name: 'Nome',
password: 'Palavra Chave',
signIn: 'Entrar',
logout: 'Sair',
updateAvailable: 'Existe uma atualização disponível!',
update: 'Atualizar',
clients: 'Clientes',
new: 'Novo',
deleteClient: 'Apagar Clientes',
deleteDialog1: 'Tem certeza que pretende apagar',
deleteDialog2: 'Esta ação não pode ser revertida.',
cancel: 'Cancelar',
create: 'Criar',
createdOn: 'Criado em ',
lastSeen: 'Último acesso em ',
totalDownload: 'Total Download: ',
totalUpload: 'Total Upload: ',
newClient: 'Novo Cliente',
disableClient: 'Desativar Cliente',
enableClient: 'Ativar Cliente',
noClients: 'Não existem ainda clientes.',
showQR: 'Apresentar o código QR',
downloadConfig: 'Descarregar Configuração',
madeBy: 'Feito por',
donate: 'Doar',
},
chs: {
name: '名称',
password: '密码',
signIn: '登录',
logout: '退出',
updateAvailable: '有新版本可用!',
update: '更新',
clients: '客户端',
new: '新建',
deleteClient: '删除客户端',
deleteDialog1: '您确定要删除',
deleteDialog2: '此操作无法撤销。',
cancel: '取消',
create: '创建',
createdOn: '创建于 ',
lastSeen: '最后访问于 ',
totalDownload: '总下载: ',
totalUpload: '总上传: ',
newClient: '新建客户端',
disableClient: '禁用客户端',
enableClient: '启用客户端',
noClients: '目前没有客户端。',
showQR: '显示二维码',
downloadConfig: '下载配置',
madeBy: '由',
donate: '捐赠',
},
cht: {
name: '名字',
password: '密碼',
signIn: '登入',
logout: '登出',
updateAvailable: '有新版本可用!',
update: '更新',
clients: '客戶',
new: '新建',
deleteClient: '刪除客戶',
deleteDialog1: '您確定要刪除',
deleteDialog2: '此操作無法撤銷。',
cancel: '取消',
create: '建立',
createdOn: '建立於 ',
lastSeen: '最後訪問於 ',
totalDownload: '總下載: ',
totalUpload: '總上傳: ',
newClient: '新客戶',
disableClient: '禁用客戶',
enableClient: '啟用客戶',
noClients: '目前沒有客戶。',
showQR: '顯示二維碼',
downloadConfig: '下載配置',
madeBy: '由',
donate: '捐贈',
},
it: {
name: 'Nome',
password: 'Password',
signIn: 'Accedi',
logout: 'Esci',
updateAvailable: 'È disponibile un aggiornamento!',
update: 'Aggiorna',
clients: 'Client',
new: 'Nuovo',
deleteClient: 'Elimina Client',
deleteDialog1: 'Sei sicuro di voler eliminare',
deleteDialog2: 'Questa azione non può essere annullata.',
cancel: 'Annulla',
create: 'Crea',
createdOn: 'Creato il ',
lastSeen: 'Visto l\'ultima volta il ',
totalDownload: 'Totale Download: ',
totalUpload: 'Totale Upload: ',
newClient: 'Nuovo Client',
disableClient: 'Disabilita Client',
enableClient: 'Abilita Client',
noClients: 'Non ci sono ancora client.',
showQR: 'Mostra codice QR',
downloadConfig: 'Scarica configurazione',
madeBy: 'Realizzato da',
donate: 'Donazione',
},
th: {
name: 'ชื่อ',
password: 'รหัสผ่าน',
signIn: 'ลงชื่อเข้าใช้',
logout: 'ออกจากระบบ',
updateAvailable: 'มีอัปเดตพร้อมใช้งาน!',
update: 'อัปเดต',
clients: 'Clients',
new: 'ใหม่',
deleteClient: 'ลบ Client',
deleteDialog1: 'คุณแน่ใจหรือไม่ว่าต้องการลบ',
deleteDialog2: 'การกระทำนี้;ไม่สามารถยกเลิกได้',
cancel: 'ยกเลิก',
create: 'สร้าง',
createdOn: 'สร้างเมื่อ ',
lastSeen: 'เห็นครั้งสุดท้ายเมื่อ ',
totalDownload: 'ดาวน์โหลดทั้งหมด: ',
totalUpload: 'อัพโหลดทั้งหมด: ',
newClient: 'Client ใหม่',
disableClient: 'ปิดการใช้งาน Client',
enableClient: 'เปิดการใช้งาน Client',
noClients: 'ยังไม่มี Clients เลย',
showQR: 'แสดงรหัส QR',
downloadConfig: 'ดาวน์โหลดการตั้งค่า',
madeBy: 'สร้างโดย',
donate: 'บริจาค',
},
};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long