Skip to content

Commit

Permalink
change: adjust ui (#339)
Browse files Browse the repository at this point in the history
  • Loading branch information
singularity-s0 authored Nov 27, 2024
1 parent d5fd7f4 commit 0e4cc50
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 16 deletions.
8 changes: 6 additions & 2 deletions DanXiUI/Curriculum/Page/CurriculumHomePage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,12 @@ fileprivate struct HomePageContent: View {
.searchable(text: $searchText)
.toolbar {
if profileStore.isAdmin {
DetailLink(value: CurriculumSection.moderate) {
Image(systemName: "video")
Menu {
DetailLink(value: CurriculumSection.moderate) {
Label(String(localized: "Admin Actions", bundle: .module), systemImage: "person.badge.key")
}
} label: {
Image(systemName: "ellipsis.circle")
}
}
}
Expand Down
10 changes: 10 additions & 0 deletions FudanUI/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,16 @@
}
}
},
"Advanced Settings" : {
"localizations" : {
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "高级设置"
}
}
}
},
"All" : {
"localizations" : {
"zh-Hans" : {
Expand Down
36 changes: 22 additions & 14 deletions FudanUI/Pages/CoursePage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -156,21 +156,29 @@ fileprivate struct CalendarContent: View {
}
.disabled(model.semester.startDate == nil)

Button {
showColorSheet = true
} label: {
Label {
Text("Change Color", bundle: .module)
} icon: {
Image(systemName: "paintpalette")
}
}
Divider()

Button {
showManualDateSelectionSheet = true
} label: {
Text("Set Semester Start Date", bundle: .module)
}
Menu(String(localized: "Advanced Settings", bundle: .module), content: {
Button {
showColorSheet = true
} label: {
Label {
Text("Change Color", bundle: .module)
} icon: {
Image(systemName: "paintpalette")
}
}

Button {
showManualDateSelectionSheet = true
} label: {
Label {
Text("Set Semester Start Date", bundle: .module)
} icon: {
Image(systemName: "clock")
}
}
})
} label: {
Image(systemName: "ellipsis.circle")
}
Expand Down

0 comments on commit 0e4cc50

Please sign in to comment.