mirror of
https://github.com/gkd-kit/gkd.git
synced 2024-11-16 03:32:38 +08:00
perf: short log file href
This commit is contained in:
parent
9b17aaac77
commit
072cbead58
|
@ -1,9 +1,13 @@
|
|||
package li.songe.gkd.data
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
import li.songe.gkd.util.FILE_SHORT_URL
|
||||
|
||||
@Serializable
|
||||
data class GithubPoliciesAsset(
|
||||
val id: Int,
|
||||
val href: String,
|
||||
)
|
||||
) {
|
||||
val shortHref: String
|
||||
get() = FILE_SHORT_URL + id
|
||||
}
|
||||
|
|
|
@ -291,7 +291,7 @@ fun useSettingsPage(): ScaffoldExt {
|
|||
|
||||
is LoadStatus.Success -> {
|
||||
AlertDialog(title = { Text(text = "上传完成") }, text = {
|
||||
Text(text = uploadStatusVal.result.href)
|
||||
Text(text = uploadStatusVal.result.shortHref)
|
||||
}, onDismissRequest = {}, dismissButton = {
|
||||
TextButton(onClick = {
|
||||
vm.uploadStatusFlow.value = null
|
||||
|
@ -300,7 +300,7 @@ fun useSettingsPage(): ScaffoldExt {
|
|||
}
|
||||
}, confirmButton = {
|
||||
TextButton(onClick = {
|
||||
ClipboardUtils.copyText(uploadStatusVal.result.href)
|
||||
ClipboardUtils.copyText(uploadStatusVal.result.shortHref)
|
||||
toast("复制成功")
|
||||
vm.uploadStatusFlow.value = null
|
||||
}) {
|
||||
|
|
|
@ -6,6 +6,7 @@ import li.songe.gkd.BuildConfig
|
|||
const val VOLUME_CHANGED_ACTION = "android.media.VOLUME_CHANGED_ACTION"
|
||||
|
||||
const val FILE_UPLOAD_URL = "https://u.gkd.li/"
|
||||
const val FILE_SHORT_URL = "https://f.gkd.li/"
|
||||
const val IMPORT_BASE_URL = "https://i.gkd.li/i/"
|
||||
|
||||
const val UPDATE_URL = "https://registry.npmmirror.com/@gkd-kit/app/latest/files/index.json"
|
||||
|
|
Loading…
Reference in New Issue
Block a user