Commit graph

21 commits

Author SHA1 Message Date
Jakob Meier
fa734eca15
Moved network requests into seperate method,
called from initState using
WidgetsBinding.instance.addPostFrameCallback

FIXES: bug where edit room would reset
the input field content
2023-03-24 16:33:37 +01:00
Jakob Meier
4775d6923e
Added edit room screen
Data-fetch routine:
fetch room information from server
-> if unsuccessfull load room from disk

The room will automatically be closed,
if either of the following conditions apply:
- the user is offline and no data was found on disk
- the network request returned a server error
2023-03-24 13:25:42 +01:00
Jakob Meier
5d333522a5
Simplified network requests & snackbars
and rewrote the component's network requests.

showSimpleSnackbar, allows displaying a simple snackbar,
with text and one action button, that can be clicked.

doNetworkRequest is supposed to be a wrapper for the
already existing post* functions.
It aims to make network requests and error handling easier,
by containing all the try&catch blocks
and being able to show snackbars.
2023-03-24 13:25:34 +01:00
Jakob Meier
eabb6b93ae
Moved room pages into seperate folder 2023-03-23 14:04:48 +01:00
Jakob Meier
8e02de97c1
Added missing routes
and added a padding around the visibility selector
2023-03-23 11:05:18 +01:00
Jakob Meier
aee9c9f82e
Added server dashboard button to menu
The button is only shown if the user has
any of the management permissions.
2023-03-23 10:53:10 +01:00
Jakob Meier
4ed46929f8
Moved main room screen into room folder 2023-03-23 10:19:14 +01:00
Jakob Meier
c466a19fc9
Added ability to delete or leave room.
NOTE: Only the room owner can delete a room,
but they are not able to leave the room.

BUG: Deleting or leaving the room deletes the room from disk,
but for an unknown reason, the homescreen does not update
and still shows the room.
Opening and closing the room seems to cause the homescreen to
update, removing the room.
2023-03-23 08:58:34 +01:00
Jakob Meier
c54e4f519f
Added about room screen.
NOTE: Some of the route redirect options are still missing.
There should also be a delete Room option
2023-03-22 21:17:03 +01:00
Jakob Meier
f3ac4a502c
Added stub screens
Used as a placeholder,
whilst other screens are currently worked on.

NOTE: there is no finished specification for
Products and Shopping List Items
2023-03-22 21:16:00 +01:00
Jakob Meier
ea2791fac7
Removed unnecessary server attribut in request
Triggered by 9efffabe80
2023-03-22 21:15:05 +01:00
Jakob Meier
69d1892fc8
Renamed /new-room endpoint to /add-room/new
This has been done in an effort
to move all endpoints used to join a room
under one umbrella (/add-room)

A list of planned or completed endpoints:
- /add-room
- /add-room/new
- /add-room/by-id
2023-03-21 20:26:24 +01:00
Jakob Meier
6347476b2f
Finished join-public-room screen
NOTE: If the user is already in a public room,
the room will not be shown in the list.

NOTE: The search funtionality
has not been implemented yet.

NOTE: The join invite-only room screen
will be part of a later commit.
But the endpoint has already been set to
/add-room/by-id
2023-03-21 20:24:48 +01:00
Jakob Meier
596c8cc4eb
Started working on Join Room Screen
Work already done:
- moving the New Room screen to a different endpoint
- fetching public rooms using the post API
- displaying public rooms

Suggestion for user interaction:
1. click on room
2. open bottomSheet with information and join button
3. click "join" to join room
2023-03-20 21:19:25 +01:00
Jakob Meier
f2cbfaf924
Fixed bug where room list was not processed properly
This was caused by a wrong type.

To fix this I updated the type and implemented Room.fromJSON
which should make fetching rooms easier in the future
2023-03-20 20:45:49 +01:00
Jakob Meier
cfd54e3bb5
Added room creation screen
If the room was created successfully,
the wizard automatically saves the room data on disk.
This allows it to be cached,
even if the user loses internet connection
right before the wizard exists.
That way the room will be cached.
2023-03-18 20:28:30 +01:00
Jakob Meier
4bbdcaad4d
Basic home screen
NOTE: Might be a good idea to move the title down,
if no description is available.
If ListTile does not support such feature,
maybe using an alternative might be good idea
2023-03-18 20:27:20 +01:00
Jakob Meier
f2d77e066d
Initialized empty screens 2023-03-17 21:08:29 +01:00
Jakob Meier
4c06208e82
Basic auth screen 2023-03-17 21:07:05 +01:00
Jakob Meier
4c9f9b7627
Improved accessibility 2023-03-17 21:06:54 +01:00
Jakob Meier
39d7a14b4a
Added basic welcome screen 2023-03-17 09:41:28 +01:00