mirror of
https://github.com/shadowsocks/ShadowsocksX-NG.git
synced 2026-11-28 17:23:47 +00:00
style(servers): emphasize activation action
This commit is contained in:
@@ -15,17 +15,6 @@ struct CatalogNodeDetailView: View {
|
||||
var body: some View {
|
||||
if let node {
|
||||
NodeDetailView(detail: presentation(for: node)) {
|
||||
Button(
|
||||
workflow.isFavorite(nodeID)
|
||||
? String(localized: "取消收藏", table: "ServerDetails")
|
||||
: String(localized: "收藏", table: "ServerDetails")
|
||||
) {
|
||||
do {
|
||||
try workflow.setFavorite(nodeID, isFavorite: !workflow.isFavorite(nodeID))
|
||||
} catch {
|
||||
errors.present(error)
|
||||
}
|
||||
}
|
||||
Button(
|
||||
activation.pendingTargetID == nodeID
|
||||
? String(localized: "激活中…", table: "ServerDetails")
|
||||
@@ -39,7 +28,19 @@ struct CatalogNodeDetailView: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
.buttonStyle(.borderedProminent)
|
||||
.disabled(!(eligibility?.canActivate ?? false) || activation.isPending)
|
||||
Button(
|
||||
workflow.isFavorite(nodeID)
|
||||
? String(localized: "取消收藏", table: "ServerDetails")
|
||||
: String(localized: "收藏", table: "ServerDetails")
|
||||
) {
|
||||
do {
|
||||
try workflow.setFavorite(nodeID, isFavorite: !workflow.isFavorite(nodeID))
|
||||
} catch {
|
||||
errors.present(error)
|
||||
}
|
||||
}
|
||||
if !node.isGroup && parameters.failure != nil {
|
||||
Button(String(localized: "重新加载", table: "ServerDetails")) {
|
||||
parameters.reload(load: workflow.serverDetailPluginOptions)
|
||||
|
||||
Reference in New Issue
Block a user