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:
@@ -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,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user