From ba96974bdebd6d4ec345907d49944b5ee644ed47 Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Wed, 9 Oct 2024 00:57:31 -0400 Subject: Provide a view of logins to clients. --- hi-ui/src/store/logins.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 hi-ui/src/store/logins.js (limited to 'hi-ui/src/store/logins.js') diff --git a/hi-ui/src/store/logins.js b/hi-ui/src/store/logins.js new file mode 100644 index 0000000..207b757 --- /dev/null +++ b/hi-ui/src/store/logins.js @@ -0,0 +1,21 @@ +export class Logins { + constructor() { + this.logins = {}; + } + + addLogin(id, name) { + this.logins[id] = name; + return this; + } + + addLogins(logins) { + for (let { id, name } of logins) { + this.addLogin(id, name); + } + return this; + } + + get(id) { + return this.logins[id]; + } +} -- cgit v1.2.3