Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change: adjust ui #339

Merged
merged 1 commit into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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