small ui changes

This commit is contained in:
Fabian Freund
2026-03-10 03:41:57 +01:00
parent 1b1ee65fb3
commit 3a1bacb746
5 changed files with 34 additions and 26 deletions
@@ -63,6 +63,9 @@ class BangSearch extends _$BangSearch {
Stream<List<BangData>> build() {
_streamController = StreamController();
// Emit initial empty list so UI doesn't show loading state
_streamController.add([]);
ref.onDispose(() async {
await _streamController.close();
});
@@ -384,14 +384,10 @@ class _PageActionsCard extends HookConsumerWidget {
),
_buildDivider(),
// Pin/Unpin Top Site
_PinTopSiteTile(selectedTabId: selectedTabId),
_buildDivider(),
// Find in page
ListTile(
leading: const Icon(Icons.search),
title: const Text('Find in page'),
title: const Text('Find in Page'),
onTap: () {
ref.read(bottomSheetControllerProvider.notifier).requestDismiss();
ref
@@ -657,21 +653,26 @@ class _TranslatePageTile extends ConsumerWidget {
final isTranslated = translationState?.isTranslated ?? false;
return ListTile(
leading: Icon(
Icons.translate,
color: isTranslated ? Theme.of(context).colorScheme.primary : null,
),
title: Text(isTranslated ? 'Translated' : 'Translate Page'),
onTap: () async {
Navigator.pop(context);
if (context.mounted) {
await showTranslationBottomSheet(
context,
selectedTabId: selectedTabId,
);
}
},
return Column(
children: [
_buildDivider(),
ListTile(
leading: Icon(
Icons.translate,
color: isTranslated ? Theme.of(context).colorScheme.primary : null,
),
title: Text(isTranslated ? 'Translated' : 'Translate Page'),
onTap: () async {
Navigator.pop(context);
if (context.mounted) {
await showTranslationBottomSheet(
context,
selectedTabId: selectedTabId,
);
}
},
),
],
);
}
}
@@ -691,7 +692,7 @@ class _FetchFeedsTile extends HookConsumerWidget {
_buildDivider(),
ListTile(
leading: const Icon(Icons.rss_feed),
title: const Text('Fetch Feeds'),
title: const Text('Fetch Feeds on Page'),
onTap: () {
showFeeds.value = true;
},
@@ -786,7 +787,9 @@ class _TabActionsCard extends HookConsumerWidget {
ListTile(
leading: const Icon(Icons.more_horiz),
title: const Text('More'),
subtitle: const Text('Clone Tab, Export, Fetch Feeds'),
subtitle: const Text(
'Clone Tab, Export, Pin Top Site, Fetch Feeds',
),
trailing: const Icon(Icons.expand_more),
onTap: () => showMore.value = true,
)
@@ -794,6 +797,8 @@ class _TabActionsCard extends HookConsumerWidget {
_CloneTabExpansion(selectedTabId: selectedTabId),
_buildDivider(),
_ExportExpansion(selectedTabId: selectedTabId),
_buildDivider(),
_PinTopSiteTile(selectedTabId: selectedTabId),
_FetchFeedsTile(selectedTabId: selectedTabId),
],
],
@@ -119,7 +119,7 @@ class TabMenu extends HookConsumerWidget {
.show();
},
leadingIcon: const Icon(Icons.search),
child: const Text('Find in page'),
child: const Text('Find in Page'),
),
if (enableReaderMode)
ReaderButton(
@@ -183,7 +183,7 @@ class TabMenu extends HookConsumerWidget {
replacement: MenuItemButton(
closeOnActivate: false,
leadingIcon: const Icon(Icons.rss_feed),
child: const Text('Fetch Feeds'),
child: const Text('Fetch Feeds on Page'),
onPressed: () {
showFeeds.value = true;
},
@@ -85,7 +85,7 @@ class FindInPageWidget extends HookConsumerWidget {
autofocus: true,
autocorrect: false,
decoration: const InputDecoration.collapsed(
hintText: 'Find in page',
hintText: 'Find in Page',
),
keyboardType: TextInputType.text,
onChanged: onSearchTextChanged,
@@ -70,7 +70,7 @@ class FindInPageAction extends BaseSelectionAction {
FindInPageAction(PerformAction action)
: super(
id: 'CUSTOM_CONTEXT_MENU_FIND_IN_PAGE',
title: 'Find in page',
title: 'Find in Page',
performAction: action,
);
}