rename top sites to shortcuts
This commit is contained in:
+5
-5
@@ -860,7 +860,7 @@ class _PinTopSiteTile extends HookConsumerWidget {
|
||||
|
||||
return ListTile(
|
||||
leading: Icon(pinned ? MdiIcons.pinOff : MdiIcons.pin),
|
||||
title: Text(pinned ? 'Unpin from Top Sites' : 'Pin to Top Sites'),
|
||||
title: Text(pinned ? 'Unpin from Shortcuts' : 'Pin to Shortcuts'),
|
||||
onTap: () async {
|
||||
if (tabState == null || url == null) return;
|
||||
Navigator.pop(context);
|
||||
@@ -870,19 +870,19 @@ class _PinTopSiteTile extends HookConsumerWidget {
|
||||
.read(topSiteRepositoryProvider.notifier)
|
||||
.unpinSiteByUrl(url);
|
||||
if (context.mounted) {
|
||||
ui_helper.showInfoMessage(context, 'Unpinned from Top Sites');
|
||||
ui_helper.showInfoMessage(context, 'Unpinned from Shortcuts');
|
||||
}
|
||||
} else {
|
||||
await ref
|
||||
.read(topSiteRepositoryProvider.notifier)
|
||||
.addPinnedSite(title: tabState.titleOrAuthority, url: url);
|
||||
if (context.mounted) {
|
||||
ui_helper.showInfoMessage(context, 'Pinned to Top Sites');
|
||||
ui_helper.showInfoMessage(context, 'Pinned to Shortcuts');
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
if (context.mounted) {
|
||||
ui_helper.showErrorMessage(context, 'Failed to update Top Sites');
|
||||
ui_helper.showErrorMessage(context, 'Failed to update Shortcuts');
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -1051,7 +1051,7 @@ class _TabActionsCard extends HookConsumerWidget {
|
||||
leading: const Icon(Icons.more_horiz),
|
||||
title: const Text('More'),
|
||||
subtitle: const Text(
|
||||
'Clone Tab, Export, Pin Top Site, Fetch Feeds',
|
||||
'Clone Tab, Export, Pin Shortcut, Fetch Feeds',
|
||||
),
|
||||
trailing: const Icon(Icons.expand_more),
|
||||
onTap: () => showMore.value = true,
|
||||
|
||||
+1
-1
@@ -76,7 +76,7 @@ enum SearchModuleType {
|
||||
combinedHistory => 'History',
|
||||
popularSites => 'Popular Sites',
|
||||
historyHighlights => 'History Highlights',
|
||||
topSites => 'Top Sites',
|
||||
topSites => 'Shortcuts',
|
||||
recentHistory => 'Recent History',
|
||||
recentArticles => 'Recent Articles',
|
||||
recentTabs => 'Recent Tabs',
|
||||
|
||||
+1
-1
@@ -67,7 +67,7 @@ class _EditTopSiteDialogState extends State<_EditTopSiteDialog> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AlertDialog(
|
||||
title: const Text('Edit Top Site'),
|
||||
title: const Text('Edit Shortcut'),
|
||||
content: Form(
|
||||
key: _formKey,
|
||||
child: Column(
|
||||
|
||||
+6
-6
@@ -132,7 +132,7 @@ class TopSitesSection extends HookConsumerWidget {
|
||||
final historyItems = topSites.where((s) => !s.isPersisted).toList();
|
||||
|
||||
return SearchModuleSection(
|
||||
title: 'Top Sites',
|
||||
title: 'Shortcuts',
|
||||
moduleType: SearchModuleType.topSites,
|
||||
totalCount: topSites.length,
|
||||
previewLimit: _topSitesPreviewLimit,
|
||||
@@ -152,7 +152,7 @@ class TopSitesSection extends HookConsumerWidget {
|
||||
if (!wasEnabled && context.mounted) {
|
||||
ui_helper.showInfoMessage(
|
||||
context,
|
||||
'Drag and drop top sites to reorder',
|
||||
'Drag and drop shortcuts to reorder',
|
||||
);
|
||||
}
|
||||
},
|
||||
@@ -325,7 +325,7 @@ class _ReorderableTopSitesGrid extends HookConsumerWidget {
|
||||
if (context.mounted) {
|
||||
ui_helper.showErrorMessage(
|
||||
context,
|
||||
'Failed to reorder top site',
|
||||
'Failed to reorder shortcut',
|
||||
);
|
||||
}
|
||||
} finally {
|
||||
@@ -641,11 +641,11 @@ Future<void> _editItem(
|
||||
|
||||
await repo.updateSite(id: id, title: result.title, url: result.url);
|
||||
if (context.mounted) {
|
||||
ui_helper.showInfoMessage(context, 'Top site updated');
|
||||
ui_helper.showInfoMessage(context, 'Shortcut updated');
|
||||
}
|
||||
} catch (e) {
|
||||
if (context.mounted) {
|
||||
ui_helper.showErrorMessage(context, 'Failed to update top site');
|
||||
ui_helper.showErrorMessage(context, 'Failed to update shortcut');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -680,7 +680,7 @@ Future<void> _removeItem(
|
||||
}
|
||||
} catch (e) {
|
||||
if (context.mounted) {
|
||||
ui_helper.showErrorMessage(context, 'Failed to remove top site');
|
||||
ui_helper.showErrorMessage(context, 'Failed to remove shortcut');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user