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

UI work #6

Merged
merged 73 commits into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
4cf0f20
Add non-pump insulin; add new colors for SMBs and non-pump
dnzxy Sep 28, 2023
1ebfca8
Changed NS eventType name + description; shortened nonPump descriptipn
dnzxy Sep 28, 2023
d308026
Capitalize 'insulin' for non-pump string; add localization to EN and GER
dnzxy Sep 28, 2023
d810422
Add localization 'Non-Pump'
dnzxy Sep 28, 2023
4ee1b41
Merge branch 'dev' of github.com:dnzxy/iAPS into nonpump-insulin
dnzxy Sep 28, 2023
d069beb
determineBolusEventType (#1)
bjorkert Sep 29, 2023
20dc8aa
Merge branch 'dev' of github.com:dnzxy/iAPS into nonpump-insulin
dnzxy Sep 29, 2023
0563c99
Rework history to sleeker UI w/ 3 tabs, swipe-to-delete, no dots
dnzxy Sep 29, 2023
6d29558
Fix typos
dnzxy Sep 29, 2023
0016a86
Try at home view with sleeker icons based on SF Symbols
dnzxy Sep 29, 2023
91443a1
Added deletion functionality deletion alerts; long press to combine t…
dnzxy Sep 30, 2023
8a22d6d
Remove longpress stuff from previous fiddling around
dnzxy Oct 1, 2023
1cd22ee
Fix typo
dnzxy Oct 1, 2023
4ba465d
Rework manual glucose dialog
dnzxy Oct 1, 2023
b48ca9e
Add FPU carb equivalent value to delete alert
dnzxy Oct 1, 2023
8f48a36
Fix faulty formatting of glucose value in warning
dnzxy Oct 1, 2023
e00c9a4
Add non-pump insulin entry dialog and logic
dnzxy Oct 2, 2023
db006ad
Remove non-pump insulin view elements and logic from bolus module
dnzxy Oct 2, 2023
547f845
Make button style uniform
dnzxy Oct 2, 2023
b1dfdd9
Update bolus amount warning for better visuals
dnzxy Oct 2, 2023
20ea08f
Add conditional 'No data.' message for history contents
dnzxy Oct 2, 2023
d6f75ba
Merge branch 'dev' of github.com:dnzxy/iAPS into ui-work
dnzxy Oct 2, 2023
b375ee0
Revert home view icon changes
dnzxy Oct 2, 2023
ca72e1e
Add wrongly removed 'Continue without bolusing' back in
dnzxy Oct 2, 2023
6af6300
Resert non-pump insulin amount on save
dnzxy Oct 2, 2023
d6a2ee7
Merge branch 'dev' of github.com:dnzxy/iAPS into ui-work
dnzxy Oct 2, 2023
5f721e8
Fix setting non-pump insulin amount and manual glucose value to 0 on …
dnzxy Oct 2, 2023
45022d2
Shorten overly long navigation view title for carb entry
dnzxy Oct 2, 2023
6fcd2da
Add filter for future meal entries; add variable types; shorten title
dnzxy Oct 2, 2023
5d49213
Fix weird text change for filter button
dnzxy Oct 2, 2023
ce7a69e
Add combined treatments view and related setting; filter broken
dnzxy Oct 3, 2023
9c63ba7
Change isCombined state and do not import settingsManager
dnzxy Oct 3, 2023
90563a2
Remove filtering from history; colors for SMB and non-pump insulin
dnzxy Oct 6, 2023
a2bbab8
Add EN localization strings; change edited localization keys
dnzxy Oct 6, 2023
6167b63
Merge branch 'dev' of github.com:dnzxy/iAPS into ui-work
dnzxy Oct 6, 2023
9ff112e
Fix issue where amount in modal was not reset on dismiss
dnzxy Oct 8, 2023
e510eb3
Fix previous fix with isAmountUnconfirmed condition check
dnzxy Oct 9, 2023
c7b88ad
* Changed non-pump insulin and manual glucose button style and position
dnzxy Oct 14, 2023
16cbb2f
Fix faulty button wrapper function argument
dnzxy Oct 14, 2023
f816ed8
Merge branch 'dev' of github.com:Artificial-Pancreas/iAPS into ui-work
dnzxy Oct 14, 2023
46d6f01
Merge branch 'dev' into Crowdin
Jon-b-m Oct 20, 2023
3cda9ef
New translations localizable.strings (Dutch)
Jon-b-m Oct 20, 2023
fb67032
New translations localizable.strings (French)
Jon-b-m Oct 20, 2023
30a57f8
New translations localizable.strings (Spanish)
Jon-b-m Oct 20, 2023
81121ac
New translations localizable.strings (Arabic)
Jon-b-m Oct 20, 2023
ccebbce
New translations localizable.strings (Danish)
Jon-b-m Oct 20, 2023
895f2f0
New translations localizable.strings (German)
Jon-b-m Oct 20, 2023
d9440be
New translations localizable.strings (Finnish)
Jon-b-m Oct 20, 2023
2795ce7
New translations localizable.strings (Hebrew)
Jon-b-m Oct 20, 2023
b7f2bba
New translations localizable.strings (Italian)
Jon-b-m Oct 20, 2023
dc57a92
New translations localizable.strings (Polish)
Jon-b-m Oct 20, 2023
4074d34
New translations localizable.strings (Portuguese)
Jon-b-m Oct 20, 2023
bc15348
New translations localizable.strings (Russian)
Jon-b-m Oct 20, 2023
c5a14ba
New translations localizable.strings (Slovak)
Jon-b-m Oct 20, 2023
8ed6e8c
New translations localizable.strings (Swedish)
Jon-b-m Oct 20, 2023
eb54579
New translations localizable.strings (Turkish)
Jon-b-m Oct 20, 2023
af434e9
New translations localizable.strings (Ukrainian)
Jon-b-m Oct 20, 2023
7340e62
New translations localizable.strings (Chinese Simplified)
Jon-b-m Oct 20, 2023
fd7141a
New translations localizable.strings (Portuguese, Brazilian)
Jon-b-m Oct 20, 2023
72231c3
New translations localizable.strings (Norwegian Bokmal)
Jon-b-m Oct 20, 2023
cce037f
New translations localizable.strings (Norwegian Bokmal)
Jon-b-m Oct 21, 2023
2dac90a
Fix merge conflicts brought in by #261; adapted to proposed UI changes
dnzxy Oct 21, 2023
7cd6130
New translations localizable.strings (Dutch)
Jon-b-m Oct 21, 2023
ce6d7de
New translations localizable.strings (Russian)
Jon-b-m Oct 21, 2023
d11c091
New translations localizable.strings (Russian)
Jon-b-m Oct 21, 2023
6e1d4b9
Merge branch 'Crowdin' into crowdin_generated
Jon-b-m Oct 21, 2023
e49f06c
Crowdin updates
Jon-b-m Oct 21, 2023
9f48cc9
Merge branch 'Crowdin' into dev
Jon-b-m Oct 21, 2023
331ee47
Dexcom G7 SAGE
Jon-b-m Oct 21, 2023
4a39fba
Force push Profiles and settings when using button
Jon-b-m Oct 22, 2023
6011575
Add "non-pump insulin" as treatment type (#267)
dnzxy Oct 22, 2023
b99e043
Merge branch 'dev' of github.com:Artificial-Pancreas/iAPS into ui-work
dnzxy Oct 22, 2023
fd09966
Fix date issues for new entry dialogs:
dnzxy Oct 22, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"Sensor failed" = "Сбой датчика";

/* title for g7 settings row showing sensor start time */
"Sensor Start" = "Start sensor";
"Sensor Start" = "Запуск датчика";

/* G7 Status highlight text for signal loss */
"Signal\nLoss" = "Сигнал\nПотерян";
Expand Down
2 changes: 1 addition & 1 deletion FreeAPS.xcworkspace/xcshareddata/swiftpm/Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
},
{
"package": "SwiftCharts",
"repositoryURL": "https://github.com/ivanschuetz/SwiftCharts",
"repositoryURL": "https://github.com/ivanschuetz/SwiftCharts.git",
"state": {
"branch": "master",
"revision": "c354c1945bb35a1f01b665b22474f6db28cba4a2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "1.000",
"green" : "1.000",
"red" : "1.000"
"alpha" : "0.500",
"blue" : "0.988",
"green" : "0.588",
"red" : "0.118"
}
},
"idiom" : "universal"
Expand Down
3 changes: 2 additions & 1 deletion FreeAPS/Resources/json/defaults/preferences.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,6 @@
"enableSMB_high_bg" : false,
"enableSMB_high_bg_target" : 110,
"threshold_setting" : 65,
"updateInterval" : 20
"updateInterval" : 20,
"combineTreatmentsHistory" : false
}
13 changes: 12 additions & 1 deletion FreeAPS/Sources/APS/CGM/dexcomSourceG7.swift
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,15 @@ extension DexcomSourceG7: CGMManagerDelegate {
debug(.deviceManager, "DEXCOMG7 - Process CGM Reading Result launched")
switch readingResult {
case let .newData(values):

var activationDate: Date = .distantPast
var sessionStart: Date = .distantPast
if let cgmG7Manager = cgmManager as? G7CGMManager {
activationDate = cgmG7Manager.sensorActivatedAt ?? .distantPast
sessionStart = cgmG7Manager.sensorFinishesWarmupAt ?? .distantPast
print("Activastion date: " + activationDate.description)
}

let bloodGlucose = values.compactMap { newGlucoseSample -> BloodGlucose? in
let quantity = newGlucoseSample.quantity
let value = Int(quantity.doubleValue(for: .milligramsPerDeciliter))
Expand All @@ -148,7 +157,9 @@ extension DexcomSourceG7: CGMManagerDelegate {
filtered: nil,
noise: nil,
glucose: value,
type: "sgv"
type: "sgv",
activationDate: activationDate,
sessionStartDate: sessionStart
)
}

Expand Down
16 changes: 14 additions & 2 deletions FreeAPS/Sources/APS/Storage/PumpHistoryStorage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ final class BasePumpHistoryStorage: PumpHistoryStorage, Injectable {
rate: nil,
temp: nil,
carbInput: nil,
isSMB: dose.automatic
isSMB: dose.automatic,
isNonPumpInsulin: dose.manuallyEntered
)]
case .tempBasal:
guard let dose = event.dose else { return [] }
Expand Down Expand Up @@ -210,6 +211,16 @@ final class BasePumpHistoryStorage: PumpHistoryStorage, Injectable {
}
}

func determineBolusEventType(for event: PumpHistoryEvent) -> EventType {
if event.isSMB ?? false {
return .smb
}
if event.isNonPumpInsulin ?? false {
return .nonPumpInsulin
}
return event.type
}

func nightscoutTretmentsNotUploaded() -> [NigtscoutTreatment] {
let events = recent()
guard !events.isEmpty else { return [] }
Expand Down Expand Up @@ -250,13 +261,14 @@ final class BasePumpHistoryStorage: PumpHistoryStorage, Injectable {
let bolusesAndCarbs = events.compactMap { event -> NigtscoutTreatment? in
switch event.type {
case .bolus:
let eventType = determineBolusEventType(for: event)
return NigtscoutTreatment(
duration: event.duration,
rawDuration: nil,
rawRate: nil,
absolute: nil,
rate: nil,
eventType: (event.isSMB ?? false) ? .smb : .bolus,
eventType: eventType,
createdAt: event.timestamp,
enteredBy: NigtscoutTreatment.local,
bolus: event,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,9 @@ Enact a temp Basal or a temp target */
/* Import Error */
"Can't find the default Nightscout Profile." = "Can't find the default Nightscout Profile.";

/* Add Blood Glucose Test, header */
"Blood Glucose Test" = "Blood Glucose Test";

/* Add Medtronic pump */
"Add Medtronic" = "Add Medtronic";

Expand Down Expand Up @@ -534,10 +537,10 @@ Enact a temp Basal or a temp target */
"Temp Targets" = "Temp Targets";

/* Delete carbs from data table and Nightscout */
"Delete carbs?" = "Delete carbs?";
"Delete Carbs?" = "Delete Carbs?";

/* Delete insulin from pump history and Nightscout */
"Delete insulin?" = "Delete insulin?";
"Delete Insulin?" = "Delete Insulin?";

/* Treatments list */
"Treatments" = "Treatments";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -490,10 +490,10 @@ Enact a temp Basal or a temp target */
"Temp Targets" = "Temp Targets";

/* Delete carbs from data table and Nightscout */
"Delete carbs?" = "Delete carbs?";
"Delete Carbs?" = "Delete Carbs?";

/* Delete insulin from pump history and Nightscout */
"Delete insulin?" = "Delete insulin?";
"Delete Insulin?" = "Delete Insulin?";

/* Treatments list */
"Treatments" = "Treatments";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,9 @@ Enact a temp Basal or a temp target */
/* Import Error */
"Can't find the default Nightscout Profile." = "Can't find the default Nightscout Profile.";

/* Add Blood Glucose Test, header */
"Blood Glucose Test" = "Blood Glucose Test";

/* Add Medtronic pump */
"Add Medtronic" = "Tilføj Medtronic";

Expand Down Expand Up @@ -534,10 +537,10 @@ Enact a temp Basal or a temp target */
"Temp Targets" = "Temp Targets";

/* Delete carbs from data table and Nightscout */
"Delete carbs?" = "Delete carbs?";
"Delete Carbs?" = "Delete Carbs?";

/* Delete insulin from pump history and Nightscout */
"Delete insulin?" = "Delete insulin?";
"Delete Insulin?" = "Delete Insulin?";

/* Treatments list */
"Treatments" = "Treatments";
Expand Down
10 changes: 8 additions & 2 deletions FreeAPS/Sources/Localizations/Main/de.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,9 @@ Enact a temp Basal or a temp target */
/* Import Error */
"Can't find the default Nightscout Profile." = "Can't find the default Nightscout Profile.";

/* Add Blood Glucose Test, header */
"Blood Glucose Test" = "Blood Glucose Test";

/* Add Medtronic pump */
"Add Medtronic" = "Medtronic-Pumpe hinzufügen";

Expand Down Expand Up @@ -534,10 +537,10 @@ Enact a temp Basal or a temp target */
"Temp Targets" = "Temporäre Ziele";

/* Delete carbs from data table and Nightscout */
"Delete carbs?" = "Kohlenhydrate löschen?";
"Delete Carbs?" = "Kohlenhydrate löschen?";

/* Delete insulin from pump history and Nightscout */
"Delete insulin?" = "Insulin löschen?";
"Delete Insulin?" = "Insulin löschen?";

/* Treatments list */
"Treatments" = "Behandlungen";
Expand Down Expand Up @@ -1168,6 +1171,9 @@ Enact a temp Basal or a temp target */
/* An Automatic delivered bolus (SMB) */
"SMB" = "SMB";

/* A manually entered dose of non-pump insulin */
"Non-pump Insulin" = "Externes Insulin";

/* Status highlight when manual temp basal is running. */
"Manual Basal" = "Manuelle Temporäre Basalrate";

Expand Down
41 changes: 39 additions & 2 deletions FreeAPS/Sources/Localizations/Main/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -537,20 +537,48 @@ Enact a temp Basal or a temp target */
"Temp Targets" = "Temp Targets";

/* Delete carbs from data table and Nightscout */
"Delete carbs?" = "Delete carbs?";
"Delete Carbs?" = "Delete Carbs?";

/* Delete insulin from pump history and Nightscout */
"Delete insulin?" = "Delete insulin?";
"Delete Insulin?" = "Delete Insulin?";

/* Delete fpus alert title */
"Delete Carb Equivalents?" = "Delete Carb Equivalents?";

/* Delete Glucose alert title */
"Delete Glucose?" = "Delete Glucose?";

/* Treatments list */
"Treatments" = "Treatments";

/* Meals list */
"Meals" = "Meals";

/* No data text when no entries in history list */
"No data." = "No data.";

/* " min" in Treatments list */
" min" = " min";

/* */
"Unable to change anything" = "Unable to change anything";

/* Non-pump insulin maxBolus * 3 alert text */
"**⚠️ Warning!** The entered insulin amount is greater than your Max Bolus setting!" = "**⚠️ Warning!** The entered insulin amount is greater than your Max Bolus setting!";

/* Log non-pump insulin button text */
"Log non-pump insulin" = "Log non-pump insulin";

/* Non-Pump Insulin button text */
"Non-Pump Insulin" = "Non-Pump Insulin";

/* Glucose button text */
"Glucose" = "Glucose";

/* Add glucose dialog title */
"Add Glucose" = "Add Glucose";



/* Calendar and Libre transmitter settings ---------------
*/
Expand All @@ -569,6 +597,9 @@ Enact a temp Basal or a temp target */
/* Automatic delivered treatments */
"Automatic" = "Automatic";

/* Non-pump insulin treatments */
"Non-Pump" = "Non-Pump";

/* */
"Other" = "Other";

Expand Down Expand Up @@ -1172,6 +1203,9 @@ Enact a temp Basal or a temp target */
/* An Automatic delivered bolus (SMB) */
"SMB" = "SMB";

/* A manually entered dose of non-pump insulin */
"Non-pump Insulin" = "Non-pump Insulin";

/* Status highlight when manual temp basal is running. */
"Manual Basal" = "Manual Basal";

Expand Down Expand Up @@ -1580,6 +1614,9 @@ Enact a temp Basal or a temp target */
/* In Range */
"In Range" = "In Range";

/* Display treatment history with 2 tabs (treatments+glucose) or 3 tabs (treatments split in insulin and meals + glucose) */
"Combine Treatments in History" = "Combine Treatments in History";

/* Display % */
"Change HbA1c Unit" = "Change HbA1c Unit";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,9 @@ Enact a temp Basal or a temp target */
/* Import Error */
"Can't find the default Nightscout Profile." = "Can't find the default Nightscout Profile.";

/* Add Blood Glucose Test, header */
"Blood Glucose Test" = "Blood Glucose Test";

/* Add Medtronic pump */
"Add Medtronic" = "Añadir Medtronic";

Expand Down Expand Up @@ -534,10 +537,10 @@ Enact a temp Basal or a temp target */
"Temp Targets" = "Temp Targets";

/* Delete carbs from data table and Nightscout */
"Delete carbs?" = "¿Eliminar carbohidratos?";
"Delete Carbs?" = "¿Eliminar carbohidratos?";

/* Delete insulin from pump history and Nightscout */
"Delete insulin?" = "Delete insulin?";
"Delete Insulin?" = "Delete Insulin?";

/* Treatments list */
"Treatments" = "Tratamientos";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,9 @@ Enact a temp Basal or a temp target */
/* Import Error */
"Can't find the default Nightscout Profile." = "Can't find the default Nightscout Profile.";

/* Add Blood Glucose Test, header */
"Blood Glucose Test" = "Blood Glucose Test";

/* Add Medtronic pump */
"Add Medtronic" = "Add Medtronic";

Expand Down Expand Up @@ -534,10 +537,10 @@ Enact a temp Basal or a temp target */
"Temp Targets" = "Temp Targets";

/* Delete carbs from data table and Nightscout */
"Delete carbs?" = "Delete carbs?";
"Delete Carbs?" = "Delete Carbs?";

/* Delete insulin from pump history and Nightscout */
"Delete insulin?" = "Delete insulin?";
"Delete Insulin?" = "Delete Insulin?";

/* Treatments list */
"Treatments" = "Treatments";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,9 @@ Enact a temp Basal or a temp target */
/* Import Error */
"Can't find the default Nightscout Profile." = "Can't find the default Nightscout Profile.";

/* Add Blood Glucose Test, header */
"Blood Glucose Test" = "Blood Glucose Test";

/* Add Medtronic pump */
"Add Medtronic" = "Ajouter une pompe Medtronic";

Expand Down Expand Up @@ -534,10 +537,10 @@ Enact a temp Basal or a temp target */
"Temp Targets" = "Cibles temporaires";

/* Delete carbs from data table and Nightscout */
"Delete carbs?" = "Supprimer les glucides ?";
"Delete Carbs?" = "Supprimer les glucides ?";

/* Delete insulin from pump history and Nightscout */
"Delete insulin?" = "Delete insulin?";
"Delete Insulin?" = "Delete Insulin?";

/* Treatments list */
"Treatments" = "Traitements";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,9 @@ Enact a temp Basal or a temp target */
/* Import Error */
"Can't find the default Nightscout Profile." = "Can't find the default Nightscout Profile.";

/* Add Blood Glucose Test, header */
"Blood Glucose Test" = "Blood Glucose Test";

/* Add Medtronic pump */
"Add Medtronic" = "Add Medtronic";

Expand Down Expand Up @@ -534,10 +537,10 @@ Enact a temp Basal or a temp target */
"Temp Targets" = "Temp Targets";

/* Delete carbs from data table and Nightscout */
"Delete carbs?" = "Delete carbs?";
"Delete Carbs?" = "Delete Carbs?";

/* Delete insulin from pump history and Nightscout */
"Delete insulin?" = "Delete insulin?";
"Delete Insulin?" = "Delete Insulin?";

/* Treatments list */
"Treatments" = "Treatments";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,9 @@ Enact a temp Basal or a temp target */
/* Import Error */
"Can't find the default Nightscout Profile." = "Can't find the default Nightscout Profile.";

/* Add Blood Glucose Test, header */
"Blood Glucose Test" = "Blood Glucose Test";

/* Add Medtronic pump */
"Add Medtronic" = "Aggiungi microinfusore Medtronic";

Expand Down Expand Up @@ -534,10 +537,10 @@ Enact a temp Basal or a temp target */
"Temp Targets" = "Obiettivi Temporanei";

/* Delete carbs from data table and Nightscout */
"Delete carbs?" = "Cancella carboidrati?";
"Delete Carbs?" = "Cancella carboidrati?";

/* Delete insulin from pump history and Nightscout */
"Delete insulin?" = "Cancella l'insulina?";
"Delete Insulin?" = "Cancella l'insulina?";

/* Treatments list */
"Treatments" = "Trattamenti";
Expand Down
Loading