diff options
| author | Owen Jacobson <owen@grimoire.ca> | 2024-10-09 00:57:31 -0400 |
|---|---|---|
| committer | Owen Jacobson <owen@grimoire.ca> | 2024-10-09 11:45:31 -0400 |
| commit | ba96974bdebd6d4ec345907d49944b5ee644ed47 (patch) | |
| tree | 8811ef8981a915a8cc17d8a1e576750b31cbdd0b /hi-ui/src/store/logins.js | |
| parent | da1810afc5a627a518131cfb0af0996c5ec60bcf (diff) | |
Provide a view of logins to clients.
Diffstat (limited to 'hi-ui/src/store/logins.js')
| -rw-r--r-- | hi-ui/src/store/logins.js | 21 |
1 files changed, 21 insertions, 0 deletions
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]; + } +} |
