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
2 changes: 2 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,8 @@ dependencies {
implementation(libs.reword)
implementation(libs.androidx.datastore)
implementation(libs.protobuf.kotlin.lite)
implementation(libs.multiplatform.markdown.renderer)
implementation(libs.multiplatform.markdown.renderer.m3)

if (ffmpegModuleExists || isCI) {
implementation(files("libs/lib-decoder-ffmpeg-release.aar"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import androidx.leanback.widget.GuidanceStylist
import androidx.leanback.widget.GuidedAction
import androidx.lifecycle.lifecycleScope
import com.github.damontecres.stashapp.navigation.Destination
import com.github.damontecres.stashapp.ui.pages.DownloadCallback
import com.github.damontecres.stashapp.util.Release
import com.github.damontecres.stashapp.util.StashCoroutineExceptionHandler
import com.github.damontecres.stashapp.util.StashServer
Expand Down Expand Up @@ -94,7 +95,17 @@ class UpdateAppFragment : GuidedStepSupportFragment() {
)
},
) {
UpdateChecker.installRelease(requireActivity(), release)
UpdateChecker.installRelease(
requireActivity(),
release,
object : DownloadCallback {
override fun contentLength(contentLength: Long) {
}

override fun bytesDownloaded(bytes: Long) {
}
},
)
}
} else if (action.id == 1000L) {
serverViewModel.navigationManager.navigate(Destination.ReleaseChangelog(release))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import com.github.damontecres.stashapp.LicenseFragment
import com.github.damontecres.stashapp.PinFragment
import com.github.damontecres.stashapp.R
import com.github.damontecres.stashapp.RootActivity
import com.github.damontecres.stashapp.UpdateAppFragment
import com.github.damontecres.stashapp.UpdateChangelogFragment
import com.github.damontecres.stashapp.setup.readonly.SettingsPinEntryFragment
import com.github.damontecres.stashapp.ui.NavDrawerFragment
Expand Down Expand Up @@ -81,10 +80,6 @@ class NavigationManagerCompose(

// Destination.Setup -> SetupFragment()

is Destination.UpdateApp -> {
UpdateAppFragment()
}

is Destination.ReleaseChangelog -> {
UpdateChangelogFragment()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import androidx.compose.foundation.background
import androidx.compose.foundation.focusable
import androidx.compose.foundation.gestures.scrollBy
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.BoxScope
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.height
Expand All @@ -27,6 +28,7 @@ import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.drawBehind
import androidx.compose.ui.draw.shadow
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.graphicsLayer
import androidx.compose.ui.graphics.vector.ImageVector
Expand All @@ -36,6 +38,7 @@ import androidx.compose.ui.input.key.key
import androidx.compose.ui.input.key.onKeyEvent
import androidx.compose.ui.input.key.type
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import androidx.compose.ui.window.Dialog
import androidx.compose.ui.window.DialogProperties
Expand Down Expand Up @@ -303,3 +306,28 @@ fun MarkerDurationDialog(
properties = DialogProperties(),
)
}

@Composable
fun BasicDialog(
onDismissRequest: () -> Unit,
properties: DialogProperties = DialogProperties(),
elevation: Dp = 8.dp,
content: @Composable () -> Unit,
) {
Dialog(
onDismissRequest = onDismissRequest,
properties = properties,
) {
Box(
modifier =
Modifier
.shadow(elevation = elevation, shape = RoundedCornerShape(8.dp))
.background(
MaterialTheme.colorScheme.surfaceColorAtElevation(elevation),
shape = RoundedCornerShape(8.dp),
),
) {
content()
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import com.github.damontecres.stashapp.ui.pages.SearchPage
import com.github.damontecres.stashapp.ui.pages.SettingsPage
import com.github.damontecres.stashapp.ui.pages.StudioPage
import com.github.damontecres.stashapp.ui.pages.TagPage
import com.github.damontecres.stashapp.ui.pages.UpdateAppPage
import com.github.damontecres.stashapp.util.StashServer
import kotlin.time.Duration.Companion.milliseconds
import kotlin.time.Duration.Companion.seconds
Expand Down Expand Up @@ -85,6 +86,14 @@ fun DestinationContent(
// modifier = Modifier.fillMaxSize(),
// )

is Destination.UpdateApp -> {
UpdateAppPage(
composeUiConfig = composeUiConfig,
navigationManager = navManager,
modifier = modifier,
)
}

is Destination.Settings -> {
SettingsPage(
server = server,
Expand Down
Loading
Loading