Skip to content

Commit

Permalink
move version string to the bottom
Browse files Browse the repository at this point in the history
  • Loading branch information
greenart7c3 committed Jan 8, 2024
1 parent ec3334d commit 64ea09f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 30 deletions.
36 changes: 6 additions & 30 deletions app/src/main/java/com/greenart7c3/nostrsigner/ui/SettingsScreen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@ import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.CurrencyBitcoin
import androidx.compose.material.icons.filled.Key
import androidx.compose.material.icons.filled.Person
import androidx.compose.material.icons.filled.PhoneAndroid
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.SheetValue
Expand All @@ -26,6 +24,7 @@ import androidx.compose.ui.platform.LocalUriHandler
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.text.style.TextDecoration
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.greenart7c3.nostrsigner.BuildConfig
Expand Down Expand Up @@ -117,46 +116,23 @@ fun SettingsScreen(
)
}

Box(
Modifier
.padding(16.dp)
) {
IconRow(
title = stringResource(R.string.support_development),
icon = Icons.Default.CurrencyBitcoin,
tint = MaterialTheme.colorScheme.onBackground,
onClick = {
uriHandler.openUri(context.getString(R.string.support_development_uri))
}
)
}

Box(
Modifier
.padding(16.dp)
) {
IconRow(
title = "v" + BuildConfig.VERSION_NAME,
icon = Icons.Default.PhoneAndroid,
tint = MaterialTheme.colorScheme.onBackground,
onClick = { }
)
}
Spacer(modifier = Modifier.weight(1f))

HyperlinkText(
Modifier
.fillMaxWidth()
.padding(vertical = 24.dp),
fullText = "Made possible by OpenSats \n\nSource code",
fullText = "v${BuildConfig.VERSION_NAME}\n\n${context.getString(R.string.support_development)}\n\n${context.getString(R.string.source_code)}\n\n${context.getString(R.string.made_possible_by)} ${context.getString(R.string.opensats)}",
hyperLinks = mutableMapOf(
"OpenSats" to "https://opensats.org",
"Source code" to "https://github.com/greenart7c3/amber"
stringResource(R.string.opensats) to stringResource(R.string.opensats_uri),
stringResource(R.string.source_code) to stringResource(R.string.amber_github_uri),
stringResource(R.string.support_development) to stringResource(R.string.support_development_uri)
),
textStyle = TextStyle(
textAlign = TextAlign.Center
),
linkTextColor = MaterialTheme.colorScheme.primary,
linkTextDecoration = TextDecoration.Underline,
fontSize = 18.sp
)
}
Expand Down
5 changes: 5 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,9 @@
<string name="decrypt_content">Decrypt content</string>
<string name="support_development_uri">https://donate.greenart7c3.com/apps/gubjiRzruRLo6hMviH2hmSrvJjt/pos/static</string>
<string name="support_development">Support development</string>
<string name="opensats">OpenSats</string>
<string name="source_code">Source code</string>
<string name="opensats_uri">https://opensats.org</string>
<string name="amber_github_uri">https://github.com/greenart7c3/amber</string>
<string name="made_possible_by">Made possible by</string>
</resources>

0 comments on commit 64ea09f

Please sign in to comment.