Compare commits
No commits in common. "067a3ff369fb244444d76b00c58f83c19fa35739" and "4478befa8d80774c630818774e58460ed393c2f9" have entirely different histories.
067a3ff369
...
4478befa8d
3 changed files with 16 additions and 11 deletions
|
@ -12,7 +12,13 @@ Includes:
|
|||
## Jumpstart
|
||||
|
||||
1. Install dependencies: `yarn`
|
||||
2. Build everything: `yarn build`
|
||||
2. Build everything
|
||||
```
|
||||
yarn workspace @msagent-chat/msagent.js build
|
||||
yarn workspace @msagent-chat/protocol build
|
||||
yarn workspace @msagent-chat/webapp build
|
||||
yarn workspace @msagent-chat/server build
|
||||
```
|
||||
3. Copy `server/config.example.toml` to `server/config.toml` and fill out the relevant fields.
|
||||
4. Run the server: `yarn workspace @msagent-chat/server serve`
|
||||
5. - Run the webapp on the development webserver: `yarn workspace @msagent-chat/webapp serve`; OR
|
||||
|
|
|
@ -7,8 +7,7 @@
|
|||
"msagent.js"
|
||||
],
|
||||
"scripts": {
|
||||
"format": "prettier --write **/*.{ts,html,scss}",
|
||||
"build": "yarn workspaces foreach -p -A run build"
|
||||
"format": "prettier --write **/*.{ts,html,scss}"
|
||||
},
|
||||
"packageManager": "yarn@4.2.2",
|
||||
"devDependencies": {
|
||||
|
|
|
@ -65,8 +65,8 @@ logonWindow.show();
|
|||
let loggingIn = false;
|
||||
elements.logonForm.addEventListener('submit', (e) => {
|
||||
e.preventDefault();
|
||||
localStorage.setItem('MSAUser', elements.logonUsername.value);
|
||||
localStorage.setItem('MSAgent', elements.agentSelect.value);
|
||||
localStorage.setItem("MSAUser", elements.logonUsername.value);
|
||||
localStorage.setItem("MSAgent", elements.agentSelect.value);
|
||||
connectToRoom();
|
||||
});
|
||||
|
||||
|
@ -97,17 +97,17 @@ async function connectToRoom() {
|
|||
|
||||
document.addEventListener('DOMContentLoaded', async () => {
|
||||
await agentInit();
|
||||
elements.logonUsername.value = localStorage.getItem('MSAUser') || '';
|
||||
let agents = await Room.getAgents();
|
||||
for (const agent of agents) {
|
||||
elements.logonUsername.value = localStorage.getItem("MSAUser") || "";
|
||||
for (const agent of await Room.getAgents()) {
|
||||
let option = document.createElement('option');
|
||||
option.innerText = agent.friendlyName;
|
||||
option.value = agent.filename;
|
||||
elements.agentSelect.appendChild(option);
|
||||
}
|
||||
let savedAgent = localStorage.getItem('MSAgent') || '';
|
||||
if (agents.some((x) => x.filename === savedAgent)) {
|
||||
elements.agentSelect.value = savedAgent;
|
||||
elements.agentSelect.value = localStorage.getItem("MSAgent") || "";
|
||||
if(elements.agentSelect.value === "") {
|
||||
// HTMLSelectElement is like this, don't complain.
|
||||
elements.agentSelect.value = "";
|
||||
}
|
||||
let motd = await Room.getMotd();
|
||||
elements.motdContainer.innerHTML = motd.html;
|
||||
|
|
Loading…
Reference in a new issue