small web feature initial

This commit is contained in:
Fabian Freund
2026-03-23 11:13:39 +01:00
parent 1e56bb3e3a
commit b9669635d9
61 changed files with 10455 additions and 233 deletions
@@ -114,6 +114,7 @@ class GeneralSettings with FastEquatable {
final bool urlCleanerAutoUpdate;
final int? urlCleanerLastCheckEpochMs;
final bool urlCleanerLastUpdateWasAuto;
final TabType smallWebTabType;
final bool unshortenerEnabled;
final String unshortenerToken;
@@ -162,6 +163,7 @@ class GeneralSettings with FastEquatable {
required this.urlCleanerAutoUpdate,
required this.urlCleanerLastCheckEpochMs,
required this.urlCleanerLastUpdateWasAuto,
required this.smallWebTabType,
required this.unshortenerEnabled,
required this.unshortenerToken,
});
@@ -211,6 +213,7 @@ class GeneralSettings with FastEquatable {
bool? urlCleanerAutoUpdate,
this.urlCleanerLastCheckEpochMs,
bool? urlCleanerLastUpdateWasAuto,
TabType? smallWebTabType,
bool? unshortenerEnabled,
String? unshortenerToken,
}) : themeMode = themeMode ?? ThemeMode.dark,
@@ -267,6 +270,7 @@ class GeneralSettings with FastEquatable {
'https://rules2.clearurls.xyz/rules.minify.hash',
urlCleanerAutoUpdate = urlCleanerAutoUpdate ?? false,
urlCleanerLastUpdateWasAuto = urlCleanerLastUpdateWasAuto ?? false,
smallWebTabType = smallWebTabType ?? TabType.private,
unshortenerEnabled = unshortenerEnabled ?? false,
unshortenerToken = unshortenerToken ?? '';
@@ -336,6 +340,7 @@ class GeneralSettings with FastEquatable {
urlCleanerAutoUpdate,
urlCleanerLastCheckEpochMs,
urlCleanerLastUpdateWasAuto,
smallWebTabType,
unshortenerEnabled,
unshortenerToken,
];
@@ -113,6 +113,8 @@ abstract class _$GeneralSettingsCWProxy {
GeneralSettings urlCleanerLastUpdateWasAuto(bool urlCleanerLastUpdateWasAuto);
GeneralSettings smallWebTabType(TabType smallWebTabType);
GeneralSettings unshortenerEnabled(bool unshortenerEnabled);
GeneralSettings unshortenerToken(String unshortenerToken);
@@ -169,6 +171,7 @@ abstract class _$GeneralSettingsCWProxy {
bool urlCleanerAutoUpdate,
int? urlCleanerLastCheckEpochMs,
bool urlCleanerLastUpdateWasAuto,
TabType smallWebTabType,
bool unshortenerEnabled,
String unshortenerToken,
});
@@ -369,6 +372,10 @@ class _$GeneralSettingsCWProxyImpl implements _$GeneralSettingsCWProxy {
bool urlCleanerLastUpdateWasAuto,
) => call(urlCleanerLastUpdateWasAuto: urlCleanerLastUpdateWasAuto);
@override
GeneralSettings smallWebTabType(TabType smallWebTabType) =>
call(smallWebTabType: smallWebTabType);
@override
GeneralSettings unshortenerEnabled(bool unshortenerEnabled) =>
call(unshortenerEnabled: unshortenerEnabled);
@@ -431,6 +438,7 @@ class _$GeneralSettingsCWProxyImpl implements _$GeneralSettingsCWProxy {
Object? urlCleanerAutoUpdate = const $CopyWithPlaceholder(),
Object? urlCleanerLastCheckEpochMs = const $CopyWithPlaceholder(),
Object? urlCleanerLastUpdateWasAuto = const $CopyWithPlaceholder(),
Object? smallWebTabType = const $CopyWithPlaceholder(),
Object? unshortenerEnabled = const $CopyWithPlaceholder(),
Object? unshortenerToken = const $CopyWithPlaceholder(),
}) {
@@ -693,6 +701,12 @@ class _$GeneralSettingsCWProxyImpl implements _$GeneralSettingsCWProxy {
? _value.urlCleanerLastUpdateWasAuto
// ignore: cast_nullable_to_non_nullable
: urlCleanerLastUpdateWasAuto as bool,
smallWebTabType:
smallWebTabType == const $CopyWithPlaceholder() ||
smallWebTabType == null
? _value.smallWebTabType
// ignore: cast_nullable_to_non_nullable
: smallWebTabType as TabType,
unshortenerEnabled:
unshortenerEnabled == const $CopyWithPlaceholder() ||
unshortenerEnabled == null
@@ -808,6 +822,10 @@ GeneralSettings _$GeneralSettingsFromJson(
urlCleanerLastCheckEpochMs: (json['urlCleanerLastCheckEpochMs'] as num?)
?.toInt(),
urlCleanerLastUpdateWasAuto: json['urlCleanerLastUpdateWasAuto'] as bool?,
smallWebTabType: $enumDecodeNullable(
_$TabTypeEnumMap,
json['smallWebTabType'],
),
unshortenerEnabled: json['unshortenerEnabled'] as bool?,
unshortenerToken: json['unshortenerToken'] as String?,
);
@@ -870,6 +888,7 @@ Map<String, dynamic> _$GeneralSettingsToJson(
'urlCleanerAutoUpdate': instance.urlCleanerAutoUpdate,
'urlCleanerLastCheckEpochMs': instance.urlCleanerLastCheckEpochMs,
'urlCleanerLastUpdateWasAuto': instance.urlCleanerLastUpdateWasAuto,
'smallWebTabType': _$TabTypeEnumMap[instance.smallWebTabType]!,
'unshortenerEnabled': instance.unshortenerEnabled,
'unshortenerToken': instance.unshortenerToken,
};