diff --git a/server/server.js b/server/server.js index c4d18869e..9b670b767 100644 --- a/server/server.js +++ b/server/server.js @@ -865,6 +865,27 @@ exports.entryPage = "dashboard"; } }); + socket.on("getUsername", async (callback) => { + try { + checkLogin(socket); + + let user = await R.findOne("user", " id = ? AND active = 1 ", [ + socket.userID, + ]); + + callback({ + ok: true, + data: user.username, + }); + + } catch (e) { + callback({ + ok: false, + msg: e.message, + }); + } + }); + socket.on("getSettings", async (callback) => { try { checkLogin(socket); diff --git a/src/languages/de-DE.js b/src/languages/de-DE.js index 5e69899d8..0e47701e1 100644 --- a/src/languages/de-DE.js +++ b/src/languages/de-DE.js @@ -197,4 +197,5 @@ export default { pushbullet: "Pushbullet", line: "Line Messenger", mattermost: "Mattermost", + "Current User": "Aktueller Benutzer", }; diff --git a/src/languages/en.js b/src/languages/en.js index 4542d72b2..bb8d96357 100644 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -305,4 +305,5 @@ export default { "One record": "One record", "Showing {from} to {to} of {count} records": "Showing {from} to {to} of {count} records", steamApiKeyDescription: "For monitoring a Steam Gameserver you need a steam Web-API key. You can register your api key here: ", + "Current User": "Current User", }; diff --git a/src/pages/Settings.vue b/src/pages/Settings.vue index dc0198531..292098107 100644 --- a/src/pages/Settings.vue +++ b/src/pages/Settings.vue @@ -149,6 +149,7 @@