update icons and tab order
This commit is contained in:
+8
-8
@@ -152,13 +152,6 @@ class AppBarTitle extends HookConsumerWidget {
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
if (isTabTuneledAsync.hasValue &&
|
||||
isTabTuneledAsync.value == true) ...[
|
||||
const Icon(MdiIcons.tunnelOutline, size: 14),
|
||||
const SizedBox(width: 4),
|
||||
],
|
||||
icon,
|
||||
const SizedBox(width: 4),
|
||||
if (tabState.tabMode is PrivateTabMode) ...[
|
||||
Icon(
|
||||
MdiIcons.dominoMask,
|
||||
@@ -168,12 +161,19 @@ class AppBarTitle extends HookConsumerWidget {
|
||||
const SizedBox(width: 4),
|
||||
] else if (tabState.tabMode is IsolatedTabMode) ...[
|
||||
Icon(
|
||||
MdiIcons.shieldLock,
|
||||
MdiIcons.snowflake,
|
||||
color: appColors.isolatedTabTeal,
|
||||
size: 14,
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
],
|
||||
if (isTabTuneledAsync.hasValue &&
|
||||
isTabTuneledAsync.value == true) ...[
|
||||
const Icon(MdiIcons.tunnelOutline, size: 14),
|
||||
const SizedBox(width: 4),
|
||||
],
|
||||
icon,
|
||||
const SizedBox(width: 4),
|
||||
Expanded(
|
||||
child: UriBreadcrumb(
|
||||
uri: tabState.url,
|
||||
|
||||
+1
-1
@@ -553,7 +553,7 @@ class QuickTabSwitcher extends HookConsumerWidget {
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 8.0),
|
||||
child: Icon(
|
||||
MdiIcons.shieldLock,
|
||||
MdiIcons.snowflake,
|
||||
color: appColors.isolatedTabTeal,
|
||||
size: 20,
|
||||
),
|
||||
|
||||
+21
-19
@@ -23,7 +23,6 @@ import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:weblibre/core/design/app_colors.dart';
|
||||
import 'package:weblibre/core/routing/routes.dart';
|
||||
import 'package:weblibre/features/user/domain/repositories/general_settings.dart';
|
||||
import 'package:weblibre/presentation/icons/weblibre_icons.dart';
|
||||
|
||||
class TabCreationMenu extends HookConsumerWidget {
|
||||
final Widget child;
|
||||
@@ -61,24 +60,6 @@ class TabCreationMenu extends HookConsumerWidget {
|
||||
leadingIcon: const Icon(MdiIcons.tab),
|
||||
child: const Text('Add Regular Tab'),
|
||||
),
|
||||
MenuItemButton(
|
||||
onPressed: () async {
|
||||
await const SearchRoute(tabType: TabType.private).push(context);
|
||||
},
|
||||
leadingIcon: const Icon(WebLibreIcons.privateTab),
|
||||
child: const Text('Add Private Tab'),
|
||||
),
|
||||
if (showIsolatedTabUi)
|
||||
MenuItemButton(
|
||||
onPressed: () async {
|
||||
await const SearchRoute(tabType: TabType.isolated).push(context);
|
||||
},
|
||||
leadingIcon: Icon(
|
||||
MdiIcons.shieldLock,
|
||||
color: AppColors.of(context).isolatedTabTeal,
|
||||
),
|
||||
child: const Text('Add Isolated Tab'),
|
||||
),
|
||||
if (createChildTabsOption)
|
||||
MenuItemButton(
|
||||
onPressed: () async {
|
||||
@@ -87,6 +68,27 @@ class TabCreationMenu extends HookConsumerWidget {
|
||||
leadingIcon: const Icon(MdiIcons.fileTree),
|
||||
child: const Text('Add Child Tab'),
|
||||
),
|
||||
MenuItemButton(
|
||||
onPressed: () async {
|
||||
await const SearchRoute(tabType: TabType.private).push(context);
|
||||
},
|
||||
leadingIcon: Icon(
|
||||
MdiIcons.dominoMask,
|
||||
color: AppColors.of(context).privateTabPurple,
|
||||
),
|
||||
child: const Text('Add Private Tab'),
|
||||
),
|
||||
if (showIsolatedTabUi)
|
||||
MenuItemButton(
|
||||
onPressed: () async {
|
||||
await const SearchRoute(tabType: TabType.isolated).push(context);
|
||||
},
|
||||
leadingIcon: Icon(
|
||||
MdiIcons.snowflake,
|
||||
color: AppColors.of(context).isolatedTabTeal,
|
||||
),
|
||||
child: const Text('Add Isolated Tab'),
|
||||
),
|
||||
],
|
||||
child: child,
|
||||
);
|
||||
|
||||
@@ -50,7 +50,6 @@ import 'package:weblibre/features/geckoview/features/tabs/domain/repositories/co
|
||||
import 'package:weblibre/features/geckoview/features/tabs/domain/repositories/tab.dart';
|
||||
import 'package:weblibre/features/user/domain/repositories/general_settings.dart';
|
||||
import 'package:weblibre/presentation/hooks/menu_controller.dart';
|
||||
import 'package:weblibre/presentation/icons/weblibre_icons.dart';
|
||||
import 'package:weblibre/presentation/widgets/website_feed_menu_button.dart';
|
||||
import 'package:weblibre/utils/ui_helper.dart' as ui_helper;
|
||||
|
||||
@@ -273,7 +272,10 @@ class TabMenu extends HookConsumerWidget {
|
||||
},
|
||||
),
|
||||
MenuItemButton(
|
||||
leadingIcon: const Icon(WebLibreIcons.privateTab),
|
||||
leadingIcon: Icon(
|
||||
MdiIcons.dominoMask,
|
||||
color: AppColors.of(context).privateTabPurple,
|
||||
),
|
||||
child: const Text('Private'),
|
||||
onPressed: () async {
|
||||
final tabState = ref.read(tabStateProvider(selectedTabId))!;
|
||||
@@ -318,7 +320,7 @@ class TabMenu extends HookConsumerWidget {
|
||||
if (settings.showIsolatedTabUi)
|
||||
MenuItemButton(
|
||||
leadingIcon: Icon(
|
||||
MdiIcons.shieldLock,
|
||||
MdiIcons.snowflake,
|
||||
color: AppColors.of(context).isolatedTabTeal,
|
||||
),
|
||||
child: const Text('Isolated'),
|
||||
|
||||
+2
-2
@@ -233,7 +233,7 @@ class GridTabPreview extends HookConsumerWidget {
|
||||
top: -4,
|
||||
child: Icon(
|
||||
tabState.tabMode is IsolatedTabMode
|
||||
? MdiIcons.shieldLock
|
||||
? MdiIcons.snowflake
|
||||
: MdiIcons.dominoMask,
|
||||
color: tabState.tabMode is IsolatedTabMode
|
||||
? appColors.isolatedTabTeal
|
||||
@@ -337,7 +337,7 @@ class ListTabPreview extends HookConsumerWidget {
|
||||
};
|
||||
final (modeBadgeIcon, modeBadgeColor) = switch (tabState.tabMode) {
|
||||
PrivateTabMode() => (MdiIcons.dominoMask, appColors.privateTabPurple),
|
||||
IsolatedTabMode() => (MdiIcons.shieldLock, appColors.isolatedTabTeal),
|
||||
IsolatedTabMode() => (MdiIcons.snowflake, appColors.isolatedTabTeal),
|
||||
RegularTabMode() => (null, null),
|
||||
};
|
||||
|
||||
|
||||
+1
-1
@@ -516,7 +516,7 @@ class TabViewHeader extends HookConsumerWidget {
|
||||
if (showIsolatedTabUi)
|
||||
MenuItemButton(
|
||||
leadingIcon: Icon(
|
||||
MdiIcons.shieldLock,
|
||||
MdiIcons.snowflake,
|
||||
color: AppColors.of(context).isolatedTabTeal,
|
||||
),
|
||||
onPressed: isSyncedScope
|
||||
|
||||
+3
-2
@@ -42,6 +42,7 @@ import 'package:weblibre/features/geckoview/features/tabs/presentation/widgets/c
|
||||
import 'package:weblibre/features/user/domain/repositories/general_settings.dart';
|
||||
import 'package:weblibre/presentation/hooks/cached_future.dart';
|
||||
import 'package:weblibre/presentation/hooks/debouncer.dart';
|
||||
import 'package:weblibre/presentation/icons/weblibre_icons.dart';
|
||||
import 'package:weblibre/utils/form_validators.dart';
|
||||
import 'package:weblibre/utils/ui_helper.dart';
|
||||
|
||||
@@ -381,7 +382,7 @@ class OpenSharedContent extends HookConsumerWidget {
|
||||
subtitle: 'Add to your browser tabs',
|
||||
icon: MdiIcons.tab,
|
||||
trailing: PopupMenuButton<TabMode>(
|
||||
icon: const Icon(MdiIcons.tabUnselected, size: 24),
|
||||
icon: const Icon(WebLibreIcons.tabType, size: 24),
|
||||
tooltip: settings.showIsolatedTabUi
|
||||
? 'Private / Isolated'
|
||||
: 'Private',
|
||||
@@ -407,7 +408,7 @@ class OpenSharedContent extends HookConsumerWidget {
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(
|
||||
MdiIcons.shieldLock,
|
||||
MdiIcons.snowflake,
|
||||
color: appColors.isolatedTabTeal,
|
||||
size: 20,
|
||||
),
|
||||
|
||||
+20
-21
@@ -20,7 +20,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_material_design_icons/flutter_material_design_icons.dart';
|
||||
import 'package:weblibre/core/routing/routes.dart';
|
||||
import 'package:weblibre/presentation/icons/weblibre_icons.dart';
|
||||
|
||||
/// An animated tab type switcher that only shows the label for the currently
|
||||
/// active option. Inactive options collapse to show only their icon.
|
||||
@@ -65,26 +64,6 @@ class AnimatedTabTypeSwitcher extends StatelessWidget {
|
||||
selectedBackgroundColor: selectedBackgroundColor,
|
||||
onTap: () => onChanged(TabType.regular),
|
||||
),
|
||||
_divider(borderColor),
|
||||
_Segment(
|
||||
tabType: TabType.private,
|
||||
icon: WebLibreIcons.privateTab,
|
||||
label: 'Private',
|
||||
isSelected: selected == TabType.private,
|
||||
selectedBackgroundColor: selectedBackgroundColor,
|
||||
onTap: () => onChanged(TabType.private),
|
||||
),
|
||||
if (showIsolatedOption) ...[
|
||||
_divider(borderColor),
|
||||
_Segment(
|
||||
tabType: TabType.isolated,
|
||||
icon: MdiIcons.shieldLock,
|
||||
label: 'Isolated',
|
||||
isSelected: selected == TabType.isolated,
|
||||
selectedBackgroundColor: selectedBackgroundColor,
|
||||
onTap: () => onChanged(TabType.isolated),
|
||||
),
|
||||
],
|
||||
if (showChildOption) ...[
|
||||
_divider(borderColor),
|
||||
_Segment(
|
||||
@@ -96,6 +75,26 @@ class AnimatedTabTypeSwitcher extends StatelessWidget {
|
||||
onTap: () => onChanged(TabType.child),
|
||||
),
|
||||
],
|
||||
_divider(borderColor),
|
||||
_Segment(
|
||||
tabType: TabType.private,
|
||||
icon: MdiIcons.dominoMask,
|
||||
label: 'Private',
|
||||
isSelected: selected == TabType.private,
|
||||
selectedBackgroundColor: selectedBackgroundColor,
|
||||
onTap: () => onChanged(TabType.private),
|
||||
),
|
||||
if (showIsolatedOption) ...[
|
||||
_divider(borderColor),
|
||||
_Segment(
|
||||
tabType: TabType.isolated,
|
||||
icon: MdiIcons.snowflake,
|
||||
label: 'Isolated',
|
||||
isSelected: selected == TabType.isolated,
|
||||
selectedBackgroundColor: selectedBackgroundColor,
|
||||
onTap: () => onChanged(TabType.isolated),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user