Commit Graph

354 Commits

Author SHA1 Message Date
projectmoon b9381eecf4 Begin creating logic layer in web UI. 2021-06-20 21:53:45 +00:00
projectmoon 9e0fd44448 Working login flow. 2021-06-17 14:31:18 +00:00
projectmoon 76fbe9a74b Update web-api to Rocket 0.5-rc1 2021-06-14 20:22:11 +00:00
projectmoon 258f7f8b88 Clean up and document index.js file. 2021-06-12 23:00:58 +00:00
projectmoon 4c0d5ea2d8 Refactor auth API client. Implement proper error handling. 2021-06-12 22:55:51 +00:00
projectmoon da3874986f Use Rc instead of Arc for login, as Arc doesn't seem to be required. 2021-06-12 15:21:08 +00:00
projectmoon d082d10c7a Implement basic login component. With funny arc stuff. WTB functional yewdux matching release version of yew. 2021-06-12 15:14:18 +00:00
projectmoon 5986a3611a Implement JWT refreshing. 2021-06-11 22:37:30 +00:00
projectmoon 01e90ea0a1 Use jwt token when calling graphql 2021-06-11 14:24:49 +00:00
projectmoon eeacf01cbe Add login API call for web UI 2021-06-11 13:46:05 +00:00
projectmoon 00742c14a9 Add authentication checking to api 2021-06-10 15:25:44 +00:00
projectmoon 81b4447c84 Remove some proto js definitions from api 2021-06-10 14:15:33 +00:00
projectmoon 96330e13e4 Remove some warnings in API 2021-06-09 15:56:20 +00:00
projectmoon d94451897c Also create a refresh token, and store it as HTTP only cookie. 2021-06-09 15:50:20 +00:00
projectmoon 9a5d765d9b Put JWT secret in rocket.toml. Also, we should remove rocket.toml from the repo. 2021-06-09 15:34:59 +00:00
projectmoon 9b8d5dd2ea Add auth routes and stuff. 2021-06-09 15:26:16 +00:00
projectmoon 1e96ccb307 Fix CORS issues with API 2021-06-08 14:38:21 +00:00
projectmoon 1b57d128c0 Add bootstrap for styling. 2021-06-07 23:15:39 +00:00
projectmoon ab8bc0f25d Change page title. 2021-06-07 22:40:47 +00:00
projectmoon ddb8eae185 Move state to separate file. Fix double rendering problem. 2021-06-07 22:34:05 +00:00
projectmoon aeef9533ea Update to yew 0.18, but with git revs (because yewdux) 2021-06-07 21:53:35 +00:00
projectmoon 60cf7d406a Add proper error handling to web UI. Organize API client in web UI. 2021-06-06 22:32:48 +00:00
projectmoon 57ab6a51da Avoid random clones in API. 2021-06-06 21:22:23 +00:00
projectmoon 05157507aa Working graphql from web UI! 2021-06-06 15:51:46 +00:00
projectmoon e002c9e5c9 Implement get user variable in web ui client. 2021-06-06 14:48:29 +00:00
projectmoon a1a37d418a Add schema generating binary to API server, so we can then proceed with the UI client graphql calls. 2021-06-05 22:31:59 +00:00
projectmoon 6eca450346 Web UI with a functional async-await boundary! 2021-06-05 21:42:41 +00:00
projectmoon 6154bf2c0b Move address of grpc to rpc crate. But why static lifetime? 2021-06-05 15:29:45 +00:00
projectmoon 7a59e6246f Remove some unused stuff 2021-06-05 15:06:03 +00:00
projectmoon 82656bd849 Implement get variable 2021-06-05 14:57:44 +00:00
projectmoon 6dfc9119f7 Working graphql 2021-06-05 14:48:40 +00:00
projectmoon 4776b6f739 WIP on trying to get working graphql server 2021-06-05 14:34:22 +00:00
projectmoon f157c42768 Complete mess with yew, that does not compile! 2021-06-03 20:21:09 +00:00
projectmoon f9d6b7b827 Working grpc-web. Needs tonic master. Next step: attempt same shit with web assembly 2021-06-02 22:52:01 +00:00
projectmoon 764426382a Convert project to workspace with Tonic for gRPC. (#84)
continuous-integration/drone/push Build is passing Details
Convert project to workspace with Tonic for gRPC.

This commit adds an RPC service to the dicebot, allowing external
applications to control it. The project was converted to a cargo
workspace to house the protobuf definitions in a common crate
(tenebrous-rpc), so that clients and servers can make use of these
protobuf definitions.
Co-Authored-By: projectmoon <projectmoon@noreply.git.agnos.is>
Co-Committed-By: projectmoon <projectmoon@noreply.git.agnos.is>
2021-06-02 21:09:58 +00:00
projectmoon b4321721c4 Minor documentation update.
continuous-integration/drone/push Build is passing Details
2021-05-30 22:53:56 +00:00
projectmoon 494d28486e Remove Box<dyn Command> conversion impls for map in macro.
continuous-integration/drone/push Build is passing Details
2021-05-30 22:49:28 +00:00
projectmoon b7393c1907 Use active room in relevant commands.
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2021-05-30 14:19:13 +00:00
projectmoon 3d2eb14cd3 Change room in context to origin_room, add active_room.
The context now knows about origin room (the room where the command
was executed), and the "active room," which is the room that the user
wants the command to apply to. If no active room is defined, then the
origin room acts as the active room. In a public room with the bot,
the active room is also the same as the origin room.
2021-05-30 14:18:56 +00:00
projectmoon 53339282e0 Actually set room when running SetRoomCommand (#79)
continuous-integration/drone/push Build is passing Details
Also sort rooms in get_rooms_for_user for consistency.
Co-Authored-By: projectmoon <projectmoon@noreply.git.agnos.is>
Co-Committed-By: projectmoon <projectmoon@noreply.git.agnos.is>
2021-05-29 20:26:20 +00:00
projectmoon 7050cf037a Remove return statements in Fuseable impl for room search.
continuous-integration/drone/push Build is passing Details
2021-05-29 14:49:24 +00:00
projectmoon 0c0ddafd03 Search for rooms closure as a separate variable.
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2021-05-28 21:19:26 +00:00
projectmoon 7f0bdc1e82 Unit test for search_rooms
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details
2021-05-28 21:13:19 +00:00
projectmoon 0ca7ad4db0 Minor fix to command logging.
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details
2021-05-28 15:08:00 +00:00
projectmoon 59be127430 Implement set room command; common code for list and set rooms.
Adds fuzzy room search that can also set by exact ID, and refactors
the code to get room list for user into a common function and struct
for use by both commands.
2021-05-28 15:08:00 +00:00
projectmoon e9c0a184bd Show room list with preformatted text.
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2021-05-27 20:47:54 +00:00
projectmoon 589d0e0dbf From<String> for ListRoomsCommand
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details
2021-05-27 15:56:15 +00:00
projectmoon 892ccf73e3 Basic list rooms command. Needs formatting.
continuous-integration/drone/push Build is failing Details
continuous-integration/drone/pr Build is failing Details
2021-05-27 15:52:16 +00:00
projectmoon 896acee5ba Avoid cloned command input with From<String> instead of From<&str>.
continuous-integration/drone/push Build is passing Details
2021-05-27 15:50:43 +00:00
projectmoon d70df44d2a Remove MIT notice from bot event handlers
continuous-integration/drone/push Build is passing Details
2021-05-26 22:40:15 +00:00