melos format

This commit is contained in:
Fabian Freund
2026-05-01 12:48:18 +02:00
parent f76a81041b
commit 65fd9c2e93
12 changed files with 61 additions and 59 deletions
@@ -85,9 +85,10 @@ extension HitResultX on HitResult {
return switch (this) {
UnknownHitResult(src: final src) => src.uriDisplayString,
ImageSrcHitResult(uri: final uri) => uri.uriDisplayString,
ImageHitResult(src: final src, title: final title) => title.isEmpty
? (src.length > maxTitleLength ? 'image' : src.uriDisplayString)
: title!,
ImageHitResult(src: final src, title: final title) =>
title.isEmpty
? (src.length > maxTitleLength ? 'image' : src.uriDisplayString)
: title!,
VideoHitResult(src: final src, title: final title) =>
(title.isEmpty) ? src.uriDisplayString : title!,
AudioHitResult(src: final src, title: final title) =>
@@ -195,7 +195,11 @@ class _InstallConfigSheet extends HookConsumerWidget {
list.add(_StorageNewIsolated());
return list;
},
[tabContextId, containerData?.id, containerData?.metadata.contextualIdentity],
[
tabContextId,
containerData?.id,
containerData?.metadata.contextualIdentity,
],
);
// Pick sensible default selection based on current context.
@@ -319,9 +323,7 @@ class _InstallConfigSheet extends HookConsumerWidget {
ListTile(
leading: const Icon(Icons.shortcut),
title: const Text('Add Shortcut'),
subtitle: const Text(
'Opens as a standard tab in the browser.',
),
subtitle: const Text('Opens as a standard tab in the browser.'),
onTap: () => submit(ShortcutInstallType.shortcut),
),
const SizedBox(height: 8),
@@ -32,8 +32,7 @@ import 'package:weblibre/utils/ui_helper.dart';
Future<void> showPwaInstallDialog(BuildContext context, WidgetRef ref) async {
final selectedTabId = ref.read(selectedTabProvider);
final manifest = ref.read(currentTabManifestProvider);
final defaultName =
manifest?.shortName ?? manifest?.name ?? 'this web app';
final defaultName = manifest?.shortName ?? manifest?.name ?? 'this web app';
final tabState = selectedTabId != null
? ref.read(tabStateProvider(selectedTabId))
: null;
@@ -28,9 +28,7 @@ import 'package:weblibre/presentation/widgets/url_icon.dart';
import 'package:weblibre/utils/form_validators.dart';
import 'package:weblibre/utils/ui_helper.dart' as ui_helper;
final _wildcardHostRegex = RegExp(
r'^\*\.([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,63}$',
);
final _wildcardHostRegex = RegExp(r'^\*\.([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,63}$');
/// Parses a user-entered site-assignment value. Accepts:
/// - `example.com`, `https://example.com/path` → exact origin entry
@@ -44,8 +42,10 @@ Uri? _parseSiteAssignmentInput(String? input) {
// Strip scheme for wildcard detection.
var rest = trimmed;
var scheme = 'https';
final schemeMatch = RegExp(r'^(https?):\/\/', caseSensitive: false)
.firstMatch(trimmed);
final schemeMatch = RegExp(
r'^(https?):\/\/',
caseSensitive: false,
).firstMatch(trimmed);
if (schemeMatch != null) {
scheme = schemeMatch.group(1)!.toLowerCase();
rest = trimmed.substring(schemeMatch.end);
@@ -110,8 +110,7 @@ class ContainerSitesScreen extends HookConsumerWidget {
decoration: InputDecoration(
label: const Text('Add Site'),
hintText: 'example.com or *.example.com',
helperText:
'Use *.example.com to match all subdomains',
helperText: 'Use *.example.com to match all subdomains',
floatingLabelBehavior: FloatingLabelBehavior.always,
suffix: TextButton(
onPressed: () {