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