From deb6602e15c6aeab5525dea53136ca19f73a85cd Mon Sep 17 00:00:00 2001 From: Abhishek Shroff Date: Sun, 4 May 2025 09:35:21 +0530 Subject: [PATCH] [client] Show public shares on info view --- client/lib/ui/explorer/resource_info_view.dart | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/client/lib/ui/explorer/resource_info_view.dart b/client/lib/ui/explorer/resource_info_view.dart index 192bf1a5..e333514e 100644 --- a/client/lib/ui/explorer/resource_info_view.dart +++ b/client/lib/ui/explorer/resource_info_view.dart @@ -1,4 +1,5 @@ import 'dart:async'; +import 'dart:convert'; import 'package:flutter/material.dart'; import 'package:offtheline/offtheline.dart'; @@ -61,6 +62,8 @@ class ResourceInfoView extends StatelessWidget { final repository = context.read().userRepository; final entries = p.entries.toList(growable: false)..sort(((a, b) => a.key.compareTo(b.key))); final other = entries.map((e) => repository.getUserDisplayName(e.key)).join(', '); + final publinks = + resource.publinks == null ? const [] : (jsonDecode(resource.publinks!) as List).cast(); return ListTileTheme( data: ListTileThemeData( @@ -106,6 +109,14 @@ class ResourceInfoView extends StatelessWidget { title: const Text('Others with Access'), subtitle: other.isEmpty ? const Text('--') : Text(other), ), + ListTile( + title: const Text('Public Shares'), + subtitle: publinks.isEmpty ? const Text('--') : Text(publinks.join(', ')), + trailing: IconButton( + icon: const Icon(Icons.add), + onPressed: () {}, + ), + ), ], ), );