- Fixed bug where opening room would show null-error,
for a couple of seconds.
This was caused by the FAB not checking if widget.info!=null
- Added try&catch for item category,
to prevent index-out-of-bounds when the item uses a category
that no longer exists
- Renamed add/remove Articles to fit the new name: ShoppingListItem
- Fixed bug where switching room pages
(list,products,categories,about),
would result an unknown error,
due to setState being called on a widget that isn't mounted.
This was solved by surrounding the setState function,
with a condition to check if the widget is mounted
- Fixed bug where room members weren't recognized as admins
This was caused by a typedifference between the server and the app
(The server now returns booleans,
where as before a ==1 comparison was
needed)
- Fixed bug where successfully closing the admin/kick member dialog,
would crash the application.
This was caused by popping the same context twice.
We are now using two navigator (the outer and the inner one)
Similarily to categories and rooms,
the edit product screen is reused as a new-room screen,
which is especially easy, because the user is unable to select
the product id themselves.
NOTE: the dynamic value-unit input is still missing some "subunits"
The view product screen has links to the edit product page,
the view parent page (if available) and a not yet functional
view children screen.
NOTE: The parent product display should be restricted in width,
and the screen is missing value/unit information.
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
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?
(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.
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.
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)
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
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.
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