Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@

# Zipline Upload

<a title="Django Files" href="https://zipline-android.cssnr.com/" target="_blank">
<img alt="Django Files" align="right" width="128" height="auto" src="https://zipline-android.cssnr.com/images/logo.png"></a>

- [Install](#Install)
- [Setup](#Setup)
- [Features](#Features)
Expand Down
12 changes: 11 additions & 1 deletion app/src/main/java/org/cssnr/zipline/api/ServerApi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -675,12 +675,22 @@ class ServerApi(private val context: Context, url: String? = null) {
@param:Json(name = "updatedAt") val updatedAt: String,
@param:Json(name = "role") val role: String,
//@param:Json(name = "view") val view: UserViewSettings,
@param:Json(name = "sessions") val sessions: List<String>,
@param:Json(name = "sessions") val sessions: List<Session>,
//@param:Json(name = "oauthProviders") val oauthProviders: List<String>,
@param:Json(name = "totpSecret") val totpSecret: String?,
//@param:Json(name = "quota") val quota: String?,
)

@JsonClass(generateAdapter = true)
data class Session(
val id: String,
val createdAt: String,
val ua: String?,
val client: String?,
val device: String?,
val userId: String
)

@JsonClass(generateAdapter = true)
data class PatchUser(
@param:Json(name = "username") val username: String? = null,
Expand Down
5 changes: 2 additions & 3 deletions app/src/main/java/org/cssnr/zipline/ui/user/UserFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import androidx.core.content.FileProvider
import androidx.core.content.edit
import androidx.core.graphics.toColorInt
import androidx.core.net.toUri
import androidx.core.os.bundleOf
import androidx.fragment.app.Fragment
import androidx.fragment.app.activityViewModels
import androidx.fragment.app.setFragmentResultListener
Expand Down Expand Up @@ -254,7 +253,7 @@ class UserFragment : Fragment() {
registerForActivityResult(ActivityResultContracts.OpenDocument()) { uri ->
Log.d("filePickerLauncher", "uris: $uri")
if (uri != null) {
val bundle = bundleOf("uri" to uri.toString())
val bundle = Bundle().apply { putString("uri", uri.toString()) }
navController.navigate(R.id.nav_item_crop, bundle)
}
//} else {
Expand Down Expand Up @@ -439,7 +438,7 @@ class UserFragment : Fragment() {
Log.d(LOG_TAG, "LOG OUT")
// TODO: Add logout function to ServerApi and actually log out...
preferences.edit { remove("ziplineToken") }
val bundle = bundleOf("url" to savedUrl)
val bundle = Bundle().apply { putString("url", savedUrl) }
Log.d(LOG_TAG, "bundle: $bundle")
navController.navigate(
R.id.nav_item_login, bundle, NavOptions.Builder()
Expand Down
16 changes: 8 additions & 8 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
[versions]
agp = "9.0.1"
kotlin = "2.3.10"
agp = "9.1.1"
kotlin = "2.3.20"
ksp = "2.3.5"
coreKtx = "1.17.0"
coreKtx = "1.18.0"
junit = "4.13.2"
junitVersion = "1.3.0"
espressoCore = "3.7.0"
appcompat = "1.7.1"
material = "1.13.0"

activity = "1.12.4"
activity = "1.13.0"
preferenceKtx = "1.2.1"
lifecycleLivedataKtx = "2.10.0"
lifecycleViewmodelKtx = "2.10.0"
navigationFragmentKtx = "2.9.7"
navigationUiKtx = "2.9.7"
workRuntimeKtx = "2.11.1"
workRuntimeKtx = "2.11.2"
swiperefreshlayout = "1.2.0"
webkit = "1.15.0"
room = "2.8.4"
media3 = "1.9.2"
media3 = "1.10.0"

okhttp = "5.3.2"
retrofit = "3.0.0"
Expand All @@ -31,8 +31,8 @@ photoview = "1.0.3"
androidImageCropper = "4.7.0"

googleServices = "4.4.4"
firebaseBom = "34.9.0"
crashlyticsPlugin = "3.0.6"
firebaseBom = "34.12.0"
crashlyticsPlugin = "3.0.7"

[libraries]
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
Expand Down
Loading