including the ability to
add item into the shopping cart and remove them.
The click events have been implemented,
however the routes do not exist yet.
NOTE: The shopping list item info sheet is still missing
the unit type and value
and some more advanced options, like deleting the item
NOTE: The click action is removed, if the user doesn't
have the required permission and the drag-handle is not shown.
BUG: Editing the list (in any way, other than reordering it),
wont reload the list - hopefully this will be addressed later,
by caching the categories (or removing them from the cache)
and auto-rebuilding on cache-change
This was caused by doNetworkRequest
introduced in Commit 5d333522a5 (Simplified network requests & snackbars, 2023-03-23),
as it ran asynchronously and thus the blacklist wasn't filled in time.
Planned Flow (unimplemented):
- create new category on /edit-category page using bottom-right fab
- sort categories using the two-line hamburger-style menu on each item
- click on a category to modify/delete it
NOTE: maybe on a different screen or MBS?
Moved AccountMeta provider into <User> context
and migrated to using a FutureProvider to perform the network request
NOTE: Bug was caused by AccountMeta? being loaded late,
causing the root provider to be reloaded.
(only for user, server and theme)
This was done, because localstore is somewhat inconsistent
in terms of events on different platforms.
Also storing user, server and theme using shared-preferences
should fit into flutters ecosystem a little better
Translations are provided in *.arb* format.
Some keys have descriptions
(indicated by leading @-symbol).
Descriptions should not be copied into the translation itself.
Currently only English is supported (app_en.arb),
but German is planned.
Apparently weblate merged .arb support at some time,
so it would be nice to enable community translations at some point.
NOTE: Some bugs have not been fixed, and the member screen needs fixing,
but before that can happen, localstore has to be replaced,
because it causes loops on android and linux.
It also seems like it might lead to memory leaks
Reasons for migration:
- buggy behaviour from old router
- GoRouter is a recommended flutter plugin
- ShellRoutes allow exposing Providers
to a limited scope of routes
- GoRoutes provides named routes,
and the navigator allows us to provide parameters directly.
Every page (after login) has access
to the User object via context.read/watch<User>().
This reduces localstore and asnyc operations,
as the screens do not have to load the user every time.
Additionally this prevents anyone from
using the without a user object.
Added:
- changePassword to change the password
NOTE: this requires the old password,
just to prevent account hijacking.
- some basic user limit information
- theme selector
NOTE: the system theme is meant to function like auto-theme,
and is directly translated into a flutter ThemeMode,
however, this does not appear to be working on the web.
This commit also adds the logout and delete account buttons,
but they do not yet delete all rooms,
nor do they properly logout the user.
BUG: User is not logged out correctly,
reloading the page fixes this.
Maybe localstore.listen does not detect deletion?
The screen allows the user to change the default permission set,
that applies to every member (but not the owner nor the admins).
This screen is only accessible by the owner,
admins or members with the changeAdmin permission.
The screen allows every room member,
to view a list of other room members,
and their role (Owner, Admin or Member).
If the user is allowed
(Owner, Admin, changeAdmin/manageMembers),
to either kick or promote members to the admin role,
the list tile will have a tap event.
NOTE: This is why some members do not have a hover animation.
For example the owner cannot be kicked.
Added SingleChildScrollView to new-room, edit-room
and the about-room tab.
NOTE: Added a padding to the new and edit room pages,
to prevent widgets from touching the screen bottom
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
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
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.
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.
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.
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)
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
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
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