Skip to content
Merged
Show file tree
Hide file tree
Changes from 34 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
2190c88
Support sharing images from external apps
kaysavps Nov 7, 2024
5d3cc2b
Rename move_or copy modal file to reflect the new Select action
kaysavps Nov 7, 2024
d0d95e5
Merge pull request #2 from kaysavps/feature/share_images_from_other_apps
kaysavps Nov 7, 2024
569c752
Rebase PR #206 from kaysavps
Renarde-dev Jul 8, 2025
1877019
Bump flutter version to fix vulkan imp crash on API 31
Renarde-dev Jul 10, 2025
19b2b8c
Replace `receive_sharing_intent` by `listen_sharing_intent`
Renarde-dev Jul 10, 2025
b520740
Make keystore properties cast nullable
Renarde-dev Jul 29, 2025
b2a2910
Bump flutter to 3.32.8
Renarde-dev Jul 29, 2025
5fab22e
Bump dependencies ( pub upgrade )
Renarde-dev Jul 29, 2025
2036f08
Upgrade workmanager from 0.6 to 0.8
Renarde-dev Jul 29, 2025
c79a62e
Bump AGP and migrate deprecated JvmTarget to the new toolchain option.
Renarde-dev Aug 4, 2025
58d1e80
Fix modal (V0)
Renarde-dev Aug 5, 2025
59fabc8
Remove text trick and display album index instead.
Renarde-dev Aug 6, 2025
de2613a
Bump AGP to check if it create toolchain cleanly
Renarde-dev Aug 19, 2025
7f3b30e
Add foojay resolver to fix missing gradle SDK
Renarde-dev Aug 21, 2025
8f47661
Merge pull request #225 from Piwigo/receive-image-share
Renarde-dev Aug 22, 2025
3705324
New translations app_en.arb (French)
remi-martin Aug 22, 2025
c2c2e8d
New translations app_en.arb (Spanish)
remi-martin Aug 22, 2025
06c48b9
New translations app_en.arb (German)
remi-martin Aug 22, 2025
4e0f750
New translations app_en.arb (Lithuanian)
remi-martin Aug 22, 2025
9284e97
New translations app_en.arb (Slovak)
remi-martin Aug 22, 2025
c9dd2c6
New translations app_en.arb (Chinese Simplified)
remi-martin Aug 22, 2025
bb128cc
Merge pull request #232 from Piwigo/l10n_develop
Renarde-dev Sep 3, 2025
4993355
Remove text trick and display album index instead.
Renarde-dev Aug 6, 2025
143ad30
Rebase on develop
Renarde-dev Oct 6, 2025
c90bdfd
Upgrade player - ported from receive-image-share
Renarde-dev Aug 4, 2025
4e1600b
Cherry Pick commit from VLC and upgrade dependencies
Renarde-dev Aug 4, 2025
fe820bb
Android build system upgrades and removing android jetifier
Renarde-dev Oct 7, 2025
86a1afc
Finish cherry picking updates from VLC branch
Renarde-dev Aug 22, 2025
c6a67c6
Remove Heic/Heif conversion
Renarde-dev Oct 7, 2025
e6e13f5
Remove deprecated WorkManager debug flag
Renarde-dev Sep 2, 2025
3ac8e70
Fully move toolchain to Jvm and configure gradle to use up to 8G of ram
Renarde-dev Oct 9, 2025
bbd8bcc
Migrate to radio group to fix accessibility issues and remove depreca…
Renarde-dev Oct 10, 2025
3320644
Implement design using existing structure
Renarde-dev Oct 10, 2025
bc5cbbe
Fix padding rules
Renarde-dev Oct 10, 2025
c246472
Fix spacing between icon and number
Renarde-dev Oct 10, 2025
5a23623
fix decorated box colors scheme
LintyDev Oct 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .fvmrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"flutter": "3.32.5"
"flutter": "3.35.5"
}
29 changes: 20 additions & 9 deletions android/app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import java.util.Properties
import java.io.FileInputStream

Expand All @@ -8,6 +9,11 @@ plugins {
id("dev.flutter.flutter-gradle-plugin")
}

java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
// https://docs.flutter.dev/deployment/android#configure-signing-in-gradle
val keystoreProperties = Properties()
val keystorePropertiesFile = rootProject.file("key.properties")
Expand All @@ -20,18 +26,23 @@ android {
//compileSdkVersion flutter.compileSdkVersion
//ndkVersion = flutter.ndkVersion
compileSdk = 36
ndkVersion = "29.0.13599879"
ndkVersion = "29.0.14206865 "

val compileJavaVersion = JavaVersion.VERSION_17
val kotlinJvmTarget = JvmTarget.JVM_17

compileOptions {
// Flag to enable support for the new language APIs
isCoreLibraryDesugaringEnabled = true
// Sets Java compatibility to Java 17
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = compileJavaVersion
targetCompatibility = compileJavaVersion
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
kotlin {
compilerOptions {
jvmTarget = kotlinJvmTarget
}
}

defaultConfig {
Expand All @@ -45,10 +56,10 @@ android {

signingConfigs {
create("release") {
keyAlias = keystoreProperties["keyAlias"] as String
keyPassword = keystoreProperties["keyPassword"] as String
keyAlias = keystoreProperties["keyAlias"] as? String
keyPassword = keystoreProperties["keyPassword"] as? String
storeFile = keystoreProperties["storeFile"]?.let { file(it) }
storePassword = keystoreProperties["storePassword"] as String
storePassword = keystoreProperties["storePassword"] as? String
}
}

Expand All @@ -64,6 +75,6 @@ flutter {
}

dependencies {
implementation("androidx.window:window:1.4.0")
implementation("androidx.window:window:1.5.0")
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.5")
}
10 changes: 10 additions & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,16 @@
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND_MULTIPLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
</intent-filter>
</activity>

<!-- Don't delete the meta-data below.
Expand Down
4 changes: 3 additions & 1 deletion android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ allprojects {
}
}

val newBuildDir: Directory = rootProject.layout.buildDirectory.dir("../../build").get()
val newBuildDir: Directory = rootProject.layout.buildDirectory
.dir("../../build")
.get()
rootProject.layout.buildDirectory.value(newBuildDir)

subprojects {
Expand Down
4 changes: 1 addition & 3 deletions android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
# https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects
# org.gradle.parallel=true
#Tue Apr 22 14:46:56 CEST 2025
android.enableJetifier=true
android.jetifier.ignorelist=bcprov-jdk15on
android.nonFinalResIds=false
android.nonTransitiveRClass=false
android.useAndroidX=true
org.gradle.jvmargs=-Xmx2048M -Dkotlin.daemon.jvm.options\="-Xmx2048M"
org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-all.zip
5 changes: 3 additions & 2 deletions android/settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ pluginManagement {
}

plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0"
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
id("com.android.application") version "8.10.1" apply false
id("org.jetbrains.kotlin.android") version "2.0.21" apply false
id("com.android.application") version "8.13.0" apply false
id("org.jetbrains.kotlin.android") version "2.2.20" apply false
}

include(":app")
17 changes: 10 additions & 7 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,13 @@ flutter config --no-analytics

Using [fvm](https://fvm.app/) :
```sh
fvm install 2.27.4
fvm install 3.27.4
cd <Project-dir>
fvm use 2.27.4
fvm use 3.27.4
```

### Android Studio

*(Optional - enable wayland support)* : Add `-Dawt.toolkit.name=WLToolkit` to the Custom VM Options.

Install the flutter plugin and restart, then go to **Settings > Languages & Framework > Android SDK > SDK Tools** and install the following :

- Android SDK Build-Tools
Expand All @@ -48,6 +46,13 @@ If Android studio doesn't pickup the path of the flutter toolchain or dart :
In **Settings > Languages & Framework > Flutter** set the flutter SDK path using the absolute path of your install.
And in **Settings > Languages & Framework > Dart** specify the Dark SDK path `<Absolute-Flutter-Path>/bin/cache/dart-sdk`

## Debugging

By default running the app via Android Studio or `flutter run` will use the debug APK (located in `build/app/outputs/flutter-apk/app-debug.apk`).
Background tasks are done with [workmanager](https://docs.page/fluttercommunity/flutter_workmanager) debugging must be enabled via the kotlin flag `WorkmanagerDebug.setCurrent(LoggingDebugHandler())`

See more info in https://docs.page/fluttercommunity/flutter_workmanager/debugging

## Contributing guidelines

Contribution must target the `develop` branch and must have documented changes.
Expand All @@ -56,6 +61,4 @@ if you are fixing an existing issue or bug, tag it in your merge request (exampl

if you are doing maintenance work, be sure to add the changelog of the libraries you are updating.

Translation are done via [crowdin](https://crowdin.com/project/piwigo-ng)


Translation are done via [crowdin](https://crowdin.com/project/piwigo-ng)
1 change: 0 additions & 1 deletion l10n.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
synthetic-package: false
arb-dir: l10n
template-arb-file: app_en.arb
untranslated-messages-file: l10n/untranslated.json
Expand Down
9 changes: 9 additions & 0 deletions l10n/app_de.arb
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,15 @@
"moveCategoryHUD_moved": "Album verschoben",
"moveCategoryError_title": "Verschieben fehlgeschlagen",
"moveCategoryError_message": "Fehler beim Verschieben Ihres Albums",
"selectCategory": "Select Album",
"selectCategory_select": "Please select an album or sub-album.",
"selectCategory_message": "{count, plural, =1{Are you sure you want to upload the image into the album {parent} ?} other{Are you sure you want to upload the images into the album {parent} ?}}",
"@selectCategory_message": {
"placeholders": {
"count": {},
"parent": {}
}
},
"categoryPrivacy": "Manage Permissions",
"categoryPrivacy_subtitle": "Manage access permissions of \"{album_name}\".",
"@categoryPrivacy_subtitle": {
Expand Down
10 changes: 10 additions & 0 deletions l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,16 @@
"moveCategoryError_title": "Move Fail",
"moveCategoryError_message": "Failed to move your album",

"selectCategory": "Select Album",
"selectCategory_select": "Please select an album or sub-album.",
"selectCategory_message": "{count, plural, =1{Are you sure you want to upload the image into the album {parent} ?} other{Are you sure you want to upload the images into the album {parent} ?}}",
"@selectCategory_message" : {
"placeholders": {
"count": {},
"parent": {}
}
},


"categoryPrivacy": "Manage Permissions",
"categoryPrivacy_subtitle": "Manage access permissions of \"{album_name}\".",
Expand Down
9 changes: 9 additions & 0 deletions l10n/app_es.arb
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,15 @@
"moveCategoryHUD_moved": "Album Moved",
"moveCategoryError_title": "Move Fail",
"moveCategoryError_message": "Failed to move your album",
"selectCategory": "Select Album",
"selectCategory_select": "Please select an album or sub-album.",
"selectCategory_message": "{count, plural, =1{Are you sure you want to upload the image into the album {parent} ?} other{Are you sure you want to upload the images into the album {parent} ?}}",
"@selectCategory_message": {
"placeholders": {
"count": {},
"parent": {}
}
},
"categoryPrivacy": "Manage Permissions",
"categoryPrivacy_subtitle": "Manage access permissions of \"{album_name}\".",
"@categoryPrivacy_subtitle": {
Expand Down
9 changes: 9 additions & 0 deletions l10n/app_fr.arb
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,15 @@
"moveCategoryHUD_moved": "Album déplacé",
"moveCategoryError_title": "Echec",
"moveCategoryError_message": "Impossible de déplacer votre album",
"selectCategory": "Select Album",
"selectCategory_select": "Please select an album or sub-album.",
"selectCategory_message": "{count, plural, =1{Are you sure you want to upload the image into the album {parent} ?} other{Are you sure you want to upload the images into the album {parent} ?}}",
"@selectCategory_message": {
"placeholders": {
"count": {},
"parent": {}
}
},
"categoryPrivacy": "Gérer les permissions",
"categoryPrivacy_subtitle": "Gérer les permissions d'accès à \"{album_name}\".",
"@categoryPrivacy_subtitle": {
Expand Down
9 changes: 9 additions & 0 deletions l10n/app_lt.arb
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,15 @@
"moveCategoryHUD_moved": "Albumas perkeltas",
"moveCategoryError_title": "Perkelti nepavyko",
"moveCategoryError_message": "Nepavyko perkelti albumo",
"selectCategory": "Select Album",
"selectCategory_select": "Please select an album or sub-album.",
"selectCategory_message": "{count, plural, =1{Are you sure you want to upload the image into the album {parent} ?} other{Are you sure you want to upload the images into the album {parent} ?}}",
"@selectCategory_message": {
"placeholders": {
"count": {},
"parent": {}
}
},
"categoryPrivacy": "Manage Permissions",
"categoryPrivacy_subtitle": "Manage access permissions of \"{album_name}\".",
"@categoryPrivacy_subtitle": {
Expand Down
9 changes: 9 additions & 0 deletions l10n/app_sk.arb
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,15 @@
"moveCategoryHUD_moved": "Album presunutý",
"moveCategoryError_title": "Presunutie zlyhalo",
"moveCategoryError_message": "Nepodarilo sa presunúť tvoj album",
"selectCategory": "Select Album",
"selectCategory_select": "Please select an album or sub-album.",
"selectCategory_message": "{count, plural, =1{Are you sure you want to upload the image into the album {parent} ?} other{Are you sure you want to upload the images into the album {parent} ?}}",
"@selectCategory_message": {
"placeholders": {
"count": {},
"parent": {}
}
},
"categoryPrivacy": "Manage Permissions",
"categoryPrivacy_subtitle": "Manage access permissions of \"{album_name}\".",
"@categoryPrivacy_subtitle": {
Expand Down
9 changes: 9 additions & 0 deletions l10n/app_zh.arb
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,15 @@
"moveCategoryHUD_moved": "相册已移动",
"moveCategoryError_title": "移动失败",
"moveCategoryError_message": "移动相册失败",
"selectCategory": "Select Album",
"selectCategory_select": "Please select an album or sub-album.",
"selectCategory_message": "{count, plural, =1{Are you sure you want to upload the image into the album {parent} ?} other{Are you sure you want to upload the images into the album {parent} ?}}",
"@selectCategory_message": {
"placeholders": {
"count": {},
"parent": {}
}
},
"categoryPrivacy": "管理权限",
"categoryPrivacy_subtitle": "管理 \"{album_name}\" 的访问权限",
"@categoryPrivacy_subtitle": {
Expand Down
61 changes: 50 additions & 11 deletions lib/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:image_picker/image_picker.dart';
import 'package:piwigo_ng/services/app_providers.dart';
import 'package:piwigo_ng/services/preferences_service.dart';
import 'package:piwigo_ng/services/receive_sharing.dart';
import 'package:piwigo_ng/utils/overscroll_behavior.dart';
import 'package:piwigo_ng/utils/themes.dart';
import 'package:piwigo_ng/views/album/album_page.dart';
Expand Down Expand Up @@ -92,10 +93,9 @@ class App extends StatelessWidget {
}

Route<dynamic> generateRoute(RouteSettings settings) {
String? routeName;
Map<String, dynamic> arguments = {};
if (settings.arguments != null) {
arguments = settings.arguments as Map<String, dynamic>;
}
bool externalAppSharedFiles = SharedIntent.sharedFiles != null && SharedIntent.sharedFiles!.isNotEmpty;

bool isAdmin = appPreferences.getBool(Preferences.isAdminKey) ?? false;

Expand All @@ -107,7 +107,14 @@ Route<dynamic> generateRoute(RouteSettings settings) {
);
}

switch (settings.name) {
if (externalAppSharedFiles) {
routeName = UploadPage.routeName;
} else {
routeName = settings.name;
arguments = _extractArguments(settings);
}

switch (routeName) {
case LoginPage.routeName:
return MaterialPageRoute(
builder: (_) => const LoginPage(),
Expand Down Expand Up @@ -164,13 +171,7 @@ Route<dynamic> generateRoute(RouteSettings settings) {
settings: settings,
);
case UploadPage.routeName:
return MaterialPageRoute(
builder: (_) => UploadPage(
imageList: arguments["images"] ?? <XFile>[],
albumId: arguments["category"],
),
settings: settings,
);
return _createUploadPageRoute(settings, externalAppSharedFiles);
case UploadStatusPage.routeName:
return MaterialPageRoute(
builder: (_) => UploadStatusPage(),
Expand Down Expand Up @@ -228,3 +229,41 @@ Route<dynamic> generateRoute(RouteSettings settings) {
);
}
}

Map<String, dynamic> _extractArguments(RouteSettings settings) {
if (settings.arguments != null) {
return settings.arguments as Map<String, dynamic>;
}
return {};
}

MaterialPageRoute<dynamic> _createUploadPageRoute(RouteSettings settings, bool externalAppSharedFiles) {
Map<String, dynamic> arguments = {};

if (externalAppSharedFiles) {
arguments['images'] = SharedIntent.sharedFiles;
SharedIntent.cleanupSharedFiles();

// Create new RouteSettings with updated arguments
return MaterialPageRoute(
builder: (_) => UploadPage(
imageList: arguments["images"] ?? <XFile>[],
albumId: arguments["category"],
),
settings: RouteSettings( // Create new RouteSettings here
name: UploadPage.routeName,
arguments: arguments,
),
);
} else {
// For other cases, use original settings
arguments = _extractArguments(settings);
return MaterialPageRoute(
builder: (_) => UploadPage(
imageList: arguments["images"] ?? <XFile>[],
albumId: arguments["category"],
),
settings: settings,
);
}
}
Loading