diff --git a/server/server.js b/server/server.js index c4d18869..9b670b76 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 5e69899d..0e47701e 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 4542d72b..bb8d9635 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 dc019853..29209810 100644 --- a/src/pages/Settings.vue +++ b/src/pages/Settings.vue @@ -149,6 +149,7 @@