Commit graph

36 commits

Author SHA1 Message Date
Jakob Meier
0235ec6a83
Fixed android-compilation
NOTE: permissions belong into root section
2023-03-24 17:22:00 +01:00
Jakob Meier
672892e21b
Removed Flexible widget.
FIXES: Bug where signup, signin,
edit room and new room screen would fail to open,
because the Flexible Widget cannot be nested in a
Centered Widget.

NOTE: Turns out the widget was not neccessary at all
2023-03-24 16:42:12 +01:00
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
db5e950a93
Added outbag icon
only tested on web
2023-03-23 10:57:27 +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
5c8c108818
Added server-wide permissions
according to https://codeberg.org/outbag/server/src/branch/dev/src/server/permissions.ts
2023-03-23 10:19:36 +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
7b23b12125
Implemented room member and room info
In preperation for upcoming room screens.

RoomInfo is supposed to be used in conjunction with
the Room class.
They are not merged (Room as a attribut in RoomInfo),
because whilst Room can be stored on disk,
RoomInfo can not.
This is done to prevent tampering with the data
(when offline).

This also makes hiding elements easier when the user is offline,
as we can just pretend, that they do not have the required permission.
2023-03-22 21:12:04 +01:00
Jakob Meier
48c15b244a
Implemented room permission types
Done in preperations for rooms,
and the ability to edit rooms.

Will later be used to hide/show certain elements,
when the user does not meet the criteria
(permissions / admin / owner)
2023-03-22 21:07:29 +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
31a84b5ec7
Rewrote autologin to default to authorized
This is prevents the current route from being reset,
when reloading the tab
and also prevents the welcome screen from showing
(when running on slow connections)

NOTE: This also means that the home screen will be loaded
even if the client has never been logged in.
This means that some functions might return null
2023-03-18 20:24:48 +01:00
Jakob Meier
63155fc6bb
Added basic user authentification & auto-login 2023-03-17 21:08:45 +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
6aab88bbfd
Basic request backend 2023-03-17 21:06:41 +01:00
Jakob Meier
fd1c104e6a
Ported error_as_text from https://codeberg.org/outbag/app/src/branch/develop/deps/outbag-core/src/tools.js 2023-03-17 21:06:23 +01:00
Jakob Meier
fd2e21c328
Ported resolve_url from https://codeberg.org/outbag/app/src/branch/develop/deps/outbag-core/src/resolve_url.js 2023-03-17 21:06:01 +01:00
Jakob Meier
955a01d368
Basic Userdata storage 2023-03-17 21:05:48 +01:00
Jakob Meier
ac32d2419d
Added missing flutter files/folders 2023-03-17 21:05:31 +01:00
Jakob Meier
dfbc152db3
Added Platforms 2023-03-17 21:04:45 +01:00
Jakob Meier
39d7a14b4a
Added basic welcome screen 2023-03-17 09:41:28 +01:00
Jakob Meier
2cbb8fb701
Initial commit 2023-03-17 09:41:08 +01:00