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