Compare commits

...

10 Commits

Author SHA1 Message Date
Imran Remtulla
361a3e1bc2 Merge pull request #426 from ImranR98/dev
Increment version
2023-04-04 21:46:15 -04:00
Imran Remtulla
f33a26d4f4 Increment version 2023-04-04 21:45:57 -04:00
Imran Remtulla
7aaf56ec8c Merge pull request #425 from HRTK92/main
Add long-press URL copy and snackbar message
2023-04-04 21:44:35 -04:00
HRTK92
ed120016d9 Add long-press URL copy and snackbar message 2023-04-05 10:32:56 +09:00
Imran Remtulla
e8cbac8657 Merge pull request #413 from gidano/Obtainium-HU
Done
2023-04-04 21:13:23 -04:00
Imran Remtulla
b66c13d319 Merge pull request #424 from ImranR98/dev
Bugfix #392, Custom App Names #420, Archive Label in GitHub Search #421
2023-04-04 21:05:54 -04:00
Imran Remtulla
782d055bc3 Added cloudflare.f-droid.org support 2023-04-04 20:21:24 -04:00
Imran Remtulla
d557746965 Increment version 2023-04-04 20:00:36 -04:00
Imran Remtulla
e6b05d50b9 Scrolling bugfix #392, custom name #420, search archive label #421 2023-04-04 19:59:35 -04:00
gidano
9fe8a200ef Done 2023-04-01 14:55:56 +02:00
16 changed files with 54 additions and 31 deletions

View File

@@ -207,6 +207,7 @@
"addCategory": "Kategorie hinzufügen", "addCategory": "Kategorie hinzufügen",
"label": "Bezeichnung", "label": "Bezeichnung",
"language": "Sprache", "language": "Sprache",
"copiedToClipboard": "Copied to Clipboard",
"storagePermissionDenied": "Speicherberechtigung verweigert", "storagePermissionDenied": "Speicherberechtigung verweigert",
"selectedCategorizeWarning": "Dadurch werden alle bestehenden Kategorieeinstellungen für die ausgewählten Apps ersetzt.", "selectedCategorizeWarning": "Dadurch werden alle bestehenden Kategorieeinstellungen für die ausgewählten Apps ersetzt.",
"filterAPKsByRegEx": "APKs nach regulärem Ausdruck filtern", "filterAPKsByRegEx": "APKs nach regulärem Ausdruck filtern",
@@ -269,4 +270,4 @@
"one": "{} und 1 weitere Anwendung wurden aktualisiert.", "one": "{} und 1 weitere Anwendung wurden aktualisiert.",
"other": "{} und {} weitere Anwendungen wurden aktualisiert." "other": "{} und {} weitere Anwendungen wurden aktualisiert."
} }
} }

View File

@@ -207,6 +207,7 @@
"addCategory": "Add Category", "addCategory": "Add Category",
"label": "Label", "label": "Label",
"language": "Language", "language": "Language",
"copiedToClipboard": "Copied to Clipboard",
"storagePermissionDenied": "Storage permission denied", "storagePermissionDenied": "Storage permission denied",
"selectedCategorizeWarning": "This will replace any existing category settings for the selected Apps.", "selectedCategorizeWarning": "This will replace any existing category settings for the selected Apps.",
"filterAPKsByRegEx": "Filter APKs by Regular Expression", "filterAPKsByRegEx": "Filter APKs by Regular Expression",
@@ -269,4 +270,4 @@
"one": "{} and 1 more app were updated.", "one": "{} and 1 more app were updated.",
"other": "{} and {} more apps were updated." "other": "{} and {} more apps were updated."
} }
} }

View File

@@ -207,6 +207,7 @@
"addCategory": "اضافه کردن دسته", "addCategory": "اضافه کردن دسته",
"label": "برچسب", "label": "برچسب",
"language": "زبان", "language": "زبان",
"copiedToClipboard": "Copied to Clipboard",
"storagePermissionDenied": "مجوز ذخیره سازی رد شد", "storagePermissionDenied": "مجوز ذخیره سازی رد شد",
"selectedCategorizeWarning": "این جایگزین تنظیمات دسته بندی موجود برای برنامه های انتخابی می شود.", "selectedCategorizeWarning": "این جایگزین تنظیمات دسته بندی موجود برای برنامه های انتخابی می شود.",
"filterAPKsByRegEx": "فایل‌های APK را با نظم فیلتر کنید", "filterAPKsByRegEx": "فایل‌های APK را با نظم فیلتر کنید",

View File

@@ -207,6 +207,7 @@
"addCategory": "Ajouter une catégorie", "addCategory": "Ajouter une catégorie",
"label": "Étiquette", "label": "Étiquette",
"language": "Langue", "language": "Langue",
"copiedToClipboard": "Copied to Clipboard",
"storagePermissionDenied": "Autorisation de stockage refusée", "storagePermissionDenied": "Autorisation de stockage refusée",
"selectedCategorizeWarning": "Cela remplacera tous les paramètres de catégorie existants pour les applications sélectionnées.", "selectedCategorizeWarning": "Cela remplacera tous les paramètres de catégorie existants pour les applications sélectionnées.",
"filterAPKsByRegEx": "Filtrer les APK par expression régulière", "filterAPKsByRegEx": "Filtrer les APK par expression régulière",

View File

@@ -206,6 +206,7 @@
"addCategory": "Új kategória", "addCategory": "Új kategória",
"label": "Címke", "label": "Címke",
"language": "Nyelv", "language": "Nyelv",
"copiedToClipboard": "Copied to Clipboard",
"storagePermissionDenied": "Tárhely engedély megtagadva", "storagePermissionDenied": "Tárhely engedély megtagadva",
"selectedCategorizeWarning": "Ez felváltja a kiválasztott alkalmazások meglévő kategória-beállításait.", "selectedCategorizeWarning": "Ez felváltja a kiválasztott alkalmazások meglévő kategória-beállításait.",
"filterAPKsByRegEx": "Az APK-k szűrése reguláris kifejezéssel", "filterAPKsByRegEx": "Az APK-k szűrése reguláris kifejezéssel",
@@ -219,7 +220,7 @@
"importFromURLsInFile": "Importálás fájlban található URL-ből (mint pl. OPML)", "importFromURLsInFile": "Importálás fájlban található URL-ből (mint pl. OPML)",
"versionDetection": "Verzió érzékelés", "versionDetection": "Verzió érzékelés",
"standardVersionDetection": "Alapért. verzió érzékelés", "standardVersionDetection": "Alapért. verzió érzékelés",
"groupByCategory": "Group by Category", "groupByCategory": "Csoportosítás Kategória alapján",
"removeAppQuestion": { "removeAppQuestion": {
"one": "Eltávolítja az alkalmazást?", "one": "Eltávolítja az alkalmazást?",
"other": "Eltávolítja az alkalmazást?" "other": "Eltávolítja az alkalmazást?"

View File

@@ -207,6 +207,7 @@
"addCategory": "Aggiungi categoria", "addCategory": "Aggiungi categoria",
"label": "Etichetta", "label": "Etichetta",
"language": "Lingua", "language": "Lingua",
"copiedToClipboard": "Copied to Clipboard",
"storagePermissionDenied": "Accesso ai file non autorizzato", "storagePermissionDenied": "Accesso ai file non autorizzato",
"selectedCategorizeWarning": "Ciò sostituirà le impostazioni di categoria esistenti per le App selezionate.", "selectedCategorizeWarning": "Ciò sostituirà le impostazioni di categoria esistenti per le App selezionate.",
"filterAPKsByRegEx": "Filtra file APK con espressioni regolari", "filterAPKsByRegEx": "Filtra file APK con espressioni regolari",

View File

@@ -207,6 +207,7 @@
"addCategory": "カテゴリを追加", "addCategory": "カテゴリを追加",
"label": "ラベル", "label": "ラベル",
"language": "言語", "language": "言語",
"copiedToClipboard": "クリップボードにコピーしました",
"storagePermissionDenied": "ストレージ権限が拒否されました", "storagePermissionDenied": "ストレージ権限が拒否されました",
"selectedCategorizeWarning": "これにより、選択したアプリの既存のカテゴリ設定がすべて置き換えられます。", "selectedCategorizeWarning": "これにより、選択したアプリの既存のカテゴリ設定がすべて置き換えられます。",
"filterAPKsByRegEx": "正規表現でAPKを絞り込む", "filterAPKsByRegEx": "正規表現でAPKを絞り込む",
@@ -269,4 +270,4 @@
"one": "{} とさらに {} 個のアプリがアップデートされました", "one": "{} とさらに {} 個のアプリがアップデートされました",
"other": "{} とさらに {} 個のアプリがアップデートされました" "other": "{} とさらに {} 個のアプリがアップデートされました"
} }
} }

View File

@@ -208,6 +208,7 @@
"addCategory": "添加类别", "addCategory": "添加类别",
"label": "标签", "label": "标签",
"language": "语言", "language": "语言",
"copiedToClipboard": "Copied to Clipboard",
"storagePermissionDenied": "存储权限已被拒绝", "storagePermissionDenied": "存储权限已被拒绝",
"selectedCategorizeWarning": "这将取代所选应用程序的任何现有类别", "selectedCategorizeWarning": "这将取代所选应用程序的任何现有类别",
"filterAPKsByRegEx": "Filter APKs by Regular Expression", "filterAPKsByRegEx": "Filter APKs by Regular Expression",
@@ -269,4 +270,4 @@
"one": "{} 和 {} 更多应用已被安装", "one": "{} 和 {} 更多应用已被安装",
"other": "{} 和 {} 更多应用已被安装" "other": "{} 和 {} 更多应用已被安装"
} }
} }

View File

@@ -14,12 +14,14 @@ class FDroid extends AppSource {
@override @override
String standardizeURL(String url) { String standardizeURL(String url) {
RegExp standardUrlRegExB = RegExp standardUrlRegExB =
RegExp('^https?://$host/+[^/]+/+packages/+[^/]+'); RegExp('^https?://(cloudflare\\.)?$host/+[^/]+/+packages/+[^/]+');
RegExpMatch? match = standardUrlRegExB.firstMatch(url.toLowerCase()); RegExpMatch? match = standardUrlRegExB.firstMatch(url.toLowerCase());
if (match != null) { if (match != null) {
url = 'https://$host/packages/${Uri.parse(url).pathSegments.last}'; url =
'https://${Uri.parse(url.substring(0, match.end)).host}/packages/${Uri.parse(url).pathSegments.last}';
} }
RegExp standardUrlRegExA = RegExp('^https?://$host/+packages/+[^/]+'); RegExp standardUrlRegExA =
RegExp('^https?://(cloudflare\\.)?$host/+packages/+[^/]+');
match = standardUrlRegExA.firstMatch(url.toLowerCase()); match = standardUrlRegExA.firstMatch(url.toLowerCase());
if (match == null) { if (match == null) {
throw InvalidURLError(name); throw InvalidURLError(name);
@@ -61,9 +63,10 @@ class FDroid extends AppSource {
Map<String, dynamic> additionalSettings, Map<String, dynamic> additionalSettings,
) async { ) async {
String? appId = tryInferringAppId(standardUrl); String? appId = tryInferringAppId(standardUrl);
String host = Uri.parse(standardUrl).host;
return getAPKUrlsFromFDroidPackagesAPIResponse( return getAPKUrlsFromFDroidPackagesAPIResponse(
await get(Uri.parse('https://f-droid.org/api/v1/packages/$appId')), await get(Uri.parse('https://$host/api/v1/packages/$appId')),
'https://f-droid.org/repo/$appId', 'https://$host/repo/$appId',
standardUrl); standardUrl);
} }
} }

View File

@@ -185,9 +185,11 @@ class GitHub extends AppSource {
Map<String, String> urlsWithDescriptions = {}; Map<String, String> urlsWithDescriptions = {};
for (var e in (jsonDecode(res.body)['items'] as List<dynamic>)) { for (var e in (jsonDecode(res.body)['items'] as List<dynamic>)) {
urlsWithDescriptions.addAll({ urlsWithDescriptions.addAll({
e['html_url'] as String: e['description'] != null e['html_url'] as String:
? e['description'] as String ((e['archived'] == true ? '[ARCHIVED] ' : '') +
: tr('noDescription') (e['description'] != null
? e['description'] as String
: tr('noDescription')))
}); });
} }
return urlsWithDescriptions; return urlsWithDescriptions;

View File

@@ -21,7 +21,7 @@ import 'package:easy_localization/src/easy_localization_controller.dart';
// ignore: implementation_imports // ignore: implementation_imports
import 'package:easy_localization/src/localization.dart'; import 'package:easy_localization/src/localization.dart';
const String currentVersion = '0.11.22'; const String currentVersion = '0.11.24';
const String currentReleaseTag = const String currentReleaseTag =
'v$currentVersion-beta'; // KEEP THIS IN SYNC WITH GITHUB RELEASES 'v$currentVersion-beta'; // KEEP THIS IN SYNC WITH GITHUB RELEASES

View File

@@ -334,11 +334,10 @@ class _AddAppPageState extends State<AddAppPage> {
], ],
); );
Widget getSourcesListWidget() => Expanded( Widget getSourcesListWidget() => Column(
child: Column( crossAxisAlignment: CrossAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center, children: [
children: [
const SizedBox( const SizedBox(
height: 48, height: 48,
), ),
@@ -365,16 +364,17 @@ class _AddAppPageState extends State<AddAppPage> {
fontStyle: FontStyle.italic), fontStyle: FontStyle.italic),
))) )))
.toList() .toList()
])); ]);
return Scaffold( return Scaffold(
backgroundColor: Theme.of(context).colorScheme.surface, backgroundColor: Theme.of(context).colorScheme.surface,
body: CustomScrollView(slivers: <Widget>[ body: CustomScrollView(shrinkWrap: true, slivers: <Widget>[
CustomAppBar(title: tr('addApp')), CustomAppBar(title: tr('addApp')),
SliverFillRemaining( SliverToBoxAdapter(
child: Padding( child: Padding(
padding: const EdgeInsets.all(16), padding: const EdgeInsets.all(16),
child: Column( child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.stretch, crossAxisAlignment: CrossAxisAlignment.stretch,
children: [ children: [
getUrlInputRow(), getUrlInputRow(),

View File

@@ -61,6 +61,12 @@ class _AppPageState extends State<AppPage> {
mode: LaunchMode.externalApplication); mode: LaunchMode.externalApplication);
} }
}, },
onLongPress: () {
Clipboard.setData(ClipboardData(text: app?.app.url ?? ''));
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
content: Text(tr('copiedToClipboard')),
));
},
child: Text( child: Text(
app?.app.url ?? '', app?.app.url ?? '',
textAlign: TextAlign.center, textAlign: TextAlign.center,
@@ -147,7 +153,7 @@ class _AppPageState extends State<AppPage> {
height: 25, height: 25,
), ),
Text( Text(
app?.installedInfo?.name ?? app?.app.name ?? tr('app'), app?.app.name ?? tr('app'),
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: Theme.of(context).textTheme.displayLarge, style: Theme.of(context).textTheme.displayLarge,
), ),

View File

@@ -670,6 +670,9 @@ class AppsProvider with ChangeNotifier {
for (var app in apps) { for (var app in apps) {
AppInfo? info = await getInstalledInfo(app.id); AppInfo? info = await getInstalledInfo(app.id);
app.name = info?.name ?? app.name; app.name = info?.name ?? app.name;
if (app.additionalSettings['appName']?.toString().isNotEmpty == true) {
app.name = app.additionalSettings['appName'].toString().trim();
}
if (attemptToCorrectInstallStatus) { if (attemptToCorrectInstallStatus) {
app = getCorrectedInstallStatusAppIfPossible(app, info) ?? app; app = getCorrectedInstallStatusAppIfPossible(app, info) ?? app;
} }

View File

@@ -278,7 +278,8 @@ class AppSource {
return regExValidator(value); return regExValidator(value);
} }
]) ])
] ],
[GeneratedFormTextField('appName', label: tr('appName'), required: false)]
]; ];
// Previous 2 variables combined into one at runtime for convenient usage // Previous 2 variables combined into one at runtime for convenient usage
@@ -362,7 +363,7 @@ class SourceProvider {
url = preStandardizeUrl(url); url = preStandardizeUrl(url);
AppSource? source; AppSource? source;
for (var s in sources.where((element) => element.host != null)) { for (var s in sources.where((element) => element.host != null)) {
if (url.contains('://${s.host}')) { if (RegExp('://(.+\\.)?${s.host}').hasMatch(url)) {
source = s; source = s;
break; break;
} }
@@ -427,8 +428,10 @@ class SourceProvider {
throw NoAPKError(); throw NoAPKError();
} }
String apkVersion = apk.version.replaceAll('/', '-'); String apkVersion = apk.version.replaceAll('/', '-');
var name = currentApp?.name.trim() ?? var name = currentApp != null ? currentApp.name.trim() : '';
apk.names.name[0].toUpperCase() + apk.names.name.substring(1); name = name.isNotEmpty
? name
: apk.names.name[0].toUpperCase() + apk.names.name.substring(1);
return App( return App(
currentApp?.id ?? currentApp?.id ??
source.tryInferringAppId(standardUrl, source.tryInferringAppId(standardUrl,
@@ -436,9 +439,7 @@ class SourceProvider {
generateTempID(standardUrl, additionalSettings), generateTempID(standardUrl, additionalSettings),
standardUrl, standardUrl,
apk.names.author[0].toUpperCase() + apk.names.author.substring(1), apk.names.author[0].toUpperCase() + apk.names.author.substring(1),
name.trim().isNotEmpty name,
? name
: apk.names.name[0].toUpperCase() + apk.names.name.substring(1),
currentApp?.installedVersion, currentApp?.installedVersion,
apkVersion, apkVersion,
apk.apkUrls, apk.apkUrls,

View File

@@ -17,7 +17,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts # In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix. # of the product and file versions while build-number is used as the build suffix.
version: 0.11.22+144 # When changing this, update the tag in main() accordingly version: 0.11.24+146 # When changing this, update the tag in main() accordingly
environment: environment:
sdk: '>=2.18.2 <3.0.0' sdk: '>=2.18.2 <3.0.0'