Add proxy tag sanitization
This commit is contained in:
@@ -1 +1 @@
|
||||
core.version=0.4.1
|
||||
core.version=0.5.0
|
||||
@@ -21,6 +21,8 @@ class OutboundGroup with _$OutboundGroup {
|
||||
|
||||
@freezed
|
||||
class OutboundGroupItem with _$OutboundGroupItem {
|
||||
const OutboundGroupItem._();
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.kebab)
|
||||
const factory OutboundGroupItem({
|
||||
required String tag,
|
||||
@@ -28,6 +30,9 @@ class OutboundGroupItem with _$OutboundGroupItem {
|
||||
required int urlTestDelay,
|
||||
}) = _OutboundGroupItem;
|
||||
|
||||
String get sanitizedTag =>
|
||||
tag.replaceFirst(RegExp(r"\§[^]*"), "").trimRight();
|
||||
|
||||
factory OutboundGroupItem.fromJson(Map<String, dynamic> json) =>
|
||||
_$OutboundGroupItemFromJson(json);
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ class ProxyTile extends HookConsumerWidget {
|
||||
return ListTile(
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
|
||||
title: Text(
|
||||
proxy.tag,
|
||||
proxy.sanitizedTag,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
leading: Padding(
|
||||
|
||||
Reference in New Issue
Block a user