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
+27 -1
View File
@@ -23,7 +23,7 @@ class FileLeading extends StatelessWidget {
Widget build(BuildContext context) {
final icon = Icon(iconForFile(file), size: size);
final fileId = file.fileId;
return SizedBox(
final base = SizedBox(
width: size,
height: size,
child: (file.isDirectory || file.hasPreview != true || fileId == null)
@@ -47,5 +47,31 @@ class FileLeading extends StatelessWidget {
),
),
);
// Badge incoming shares (shared with the user by someone else).
if (file.isSharedWithMe != true) return base;
final colors = Theme.of(context).colorScheme;
return Stack(
clipBehavior: Clip.none,
children: [
base,
Positioned(
right: -3,
bottom: -3,
child: Container(
decoration: BoxDecoration(
color: colors.errorContainer,
shape: BoxShape.circle,
),
padding: const EdgeInsets.all(1),
child: Icon(
Icons.people,
size: size * 0.45,
color: colors.onErrorContainer,
),
),
),
],
);
}
}