Skip to content

Commit

Permalink
界面优化
Browse files Browse the repository at this point in the history
  • Loading branch information
ming1016 committed Apr 15, 2024
1 parent 785c6fb commit 4ff0a25
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ struct CategoryRowView: View {
Button {
IOCategory.pin(cate)
} label: {
Label("置顶", systemImage: cate.pin == 1 ? "pin.slash.fill" : "pin.fill")
Label(cate.pin == 1 ? "取消置顶" : "置顶", systemImage: cate.pin == 1 ? "pin.slash.fill" : "pin.fill")
}
Button(role: .destructive) {
IOCategory.delete(cate)
Expand Down
10 changes: 7 additions & 3 deletions SwiftPamphletApp/InfoOrganizer/Info/InfoRowView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,14 @@ struct InfoRowView: View {

func shortDes() -> String {
let shortDes = info.des.trimmingCharacters(in: .whitespacesAndNewlines).components(separatedBy: .newlines)
if let re = shortDes.first {
return String(re)
var reStr = ""
if let first = shortDes.first {
reStr += first
}
return ""
if shortDes.count > 1 {
reStr += "\n" + shortDes[1]
}
return reStr
}

}
Expand Down
2 changes: 1 addition & 1 deletion SwiftPamphletApp/ViewComponet/ViewComponentImage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ struct NukeImage: View {
} else if state.isLoading == false {
ZStack {
Color.gray.opacity(0.2) // Placeholder
Text(url)
Text(url.prefix(100))
.font(.footnote)
.foregroundColor(light: .secondary, dark: .secondary)
}
Expand Down

0 comments on commit 4ff0a25

Please sign in to comment.