Changed options menu
This commit is contained in:
@@ -1,9 +1,13 @@
|
||||
PODS:
|
||||
- device_info_plus (0.0.1):
|
||||
- Flutter
|
||||
- Flutter (1.0.0)
|
||||
- flutter_custom_tabs_ios (2.0.0):
|
||||
- Flutter
|
||||
- flutter_native_splash (0.0.1):
|
||||
- Flutter
|
||||
- irondash_engine_context (0.0.1):
|
||||
- Flutter
|
||||
- package_info_plus (0.4.5):
|
||||
- Flutter
|
||||
- path_provider_foundation (0.0.1):
|
||||
@@ -21,20 +25,25 @@ PODS:
|
||||
- shared_preferences_foundation (0.0.1):
|
||||
- Flutter
|
||||
- FlutterMacOS
|
||||
- super_native_extensions (0.0.1):
|
||||
- Flutter
|
||||
- url_launcher_ios (0.0.1):
|
||||
- Flutter
|
||||
- webview_flutter_wkwebview (0.0.1):
|
||||
- Flutter
|
||||
|
||||
DEPENDENCIES:
|
||||
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
|
||||
- Flutter (from `Flutter`)
|
||||
- flutter_custom_tabs_ios (from `.symlinks/plugins/flutter_custom_tabs_ios/ios`)
|
||||
- flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`)
|
||||
- irondash_engine_context (from `.symlinks/plugins/irondash_engine_context/ios`)
|
||||
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
|
||||
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
|
||||
- sentry_flutter (from `.symlinks/plugins/sentry_flutter/ios`)
|
||||
- share_plus (from `.symlinks/plugins/share_plus/ios`)
|
||||
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
|
||||
- super_native_extensions (from `.symlinks/plugins/super_native_extensions/ios`)
|
||||
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
|
||||
- webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/ios`)
|
||||
|
||||
@@ -44,12 +53,16 @@ SPEC REPOS:
|
||||
- SentryPrivate
|
||||
|
||||
EXTERNAL SOURCES:
|
||||
device_info_plus:
|
||||
:path: ".symlinks/plugins/device_info_plus/ios"
|
||||
Flutter:
|
||||
:path: Flutter
|
||||
flutter_custom_tabs_ios:
|
||||
:path: ".symlinks/plugins/flutter_custom_tabs_ios/ios"
|
||||
flutter_native_splash:
|
||||
:path: ".symlinks/plugins/flutter_native_splash/ios"
|
||||
irondash_engine_context:
|
||||
:path: ".symlinks/plugins/irondash_engine_context/ios"
|
||||
package_info_plus:
|
||||
:path: ".symlinks/plugins/package_info_plus/ios"
|
||||
path_provider_foundation:
|
||||
@@ -60,15 +73,19 @@ EXTERNAL SOURCES:
|
||||
:path: ".symlinks/plugins/share_plus/ios"
|
||||
shared_preferences_foundation:
|
||||
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"
|
||||
super_native_extensions:
|
||||
:path: ".symlinks/plugins/super_native_extensions/ios"
|
||||
url_launcher_ios:
|
||||
:path: ".symlinks/plugins/url_launcher_ios/ios"
|
||||
webview_flutter_wkwebview:
|
||||
:path: ".symlinks/plugins/webview_flutter_wkwebview/ios"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
device_info_plus: c6fb39579d0f423935b0c9ce7ee2f44b71b9fce6
|
||||
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
|
||||
flutter_custom_tabs_ios: 62439c843b2691aae516fd50119a01eb9755fff7
|
||||
flutter_native_splash: 52501b97d1c0a5f898d687f1646226c1f93c56ef
|
||||
irondash_engine_context: 3458bf979b90d616ffb8ae03a150bafe2e860cc9
|
||||
package_info_plus: 115f4ad11e0698c8c1c5d8a689390df880f47e85
|
||||
path_provider_foundation: 3784922295ac71e43754bd15e0653ccfd36a147c
|
||||
Sentry: a8d7b373b9f9868442b02a0c425192f693103cbf
|
||||
@@ -76,9 +93,10 @@ SPEC CHECKSUMS:
|
||||
SentryPrivate: 006b24af16828441f70e2ab6adf241bd0a8ad130
|
||||
share_plus: c3fef564749587fc939ef86ffb283ceac0baf9f5
|
||||
shared_preferences_foundation: b4c3b4cddf1c21f02770737f147a3f5da9d39695
|
||||
super_native_extensions: 4916b3c627a9c7fffdc48a23a9eca0b1ac228fa7
|
||||
url_launcher_ios: 6116280ddcfe98ab8820085d8d76ae7449447586
|
||||
webview_flutter_wkwebview: be0f0d33777f1bfd0c9fdcb594786704dbf65f36
|
||||
|
||||
PODFILE CHECKSUM: 819463e6a0290f5a72f145ba7cde16e8b6ef0796
|
||||
|
||||
COCOAPODS: 1.14.3
|
||||
COCOAPODS: 1.15.2
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
/// To regenerate, run: `dart run slang`
|
||||
///
|
||||
/// Locales: 2
|
||||
/// Strings: 350 (175 per locale)
|
||||
/// Strings: 360 (180 per locale)
|
||||
///
|
||||
/// Built on 2024-02-29 at 10:47 UTC
|
||||
/// Built on 2024-02-29 at 17:55 UTC
|
||||
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
@@ -377,8 +377,10 @@ class _StringsBookmarksBookmarkOptionsEn {
|
||||
// Translations
|
||||
String get edit => 'Edit';
|
||||
String get delete => 'Delete';
|
||||
String get unread => 'Unread';
|
||||
String get read => 'Read';
|
||||
String get unread => 'Unread';
|
||||
String get markAsUnread => 'Mark as unread';
|
||||
String get markAsRead => 'Mark as read';
|
||||
String get shareOptions => 'Share options';
|
||||
String get shared => 'Shared';
|
||||
String get archive => 'Archive';
|
||||
@@ -400,6 +402,9 @@ class _StringsBookmarksBookmarkOptionsEn {
|
||||
String get bookmarkUnrchivedSuccessfully => 'Bookmark unarchived successfully.';
|
||||
String get bookmarkNotArchived => 'The bookmark couldn\'t be archived.';
|
||||
String get bookmarkNotUnrchived => 'The bookmark couldn\'t be unarchived.';
|
||||
String get shareThirdPartyApp => 'Share using a third party app';
|
||||
String get shareInternally => 'Share internally';
|
||||
String get unshareInternally => 'Unshare internally';
|
||||
}
|
||||
|
||||
// Path: bookmarks.shareOptions
|
||||
@@ -411,7 +416,7 @@ class _StringsBookmarksShareOptionsEn {
|
||||
// Translations
|
||||
String get shareOptions => 'Share options';
|
||||
String get shareInternally => 'Share internally';
|
||||
String get unshareInternally => 'Unhare internally';
|
||||
String get unshareInternally => 'Unshare internally';
|
||||
String get shareInternallyDescription => 'Share internally with the rest of the users of this Linkding instance';
|
||||
String get unshareInternallyDescription => 'Unshare this internally shared bookmark';
|
||||
String get shareExternally => 'Share bookmark URL externally';
|
||||
@@ -748,8 +753,10 @@ class _StringsBookmarksBookmarkOptionsEs implements _StringsBookmarksBookmarkOpt
|
||||
// Translations
|
||||
@override String get edit => 'Editar';
|
||||
@override String get delete => 'Eliminar';
|
||||
@override String get unread => 'No leído';
|
||||
@override String get read => 'Leído';
|
||||
@override String get unread => 'No leído';
|
||||
@override String get markAsUnread => 'Marcar como no leído';
|
||||
@override String get markAsRead => 'Marcar como leído';
|
||||
@override String get shareOptions => 'Opciones de compartir';
|
||||
@override String get shared => 'Compartido';
|
||||
@override String get archive => 'Archivar';
|
||||
@@ -771,6 +778,9 @@ class _StringsBookmarksBookmarkOptionsEs implements _StringsBookmarksBookmarkOpt
|
||||
@override String get bookmarkUnrchivedSuccessfully => 'Marcador desarchivado correctamente.';
|
||||
@override String get bookmarkNotArchived => 'El marcador no pudo ser archivado.';
|
||||
@override String get bookmarkNotUnrchived => 'El marcador no pudo ser desarchivado.';
|
||||
@override String get shareThirdPartyApp => 'Compartir usando una app de terceros';
|
||||
@override String get shareInternally => 'Compartir internamente';
|
||||
@override String get unshareInternally => 'Descompartir internamente';
|
||||
}
|
||||
|
||||
// Path: bookmarks.shareOptions
|
||||
@@ -959,8 +969,10 @@ extension on Translations {
|
||||
case 'bookmarks.search.inputtedSearchTermNoResults': return 'The inputted search term doesn\'t have any results';
|
||||
case 'bookmarks.bookmarkOptions.edit': return 'Edit';
|
||||
case 'bookmarks.bookmarkOptions.delete': return 'Delete';
|
||||
case 'bookmarks.bookmarkOptions.unread': return 'Unread';
|
||||
case 'bookmarks.bookmarkOptions.read': return 'Read';
|
||||
case 'bookmarks.bookmarkOptions.unread': return 'Unread';
|
||||
case 'bookmarks.bookmarkOptions.markAsUnread': return 'Mark as unread';
|
||||
case 'bookmarks.bookmarkOptions.markAsRead': return 'Mark as read';
|
||||
case 'bookmarks.bookmarkOptions.shareOptions': return 'Share options';
|
||||
case 'bookmarks.bookmarkOptions.shared': return 'Shared';
|
||||
case 'bookmarks.bookmarkOptions.archive': return 'Archive';
|
||||
@@ -982,9 +994,12 @@ extension on Translations {
|
||||
case 'bookmarks.bookmarkOptions.bookmarkUnrchivedSuccessfully': return 'Bookmark unarchived successfully.';
|
||||
case 'bookmarks.bookmarkOptions.bookmarkNotArchived': return 'The bookmark couldn\'t be archived.';
|
||||
case 'bookmarks.bookmarkOptions.bookmarkNotUnrchived': return 'The bookmark couldn\'t be unarchived.';
|
||||
case 'bookmarks.bookmarkOptions.shareThirdPartyApp': return 'Share using a third party app';
|
||||
case 'bookmarks.bookmarkOptions.shareInternally': return 'Share internally';
|
||||
case 'bookmarks.bookmarkOptions.unshareInternally': return 'Unshare internally';
|
||||
case 'bookmarks.shareOptions.shareOptions': return 'Share options';
|
||||
case 'bookmarks.shareOptions.shareInternally': return 'Share internally';
|
||||
case 'bookmarks.shareOptions.unshareInternally': return 'Unhare internally';
|
||||
case 'bookmarks.shareOptions.unshareInternally': return 'Unshare internally';
|
||||
case 'bookmarks.shareOptions.shareInternallyDescription': return 'Share internally with the rest of the users of this Linkding instance';
|
||||
case 'bookmarks.shareOptions.unshareInternallyDescription': return 'Unshare this internally shared bookmark';
|
||||
case 'bookmarks.shareOptions.shareExternally': return 'Share bookmark URL externally';
|
||||
@@ -1142,8 +1157,10 @@ extension on _StringsEs {
|
||||
case 'bookmarks.search.inputtedSearchTermNoResults': return 'El término de búsqueda introducido no tiene resultados';
|
||||
case 'bookmarks.bookmarkOptions.edit': return 'Editar';
|
||||
case 'bookmarks.bookmarkOptions.delete': return 'Eliminar';
|
||||
case 'bookmarks.bookmarkOptions.unread': return 'No leído';
|
||||
case 'bookmarks.bookmarkOptions.read': return 'Leído';
|
||||
case 'bookmarks.bookmarkOptions.unread': return 'No leído';
|
||||
case 'bookmarks.bookmarkOptions.markAsUnread': return 'Marcar como no leído';
|
||||
case 'bookmarks.bookmarkOptions.markAsRead': return 'Marcar como leído';
|
||||
case 'bookmarks.bookmarkOptions.shareOptions': return 'Opciones de compartir';
|
||||
case 'bookmarks.bookmarkOptions.shared': return 'Compartido';
|
||||
case 'bookmarks.bookmarkOptions.archive': return 'Archivar';
|
||||
@@ -1165,6 +1182,9 @@ extension on _StringsEs {
|
||||
case 'bookmarks.bookmarkOptions.bookmarkUnrchivedSuccessfully': return 'Marcador desarchivado correctamente.';
|
||||
case 'bookmarks.bookmarkOptions.bookmarkNotArchived': return 'El marcador no pudo ser archivado.';
|
||||
case 'bookmarks.bookmarkOptions.bookmarkNotUnrchived': return 'El marcador no pudo ser desarchivado.';
|
||||
case 'bookmarks.bookmarkOptions.shareThirdPartyApp': return 'Compartir usando una app de terceros';
|
||||
case 'bookmarks.bookmarkOptions.shareInternally': return 'Compartir internamente';
|
||||
case 'bookmarks.bookmarkOptions.unshareInternally': return 'Descompartir internamente';
|
||||
case 'bookmarks.shareOptions.shareOptions': return 'Opciones de compartir';
|
||||
case 'bookmarks.shareOptions.shareInternally': return 'Compartir internamente';
|
||||
case 'bookmarks.shareOptions.unshareInternally': return 'Descompartir internamente';
|
||||
|
||||
@@ -98,8 +98,10 @@
|
||||
"bookmarkOptions": {
|
||||
"edit": "Edit",
|
||||
"delete": "Delete",
|
||||
"unread": "Unread",
|
||||
"read": "Read",
|
||||
"unread": "Unread",
|
||||
"markAsUnread": "Mark as unread",
|
||||
"markAsRead": "Mark as read",
|
||||
"shareOptions": "Share options",
|
||||
"shared": "Shared",
|
||||
"archive": "Archive",
|
||||
@@ -120,12 +122,15 @@
|
||||
"bookmarkArchivedSuccessfully": "Bookmark archived successfully.",
|
||||
"bookmarkUnrchivedSuccessfully": "Bookmark unarchived successfully.",
|
||||
"bookmarkNotArchived": "The bookmark couldn't be archived.",
|
||||
"bookmarkNotUnrchived": "The bookmark couldn't be unarchived."
|
||||
"bookmarkNotUnrchived": "The bookmark couldn't be unarchived.",
|
||||
"shareThirdPartyApp": "Share using a third party app",
|
||||
"shareInternally": "Share internally",
|
||||
"unshareInternally": "Unshare internally"
|
||||
},
|
||||
"shareOptions": {
|
||||
"shareOptions": "Share options",
|
||||
"shareInternally": "Share internally",
|
||||
"unshareInternally": "Unhare internally",
|
||||
"unshareInternally": "Unshare internally",
|
||||
"shareInternallyDescription": "Share internally with the rest of the users of this Linkding instance",
|
||||
"unshareInternallyDescription": "Unshare this internally shared bookmark",
|
||||
"shareExternally": "Share bookmark URL externally",
|
||||
|
||||
@@ -98,8 +98,10 @@
|
||||
"bookmarkOptions": {
|
||||
"edit": "Editar",
|
||||
"delete": "Eliminar",
|
||||
"unread": "No leído",
|
||||
"read": "Leído",
|
||||
"unread": "No leído",
|
||||
"markAsUnread": "Marcar como no leído",
|
||||
"markAsRead": "Marcar como leído",
|
||||
"shareOptions": "Opciones de compartir",
|
||||
"shared": "Compartido",
|
||||
"archive": "Archivar",
|
||||
@@ -120,7 +122,10 @@
|
||||
"bookmarkArchivedSuccessfully": "Marcador archivado correctamente.",
|
||||
"bookmarkUnrchivedSuccessfully": "Marcador desarchivado correctamente.",
|
||||
"bookmarkNotArchived": "El marcador no pudo ser archivado.",
|
||||
"bookmarkNotUnrchived": "El marcador no pudo ser desarchivado."
|
||||
"bookmarkNotUnrchived": "El marcador no pudo ser desarchivado.",
|
||||
"shareThirdPartyApp": "Compartir usando una app de terceros",
|
||||
"shareInternally": "Compartir internamente",
|
||||
"unshareInternally": "Descompartir internamente"
|
||||
},
|
||||
"shareOptions": {
|
||||
"shareOptions": "Opciones de compartir",
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:flutter_slidable/flutter_slidable.dart';
|
||||
import 'package:share_plus/share_plus.dart';
|
||||
import 'package:skeletonizer/skeletonizer.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
|
||||
import 'package:linkdy/screens/bookmarks/ui/share_options_modal.dart';
|
||||
import 'package:linkdy/screens/bookmarks/provider/favicon_loader.provider.dart';
|
||||
|
||||
import 'package:linkdy/config/options.dart';
|
||||
import 'package:linkdy/i18n/strings.g.dart';
|
||||
import 'package:linkdy/models/data/bookmarks.dart';
|
||||
import 'package:linkdy/providers/app_status.provider.dart';
|
||||
import 'package:linkdy/utils/date_to_string.dart';
|
||||
import 'package:super_context_menu/super_context_menu.dart';
|
||||
|
||||
class BookmarkItem extends ConsumerWidget {
|
||||
final Bookmark bookmark;
|
||||
@@ -53,63 +52,63 @@ class BookmarkItem extends ConsumerWidget {
|
||||
padding: tabletMode ? const EdgeInsets.symmetric(horizontal: 8) : const EdgeInsets.all(0),
|
||||
child: ClipRRect(
|
||||
borderRadius: tabletMode ? BorderRadius.circular(28) : BorderRadius.circular(0),
|
||||
child: Slidable(
|
||||
key: ValueKey(bookmark.id!),
|
||||
groupTag: ConfigOptions.slidableGroupTag,
|
||||
startActionPane: ActionPane(
|
||||
motion: const DrawerMotion(),
|
||||
extentRatio: 0.75,
|
||||
child: ContextMenuWidget(
|
||||
menuProvider: (request) => Menu(
|
||||
children: [
|
||||
SlidableAction(
|
||||
onPressed: (_) => onReadUnread(bookmark),
|
||||
backgroundColor: Colors.blue,
|
||||
label: bookmark.unread == true ? t.bookmarks.bookmarkOptions.read : t.bookmarks.bookmarkOptions.unread,
|
||||
icon: bookmark.unread == true ? Icons.mark_email_read_rounded : Icons.mark_as_unread_rounded,
|
||||
padding: const EdgeInsets.all(4),
|
||||
MenuAction(
|
||||
callback: () => onReadUnread(bookmark),
|
||||
title: bookmark.unread == true
|
||||
? t.bookmarks.bookmarkOptions.markAsRead
|
||||
: t.bookmarks.bookmarkOptions.markAsUnread,
|
||||
image: MenuImage.icon(
|
||||
bookmark.unread == true ? Icons.mark_email_read_rounded : Icons.mark_as_unread_rounded,
|
||||
),
|
||||
SlidableAction(
|
||||
onPressed: (ctx) => onArchiveUnarchive(bookmark),
|
||||
backgroundColor: Colors.grey,
|
||||
label: bookmark.isArchived == true
|
||||
),
|
||||
MenuAction(
|
||||
callback: () => onArchiveUnarchive(bookmark),
|
||||
title: bookmark.isArchived == true
|
||||
? t.bookmarks.bookmarkOptions.unarchive
|
||||
: t.bookmarks.bookmarkOptions.archive,
|
||||
icon: bookmark.isArchived == true ? Icons.unarchive_rounded : Icons.archive_rounded,
|
||||
padding: const EdgeInsets.all(4),
|
||||
image: MenuImage.icon(
|
||||
bookmark.isArchived == true ? Icons.unarchive_rounded : Icons.archive_rounded,
|
||||
),
|
||||
SlidableAction(
|
||||
onPressed: (ctx) => showDialog(
|
||||
context: context,
|
||||
builder: (ctx) => ShareOptionsModal(bookmark: bookmark, onShareInternally: onShareInternally),
|
||||
),
|
||||
backgroundColor: Colors.orange,
|
||||
label: t.bookmarks.bookmarkOptions.shareOptions,
|
||||
icon: Icons.share_rounded,
|
||||
padding: const EdgeInsets.all(4),
|
||||
Menu(
|
||||
title: t.bookmarks.bookmarkOptions.shareOptions,
|
||||
image: MenuImage.icon(Icons.share_rounded),
|
||||
children: [
|
||||
MenuAction(
|
||||
callback: () => onShareInternally(bookmark),
|
||||
title: bookmark.shared == true
|
||||
? t.bookmarks.bookmarkOptions.unshareInternally
|
||||
: t.bookmarks.bookmarkOptions.shareInternally,
|
||||
image: MenuImage.icon(Icons.input_rounded),
|
||||
),
|
||||
MenuAction(
|
||||
callback: () => Share.shareUri(Uri.parse(bookmark.url!)),
|
||||
title: t.bookmarks.bookmarkOptions.shareThirdPartyApp,
|
||||
image: MenuImage.icon(Icons.output_rounded),
|
||||
),
|
||||
],
|
||||
),
|
||||
endActionPane: ActionPane(
|
||||
motion: const DrawerMotion(),
|
||||
extentRatio: 0.5,
|
||||
children: [
|
||||
SlidableAction(
|
||||
onPressed: (ctx) => onEdit(bookmark),
|
||||
backgroundColor: Colors.green,
|
||||
label: t.bookmarks.bookmarkOptions.edit,
|
||||
icon: Icons.edit_rounded,
|
||||
padding: const EdgeInsets.all(4),
|
||||
MenuSeparator(),
|
||||
MenuAction(
|
||||
callback: () => onEdit(bookmark),
|
||||
title: t.bookmarks.bookmarkOptions.edit,
|
||||
image: MenuImage.icon(Icons.edit_rounded),
|
||||
),
|
||||
SlidableAction(
|
||||
onPressed: (_) => onDelete(bookmark),
|
||||
backgroundColor: Colors.red,
|
||||
label: t.bookmarks.bookmarkOptions.delete,
|
||||
icon: Icons.delete_rounded,
|
||||
padding: const EdgeInsets.all(4),
|
||||
MenuAction(
|
||||
callback: () => onDelete(bookmark),
|
||||
title: t.bookmarks.bookmarkOptions.delete,
|
||||
image: MenuImage.icon(Icons.delete_rounded),
|
||||
attributes: const MenuActionAttributes(destructive: true),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Material(
|
||||
color: selected && tabletMode ? Theme.of(context).colorScheme.primaryContainer : Colors.transparent,
|
||||
color: selected && tabletMode
|
||||
? Theme.of(context).colorScheme.primaryContainer
|
||||
: Theme.of(context).colorScheme.surface,
|
||||
child: InkWell(
|
||||
onTap: () => onSelect(bookmark),
|
||||
child: Padding(
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:flutter_slidable/flutter_slidable.dart';
|
||||
|
||||
import 'package:linkdy/screens/bookmarks/ui/visualization_modal.dart';
|
||||
import 'package:linkdy/screens/bookmarks/provider/bookmarks.provider.dart';
|
||||
@@ -241,8 +240,7 @@ class _List extends ConsumerWidget {
|
||||
),
|
||||
),
|
||||
if (bookmarks.bookmarks.isNotEmpty)
|
||||
SlidableAutoCloseBehavior(
|
||||
child: SliverList.builder(
|
||||
SliverList.builder(
|
||||
itemCount: bookmarks.bookmarks.length + 1,
|
||||
itemBuilder: (context, index) {
|
||||
// index == bookmarks.value!.content!.results!.length -> itemCount + 1
|
||||
@@ -277,7 +275,6 @@ class _List extends ConsumerWidget {
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:flutter_slidable/flutter_slidable.dart';
|
||||
|
||||
import 'package:linkdy/screens/bookmarks/provider/search_bookmarks.provider.dart';
|
||||
import 'package:linkdy/screens/bookmarks/ui/bookmark_form_modal.dart';
|
||||
@@ -152,7 +151,6 @@ class _List extends ConsumerWidget {
|
||||
|
||||
return NotificationListener(
|
||||
onNotification: scrollListener,
|
||||
child: SlidableAutoCloseBehavior(
|
||||
child: ListView.builder(
|
||||
itemCount: provider.loadingMore ? provider.bookmarks.length + 1 : provider.bookmarks.length,
|
||||
itemBuilder: (context, index) {
|
||||
@@ -183,7 +181,6 @@ class _List extends ConsumerWidget {
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
|
||||
@@ -1,76 +0,0 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:share_plus/share_plus.dart';
|
||||
|
||||
import 'package:linkdy/widgets/custom_list_tile.dart';
|
||||
|
||||
import 'package:linkdy/i18n/strings.g.dart';
|
||||
import 'package:linkdy/models/data/bookmarks.dart';
|
||||
|
||||
class ShareOptionsModal extends StatelessWidget {
|
||||
final Bookmark bookmark;
|
||||
final void Function(Bookmark bookmark) onShareInternally;
|
||||
|
||||
const ShareOptionsModal({
|
||||
super.key,
|
||||
required this.bookmark,
|
||||
required this.onShareInternally,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AlertDialog(
|
||||
scrollable: true,
|
||||
contentPadding: const EdgeInsets.symmetric(horizontal: 0, vertical: 24),
|
||||
title: Column(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.share_rounded,
|
||||
size: 24,
|
||||
color: Theme.of(context).colorScheme.secondary,
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
Text(t.bookmarks.shareOptions.shareOptions),
|
||||
],
|
||||
),
|
||||
content: Column(
|
||||
children: [
|
||||
CustomListTile(
|
||||
icon: Icons.input_rounded,
|
||||
title: bookmark.shared == true
|
||||
? t.bookmarks.shareOptions.unshareInternally
|
||||
: t.bookmarks.shareOptions.shareInternally,
|
||||
subtitle: bookmark.shared == true
|
||||
? t.bookmarks.shareOptions.unshareInternallyDescription
|
||||
: t.bookmarks.shareOptions.shareInternallyDescription,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 8),
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
onShareInternally(bookmark);
|
||||
},
|
||||
),
|
||||
CustomListTile(
|
||||
icon: Icons.output_rounded,
|
||||
title: t.bookmarks.shareOptions.shareExternally,
|
||||
subtitle: t.bookmarks.shareOptions.shareExternallyDescription,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 8),
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
Share.shareUri(Uri.parse(bookmark.url!));
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
actions: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
TextButton(
|
||||
onPressed: () => Navigator.pop(context),
|
||||
child: Text(t.generic.close),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:flutter_slidable/flutter_slidable.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
|
||||
import 'package:linkdy/screens/bookmarks/ui/bookmark_form_modal.dart';
|
||||
@@ -210,8 +209,7 @@ class _List extends ConsumerWidget {
|
||||
),
|
||||
),
|
||||
if (provider.bookmarks.isNotEmpty)
|
||||
SlidableAutoCloseBehavior(
|
||||
child: SliverList.builder(
|
||||
SliverList.builder(
|
||||
itemCount:
|
||||
provider.loadingMore == true ? provider.bookmarks.length + 1 : provider.bookmarks.length,
|
||||
itemBuilder: (context, index) {
|
||||
@@ -242,7 +240,6 @@ class _List extends ConsumerWidget {
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -7,16 +7,24 @@
|
||||
#include "generated_plugin_registrant.h"
|
||||
|
||||
#include <dynamic_color/dynamic_color_plugin.h>
|
||||
#include <irondash_engine_context/irondash_engine_context_plugin.h>
|
||||
#include <sentry_flutter/sentry_flutter_plugin.h>
|
||||
#include <super_native_extensions/super_native_extensions_plugin.h>
|
||||
#include <url_launcher_linux/url_launcher_plugin.h>
|
||||
|
||||
void fl_register_plugins(FlPluginRegistry* registry) {
|
||||
g_autoptr(FlPluginRegistrar) dynamic_color_registrar =
|
||||
fl_plugin_registry_get_registrar_for_plugin(registry, "DynamicColorPlugin");
|
||||
dynamic_color_plugin_register_with_registrar(dynamic_color_registrar);
|
||||
g_autoptr(FlPluginRegistrar) irondash_engine_context_registrar =
|
||||
fl_plugin_registry_get_registrar_for_plugin(registry, "IrondashEngineContextPlugin");
|
||||
irondash_engine_context_plugin_register_with_registrar(irondash_engine_context_registrar);
|
||||
g_autoptr(FlPluginRegistrar) sentry_flutter_registrar =
|
||||
fl_plugin_registry_get_registrar_for_plugin(registry, "SentryFlutterPlugin");
|
||||
sentry_flutter_plugin_register_with_registrar(sentry_flutter_registrar);
|
||||
g_autoptr(FlPluginRegistrar) super_native_extensions_registrar =
|
||||
fl_plugin_registry_get_registrar_for_plugin(registry, "SuperNativeExtensionsPlugin");
|
||||
super_native_extensions_plugin_register_with_registrar(super_native_extensions_registrar);
|
||||
g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar =
|
||||
fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin");
|
||||
url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar);
|
||||
|
||||
@@ -4,7 +4,9 @@
|
||||
|
||||
list(APPEND FLUTTER_PLUGIN_LIST
|
||||
dynamic_color
|
||||
irondash_engine_context
|
||||
sentry_flutter
|
||||
super_native_extensions
|
||||
url_launcher_linux
|
||||
)
|
||||
|
||||
|
||||
@@ -5,20 +5,26 @@
|
||||
import FlutterMacOS
|
||||
import Foundation
|
||||
|
||||
import device_info_plus
|
||||
import dynamic_color
|
||||
import irondash_engine_context
|
||||
import package_info_plus
|
||||
import path_provider_foundation
|
||||
import sentry_flutter
|
||||
import share_plus
|
||||
import shared_preferences_foundation
|
||||
import super_native_extensions
|
||||
import url_launcher_macos
|
||||
|
||||
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
||||
DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))
|
||||
DynamicColorPlugin.register(with: registry.registrar(forPlugin: "DynamicColorPlugin"))
|
||||
IrondashEngineContextPlugin.register(with: registry.registrar(forPlugin: "IrondashEngineContextPlugin"))
|
||||
FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin"))
|
||||
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
|
||||
SentryFlutterPlugin.register(with: registry.registrar(forPlugin: "SentryFlutterPlugin"))
|
||||
SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin"))
|
||||
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
|
||||
SuperNativeExtensionsPlugin.register(with: registry.registrar(forPlugin: "SuperNativeExtensionsPlugin"))
|
||||
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
|
||||
}
|
||||
|
||||
72
pubspec.lock
72
pubspec.lock
@@ -273,6 +273,22 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.3.4"
|
||||
device_info_plus:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: device_info_plus
|
||||
sha256: "77f757b789ff68e4eaf9c56d1752309bd9f7ad557cb105b938a7f8eb89e59110"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "9.1.2"
|
||||
device_info_plus_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: device_info_plus_platform_interface
|
||||
sha256: d3b01d5868b50ae571cd1dc6e502fc94d956b665756180f7b16ead09e836fd64
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "7.0.0"
|
||||
dio:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@@ -435,14 +451,6 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.4.10"
|
||||
flutter_slidable:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: flutter_slidable
|
||||
sha256: "19ed4813003a6ff4e9c6bcce37e792a2a358919d7603b2b31ff200229191e44c"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.1"
|
||||
flutter_split_view:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@@ -582,6 +590,22 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.4"
|
||||
irondash_engine_context:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: irondash_engine_context
|
||||
sha256: "4f5e2629296430cce08cdff42e47cef07b8f74a64fdbdfb0525d147bc1a969a2"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.5.2"
|
||||
irondash_message_channel:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: irondash_message_channel
|
||||
sha256: dd581214215dca054bd9873209d690ec3609288c28774cb509dbd86b21180cf8
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.6.0"
|
||||
js:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -774,6 +798,14 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.0.2"
|
||||
pixel_snap:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: pixel_snap
|
||||
sha256: "677410ea37b07cd37ecb6d5e6c0d8d7615a7cf3bd92ba406fd1ac57e937d1fb0"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.1.5"
|
||||
platform:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -1083,6 +1115,22 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.0"
|
||||
super_context_menu:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: super_context_menu
|
||||
sha256: a8e8d813ed109b6c76ea5ed37ed7d4ac371e2989825edb1b214a2296f0951df6
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.8.5"
|
||||
super_native_extensions:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: super_native_extensions
|
||||
sha256: f96db6b137a0b135e43034289bb55ca6447b65225076036e81f97ebb6381ffeb
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.8.5"
|
||||
term_glyph:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -1299,6 +1347,14 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "5.2.0"
|
||||
win32_registry:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: win32_registry
|
||||
sha256: "41fd8a189940d8696b1b810efb9abcf60827b6cbfab90b0c43e8439e3a39d85a"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.2"
|
||||
xdg_directories:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
||||
@@ -55,7 +55,6 @@ dependencies:
|
||||
favicon: ^1.1.2
|
||||
skeletonizer: ^1.0.1
|
||||
http: ^1.2.0
|
||||
flutter_slidable: ^3.0.1
|
||||
webview_flutter: ^4.7.0
|
||||
flutter_hooks: ^0.20.5
|
||||
hooks_riverpod: ^2.4.10
|
||||
@@ -63,6 +62,7 @@ dependencies:
|
||||
git:
|
||||
url: https://github.com/JGeek00/flutter_split_view
|
||||
ref: master-alt
|
||||
super_context_menu: ^0.8.5
|
||||
|
||||
dev_dependencies:
|
||||
build_runner: ^2.4.8
|
||||
|
||||
@@ -7,17 +7,23 @@
|
||||
#include "generated_plugin_registrant.h"
|
||||
|
||||
#include <dynamic_color/dynamic_color_plugin_c_api.h>
|
||||
#include <irondash_engine_context/irondash_engine_context_plugin_c_api.h>
|
||||
#include <sentry_flutter/sentry_flutter_plugin.h>
|
||||
#include <share_plus/share_plus_windows_plugin_c_api.h>
|
||||
#include <super_native_extensions/super_native_extensions_plugin_c_api.h>
|
||||
#include <url_launcher_windows/url_launcher_windows.h>
|
||||
|
||||
void RegisterPlugins(flutter::PluginRegistry* registry) {
|
||||
DynamicColorPluginCApiRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("DynamicColorPluginCApi"));
|
||||
IrondashEngineContextPluginCApiRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("IrondashEngineContextPluginCApi"));
|
||||
SentryFlutterPluginRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("SentryFlutterPlugin"));
|
||||
SharePlusWindowsPluginCApiRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("SharePlusWindowsPluginCApi"));
|
||||
SuperNativeExtensionsPluginCApiRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("SuperNativeExtensionsPluginCApi"));
|
||||
UrlLauncherWindowsRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("UrlLauncherWindows"));
|
||||
}
|
||||
|
||||
@@ -4,8 +4,10 @@
|
||||
|
||||
list(APPEND FLUTTER_PLUGIN_LIST
|
||||
dynamic_color
|
||||
irondash_engine_context
|
||||
sentry_flutter
|
||||
share_plus
|
||||
super_native_extensions
|
||||
url_launcher_windows
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user