Commit graph

10 commits

Author SHA1 Message Date
Jakob Meier
1ba36ff9f0
Added option to delete, edit and reorder categories.
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
2023-04-02 13:19:23 +02:00
Jakob Meier
99f0ed3558
Basic Categories Page layout
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?
2023-03-31 21:52:14 +02:00
Jakob Meier
8fffafde47
Added translations using l10n
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.
2023-03-29 15:14:27 +02:00
Jakob Meier
6b98c696ea
Finishied room member screen
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.
2023-03-25 10:31:14 +01:00
Jakob Meier
09f7e4fdd1
Added asset wrapper.
FIXES: Image paths on web
2023-03-24 17:47:47 +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
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
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
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