Co-authored-by: M57 <hy4ri@users.noreply.github.com>
This commit is contained in:
1 parent
f5edf1569c
commit
a2d299e136
3 files changed
+65
-22
No files matched your search
@@ -135,15 +135,6 @@ jobs:
|
|||||||
-PversionName="$VERSION_NAME" \
|
-PversionName="$VERSION_NAME" \
|
||||||
-PversionCode="$VERSION_CODE"
|
-PversionCode="$VERSION_CODE"
|
||||||
|
|
||||||
- name: Create source archive
|
|
||||||
run: |
|
|
||||||
mkdir -p release
|
|
||||||
git archive --format=tar.gz \
|
|
||||||
-o release/hermes-control-${{ steps.version.outputs.tag }}-source.tar.gz \
|
|
||||||
--prefix=hermes-control-${{ steps.version.outputs.tag }}/ \
|
|
||||||
${{ github.sha }}
|
|
||||||
ls -lh release/
|
|
||||||
|
|
||||||
- name: Rename APK
|
- name: Rename APK
|
||||||
run: |
|
run: |
|
||||||
mkdir -p release
|
mkdir -p release
|
||||||
@@ -155,9 +146,7 @@ jobs:
|
|||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: hermes-control-release
|
name: hermes-control-release
|
||||||
path: |
|
path: release/*.apk
|
||||||
release/*.apk
|
|
||||||
release/*-source.tar.gz
|
|
||||||
retention-days: 90
|
retention-days: 90
|
||||||
|
|
||||||
- name: Create GitHub Release
|
- name: Create GitHub Release
|
||||||
@@ -166,9 +155,7 @@ jobs:
|
|||||||
tag_name: ${{ steps.version.outputs.tag }}
|
tag_name: ${{ steps.version.outputs.tag }}
|
||||||
name: Hermes Control ${{ steps.version.outputs.tag }}
|
name: Hermes Control ${{ steps.version.outputs.tag }}
|
||||||
generate_release_notes: true
|
generate_release_notes: true
|
||||||
files: |
|
files: release/*.apk
|
||||||
release/*.apk
|
|
||||||
release/*-source.tar.gz
|
|
||||||
prerelease: false
|
prerelease: false
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -19,6 +19,12 @@ android {
|
|||||||
// Falls back to defaults for local development.
|
// Falls back to defaults for local development.
|
||||||
versionCode = (project.findProperty("versionCode") as? String)?.toIntOrNull() ?: 1
|
versionCode = (project.findProperty("versionCode") as? String)?.toIntOrNull() ?: 1
|
||||||
versionName = (project.findProperty("versionName") as? String) ?: "1.0-dev"
|
versionName = (project.findProperty("versionName") as? String) ?: "1.0-dev"
|
||||||
|
|
||||||
|
// Embed git commit SHA for the About card in Settings
|
||||||
|
val gitSha = providers.exec {
|
||||||
|
commandLine("git", "rev-parse", "--short", "HEAD")
|
||||||
|
}.standardOutput.asText.get().trim()
|
||||||
|
buildConfigField("String", "GIT_SHA", "\"$gitSha\"")
|
||||||
}
|
}
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ import androidx.compose.material3.CircularProgressIndicator
|
|||||||
import androidx.compose.material3.DropdownMenu
|
import androidx.compose.material3.DropdownMenu
|
||||||
import androidx.compose.material3.DropdownMenuItem
|
import androidx.compose.material3.DropdownMenuItem
|
||||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||||
|
import androidx.compose.material3.HorizontalDivider
|
||||||
import androidx.compose.material3.Icon
|
import androidx.compose.material3.Icon
|
||||||
import androidx.compose.material3.IconButton
|
import androidx.compose.material3.IconButton
|
||||||
import androidx.compose.material3.MaterialTheme
|
import androidx.compose.material3.MaterialTheme
|
||||||
@@ -396,19 +397,68 @@ fun SettingsScreen(
|
|||||||
|
|
||||||
Spacer(modifier = Modifier.height(16.dp))
|
Spacer(modifier = Modifier.height(16.dp))
|
||||||
|
|
||||||
// App version info
|
// ── About section ─────────────────────────────────────────
|
||||||
Text(
|
SectionCard(title = "About") {
|
||||||
text = "v${BuildConfig.VERSION_NAME} (${BuildConfig.VERSION_CODE})",
|
Row(verticalAlignment = Alignment.CenterVertically) {
|
||||||
style = MaterialTheme.typography.labelSmall,
|
Text(
|
||||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
text = "⚡ Hermes Control",
|
||||||
modifier = Modifier.align(Alignment.CenterHorizontally),
|
style =
|
||||||
)
|
MaterialTheme.typography.titleMedium.copy(
|
||||||
|
fontWeight = FontWeight.Bold,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
Spacer(modifier = Modifier.height(8.dp))
|
||||||
|
HorizontalDivider(color = MaterialTheme.colorScheme.outlineVariant)
|
||||||
|
Spacer(modifier = Modifier.height(8.dp))
|
||||||
|
|
||||||
|
InfoRow(label = "Version", value = "v${BuildConfig.VERSION_NAME} (${BuildConfig.VERSION_CODE})")
|
||||||
|
InfoRow(
|
||||||
|
label = "Build",
|
||||||
|
value = if (BuildConfig.DEBUG) "Debug" else "Release",
|
||||||
|
)
|
||||||
|
if (BuildConfig.GIT_SHA.isNotBlank()) {
|
||||||
|
InfoRow(label = "Commit", value = BuildConfig.GIT_SHA)
|
||||||
|
}
|
||||||
|
|
||||||
|
Spacer(modifier = Modifier.height(12.dp))
|
||||||
|
Text(
|
||||||
|
text = "https://github.com/Hy4ri/hermes-mobile",
|
||||||
|
style =
|
||||||
|
MaterialTheme.typography.bodySmall.copy(
|
||||||
|
color = MaterialTheme.colorScheme.primary,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
Spacer(modifier = Modifier.height(16.dp))
|
Spacer(modifier = Modifier.height(16.dp))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
private fun InfoRow(
|
||||||
|
label: String,
|
||||||
|
value: String,
|
||||||
|
) {
|
||||||
|
Row(
|
||||||
|
modifier = Modifier.fillMaxWidth().padding(vertical = 2.dp),
|
||||||
|
horizontalArrangement = Arrangement.SpaceBetween,
|
||||||
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
|
) {
|
||||||
|
Text(
|
||||||
|
text = label,
|
||||||
|
style = MaterialTheme.typography.bodyMedium,
|
||||||
|
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||||
|
)
|
||||||
|
Text(
|
||||||
|
text = value,
|
||||||
|
style = MaterialTheme.typography.bodyMedium.copy(fontWeight = FontWeight.Medium),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
private fun SectionCard(
|
private fun SectionCard(
|
||||||
title: String,
|
title: String,
|
||||||
|
|||||||
Reference in new issue
Block a user