diff options
| author | Owen Jacobson <owen@grimoire.ca> | 2024-10-09 11:45:46 -0400 |
|---|---|---|
| committer | Owen Jacobson <owen@grimoire.ca> | 2024-10-09 11:45:46 -0400 |
| commit | fecc78192ff1ad83c6a2f41e35a65ac189d25c6f (patch) | |
| tree | 481d82e99cf8aad8fe256d8186ae72bcee23bf9f /hi-ui/src/store/logins.js | |
| parent | dd62b823e01934a0f841256fdb17b551091896bf (diff) | |
| parent | 2f0b77e8fd02a137047c8975a573626cd76310ff (diff) | |
Merge branch 'wip/event-vocabulary'
Diffstat (limited to 'hi-ui/src/store/logins.js')
| -rw-r--r-- | hi-ui/src/store/logins.js | 22 |
1 files changed, 22 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..5b45206 --- /dev/null +++ b/hi-ui/src/store/logins.js @@ -0,0 +1,22 @@ +export class Logins { + constructor() { + this.logins = {}; + } + + addLogin(id, name) { + this.logins[id] = name; + return this; + } + + setLogins(logins) { + this.logins = {}; + for (let { id, name } of logins) { + this.addLogin(id, name); + } + return this; + } + + get(id) { + return this.logins[id]; + } +} |
