Skip to content

Commit e591430

Browse files
authored
Merge pull request #11 from abrenoch/temp-merge
bringing up to date
2 parents 842c6c5 + 4adf193 commit e591430

24 files changed

Lines changed: 705 additions & 1042 deletions

android/app/src/main/AndroidManifest.xml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
22
package="com.remi.piwigo_ng">
3+
34
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"/>
45
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
56
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
@@ -32,6 +33,7 @@
3233
<category android:name="android.intent.category.LAUNCHER"/>
3334
</intent-filter>
3435
</activity>
36+
3537
<!-- Don't delete the meta-data below.
3638
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
3739
<meta-data
@@ -43,12 +45,16 @@
4345
<!-- If your app opens https URLs -->
4446
<intent>
4547
<action android:name="android.intent.action.VIEW" />
48+
<category android:name="android.intent.category.BROWSABLE" />
4649
<data android:scheme="https" />
4750
</intent>
48-
<!-- If your app makes calls -->
4951
<intent>
5052
<action android:name="android.intent.action.DIAL" />
5153
<data android:scheme="tel" />
5254
</intent>
55+
<intent>
56+
<action android:name="android.intent.action.SEND" />
57+
<data android:mimeType="*/*" />
58+
</intent>
5359
</queries>
5460
</manifest>

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
buildscript {
2-
ext.kotlin_version = '1.5.31'
2+
ext.kotlin_version = '1.6.21'
33
repositories {
44
google()
55
jcenter()

android/gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
org.gradle.jvmargs=-Xmx1536M
22
android.useAndroidX=true
33
android.enableJetifier=true
4+
android.jetifier.blacklist=bcprov-jdk15on

lib/api/SearchAPI.dart

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import 'dart:convert';
2+
3+
import 'package:dio/dio.dart';
4+
import 'API.dart';
5+
6+
Future<Map<String,dynamic>> searchAlbums(String searchQuery) async {
7+
8+
Map<String, String> query = {
9+
"format": "json",
10+
"method": "pwg.images.search",
11+
"query": searchQuery,
12+
};
13+
14+
try {
15+
Response response = await API().dio.get('ws.php', queryParameters: query);
16+
17+
if (response.statusCode == 200) {
18+
return json.decode(response.data);
19+
} else {
20+
return {
21+
'stat': 'fail',
22+
'result': response.statusMessage
23+
};
24+
}
25+
} catch(e) {
26+
return {
27+
'stat': 'fail',
28+
'result': e.toString(),
29+
};
30+
}
31+
}

lib/constants/SettingsConstants.dart

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,23 @@ AppLocalizations appStrings(context) {
4747
return AppLocalizations.of(context);
4848
}
4949

50+
String getLanguageFromCode(String code) {
51+
switch (code) {
52+
case 'de': return 'Deutsch';
53+
break;
54+
case 'en': return 'English';
55+
break;
56+
case 'es': return 'Español';
57+
break;
58+
case 'fr': return 'Français';
59+
break;
60+
case 'zh': return '中国人';
61+
break;
62+
default: return code;
63+
break;
64+
}
65+
}
66+
5067
Map<int, String> albumSort(context) {
5168
return {
5269
0: appStrings(context).categorySort_nameAscending,

lib/l10n/app_en.arb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -906,6 +906,7 @@
906906

907907

908908
"settings_appName": "Piwigo NG",
909+
"settings_language": "Select language",
909910
"settingsHeader_about": "Information",
910911
"settings_twitter": "@piwigo",
911912
"settings_twitterURL": "https://twitter.com/piwigo",

0 commit comments

Comments
 (0)