Skip to content

Commit

Permalink
Merge pull request #42 from edequartel/version-20
Browse files Browse the repository at this point in the history
update
  • Loading branch information
edequartel authored Apr 8, 2024
2 parents e0edfb7 + 1df4b7d commit 516acb5
Show file tree
Hide file tree
Showing 11 changed files with 173 additions and 27 deletions.
4 changes: 2 additions & 2 deletions Ravens.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 20;
CURRENT_PROJECT_VERSION = 21;
DEVELOPMENT_ASSET_PATHS = "\"Ravens/Preview Content\"";
DEVELOPMENT_TEAM = 278BFDM8KA;
ENABLE_PREVIEWS = YES;
Expand Down Expand Up @@ -677,7 +677,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 20;
CURRENT_PROJECT_VERSION = 21;
DEVELOPMENT_ASSET_PATHS = "\"Ravens/Preview Content\"";
DEVELOPMENT_TEAM = 278BFDM8KA;
ENABLE_PREVIEWS = YES;
Expand Down
54 changes: 49 additions & 5 deletions Ravens/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
"nl" : {
"stringUnit" : {
"state" : "translated",
"value" : "Gebied"
"value" : "Locatie"
}
}
}
Expand Down Expand Up @@ -346,10 +346,36 @@
}
},
"Infinity" : {

"localizations" : {
"nl" : {
"stringUnit" : {
"state" : "translated",
"value" : "Oneindig"
}
}
}
},
"Infinity (Area)" : {

"extractionState" : "stale",
"localizations" : {
"nl" : {
"stringUnit" : {
"state" : "translated",
"value" : "Oneindig (locatie)"
}
}
}
},
"Infinity (Location)" : {
"extractionState" : "stale",
"localizations" : {
"nl" : {
"stringUnit" : {
"state" : "translated",
"value" : "Oneindig (locatie)"
}
}
}
},
"International" : {
"localizations" : {
Expand All @@ -367,7 +393,7 @@
"nl" : {
"stringUnit" : {
"state" : "translated",
"value" : "Invalide URK"
"value" : "Invalide URL"
}
}
}
Expand Down Expand Up @@ -456,6 +482,16 @@
}
}
},
"Location" : {
"localizations" : {
"nl" : {
"stringUnit" : {
"state" : "translated",
"value" : "Locatie"
}
}
}
},
"Login" : {
"localizations" : {
"nl" : {
Expand Down Expand Up @@ -549,7 +585,14 @@
}
},
"Map Style" : {

"localizations" : {
"nl" : {
"stringUnit" : {
"state" : "translated",
"value" : "Kaartstijl"
}
}
}
},
"Me" : {
"localizations" : {
Expand Down Expand Up @@ -651,6 +694,7 @@
}
},
"Obs" : {
"extractionState" : "stale",
"localizations" : {
"nl" : {
"stringUnit" : {
Expand Down
1 change: 1 addition & 0 deletions Ravens/NotUsed/SingersView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
////
//
import SwiftUI
//
//import SwiftData
//
//// Model
Expand Down
10 changes: 7 additions & 3 deletions Ravens/Notes.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
# Remarks development

## 20
## 21
- graphs

## 19
- second language
- notifications
- stats

## 20
- adjustments in lists location, observations
- adding locations

## 19

## 18
+ images now cached

Expand Down
2 changes: 1 addition & 1 deletion Ravens/Views/MapObservationView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ struct MapObservationView: View {
.mapStyle(settings.mapStyle)

.safeAreaInset(edge: .bottom) {
SettingsDetailsView(count: observationsViewModel.locations.count, results: observationsViewModel.observations?.count ?? 0 )
SettingsDetailsView(count: observationsViewModel.locations.count, results: observationsViewModel.observations?.count ?? 0, showInfinity: false )
}

.onTapGesture() { position in
Expand Down
6 changes: 4 additions & 2 deletions Ravens/Views/ObsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,17 @@ struct ObsView: View {
HStack {
Text("\(obs.user_detail?.name ?? String(obs.user))")
Spacer()
Text("\(obs.user_detail?.id ?? 0)")
// Text("\(obs.user_detail?.id ?? 0)")
}
}

if showLocation {
HStack {
Text("\(obs.location_detail?.name ?? "name")")
.lineLimit(1) // Set the maximum number of lines to 1
Spacer()
Text("\(obs.location_detail?.id ?? 0)")
// Text("\(obs.location_detail?.id ?? 0)")
.lineLimit(1) // Set the maximum number of lines to 1
}
}

Expand Down
12 changes: 3 additions & 9 deletions Ravens/Views/ObservationsLocationsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,17 @@ struct ObservationsLocationView: View {

var locationId: Int
var locationStr: String

@Binding var isShowing: Bool

var body: some View {
VStack {
HStack {
Text("Obs")
Text(locationStr)
}
.padding(16)
.bold()

Text("Locations")
List {
if let results = viewModel.observations?.results {
ForEach(results.sorted(by: { ($1.rarity, $0.species_detail.name, $1.date, $0.time ?? "00:00") < ($0.rarity, $1.species_detail.name, $0.date, $1.time ?? "00:00") }), id: \.id) {
result in
ObsView(obs: result, showLocation: false)
ObsView(obs: result, showLocation: true)
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion Ravens/Views/ObservationsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import SwiftUI

struct ObservationsView: View {
@EnvironmentObject var observationsViewModel: ObservationsViewModel

@EnvironmentObject var keyChainViewModel: KeychainViewModel
@EnvironmentObject var settings: Settings

Expand All @@ -31,7 +32,8 @@ struct ObservationsView: View {
if let results = observationsViewModel.observations?.results {
ForEach(results.sorted(by: { ($1.rarity, $0.species_detail.name, $1.date, $0.time ?? "00:00") < ($0.rarity, $1.species_detail.name, $0.date, $1.time ?? "00:00") }), id: \.id) {
result in
ObsView(obs: result, showUsername: true)

ObsView(obs: result, showUsername: false)
}

} else {
Expand Down
6 changes: 4 additions & 2 deletions Ravens/Views/SettingsDetailsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ struct SettingsDetailsView: View {

var count: Int = 0
var results: Int = 0
var showInfinity: Bool = true

var body: some View {
HStack {
Expand All @@ -28,9 +29,10 @@ struct SettingsDetailsView: View {
.symbolRenderingMode(.palette)
.foregroundStyle(myColor(value: settings.selectedRarity), .white)
Text("\(speciesGroupViewModel.getName(forID: settings.selectedSpeciesGroup) ?? "unknown")")
.lineLimit(1)

if settings.infinity {
Text("Infinity (Area)")
if (settings.infinity && showInfinity) {
Image(systemName: "infinity")
} else {
Text("\(settings.days)d")
Text("\(settings.selectedDate, formatter: dateFormatter)")
Expand Down
4 changes: 2 additions & 2 deletions Ravens/Views/SettingsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ struct SettingsView: View {
}


if !(settings.infinity) {
// if !(settings.infinity) {
Picker("Window", selection: $settings.days) {
ForEach(1 ... 14, id: \.self) { day in
HStack() {
Expand All @@ -134,7 +134,7 @@ struct SettingsView: View {
// settings.isFirstAppear = true
// settings.isFirstAppearObsView = true
}
}
// }


}
Expand Down
Loading

0 comments on commit 516acb5

Please sign in to comment.