implemented a comprehensive Nextcloud file sharing system with support for user, group, and public link shares with gating based on server-side permissions; added sharing management interfaces including a share sheet; updated the file list with visual badges for incoming shares and improved OCS API response handling.

This commit is contained in:
2026-06-02 21:42:08 +02:00
parent b6d06dd3b4
commit baa26a6e79
33 changed files with 2453 additions and 29 deletions
+22
View File
@@ -15,6 +15,7 @@ import '../state/app/modules/chat/bloc/chat_bloc.dart';
import '../state/app/modules/chat_list/bloc/chat_list_bloc.dart';
import '../state/app/modules/marianum_message/bloc/marianum_message_state.dart';
import '../view/pages/files/files.dart';
import '../view/pages/files/sharing/sharee_picker_page.dart';
import '../view/pages/foreign_timetable/element_picker_page.dart';
import '../view/pages/marianum_message/marianum_message_view.dart';
import '../view/pages/more/feedback/feedback_dialog.dart';
@@ -91,6 +92,27 @@ class AppRoutes {
return result as TimetableElementRef?;
}
/// Opens the user/group picker for sharing a file and resolves to the chosen
/// recipient (or null if dismissed). Which kinds are offered is gated by the
/// Nextcloud sharing capabilities at the call site.
static Future<ShareeRef?> openShareePicker(
BuildContext context, {
required bool allowUsers,
required bool allowGroups,
}) async {
// Push untyped (T = dynamic) and cast the popped result ourselves —
// pushScreen can't carry a concrete non-Widget T (see openElementPicker).
final result = await pushScreen(
context,
withNavBar: false,
screen: ShareePickerPage(
allowUsers: allowUsers,
allowGroups: allowGroups,
),
);
return result as ShareeRef?;
}
static void openMarianumMessage(
BuildContext context,
String basePath,