@@ -3,6 +3,8 @@ package org.qownnotes.mobile
33import android.content.ClipData
44import android.content.ClipboardManager
55import android.content.Intent
6+ import android.net.Uri
7+ import android.os.Build
68import android.os.Bundle
79import android.util.TypedValue
810import androidx.activity.ComponentActivity
@@ -124,6 +126,7 @@ import kotlin.math.roundToInt
124126import kotlinx.coroutines.delay
125127import kotlinx.coroutines.flow.flowOf
126128import kotlinx.coroutines.launch
129+ import org.qownnotes.mobile.BuildConfig
127130import org.qownnotes.mobile.core.Account
128131import org.qownnotes.mobile.core.Note
129132import org.qownnotes.mobile.core.NoteExcerpt
@@ -466,6 +469,7 @@ private fun NoteListScreen(
466469 var query by rememberSaveable { mutableStateOf(" " ) }
467470 var showRemoveConfirmation by rememberSaveable(accountId) { mutableStateOf(false ) }
468471 var showAccountChooser by rememberSaveable(accountId) { mutableStateOf(false ) }
472+ var showAbout by rememberSaveable(accountId) { mutableStateOf(false ) }
469473 var accountMenuOpen by rememberSaveable(accountId) { mutableStateOf(false ) }
470474 var selectionMenuOpen by rememberSaveable(accountId) { mutableStateOf(false ) }
471475 var selectedNoteIds by rememberSaveable(accountId) { mutableStateOf(emptyList<String >()) }
@@ -646,6 +650,15 @@ private fun NoteListScreen(
646650 },
647651 modifier = Modifier .testTag(" remove-account" )
648652 )
653+ Spacer (modifier = Modifier .height(4 .dp))
654+ DropdownMenuItem (
655+ text = { Text (" About" ) },
656+ onClick = {
657+ accountMenuOpen = false
658+ showAbout = true
659+ },
660+ modifier = Modifier .testTag(" about" )
661+ )
649662 }
650663 }
651664 }
@@ -891,6 +904,46 @@ private fun NoteListScreen(
891904 }
892905 )
893906 }
907+ if (showAbout) {
908+ val context = LocalContext .current
909+ val packageInfo = remember {
910+ context.packageManager.getPackageInfo(context.packageName, 0 )
911+ }
912+ val repoUrl = " https://github.com/qownnotes/qownnotes-android"
913+ AlertDialog (
914+ onDismissRequest = { showAbout = false },
915+ title = { Text (" About QOwnNotes" ) },
916+ text = {
917+ Column (verticalArrangement = Arrangement .spacedBy(8 .dp)) {
918+ Text (
919+ " Version: ${packageInfo.versionName} " ,
920+ modifier = Modifier .clickable {
921+ context.startActivity(
922+ Intent (
923+ Intent .ACTION_VIEW ,
924+ Uri .parse(" $repoUrl /releases/tag/v${packageInfo.versionName} " )
925+ )
926+ )
927+ }
928+ )
929+ Text (
930+ " Commit: ${BuildConfig .GIT_COMMIT } " ,
931+ modifier = Modifier .clickable {
932+ context.startActivity(
933+ Intent (
934+ Intent .ACTION_VIEW ,
935+ Uri .parse(" $repoUrl /commit/${BuildConfig .GIT_COMMIT } " )
936+ )
937+ )
938+ }
939+ )
940+ }
941+ },
942+ confirmButton = {
943+ TextButton (onClick = { showAbout = false }) { Text (" Close" ) }
944+ }
945+ )
946+ }
894947 if (trashToRestore == null ) {
895948 when (val state = trashState) {
896949 ArchiveLoadState .Idle -> Unit
0 commit comments