-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
69 changed files
with
2,136 additions
and
1,091 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,9 +22,7 @@ jobs: | |
- name: Crowdin sync | ||
uses: crowdin/[email protected] | ||
with: | ||
create_pull_request: true | ||
pull_request_title: "feat(l10n): update translations" | ||
pull_request_base_branch_name: "dev" | ||
create_pull_request: false | ||
localization_branch_name: "l10n" | ||
commit_message: "feat(l10n): update translations" | ||
upload_sources: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,4 +51,24 @@ jobs: | |
uses: actions/upload-artifact@v4 | ||
with: | ||
name: pftool | ||
path: pftool.apk | ||
path: pftool.apk | ||
|
||
- name: Check if workflow supplied | ||
id: check-workflow | ||
run: | | ||
if [ "$SECRET" == "" ]; then | ||
echo "present=NO" >> $GITHUB_OUTPUT | ||
else | ||
echo "present=YES" >> $GITHUB_OUTPUT | ||
fi | ||
env: | ||
SECRET: ${{ secrets.VERSION_DATA_WORKFLOW }} | ||
|
||
- name: Trigger workflow | ||
if: steps.check-workflow.outputs.present == 'YES' | ||
uses: fjogeleit/[email protected] | ||
with: | ||
url: ${{ secrets.VERSION_DATA_WORKFLOW }} | ||
method: "POST" | ||
customHeaders: '{ "Accept":"application/vnd.github+json", "Authorization":"Bearer ${{ secrets.VERSION_DATA_TOKEN }}" }' | ||
data: '{ "ref":"main" }' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
*.iml | ||
*.jks | ||
.gradle | ||
/.idea | ||
.DS_Store | ||
/build | ||
/captures | ||
.externalNativeBuild | ||
.cxx | ||
local.properties | ||
local.properties |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
app/src/main/java/com/aliernfrog/pftool/data/MapActionResult.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
package com.aliernfrog.pftool.data | ||
|
||
import androidx.annotation.StringRes | ||
import com.aliernfrog.pftool.R | ||
|
||
data class MapActionResult( | ||
val successful: Boolean, | ||
val messageId: Int? = if (successful) null else R.string.warning_error, | ||
@StringRes val message: Int? = if (successful) null else R.string.warning_error, | ||
val newFile: Any? = null | ||
) |
24 changes: 24 additions & 0 deletions
24
app/src/main/java/com/aliernfrog/pftool/data/MediaViewData.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.aliernfrog.pftool.data | ||
|
||
import androidx.compose.material.icons.Icons | ||
import androidx.compose.material.icons.rounded.Error | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.graphics.Color | ||
import androidx.compose.ui.graphics.vector.rememberVectorPainter | ||
import androidx.compose.ui.res.stringResource | ||
import com.aliernfrog.pftool.R | ||
import com.aliernfrog.pftool.ui.component.ErrorWithIcon | ||
|
||
data class MediaViewData( | ||
val model: Any?, | ||
val title: String? = null, | ||
val zoomEnabled: Boolean = true, | ||
val errorContent: @Composable () -> Unit = { | ||
ErrorWithIcon( | ||
error = stringResource(R.string.warning_error), | ||
painter = rememberVectorPainter(Icons.Rounded.Error), | ||
contentColor = Color.Red | ||
) | ||
}, | ||
val options: (@Composable () -> Unit)? = null | ||
) |
15 changes: 10 additions & 5 deletions
15
app/src/main/java/com/aliernfrog/pftool/data/PermissionData.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,22 @@ | ||
package com.aliernfrog.pftool.data | ||
|
||
import android.net.Uri | ||
import android.os.Environment | ||
import androidx.annotation.StringRes | ||
import androidx.compose.runtime.Composable | ||
import com.aliernfrog.pftool.util.manager.base.BasePreferenceManager | ||
|
||
data class PermissionData( | ||
@StringRes val title: Int, | ||
val recommendedPath: String?, | ||
val pref: BasePreferenceManager.Preference<String>, | ||
val recommendedPath: String? = pref.defaultValue, | ||
@StringRes val recommendedPathDescription: Int?, | ||
@StringRes val recommendedPathWarning: Int? = null, | ||
@StringRes val useUnrecommendedAnywayDescription: Int? = null, | ||
val forceRecommendedPath: Boolean = true, | ||
val getUri: () -> String, | ||
val onUriUpdate: (Uri) -> Unit, | ||
val content: @Composable () -> Unit | ||
) | ||
) | ||
|
||
val PermissionData.requiresAndroidData: Boolean | ||
get() = forceRecommendedPath && recommendedPath?.startsWith( | ||
"${Environment.getExternalStorageDirectory()}/Android/data" | ||
) == true |
11 changes: 5 additions & 6 deletions
11
app/src/main/java/com/aliernfrog/pftool/data/PrefEditItem.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
package com.aliernfrog.pftool.data | ||
|
||
import com.aliernfrog.pftool.util.manager.PreferenceManager | ||
import com.aliernfrog.pftool.util.manager.base.BasePreferenceManager | ||
|
||
data class PrefEditItem( | ||
val labelResourceId: Int, | ||
val getValue: (prefs: PreferenceManager) -> String, | ||
val setValue: (newValue: String, prefs: PreferenceManager) -> Unit, | ||
val default: String = "" | ||
) | ||
data class PrefEditItem<T>( | ||
val preference: (PreferenceManager) -> BasePreferenceManager.Preference<T>, | ||
val label: (PreferenceManager) -> Any = { preference(it).key } | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.