Skip to content

Commit

Permalink
Merge pull request #12 from loloop/mc/short-title-fix
Browse files Browse the repository at this point in the history
fixes not being able to push new races on admin
  • Loading branch information
loloop authored Nov 18, 2023
2 parents b120414 + 1287276 commit 513b780
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
4 changes: 3 additions & 1 deletion app/LandinhoLib/Sources/RacesAdmin/RaceEditor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ public struct RaceEditor: Reducer {
let request = UploadRaceRequest(
title: state.title,
categoryTag: state.tag,
earliestEventDate: state.date)
earliestEventDate: state.date,
shortTitle: state.shortTitle)
return .run { send in
try await send(.raceRequest(.request(.post(request))))
}
Expand All @@ -92,5 +93,6 @@ public struct RaceEditor: Reducer {
let title: String
let categoryTag: String
let earliestEventDate: Date
let shortTitle: String
}
}
9 changes: 6 additions & 3 deletions app/LandinhoLib/Sources/RacesAdmin/Views/RacesAdminView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ public struct RacesAdminView: View {
Group {
switch viewStore.raceList.response {
case .idle:
Color(.systemBackground)
Color(.secondarySystemBackground)
.onAppear {
store.send(.onAppear)
viewStore.send(.onAppear)
}
case .loading, .reloading:
ProgressView()
Expand All @@ -44,7 +44,7 @@ public struct RacesAdminView: View {
.navigationTitle(viewStore.title)
.navigationBarTitleDisplayMode(.large)
}
.background(Color(.secondarySystemBackground))
.background(.background.secondary)
.toolbar {
ToolbarItem(placement: .secondaryAction) {
Button(action: {
Expand Down Expand Up @@ -90,7 +90,10 @@ public struct RacesAdminView: View {
VStack(alignment: .leading) {
Text(race.title)
.font(.title3)
Text(race.shortTitle)
.font(.headline)
Text("\(race.earliestEventDate?.formatted() ?? "")")
.font(.subheadline)
}
Spacer()
Image(systemName: "chevron.right")
Expand Down
4 changes: 2 additions & 2 deletions app/VroomVroom.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 3;
CURRENT_PROJECT_VERSION = 6;
DEVELOPMENT_ASSET_PATHS = "\"VroomVroom/Preview Content\"";
DEVELOPMENT_TEAM = UQCQ667RNK;
ENABLE_PREVIEWS = YES;
Expand Down Expand Up @@ -501,7 +501,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 3;
CURRENT_PROJECT_VERSION = 6;
DEVELOPMENT_ASSET_PATHS = "\"VroomVroom/Preview Content\"";
DEVELOPMENT_TEAM = UQCQ667RNK;
ENABLE_PREVIEWS = YES;
Expand Down
5 changes: 4 additions & 1 deletion app/VroomVroom/Info.plist
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict/>
<dict>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
</dict>
</plist>

0 comments on commit 513b780

Please sign in to comment.