diff options
author | Iván Ávalos <avalos@disroot.org> | 2022-01-24 15:12:11 -0600 |
---|---|---|
committer | Iván Ávalos <avalos@disroot.org> | 2022-01-24 15:12:11 -0600 |
commit | ac5eeffba586954042c9efcf196c2efcfe854c4a (patch) | |
tree | 20378bce6484d4c68203556d9f4e76d18fc566f3 | |
parent | 0381ae0b930ceb7b43ef1e66950c9bd6f9dfcc56 (diff) | |
parent | 7f1388bc554a3ee68a1865d2a219395805a79575 (diff) | |
download | etbsa-trackermap-mobile-ac5eeffba586954042c9efcf196c2efcfe854c4a.tar.gz etbsa-trackermap-mobile-ac5eeffba586954042c9efcf196c2efcfe854c4a.tar.bz2 etbsa-trackermap-mobile-ac5eeffba586954042c9efcf196c2efcfe854c4a.zip |
Merged main from upstream (unbranded)
118 files changed, 2433 insertions, 602 deletions
@@ -2,10 +2,39 @@ TrackerMap is a user-friendly GPS tracking platform powered by Traccar. This repository contains the mobile app, powered by Kotlin Multiplatform. +## Third-party libraries + +We're grateful to the developers of the following libraries, for making this project possible: + +| Library | Author | License | +|-----------------------------------------------------------------------------------|----------------------------|------------| +| [Ktor](https://ktor.io) | JetBrains | Apache 2.0 | +| [multiplatform-settings](https://github.com/russhwolf/multiplatform-settings) | Russel Wolf | Apache 2.0 | +| [kotlinx-datetime](https://github.com/Kotlin/kotlinx-datetime) | JetBrains | Apache 2.0 | +| [live-event](https://github.com/Zhuinden/live-event) | Gabor Varadi | Apache 2.0 | +| [Koin](https://insert-koin.io) | Koin | Apache 2.0 | +| [SwipeLayout](https://github.com/zerobranch/SwipeLayout) | Arman | MIT | +| [SegmentedButton](https://github.com/addisonElliott/SegmentedButton) | ceryle, Addison Elliott | Apache 2.0 | +| [Simple Features WKT Java](https://ngageoint.github.io/simple-features-wkt-java/) | NGA, BIT Systems | MIT | +| [Krypto](https://korlibs.soywiz.com/krypto) | Carlos Ballesteros Velasco | MIT | +| [WhirlyGlobe Maply](https://mousebird-consulting-inc.github.io/WhirlyGlobe/) | mousebird consulting | Apache 2.0 | + +## Bugs and feature requests + +So, you found a cool bug or need some feature? Please report it in [this repo's ticket tracker](https://sr.ht/~avalos/trackermap/trackers) via e-mail, and we'll keep track of it. Please be civil, our time and energy is limited. Unlike GitHub or GitLab, you don't need to create an account here in order to participate in the tracker. + +## Contributing + +Maybe you wrote some cool feature or bug fix for this project, and you would love to send us a pull request, but you noticed there are no pull requests anywhere here. Oh, no! + +Fear not, my friend! SourceHut is built around e-mail, just like Git originally was, so the only way to send a pull request is sending a patch via e-mail to our [development mailing list](https://lists.sr.ht/~avalos/trackermap-devel). For sending patches, you don't need to create an account here either! + +How do I send a patch via e-mail? You may ask. It's easy! Follow the steps in [git-send-email.io](https://git-send-email.io/) to get your Git setup to send properly formatted patches using a handy built-in command. + ## License ``` -Copyright (C) 2021 Iván Ávalos <avalos@disroot.org>, Henoch Ojeda <imhenoch@protonmail.com> +Copyright (C) 2021-2022 Iván Ávalos <avalos@disroot.org>, Henoch Ojeda <imhenoch@protonmail.com> This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as @@ -20,3 +49,8 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>. ``` + +### Important + +1. The copyright belongs to us, always. Give us credit! +2. If you distribute this app with modifications, you are legally required to provide your users with the **complete source code** of your modifications, under the same license! No exceptions. diff --git a/ROADMAP.md b/ROADMAP.md new file mode 100644 index 0000000..0de79ab --- /dev/null +++ b/ROADMAP.md @@ -0,0 +1,23 @@ +# Roadmap + +## General + +* [ ] Basic settings (account, notifications, etc.) +* [ ] Implement WebSocket to fetch positions. +* [ ] Improve network and API error handling. +* [ ] Create, edit and delete devices (if deviceReadonly = false) +* [ ] Edit user data (if readonly = false) +* [ ] iOS application. + +## Reports + +* [ ] Show information when clicking position in report. +* [ ] Replay for route and stops reports. +* [ ] Select custom start and end dates for reports. + +## Low priority + +* [ ] Replace WhirlyGlobe with MapLibre-GL (if we can get it to work.) +* [ ] Marker clustering. +* [ ] Dark mode. +* [ ] Clean up code. diff --git a/androidApp/build.gradle.kts b/androidApp/build.gradle.kts index f6de76e..4d21e69 100644 --- a/androidApp/build.gradle.kts +++ b/androidApp/build.gradle.kts @@ -45,8 +45,8 @@ val googleImplementation by configurations dependencies { implementation(project(":shared")) implementation("com.google.android.material:material:1.5.0") - implementation("androidx.appcompat:appcompat:1.4.0") - implementation("androidx.constraintlayout:constraintlayout:2.1.2") + implementation("androidx.appcompat:appcompat:1.4.1") + implementation("androidx.constraintlayout:constraintlayout:2.1.3") implementation("com.squareup.okhttp3:okhttp:4.9.1") implementation("com.github.Zhuinden:live-event:1.2.0") implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.0") diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/TrackerApp.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/TrackerApp.kt index 1811733..1d181dd 100644 --- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/TrackerApp.kt +++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/TrackerApp.kt @@ -1,3 +1,20 @@ +/** + * TrackerMap + * Copyright (C) 2021-2022 Iván Ávalos <avalos@disroot.org>, Henoch Ojeda <imhenoch@protonmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ package mx.trackermap.TrackerMap.android import android.app.Application @@ -29,7 +46,7 @@ open class TrackerApp : Application() { super.onCreate() val appModule = module { - single { "https://etbsa.net/api" } + single { getString(R.string.default_server_url) } factory { SessionApi(get()) } factory { UsersApi(get()) } factory { DevicesApi(get()) } diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/DetailsActivity.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/DetailsActivity.kt index 9633332..5272f06 100644 --- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/DetailsActivity.kt +++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/DetailsActivity.kt @@ -1,3 +1,20 @@ +/** + * TrackerMap + * Copyright (C) 2021-2022 Iván Ávalos <avalos@disroot.org>, Henoch Ojeda <imhenoch@protonmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ package mx.trackermap.TrackerMap.android.details import android.Manifest diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/UnitDetailsAdapter.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/UnitDetailsAdapter.kt index cc2a7c2..e913cb5 100644 --- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/UnitDetailsAdapter.kt +++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/UnitDetailsAdapter.kt @@ -1,3 +1,20 @@ +/** + * TrackerMap + * Copyright (C) 2021-2022 Iván Ávalos <avalos@disroot.org>, Henoch Ojeda <imhenoch@protonmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ package mx.trackermap.TrackerMap.android.details import android.os.Bundle diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/commands/UnitCommandsFragment.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/commands/UnitCommandsFragment.kt index 9d12608..ecd1a53 100644 --- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/commands/UnitCommandsFragment.kt +++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/commands/UnitCommandsFragment.kt @@ -1,3 +1,20 @@ +/** + * TrackerMap + * Copyright (C) 2021-2022 Iván Ávalos <avalos@disroot.org>, Henoch Ojeda <imhenoch@protonmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ package mx.trackermap.TrackerMap.android.details.commands import android.os.Bundle diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/commands/UnitCommandsViewModel.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/commands/UnitCommandsViewModel.kt index 06c0439..3bb7f11 100644 --- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/commands/UnitCommandsViewModel.kt +++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/commands/UnitCommandsViewModel.kt @@ -1,3 +1,20 @@ +/** + * TrackerMap + * Copyright (C) 2021-2022 Iván Ávalos <avalos@disroot.org>, Henoch Ojeda <imhenoch@protonmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ package mx.trackermap.TrackerMap.android.details.commands import android.util.Log diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/information/UnitInformationFragment.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/information/UnitInformationFragment.kt index 7966c5b..e731587 100644 --- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/information/UnitInformationFragment.kt +++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/information/UnitInformationFragment.kt @@ -1,3 +1,20 @@ +/** + * TrackerMap + * Copyright (C) 2021-2022 Iván Ávalos <avalos@disroot.org>, Henoch Ojeda <imhenoch@protonmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ package mx.trackermap.TrackerMap.android.details.information import android.content.Intent diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/information/UnitInformationViewModel.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/information/UnitInformationViewModel.kt index 721fa68..43d8821 100644 --- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/information/UnitInformationViewModel.kt +++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/information/UnitInformationViewModel.kt @@ -1,3 +1,20 @@ +/** + * TrackerMap + * Copyright (C) 2021-2022 Iván Ávalos <avalos@disroot.org>, Henoch Ojeda <imhenoch@protonmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ package mx.trackermap.TrackerMap.android.details.information import android.util.Log diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/reports/UnitReportsFragment.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/reports/UnitReportsFragment.kt index 08d7076..22c75f4 100644 --- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/reports/UnitReportsFragment.kt +++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/reports/UnitReportsFragment.kt @@ -1,3 +1,20 @@ +/** + * TrackerMap + * Copyright (C) 2021-2022 Iván Ávalos <avalos@disroot.org>, Henoch Ojeda <imhenoch@protonmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ package mx.trackermap.TrackerMap.android.details.reports import android.app.Activity diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/reports/UnitReportsViewModel.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/reports/UnitReportsViewModel.kt index 0bdf61b..41a6b6d 100644 --- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/reports/UnitReportsViewModel.kt +++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/reports/UnitReportsViewModel.kt @@ -1,3 +1,20 @@ +/** + * TrackerMap + * Copyright (C) 2021-2022 Iván Ávalos <avalos@disroot.org>, Henoch Ojeda <imhenoch@protonmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ package mx.trackermap.TrackerMap.android.details.reports import androidx.lifecycle.* diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/devices/DevicesAdapter.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/devices/DevicesAdapter.kt index b1854a9..4cfd6b5 100644 --- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/devices/DevicesAdapter.kt +++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/devices/DevicesAdapter.kt @@ -1,3 +1,20 @@ +/** + * TrackerMap + * Copyright (C) 2021-2022 Iván Ávalos <avalos@disroot.org>, Henoch Ojeda <imhenoch@protonmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ package mx.trackermap.TrackerMap.android.devices import android.view.LayoutInflater diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/devices/DevicesFragment.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/devices/DevicesFragment.kt index b905beb..ad93429 100644 --- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/devices/DevicesFragment.kt +++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/devices/DevicesFragment.kt @@ -1,3 +1,20 @@ +/** + * TrackerMap + * Copyright (C) 2021-2022 Iván Ávalos <avalos@disroot.org>, Henoch Ojeda <imhenoch@protonmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ package mx.trackermap.TrackerMap.android.devices import android.content.Intent diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/MapFragment.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/MapFragment.kt index c483d52..a76ebde 100644 --- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/MapFragment.kt +++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/MapFragment.kt @@ -1,3 +1,20 @@ +/** + * TrackerMap + * Copyright (C) 2021-2022 Iván Ávalos <avalos@disroot.org>, Henoch Ojeda <imhenoch@protonmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ package mx.trackermap.TrackerMap.android.map import android.graphics.Bitmap @@ -97,6 +114,7 @@ open class MapFragment : GlobeMapFragment() { hasStarted = true setupCallbacks.forEach { it() } + setupCallbacks.clear() } override fun onStop() { diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/MapWrapperFragment.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/MapWrapperFragment.kt index c8ef688..c9eab70 100644 --- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/MapWrapperFragment.kt +++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/MapWrapperFragment.kt @@ -1,3 +1,20 @@ +/** + * TrackerMap + * Copyright (C) 2021-2022 Iván Ávalos <avalos@disroot.org>, Henoch Ojeda <imhenoch@protonmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ package mx.trackermap.TrackerMap.android.map import android.os.Bundle diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/UnitMapFragment.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/UnitMapFragment.kt index 9718262..e7e5ce0 100644 --- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/UnitMapFragment.kt +++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/UnitMapFragment.kt @@ -1,3 +1,20 @@ +/** + * TrackerMap + * Copyright (C) 2021-2022 Iván Ávalos <avalos@disroot.org>, Henoch Ojeda <imhenoch@protonmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ package mx.trackermap.TrackerMap.android.map import android.content.Intent diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/session/LoginActivity.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/session/LoginActivity.kt index 3fbab80..23e781b 100644 --- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/session/LoginActivity.kt +++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/session/LoginActivity.kt @@ -1,3 +1,20 @@ +/** + * TrackerMap + * Copyright (C) 2021-2022 Iván Ávalos <avalos@disroot.org>, Henoch Ojeda <imhenoch@protonmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ package mx.trackermap.TrackerMap.android.session import android.os.Bundle diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/session/LoginFragment.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/session/LoginFragment.kt index f1b23a6..c855f44 100644 --- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/session/LoginFragment.kt +++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/session/LoginFragment.kt @@ -1,3 +1,20 @@ +/** + * TrackerMap + * Copyright (C) 2021-2022 Iván Ávalos <avalos@disroot.org>, Henoch Ojeda <imhenoch@protonmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ package mx.trackermap.TrackerMap.android.session import android.content.* @@ -7,7 +24,6 @@ import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.widget.Toast -import androidx.core.widget.doAfterTextChanged import androidx.fragment.app.Fragment import androidx.localbroadcastmanager.content.LocalBroadcastManager import androidx.preference.PreferenceManager @@ -43,6 +59,14 @@ class LoginFragment : Fragment() { setupEvents() setupObservers() broadcastManager = LocalBroadcastManager.getInstance(activity!!) + binding.urlEditText.setText( + PreferenceManager + .getDefaultSharedPreferences(activity) + .getString( + PREFERENCE_SERVER_URL, + getString(R.string.default_server_url) + ) ?: getString(R.string.default_server_url) + ) loginViewModel.restoreSession() } @@ -67,6 +91,7 @@ class LoginFragment : Fragment() { loginViewModel.login( binding.usernameEditText.text.toString(), binding.passwordEditText.text.toString(), + binding.urlEditText.text.toString(), PreferenceManager .getDefaultSharedPreferences(activity) .getString(PREFERENCE_TOKEN, null) @@ -84,6 +109,10 @@ class LoginFragment : Fragment() { SessionController.LoginState.Loading -> { binding.infoLoading.root.visibility = View.VISIBLE } + SessionController.LoginState.UrlMissing -> { + binding.infoLoading.root.visibility = View.GONE + Toast.makeText(context, getString(R.string.login_url_missing), Toast.LENGTH_SHORT).show() + } SessionController.LoginState.EmailMissing -> { binding.infoLoading.root.visibility = View.GONE Toast.makeText(context, getString(R.string.login_username_missing), Toast.LENGTH_SHORT).show() @@ -97,6 +126,12 @@ class LoginFragment : Fragment() { Toast.makeText(context, getString(R.string.login_login_failed), Toast.LENGTH_SHORT).show() } SessionController.LoginState.Success -> { + PreferenceManager + .getDefaultSharedPreferences(activity) + .edit() + .putString(PREFERENCE_SERVER_URL, binding.urlEditText.text.toString()) + .apply() + broadcastManager.sendBroadcast(Intent(EVENT_LOGIN)) val activity = requireActivity() val intent = Intent(activity.applicationContext, UnitsActivity::class.java) @@ -126,6 +161,7 @@ class LoginFragment : Fragment() { const val EVENT_TOKEN = "eventToken" const val KEY_TOKEN = "keyToken" + const val PREFERENCE_SERVER_URL = "server_url" const val PREFERENCE_TOKEN = "token" } }
\ No newline at end of file diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/session/LoginViewModel.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/session/LoginViewModel.kt index 88b56cf..bcee2ec 100644 --- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/session/LoginViewModel.kt +++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/session/LoginViewModel.kt @@ -1,7 +1,22 @@ +/** + * TrackerMap + * Copyright (C) 2021-2022 Iván Ávalos <avalos@disroot.org>, Henoch Ojeda <imhenoch@protonmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ package mx.trackermap.TrackerMap.android.session -import androidx.lifecycle.MutableLiveData -import androidx.lifecycle.SavedStateHandle import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope import com.zhuinden.eventemitter.EventEmitter @@ -40,7 +55,7 @@ class LoginViewModel : ViewModel(), KoinComponent { sessionController.restoreSession() } - fun login(email: String, password: String, token: String?) { - sessionController.login(SessionBody(email, password, token)) + fun login(email: String, password: String, url: String, token: String?) { + sessionController.login(SessionBody(url, email, password, token)) } }
\ No newline at end of file diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/session/UserInformationActivity.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/session/UserInformationActivity.kt index 5fad118..e78e2b0 100644 --- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/session/UserInformationActivity.kt +++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/session/UserInformationActivity.kt @@ -1,3 +1,20 @@ +/** + * TrackerMap + * Copyright (C) 2021-2022 Iván Ávalos <avalos@disroot.org>, Henoch Ojeda <imhenoch@protonmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ package mx.trackermap.TrackerMap.android.session import android.content.Intent @@ -65,6 +82,11 @@ class UserInformationActivity : AppCompatActivity() { emailInfo.text = user.email ?: "" idInfo.text = "${user.id ?: "--"}" adminInfo.text = "${user.administrator}" + serverInfo.text = "${ + PreferenceManager + .getDefaultSharedPreferences(this@UserInformationActivity) + .getString(LoginFragment.PREFERENCE_SERVER_URL, getString(R.string.default_server_url)) + }" user.deviceLimit?.let { deviceLimitInfo.text = "${user.deviceLimit ?: "--"}" if (it > 0) { diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/session/UserInformationViewModel.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/session/UserInformationViewModel.kt index 9bb5ac7..0d3784c 100644 --- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/session/UserInformationViewModel.kt +++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/session/UserInformationViewModel.kt @@ -1,3 +1,20 @@ +/** + * TrackerMap + * Copyright (C) 2021-2022 Iván Ávalos <avalos@disroot.org>, Henoch Ojeda <imhenoch@protonmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ package mx.trackermap.TrackerMap.android.session import android.util.Log diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/shared/MarkerTransformations.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/shared/MarkerTransformations.kt index f684a10..242cccf 100644 --- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/shared/MarkerTransformations.kt +++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/shared/MarkerTransformations.kt @@ -1,3 +1,20 @@ +/** + * TrackerMap + * Copyright (C) 2021-2022 Iván Ávalos <avalos@disroot.org>, Henoch Ojeda <imhenoch@protonmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ package mx.trackermap.TrackerMap.android.shared import android.util.Log diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/shared/UnitRenderData.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/shared/UnitRenderData.kt index e8a4bd6..123e1ab 100644 --- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/shared/UnitRenderData.kt +++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/shared/UnitRenderData.kt @@ -1,3 +1,20 @@ +/** + * TrackerMap + * Copyright (C) 2021-2022 Iván Ávalos <avalos@disroot.org>, Henoch Ojeda <imhenoch@protonmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ package mx.trackermap.TrackerMap.android.shared import android.content.Context diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/shared/Utils.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/shared/Utils.kt index abfe1bb..ac9673f 100644 --- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/shared/Utils.kt +++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/shared/Utils.kt @@ -1,3 +1,20 @@ +/** + * TrackerMap + * Copyright (C) 2021-2022 Iván Ávalos <avalos@disroot.org>, Henoch Ojeda <imhenoch@protonmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ package mx.trackermap.TrackerMap.android.shared import android.app.NotificationManager diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/units/UnitFragment.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/units/UnitFragment.kt index e514094..05a14c9 100644 --- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/units/UnitFragment.kt +++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/units/UnitFragment.kt @@ -1,3 +1,20 @@ +/** + * TrackerMap + * Copyright (C) 2021-2022 Iván Ávalos <avalos@disroot.org>, Henoch Ojeda <imhenoch@protonmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ package mx.trackermap.TrackerMap.android.units import androidx.fragment.app.Fragment diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/units/UnitsActivity.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/units/UnitsActivity.kt index 58147e4..4371eed 100644 --- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/units/UnitsActivity.kt +++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/units/UnitsActivity.kt @@ -1,3 +1,20 @@ +/** + * TrackerMap + * Copyright (C) 2021-2022 Iván Ávalos <avalos@disroot.org>, Henoch Ojeda <imhenoch@protonmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ package mx.trackermap.TrackerMap.android.units import android.content.Context @@ -8,10 +25,8 @@ import android.view.View import android.view.inputmethod.InputMethodManager import android.widget.Toast import androidx.appcompat.app.AppCompatActivity -import androidx.appcompat.widget.PopupMenu import androidx.appcompat.widget.TooltipCompat import androidx.core.widget.doAfterTextChanged -import androidx.fragment.app.FragmentTransaction.TRANSIT_FRAGMENT_FADE import androidx.fragment.app.commit import kotlinx.coroutines.DelicateCoroutinesApi import mx.trackermap.TrackerMap.android.R diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/units/UnitsViewModel.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/units/UnitsViewModel.kt index cb30725..d7b6db1 100644 --- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/units/UnitsViewModel.kt +++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/units/UnitsViewModel.kt @@ -1,3 +1,20 @@ +/** + * TrackerMap + * Copyright (C) 2021-2022 Iván Ávalos <avalos@disroot.org>, Henoch Ojeda <imhenoch@protonmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ package mx.trackermap.TrackerMap.android.units import android.util.Log diff --git a/androidApp/src/main/res/layout/devices_fragment.xml b/androidApp/src/main/res/layout/devices_fragment.xml index 1dd1690..6e4db3f 100644 --- a/androidApp/src/main/res/layout/devices_fragment.xml +++ b/androidApp/src/main/res/layout/devices_fragment.xml @@ -2,7 +2,8 @@ <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" - android:layout_height="match_parent"> + android:layout_height="match_parent" + android:background="@color/background"> <androidx.recyclerview.widget.RecyclerView android:id="@+id/devicesList" diff --git a/androidApp/src/main/res/layout/login.xml b/androidApp/src/main/res/layout/login.xml index 7c79e5c..78c3e46 100644 --- a/androidApp/src/main/res/layout/login.xml +++ b/androidApp/src/main/res/layout/login.xml @@ -70,8 +70,8 @@ app:layout_constraintHorizontal_bias="0.5" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/usernameInputLayout" - app:layout_constraintBottom_toTopOf="@id/signinButton" - android:layout_marginTop="24dp"> + app:layout_constraintBottom_toTopOf="@id/urlInputLayout" + android:layout_marginTop="@dimen/fields_spacing"> <com.google.android.material.textfield.TextInputEditText android:id="@+id/passwordEditText" @@ -81,17 +81,38 @@ </com.google.android.material.textfield.TextInputLayout> + <com.google.android.material.textfield.TextInputLayout + android:id="@+id/urlInputLayout" + style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:hint="@string/login_url" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.5" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/passwordInputLayout" + app:layout_constraintBottom_toTopOf="@id/signinButton" + android:layout_marginTop="@dimen/fields_spacing"> + + <com.google.android.material.textfield.TextInputEditText + android:id="@+id/urlEditText" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:inputType="textUri"/> + + </com.google.android.material.textfield.TextInputLayout> + <com.google.android.material.button.MaterialButton android:id="@+id/signinButton" android:layout_width="0dp" android:layout_height="wrap_content" app:layout_constraintWidth_percent="0.5" - app:layout_constraintTop_toBottomOf="@id/passwordInputLayout" + app:layout_constraintTop_toBottomOf="@id/urlInputLayout" app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintHorizontal_bias="0.5" - android:layout_marginTop="24dp" + android:layout_marginTop="@dimen/fields_large_spacing" android:text="@string/login_login"/> </androidx.constraintlayout.widget.ConstraintLayout> diff --git a/androidApp/src/main/res/layout/units_activity.xml b/androidApp/src/main/res/layout/units_activity.xml index 5abb95b..60a77db 100644 --- a/androidApp/src/main/res/layout/units_activity.xml +++ b/androidApp/src/main/res/layout/units_activity.xml @@ -5,7 +5,8 @@ xmlns:tools="http://schemas.android.com/tools" android:id="@+id/drawerLayout" android:layout_width="match_parent" - android:layout_height="match_parent"> + android:layout_height="match_parent" + android:animateLayoutChanges="true"> <androidx.fragment.app.FragmentContainerView android:id="@+id/displayContainer" @@ -74,7 +75,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="@dimen/fab_margin" - android:layout_marginEnd="@dimen/fab_margin" + android:layout_marginEnd="@dimen/search_horizontal_margin" android:backgroundTint="@android:color/white" android:contentDescription="@string/switch_layer" android:src="@drawable/icon_layers" diff --git a/androidApp/src/main/res/layout/user_information_activity.xml b/androidApp/src/main/res/layout/user_information_activity.xml index 2f0486c..3ed9048 100644 --- a/androidApp/src/main/res/layout/user_information_activity.xml +++ b/androidApp/src/main/res/layout/user_information_activity.xml @@ -131,6 +131,20 @@ android:layout_marginBottom="@dimen/fields_spacing" tools:text="Admin" /> + <TextView + android:id="@+id/serverInfoLabel" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/login_url" + android:textAppearance="@style/TextAppearance.AppCompat.Body2"/> + + <TextView + android:id="@+id/serverInfo" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="@dimen/fields_spacing" + tools:text="@string/default_server_url" /> + <com.google.android.material.button.MaterialButton android:id="@+id/signoutButton" android:layout_width="match_parent" diff --git a/androidApp/src/main/res/values-es-rMX/strings.xml b/androidApp/src/main/res/values-es-rMX/strings.xml index 28aee79..eeb7149 100644 --- a/androidApp/src/main/res/values-es-rMX/strings.xml +++ b/androidApp/src/main/res/values-es-rMX/strings.xml @@ -10,10 +10,12 @@ <!-- LoginActivity --> <string name="login_username">Nombre de usuario</string> <string name="login_password">Contraseña</string> + <string name="login_url">URL del servidor</string> <string name="login_login">Iniciar sesión</string> <string name="login_username_missing">Falta el nombre de usuario</string> <string name="login_password_missing">Falta la contraseña</string> + <string name="login_url_missing">Falta la URL del servidor</string> <string name="login_login_failed">Falló el inicio de sesión</string> <!-- UnitsActivity --> diff --git a/androidApp/src/main/res/values/strings.xml b/androidApp/src/main/res/values/strings.xml index 4f5a213..865368e 100644 --- a/androidApp/src/main/res/values/strings.xml +++ b/androidApp/src/main/res/values/strings.xml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <resources> <string name="app_name" translatable="false">ETBSA</string> + <string name="default_server_url" translatable="false">https://etbsa.net/api</string> <!-- Non translatable --> <string name="app_website_url" translatable="false">https://etbsa.com.mx/</string> @@ -23,10 +24,12 @@ <!-- LoginActivity --> <string name="login_username">Username</string> <string name="login_password">Password</string> + <string name="login_url">Server URL</string> <string name="login_login">Login</string> <string name="login_username_missing">Username is missing</string> <string name="login_password_missing">Password is missing</string> + <string name="login_url_missing">Server URL is missing</string> <string name="login_login_failed">Login failed</string> <!-- UnitsActivity --> diff --git a/iosApp/Localizable.strings b/iosApp/Localizable.strings new file mode 100644 index 0000000..754e4ea --- /dev/null +++ b/iosApp/Localizable.strings @@ -0,0 +1,12 @@ +/* + Localizable.strings + iosApp + + Created by Iván on 23/01/22. + Copyright © 2022 orgName. All rights reserved. +*/ +"app-name" = "TrackerMap"; +"username" = "Username"; +"password" = "Password"; +"server-url" = "Server URL"; +"login" = "Login"; diff --git a/iosApp/iosApp.xcodeproj/project.pbxproj b/iosApp/iosApp.xcodeproj/project.pbxproj index 9909002..daef2d1 100644 --- a/iosApp/iosApp.xcodeproj/project.pbxproj +++ b/iosApp/iosApp.xcodeproj/project.pbxproj @@ -1,383 +1,410 @@ - // !$*UTF8*$! - { - archiveVersion = 1; - classes = { - }; - objectVersion = 50; - objects = { +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { - /* Begin PBXBuildFile section */ -058557BB273AAA24004C7B11 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 058557BA273AAA24004C7B11 /* Assets.xcassets */; }; -058557D9273AAEEB004C7B11 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 058557D8273AAEEB004C7B11 /* Preview Assets.xcassets */; }; - 2152FB042600AC8F00CF470E /* iOSApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2152FB032600AC8F00CF470E /* iOSApp.swift */; }; - 7555FF83242A565900829871 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7555FF82242A565900829871 /* ContentView.swift */; }; - /* End PBXBuildFile section */ +/* Begin PBXBuildFile section */ + 058557BB273AAA24004C7B11 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 058557BA273AAA24004C7B11 /* Assets.xcassets */; }; + 058557D9273AAEEB004C7B11 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 058557D8273AAEEB004C7B11 /* Preview Assets.xcassets */; }; + 2152FB042600AC8F00CF470E /* iOSApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2152FB032600AC8F00CF470E /* iOSApp.swift */; }; + 7555FF83242A565900829871 /* LoginView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7555FF82242A565900829871 /* LoginView.swift */; }; + E3E77EDF279D2B5A00150070 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = E3E77EDE279D2B5A00150070 /* Localizable.strings */; }; + E3E77EE3279D44E200150070 /* Koin.swift in Sources */ = {isa = PBXBuildFile; fileRef = E3E77EE2279D44E200150070 /* Koin.swift */; }; +/* End PBXBuildFile section */ - /* Begin PBXCopyFilesBuildPhase section */ - 7555FFB4242A642300829871 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; - /* End PBXCopyFilesBuildPhase section */ +/* Begin PBXCopyFilesBuildPhase section */ + 7555FFB4242A642300829871 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ - /* Begin PBXFileReference section */ - 058557BA273AAA24004C7B11 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; }; -058557D8273AAEEB004C7B11 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; }; - 2152FB032600AC8F00CF470E /* iOSApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOSApp.swift; sourceTree = "<group>"; }; - 7555FF7B242A565900829871 /* iosApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iosApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 7555FF82242A565900829871 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; }; - 7555FF8C242A565B00829871 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; - /* End PBXFileReference section */ +/* Begin PBXFileReference section */ + 058557BA273AAA24004C7B11 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; }; + 058557D8273AAEEB004C7B11 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; }; + 2152FB032600AC8F00CF470E /* iOSApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOSApp.swift; sourceTree = "<group>"; }; + 7555FF7B242A565900829871 /* iosApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iosApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 7555FF82242A565900829871 /* LoginView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginView.swift; sourceTree = "<group>"; }; + 7555FF8C242A565B00829871 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; + E3E77EDE279D2B5A00150070 /* Localizable.strings */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; path = Localizable.strings; sourceTree = "<group>"; }; + E3E77EE2279D44E200150070 /* Koin.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Koin.swift; sourceTree = "<group>"; }; +/* End PBXFileReference section */ - /* Begin PBXFrameworksBuildPhase section */ - 7555FF78242A565900829871 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - /* End PBXFrameworksBuildPhase section */ +/* Begin PBXFrameworksBuildPhase section */ + 7555FF78242A565900829871 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ - /* Begin PBXGroup section */ - 058557D7273AAEEB004C7B11 /* Preview Content */ = { - isa = PBXGroup; - children = ( - 058557D8273AAEEB004C7B11 /* Preview Assets.xcassets */, - ); - path = "Preview Content"; - sourceTree = "<group>"; -}; - 7555FF72242A565900829871 = { - isa = PBXGroup; - children = ( - 7555FF7D242A565900829871 /* iosApp */, - 7555FF7C242A565900829871 /* Products */, - 7555FFB0242A642200829871 /* Frameworks */, - ); - sourceTree = "<group>"; - }; - 7555FF7C242A565900829871 /* Products */ = { - isa = PBXGroup; - children = ( - 7555FF7B242A565900829871 /* iosApp.app */, - ); - name = Products; - sourceTree = "<group>"; - }; - 7555FF7D242A565900829871 /* iosApp */ = { - isa = PBXGroup; - children = ( - 058557BA273AAA24004C7B11 /* Assets.xcassets */, - 7555FF82242A565900829871 /* ContentView.swift */, - 7555FF8C242A565B00829871 /* Info.plist */, - 2152FB032600AC8F00CF470E /* iOSApp.swift */, - 058557D7273AAEEB004C7B11 /* Preview Content */, - ); - path = iosApp; - sourceTree = "<group>"; - }; - 7555FFB0242A642200829871 /* Frameworks */ = { - isa = PBXGroup; - children = ( - ); - name = Frameworks; - sourceTree = "<group>"; - }; - /* End PBXGroup section */ +/* Begin PBXGroup section */ + 058557D7273AAEEB004C7B11 /* Preview Content */ = { + isa = PBXGroup; + children = ( + 058557D8273AAEEB004C7B11 /* Preview Assets.xcassets */, + ); + path = "Preview Content"; + sourceTree = "<group>"; + }; + 7555FF72242A565900829871 = { + isa = PBXGroup; + children = ( + E3E77EDE279D2B5A00150070 /* Localizable.strings */, + 7555FF7D242A565900829871 /* iosApp */, + 7555FF7C242A565900829871 /* Products */, + 7555FFB0242A642200829871 /* Frameworks */, + ); + sourceTree = "<group>"; + }; + 7555FF7C242A565900829871 /* Products */ = { + isa = PBXGroup; + children = ( + 7555FF7B242A565900829871 /* iosApp.app */, + ); + name = Products; + sourceTree = "<group>"; + }; + 7555FF7D242A565900829871 /* iosApp */ = { + isa = PBXGroup; + children = ( + E3E77EE1279D43C000150070 /* Shared */, + 058557BA273AAA24004C7B11 /* Assets.xcassets */, + E3E77EE0279D43B400150070 /* Authentication */, + 7555FF8C242A565B00829871 /* Info.plist */, + 2152FB032600AC8F00CF470E /* iOSApp.swift */, + 058557D7273AAEEB004C7B11 /* Preview Content */, + E3E77EE2279D44E200150070 /* Koin.swift */, + ); + path = iosApp; + sourceTree = "<group>"; + }; + 7555FFB0242A642200829871 /* Frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = Frameworks; + sourceTree = "<group>"; + }; + E3E77EE0279D43B400150070 /* Authentication */ = { + isa = PBXGroup; + children = ( + 7555FF82242A565900829871 /* LoginView.swift */, + ); + path = Authentication; + sourceTree = "<group>"; + }; + E3E77EE1279D43C000150070 /* Shared */ = { + isa = PBXGroup; + children = ( + ); + path = Shared; + sourceTree = "<group>"; + }; +/* End PBXGroup section */ - /* Begin PBXNativeTarget section */ - 7555FF7A242A565900829871 /* iosApp */ = { - isa = PBXNativeTarget; - buildConfigurationList = 7555FFA5242A565B00829871 /* Build configuration list for PBXNativeTarget "iosApp" */; - buildPhases = ( - 7555FFB5242A651A00829871 /* ShellScript */, - 7555FF77242A565900829871 /* Sources */, - 7555FF78242A565900829871 /* Frameworks */, - 7555FF79242A565900829871 /* Resources */, - 7555FFB4242A642300829871 /* Embed Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = iosApp; - productName = iosApp; - productReference = 7555FF7B242A565900829871 /* iosApp.app */; - productType = "com.apple.product-type.application"; - }; - /* End PBXNativeTarget section */ +/* Begin PBXNativeTarget section */ + 7555FF7A242A565900829871 /* iosApp */ = { + isa = PBXNativeTarget; + buildConfigurationList = 7555FFA5242A565B00829871 /* Build configuration list for PBXNativeTarget "iosApp" */; + buildPhases = ( + 7555FFB5242A651A00829871 /* ShellScript */, + 7555FF77242A565900829871 /* Sources */, + 7555FF78242A565900829871 /* Frameworks */, + 7555FF79242A565900829871 /* Resources */, + 7555FFB4242A642300829871 /* Embed Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = iosApp; + productName = iosApp; + productReference = 7555FF7B242A565900829871 /* iosApp.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ - /* Begin PBXProject section */ - 7555FF73242A565900829871 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 1130; - LastUpgradeCheck = 1130; - ORGANIZATIONNAME = orgName; - TargetAttributes = { - 7555FF7A242A565900829871 = { - CreatedOnToolsVersion = 11.3.1; - }; - }; - }; - buildConfigurationList = 7555FF76242A565900829871 /* Build configuration list for PBXProject "iosApp" */; - compatibilityVersion = "Xcode 9.3"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 7555FF72242A565900829871; - productRefGroup = 7555FF7C242A565900829871 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 7555FF7A242A565900829871 /* iosApp */, - ); - }; - /* End PBXProject section */ +/* Begin PBXProject section */ + 7555FF73242A565900829871 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1130; + LastUpgradeCheck = 1130; + ORGANIZATIONNAME = orgName; + TargetAttributes = { + 7555FF7A242A565900829871 = { + CreatedOnToolsVersion = 11.3.1; + }; + }; + }; + buildConfigurationList = 7555FF76242A565900829871 /* Build configuration list for PBXProject "iosApp" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + "es-419", + ); + mainGroup = 7555FF72242A565900829871; + productRefGroup = 7555FF7C242A565900829871 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 7555FF7A242A565900829871 /* iosApp */, + ); + }; +/* End PBXProject section */ - /* Begin PBXResourcesBuildPhase section */ - 7555FF79242A565900829871 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 058557D9273AAEEB004C7B11 /* Preview Assets.xcassets in Resources */, - 058557BB273AAA24004C7B11 /* Assets.xcassets in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - /* End PBXResourcesBuildPhase section */ +/* Begin PBXResourcesBuildPhase section */ + 7555FF79242A565900829871 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 058557D9273AAEEB004C7B11 /* Preview Assets.xcassets in Resources */, + E3E77EDF279D2B5A00150070 /* Localizable.strings in Resources */, + 058557BB273AAA24004C7B11 /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ - /* Begin PBXShellScriptBuildPhase section */ - 7555FFB5242A651A00829871 /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - ); - outputFileListPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "cd \"$SRCROOT/..\"\n./gradlew :shared:embedAndSignAppleFrameworkForXcode\n"; - }; - /* End PBXShellScriptBuildPhase section */ +/* Begin PBXShellScriptBuildPhase section */ + 7555FFB5242A651A00829871 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "cd \"$SRCROOT/..\"\n./gradlew :shared:embedAndSignAppleFrameworkForXcode\n"; + }; +/* End PBXShellScriptBuildPhase section */ - /* Begin PBXSourcesBuildPhase section */ - 7555FF77242A565900829871 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 2152FB042600AC8F00CF470E /* iOSApp.swift in Sources */, - 7555FF83242A565900829871 /* ContentView.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - /* End PBXSourcesBuildPhase section */ +/* Begin PBXSourcesBuildPhase section */ + 7555FF77242A565900829871 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E3E77EE3279D44E200150070 /* Koin.swift in Sources */, + 2152FB042600AC8F00CF470E /* iOSApp.swift in Sources */, + 7555FF83242A565900829871 /* LoginView.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ - /* Begin XCBuildConfiguration section */ - 7555FFA3242A565B00829871 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 14.1; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; - MTL_FAST_MATH = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - }; - name = Debug; - }; - 7555FFA4242A565B00829871 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 14.1; - MTL_ENABLE_DEBUG_INFO = NO; - MTL_FAST_MATH = YES; - SDKROOT = iphoneos; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 7555FFA6242A565B00829871 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_ASSET_PATHS = "\"iosApp/Preview Content\""; - ENABLE_PREVIEWS = YES; - FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../shared/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)"; - INFOPLIST_FILE = iosApp/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - OTHER_LDFLAGS = ( - "$(inherited)", - "-framework", - shared, - ); - PRODUCT_BUNDLE_IDENTIFIER = orgIdentifier.iosApp; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 7555FFA7242A565B00829871 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_ASSET_PATHS = "\"iosApp/Preview Content\""; - ENABLE_PREVIEWS = YES; - FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../shared/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)"; - INFOPLIST_FILE = iosApp/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - OTHER_LDFLAGS = ( - "$(inherited)", - "-framework", - shared, - ); - PRODUCT_BUNDLE_IDENTIFIER = orgIdentifier.iosApp; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; - /* End XCBuildConfiguration section */ +/* Begin XCBuildConfiguration section */ + 7555FFA3242A565B00829871 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 14.1; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 7555FFA4242A565B00829871 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 14.1; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 7555FFA6242A565B00829871 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_ASSET_PATHS = "\"iosApp/Preview Content\""; + DEVELOPMENT_TEAM = 358YRZ9P3L; + ENABLE_PREVIEWS = YES; + FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../shared/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)"; + INFOPLIST_FILE = iosApp/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + OTHER_LDFLAGS = ( + "$(inherited)", + "-framework", + shared, + ); + PRODUCT_BUNDLE_IDENTIFIER = mx.trackermap.TrackerMap; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 7555FFA7242A565B00829871 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_ASSET_PATHS = "\"iosApp/Preview Content\""; + DEVELOPMENT_TEAM = 358YRZ9P3L; + ENABLE_PREVIEWS = YES; + FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../shared/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)"; + INFOPLIST_FILE = iosApp/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + OTHER_LDFLAGS = ( + "$(inherited)", + "-framework", + shared, + ); + PRODUCT_BUNDLE_IDENTIFIER = mx.trackermap.TrackerMap; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ - /* Begin XCConfigurationList section */ - 7555FF76242A565900829871 /* Build configuration list for PBXProject "iosApp" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 7555FFA3242A565B00829871 /* Debug */, - 7555FFA4242A565B00829871 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 7555FFA5242A565B00829871 /* Build configuration list for PBXNativeTarget "iosApp" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 7555FFA6242A565B00829871 /* Debug */, - 7555FFA7242A565B00829871 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - /* End XCConfigurationList section */ - }; - rootObject = 7555FF73242A565900829871 /* Project object */; - }
\ No newline at end of file +/* Begin XCConfigurationList section */ + 7555FF76242A565900829871 /* Build configuration list for PBXProject "iosApp" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7555FFA3242A565B00829871 /* Debug */, + 7555FFA4242A565B00829871 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 7555FFA5242A565B00829871 /* Build configuration list for PBXNativeTarget "iosApp" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7555FFA6242A565B00829871 /* Debug */, + 7555FFA7242A565B00829871 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 7555FF73242A565900829871 /* Project object */; +} diff --git a/iosApp/iosApp/Assets.xcassets/AboutLogo.imageset/Contents.json b/iosApp/iosApp/Assets.xcassets/AboutLogo.imageset/Contents.json new file mode 100644 index 0000000..161cf03 --- /dev/null +++ b/iosApp/iosApp/Assets.xcassets/AboutLogo.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "logo_text-2.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "logo_text-1.svg", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "logo_text.svg", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/iosApp/iosApp/Assets.xcassets/AboutLogo.imageset/logo_text-1.svg b/iosApp/iosApp/Assets.xcassets/AboutLogo.imageset/logo_text-1.svg new file mode 100644 index 0000000..07a9757 --- /dev/null +++ b/iosApp/iosApp/Assets.xcassets/AboutLogo.imageset/logo_text-1.svg @@ -0,0 +1,216 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + width="180" + height="120" + viewBox="0 0 47.625 31.75" + version="1.1" + id="svg5" + inkscape:version="1.1 (c4e8f9ed74, 2021-05-24)" + sodipodi:docname="logo_text.svg" + inkscape:export-filename="/home/avalos/Desktop/TrackerMap/Assets/logo_text.png" + inkscape:export-xdpi="317.87" + inkscape:export-ydpi="317.87" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg"> + <sodipodi:namedview + id="namedview7" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageshadow="2" + inkscape:pageopacity="0.0" + inkscape:pagecheckerboard="0" + inkscape:document-units="px" + showgrid="false" + height="120px" + inkscape:zoom="2.9111111" + inkscape:cx="90" + inkscape:cy="62.003817" + inkscape:window-width="1314" + inkscape:window-height="735" + inkscape:window-x="1673" + inkscape:window-y="187" + inkscape:window-maximized="0" + inkscape:current-layer="layer1" /> + <defs + id="defs2"> + <rect + x="1.1984541" + y="1.7311003" + width="80.372868" + height="18.800312" + id="rect835" /> + <linearGradient + inkscape:collect="always" + id="linearGradient2792"> + <stop + style="stop-color:#b80000;stop-opacity:1" + offset="0" + id="stop2788" /> + <stop + style="stop-color:#070707;stop-opacity:1" + offset="1" + id="stop2790" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + id="linearGradient839"> + <stop + style="stop-color:#000000;stop-opacity:1;" + offset="0" + id="stop835" /> + <stop + style="stop-color:#ff3232;stop-opacity:1" + offset="1" + id="stop837" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient839" + id="linearGradient841" + x1="5.5334458" + y1="9.2972012" + x2="175.42072" + y2="62.367378" + gradientUnits="userSpaceOnUse" /> + <filter + style="color-interpolation-filters:sRGB;" + inkscape:label="Drop Shadow" + id="filter1825"> + <feFlood + flood-opacity="0.447059" + flood-color="rgb(0,0,0)" + result="flood" + id="feFlood1815" /> + <feComposite + in="flood" + in2="SourceGraphic" + operator="out" + result="composite1" + id="feComposite1817" /> + <feGaussianBlur + in="composite1" + stdDeviation="5.3" + result="blur" + id="feGaussianBlur1819" /> + <feOffset + dx="0" + dy="-0.1" + result="offset" + id="feOffset1821" /> + <feComposite + in="offset" + in2="SourceGraphic" + operator="atop" + result="composite2" + id="feComposite1823" /> + </filter> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient2792" + id="linearGradient2768" + x1="3.9858818e-09" + y1="288.42419" + x2="11.706436" + y2="288.42419" + gradientUnits="userSpaceOnUse" /> + </defs> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1"> + <rect + style="fill:#f9f9f9;stroke-width:0.269399" + id="rect264" + width="47.625" + height="31.75" + x="0" + y="0" /> + <g + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:10.5833px;line-height:1.25;font-family:'Red Hat Display';-inkscape-font-specification:'Red Hat Display Bold';white-space:pre;shape-inside:url(#rect835);fill:#000000;fill-opacity:1;stroke:none" + id="text833" + transform="matrix(0.5703574,0,0,0.5703574,4.0262782,14.95041)" + aria-label="TrackerMap.mx"> + <path + id="path73" + style="shape-inside:url(#rect835)" + d="M 4.9563111,5.1431949 V 3.7885326 H 11.475624 V 5.1431949 H 8.9885483 V 11.196842 H 7.4539699 V 5.1431949 Z" /> + <path + id="path75" + style="shape-inside:url(#rect835)" + d="M 11.786508,11.196842 V 5.6829432 h 1.449912 v 0.6032481 q 0.264583,-0.3598322 0.634998,-0.5397483 0.380999,-0.1904994 0.836081,-0.1904994 0.211666,0.010583 0.349249,0.042333 0.148166,0.021167 0.253999,0.084666 V 6.9529391 Q 15.151997,6.878856 14.961498,6.8471062 14.770999,6.804773 14.569916,6.804773 q -0.423332,0 -0.783164,0.2116659 -0.349249,0.211666 -0.550332,0.6138314 v 3.5665717 z" /> + <path + id="path77" + style="shape-inside:url(#rect835)" + d="m 17.666854,11.292092 q -0.888997,0 -1.449912,-0.465665 -0.560915,-0.476249 -0.560915,-1.2276629 0,-0.7831642 0.603248,-1.2276628 0.603248,-0.4444986 1.661578,-0.4444986 0.338666,0 0.677331,0.052917 0.338666,0.052917 0.666748,0.1587495 V 7.7466866 q 0,-0.4762485 -0.296332,-0.7196644 -0.296333,-0.2434158 -0.867831,-0.2434158 -0.349249,0 -0.761997,0.1164162 -0.402166,0.105833 -0.920747,0.3386656 L 15.88886,6.169775 q 0.645581,-0.2963324 1.248829,-0.4444986 0.613831,-0.1481662 1.206496,-0.1481662 1.111247,0 1.725078,0.5397483 0.624415,0.529165 0.624415,1.5028285 v 3.577155 h -1.428746 v -0.380998 q -0.349249,0.243415 -0.740831,0.359832 -0.380999,0.116416 -0.857247,0.116416 z M 17.042439,9.5670142 q 0,0.3174989 0.275166,0.5079988 0.275166,0.179916 0.730248,0.179916 0.359832,0 0.656164,-0.08467 0.306916,-0.09525 0.560915,-0.2645823 V 9.0801824 q -0.264582,-0.105833 -0.560915,-0.1481662 -0.285749,-0.052917 -0.603248,-0.052917 -0.497415,0 -0.783164,0.1904994 -0.275166,0.1799161 -0.275166,0.4974156 z" /> + <path + id="path79" + style="shape-inside:url(#rect835)" + d="m 24.489775,10.032679 q 0.370416,0 0.687915,-0.1481659 0.328082,-0.1481661 0.624414,-0.4656651 l 0.867831,0.89958 q -0.423332,0.465666 -1.015997,0.730248 -0.592665,0.253999 -1.227663,0.253999 -0.603248,0 -1.142996,-0.222249 -0.529165,-0.222249 -0.920747,-0.603248 -0.380999,-0.380999 -0.603248,-0.8995805 -0.222249,-0.529165 -0.222249,-1.1324131 0,-0.6032481 0.222249,-1.1218298 0.222249,-0.5291649 0.603248,-0.9101637 0.391582,-0.3915821 0.920747,-0.6138314 0.539748,-0.2222493 1.142996,-0.2222493 0.656165,0 1.259413,0.2645825 0.603248,0.2539992 1.02658,0.7196644 L 25.823271,7.5032707 Q 25.526939,7.1751884 25.188273,7.0058556 24.849607,6.8365229 24.458025,6.8365229 q -0.624414,0 -1.05833,0.4656651 -0.423332,0.4656652 -0.423332,1.1429964 0,0.6773312 0.433916,1.1324131 0.444498,0.4550815 1.079496,0.4550815 z" /> + <path + id="path81" + style="shape-inside:url(#rect835)" + d="M 27.413411,11.196842 V 3.7885326 l 1.449912,-0.317499 v 4.5402355 l 2.381243,-2.3283259 h 1.640411 l -2.582325,2.5294086 2.741075,2.9844902 H 31.191649 L 28.863323,8.678017 v 2.518825 z" /> + <path + id="path83" + style="shape-inside:url(#rect835)" + d="m 37.95752,10.508928 q -0.507999,0.412749 -1.047747,0.603248 -0.529165,0.190499 -1.18533,0.190499 -0.624414,0 -1.174746,-0.222249 -0.539748,-0.222249 -0.941914,-0.603248 -0.391582,-0.380999 -0.624414,-0.8995805 -0.222249,-0.529165 -0.222249,-1.1324131 0,-0.5926648 0.211665,-1.1112465 0.22225,-0.5291649 0.603249,-0.9101637 0.380998,-0.3915821 0.89958,-0.6138314 0.529165,-0.2222493 1.12183,-0.2222493 0.582081,0 1.079496,0.2328326 0.507999,0.2222493 0.867831,0.6138314 0.370415,0.3915821 0.571498,0.9419136 0.211666,0.5397483 0.211666,1.1747463 v 0.3809988 h -4.10632 q 0.148166,0.5185817 0.571498,0.8360806 0.423332,0.3174992 0.99483,0.3174992 0.359832,0 0.677331,-0.1164165 0.317499,-0.1164163 0.539749,-0.3280822 z M 35.565694,6.7836064 q -0.497415,0 -0.857247,0.3069156 -0.359833,0.2963324 -0.497415,0.8043308 h 2.698741 Q 36.77219,7.408021 36.401775,7.1011053 36.041942,6.7836064 35.565694,6.7836064 Z" /> + <path + id="path85" + style="shape-inside:url(#rect835)" + d="M 39.21627,11.196842 V 5.6829432 h 1.449912 v 0.6032481 q 0.264582,-0.3598322 0.634998,-0.5397483 0.380998,-0.1904994 0.83608,-0.1904994 0.211666,0.010583 0.349249,0.042333 0.148166,0.021167 0.253999,0.084666 V 6.9529391 Q 42.581759,6.878856 42.391259,6.8471062 42.20076,6.804773 41.999677,6.804773 q -0.423332,0 -0.783164,0.2116659 -0.349249,0.211666 -0.550331,0.6138314 v 3.5665717 z" /> + <path + id="path87" + style="fill:#ff3232;fill-opacity:1" + d="M 47.590309,10.667677 45.02915,5.746443 v 5.450399 H 43.610988 V 3.7885326 h 1.968494 l 2.031994,3.9793206 2.031993,-3.9793206 h 1.968494 V 11.196842 H 50.162051 V 5.7570263 Z" /> + <path + id="path89" + style="fill:#ff3232;fill-opacity:1" + d="m 54.501699,11.292092 q -0.888998,0 -1.449912,-0.465665 -0.560915,-0.476249 -0.560915,-1.2276629 0,-0.7831642 0.603248,-1.2276628 0.603248,-0.4444986 1.661578,-0.4444986 0.338665,0 0.677331,0.052917 0.338666,0.052917 0.666748,0.1587495 V 7.7466866 q 0,-0.4762485 -0.296333,-0.7196644 -0.296332,-0.2434158 -0.86783,-0.2434158 -0.349249,0 -0.761998,0.1164162 -0.402165,0.105833 -0.920747,0.3386656 L 52.723704,6.169775 q 0.645582,-0.2963324 1.24883,-0.4444986 0.613831,-0.1481662 1.206496,-0.1481662 1.111246,0 1.725078,0.5397483 0.624414,0.529165 0.624414,1.5028285 v 3.577155 h -1.428745 v -0.380998 q -0.349249,0.243415 -0.740831,0.359832 -0.380999,0.116416 -0.857247,0.116416 z M 53.877284,9.5670142 q 0,0.3174989 0.275166,0.5079988 0.275165,0.179916 0.730247,0.179916 0.359833,0 0.656165,-0.08467 0.306916,-0.09525 0.560915,-0.2645823 V 9.0801824 q -0.264583,-0.105833 -0.560915,-0.1481662 -0.285749,-0.052917 -0.603248,-0.052917 -0.497415,0 -0.783164,0.1904994 -0.275166,0.1799161 -0.275166,0.4974156 z" /> + <path + id="path91" + style="fill:#ff3232;fill-opacity:1" + d="M 58.625877,13.408752 V 5.6829432 h 1.428745 v 0.4550819 q 0.328082,-0.2645825 0.730248,-0.3915821 0.402165,-0.1375829 0.83608,-0.1375829 0.582082,0 1.09008,0.2222493 0.518582,0.2222493 0.899581,0.6032481 0.380998,0.3809988 0.592664,0.8995804 0.22225,0.5185817 0.22225,1.1112465 0,0.5926648 -0.22225,1.1112465 -0.222249,0.5185821 -0.603248,0.8995801 -0.380998,0.380999 -0.910163,0.603248 -0.518582,0.211666 -1.111247,0.211666 -0.402165,0 -0.793747,-0.105833 -0.380999,-0.116416 -0.709081,-0.328082 v 2.571742 z m 2.762241,-6.5616458 q -0.391582,0 -0.730248,0.1375828 -0.338666,0.1269996 -0.582081,0.3809988 v 2.1695765 q 0.232832,0.2328325 0.571498,0.3704154 0.349249,0.1375833 0.740831,0.1375833 0.677331,0 1.142996,-0.4550822 0.465665,-0.4656652 0.465665,-1.1429964 0,-0.6773312 -0.476248,-1.1324131 -0.465665,-0.4656651 -1.132413,-0.4656651 z" /> + </g> + <g + id="g2873" + transform="matrix(0.74760439,0,0,0.74760439,5.9928839,-214.01106)"> + <g + id="g2752" + transform="translate(22.397061,13.468716)" + style="fill:#ff3232;fill-opacity:1;stroke:#ff3232;stroke-width:0.740833;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"> + <g + id="g2773" + style="fill:#ff3232;fill-opacity:1;stroke:#ff3232;stroke-width:0.740833;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"> + <g + id="g2778" + style="fill:#ff3232;fill-opacity:1;stroke:#ff3232;stroke-width:0.740833;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"> + <path + style="fill:#ff3232;fill-opacity:1;stroke:#ff3232;stroke-width:0.740833;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 5.7681275,287.97901 c 2.2039291,0.43045 3.0640156,5.9996 3.0640156,5.9996 0,0 -0.1619942,-4.32954 -3.4996904,-4.77319 -2.6639615,-0.3541 -4.57067036,3.10161 -4.57067036,3.10161 0,0 2.84131956,-4.75087 5.00634516,-4.32802 z" + id="path2830" + inkscape:connector-curvature="0" + sodipodi:nodetypes="acsca" /> + <path + sodipodi:nodetypes="acsca" + inkscape:connector-curvature="0" + id="path2836" + d="m 6.3791794,285.29038 c 2.2039291,0.43045 3.0640156,5.9996 3.0640156,5.9996 0,0 -0.1619942,-4.32954 -3.4996904,-4.77319 -2.6639615,-0.3541 -4.5706703,3.10161 -4.5706703,3.10161 0,0 2.8413195,-4.75087 5.0063451,-4.32802 z" + style="fill:#ff3232;fill-opacity:1;stroke:#ff3232;stroke-width:0.740833;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + <path + style="fill:#ff3232;fill-opacity:1;stroke:#ff3232;stroke-width:0.740833;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 6.9291261,282.60175 c 2.2039291,0.43045 3.0640156,5.9996 3.0640156,5.9996 0,0 -0.1619942,-4.32954 -3.4996904,-4.77319 -2.6639615,-0.3541 -4.5706703,3.10161 -4.5706703,3.10161 0,0 2.8413195,-4.75087 5.0063451,-4.32802 z" + id="path2849" + inkscape:connector-curvature="0" + sodipodi:nodetypes="acsca" /> + </g> + </g> + </g> + </g> + </g> +</svg> diff --git a/iosApp/iosApp/Assets.xcassets/AboutLogo.imageset/logo_text-2.svg b/iosApp/iosApp/Assets.xcassets/AboutLogo.imageset/logo_text-2.svg new file mode 100644 index 0000000..07a9757 --- /dev/null +++ b/iosApp/iosApp/Assets.xcassets/AboutLogo.imageset/logo_text-2.svg @@ -0,0 +1,216 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + width="180" + height="120" + viewBox="0 0 47.625 31.75" + version="1.1" + id="svg5" + inkscape:version="1.1 (c4e8f9ed74, 2021-05-24)" + sodipodi:docname="logo_text.svg" + inkscape:export-filename="/home/avalos/Desktop/TrackerMap/Assets/logo_text.png" + inkscape:export-xdpi="317.87" + inkscape:export-ydpi="317.87" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg"> + <sodipodi:namedview + id="namedview7" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageshadow="2" + inkscape:pageopacity="0.0" + inkscape:pagecheckerboard="0" + inkscape:document-units="px" + showgrid="false" + height="120px" + inkscape:zoom="2.9111111" + inkscape:cx="90" + inkscape:cy="62.003817" + inkscape:window-width="1314" + inkscape:window-height="735" + inkscape:window-x="1673" + inkscape:window-y="187" + inkscape:window-maximized="0" + inkscape:current-layer="layer1" /> + <defs + id="defs2"> + <rect + x="1.1984541" + y="1.7311003" + width="80.372868" + height="18.800312" + id="rect835" /> + <linearGradient + inkscape:collect="always" + id="linearGradient2792"> + <stop + style="stop-color:#b80000;stop-opacity:1" + offset="0" + id="stop2788" /> + <stop + style="stop-color:#070707;stop-opacity:1" + offset="1" + id="stop2790" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + id="linearGradient839"> + <stop + style="stop-color:#000000;stop-opacity:1;" + offset="0" + id="stop835" /> + <stop + style="stop-color:#ff3232;stop-opacity:1" + offset="1" + id="stop837" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient839" + id="linearGradient841" + x1="5.5334458" + y1="9.2972012" + x2="175.42072" + y2="62.367378" + gradientUnits="userSpaceOnUse" /> + <filter + style="color-interpolation-filters:sRGB;" + inkscape:label="Drop Shadow" + id="filter1825"> + <feFlood + flood-opacity="0.447059" + flood-color="rgb(0,0,0)" + result="flood" + id="feFlood1815" /> + <feComposite + in="flood" + in2="SourceGraphic" + operator="out" + result="composite1" + id="feComposite1817" /> + <feGaussianBlur + in="composite1" + stdDeviation="5.3" + result="blur" + id="feGaussianBlur1819" /> + <feOffset + dx="0" + dy="-0.1" + result="offset" + id="feOffset1821" /> + <feComposite + in="offset" + in2="SourceGraphic" + operator="atop" + result="composite2" + id="feComposite1823" /> + </filter> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient2792" + id="linearGradient2768" + x1="3.9858818e-09" + y1="288.42419" + x2="11.706436" + y2="288.42419" + gradientUnits="userSpaceOnUse" /> + </defs> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1"> + <rect + style="fill:#f9f9f9;stroke-width:0.269399" + id="rect264" + width="47.625" + height="31.75" + x="0" + y="0" /> + <g + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:10.5833px;line-height:1.25;font-family:'Red Hat Display';-inkscape-font-specification:'Red Hat Display Bold';white-space:pre;shape-inside:url(#rect835);fill:#000000;fill-opacity:1;stroke:none" + id="text833" + transform="matrix(0.5703574,0,0,0.5703574,4.0262782,14.95041)" + aria-label="TrackerMap.mx"> + <path + id="path73" + style="shape-inside:url(#rect835)" + d="M 4.9563111,5.1431949 V 3.7885326 H 11.475624 V 5.1431949 H 8.9885483 V 11.196842 H 7.4539699 V 5.1431949 Z" /> + <path + id="path75" + style="shape-inside:url(#rect835)" + d="M 11.786508,11.196842 V 5.6829432 h 1.449912 v 0.6032481 q 0.264583,-0.3598322 0.634998,-0.5397483 0.380999,-0.1904994 0.836081,-0.1904994 0.211666,0.010583 0.349249,0.042333 0.148166,0.021167 0.253999,0.084666 V 6.9529391 Q 15.151997,6.878856 14.961498,6.8471062 14.770999,6.804773 14.569916,6.804773 q -0.423332,0 -0.783164,0.2116659 -0.349249,0.211666 -0.550332,0.6138314 v 3.5665717 z" /> + <path + id="path77" + style="shape-inside:url(#rect835)" + d="m 17.666854,11.292092 q -0.888997,0 -1.449912,-0.465665 -0.560915,-0.476249 -0.560915,-1.2276629 0,-0.7831642 0.603248,-1.2276628 0.603248,-0.4444986 1.661578,-0.4444986 0.338666,0 0.677331,0.052917 0.338666,0.052917 0.666748,0.1587495 V 7.7466866 q 0,-0.4762485 -0.296332,-0.7196644 -0.296333,-0.2434158 -0.867831,-0.2434158 -0.349249,0 -0.761997,0.1164162 -0.402166,0.105833 -0.920747,0.3386656 L 15.88886,6.169775 q 0.645581,-0.2963324 1.248829,-0.4444986 0.613831,-0.1481662 1.206496,-0.1481662 1.111247,0 1.725078,0.5397483 0.624415,0.529165 0.624415,1.5028285 v 3.577155 h -1.428746 v -0.380998 q -0.349249,0.243415 -0.740831,0.359832 -0.380999,0.116416 -0.857247,0.116416 z M 17.042439,9.5670142 q 0,0.3174989 0.275166,0.5079988 0.275166,0.179916 0.730248,0.179916 0.359832,0 0.656164,-0.08467 0.306916,-0.09525 0.560915,-0.2645823 V 9.0801824 q -0.264582,-0.105833 -0.560915,-0.1481662 -0.285749,-0.052917 -0.603248,-0.052917 -0.497415,0 -0.783164,0.1904994 -0.275166,0.1799161 -0.275166,0.4974156 z" /> + <path + id="path79" + style="shape-inside:url(#rect835)" + d="m 24.489775,10.032679 q 0.370416,0 0.687915,-0.1481659 0.328082,-0.1481661 0.624414,-0.4656651 l 0.867831,0.89958 q -0.423332,0.465666 -1.015997,0.730248 -0.592665,0.253999 -1.227663,0.253999 -0.603248,0 -1.142996,-0.222249 -0.529165,-0.222249 -0.920747,-0.603248 -0.380999,-0.380999 -0.603248,-0.8995805 -0.222249,-0.529165 -0.222249,-1.1324131 0,-0.6032481 0.222249,-1.1218298 0.222249,-0.5291649 0.603248,-0.9101637 0.391582,-0.3915821 0.920747,-0.6138314 0.539748,-0.2222493 1.142996,-0.2222493 0.656165,0 1.259413,0.2645825 0.603248,0.2539992 1.02658,0.7196644 L 25.823271,7.5032707 Q 25.526939,7.1751884 25.188273,7.0058556 24.849607,6.8365229 24.458025,6.8365229 q -0.624414,0 -1.05833,0.4656651 -0.423332,0.4656652 -0.423332,1.1429964 0,0.6773312 0.433916,1.1324131 0.444498,0.4550815 1.079496,0.4550815 z" /> + <path + id="path81" + style="shape-inside:url(#rect835)" + d="M 27.413411,11.196842 V 3.7885326 l 1.449912,-0.317499 v 4.5402355 l 2.381243,-2.3283259 h 1.640411 l -2.582325,2.5294086 2.741075,2.9844902 H 31.191649 L 28.863323,8.678017 v 2.518825 z" /> + <path + id="path83" + style="shape-inside:url(#rect835)" + d="m 37.95752,10.508928 q -0.507999,0.412749 -1.047747,0.603248 -0.529165,0.190499 -1.18533,0.190499 -0.624414,0 -1.174746,-0.222249 -0.539748,-0.222249 -0.941914,-0.603248 -0.391582,-0.380999 -0.624414,-0.8995805 -0.222249,-0.529165 -0.222249,-1.1324131 0,-0.5926648 0.211665,-1.1112465 0.22225,-0.5291649 0.603249,-0.9101637 0.380998,-0.3915821 0.89958,-0.6138314 0.529165,-0.2222493 1.12183,-0.2222493 0.582081,0 1.079496,0.2328326 0.507999,0.2222493 0.867831,0.6138314 0.370415,0.3915821 0.571498,0.9419136 0.211666,0.5397483 0.211666,1.1747463 v 0.3809988 h -4.10632 q 0.148166,0.5185817 0.571498,0.8360806 0.423332,0.3174992 0.99483,0.3174992 0.359832,0 0.677331,-0.1164165 0.317499,-0.1164163 0.539749,-0.3280822 z M 35.565694,6.7836064 q -0.497415,0 -0.857247,0.3069156 -0.359833,0.2963324 -0.497415,0.8043308 h 2.698741 Q 36.77219,7.408021 36.401775,7.1011053 36.041942,6.7836064 35.565694,6.7836064 Z" /> + <path + id="path85" + style="shape-inside:url(#rect835)" + d="M 39.21627,11.196842 V 5.6829432 h 1.449912 v 0.6032481 q 0.264582,-0.3598322 0.634998,-0.5397483 0.380998,-0.1904994 0.83608,-0.1904994 0.211666,0.010583 0.349249,0.042333 0.148166,0.021167 0.253999,0.084666 V 6.9529391 Q 42.581759,6.878856 42.391259,6.8471062 42.20076,6.804773 41.999677,6.804773 q -0.423332,0 -0.783164,0.2116659 -0.349249,0.211666 -0.550331,0.6138314 v 3.5665717 z" /> + <path + id="path87" + style="fill:#ff3232;fill-opacity:1" + d="M 47.590309,10.667677 45.02915,5.746443 v 5.450399 H 43.610988 V 3.7885326 h 1.968494 l 2.031994,3.9793206 2.031993,-3.9793206 h 1.968494 V 11.196842 H 50.162051 V 5.7570263 Z" /> + <path + id="path89" + style="fill:#ff3232;fill-opacity:1" + d="m 54.501699,11.292092 q -0.888998,0 -1.449912,-0.465665 -0.560915,-0.476249 -0.560915,-1.2276629 0,-0.7831642 0.603248,-1.2276628 0.603248,-0.4444986 1.661578,-0.4444986 0.338665,0 0.677331,0.052917 0.338666,0.052917 0.666748,0.1587495 V 7.7466866 q 0,-0.4762485 -0.296333,-0.7196644 -0.296332,-0.2434158 -0.86783,-0.2434158 -0.349249,0 -0.761998,0.1164162 -0.402165,0.105833 -0.920747,0.3386656 L 52.723704,6.169775 q 0.645582,-0.2963324 1.24883,-0.4444986 0.613831,-0.1481662 1.206496,-0.1481662 1.111246,0 1.725078,0.5397483 0.624414,0.529165 0.624414,1.5028285 v 3.577155 h -1.428745 v -0.380998 q -0.349249,0.243415 -0.740831,0.359832 -0.380999,0.116416 -0.857247,0.116416 z M 53.877284,9.5670142 q 0,0.3174989 0.275166,0.5079988 0.275165,0.179916 0.730247,0.179916 0.359833,0 0.656165,-0.08467 0.306916,-0.09525 0.560915,-0.2645823 V 9.0801824 q -0.264583,-0.105833 -0.560915,-0.1481662 -0.285749,-0.052917 -0.603248,-0.052917 -0.497415,0 -0.783164,0.1904994 -0.275166,0.1799161 -0.275166,0.4974156 z" /> + <path + id="path91" + style="fill:#ff3232;fill-opacity:1" + d="M 58.625877,13.408752 V 5.6829432 h 1.428745 v 0.4550819 q 0.328082,-0.2645825 0.730248,-0.3915821 0.402165,-0.1375829 0.83608,-0.1375829 0.582082,0 1.09008,0.2222493 0.518582,0.2222493 0.899581,0.6032481 0.380998,0.3809988 0.592664,0.8995804 0.22225,0.5185817 0.22225,1.1112465 0,0.5926648 -0.22225,1.1112465 -0.222249,0.5185821 -0.603248,0.8995801 -0.380998,0.380999 -0.910163,0.603248 -0.518582,0.211666 -1.111247,0.211666 -0.402165,0 -0.793747,-0.105833 -0.380999,-0.116416 -0.709081,-0.328082 v 2.571742 z m 2.762241,-6.5616458 q -0.391582,0 -0.730248,0.1375828 -0.338666,0.1269996 -0.582081,0.3809988 v 2.1695765 q 0.232832,0.2328325 0.571498,0.3704154 0.349249,0.1375833 0.740831,0.1375833 0.677331,0 1.142996,-0.4550822 0.465665,-0.4656652 0.465665,-1.1429964 0,-0.6773312 -0.476248,-1.1324131 -0.465665,-0.4656651 -1.132413,-0.4656651 z" /> + </g> + <g + id="g2873" + transform="matrix(0.74760439,0,0,0.74760439,5.9928839,-214.01106)"> + <g + id="g2752" + transform="translate(22.397061,13.468716)" + style="fill:#ff3232;fill-opacity:1;stroke:#ff3232;stroke-width:0.740833;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"> + <g + id="g2773" + style="fill:#ff3232;fill-opacity:1;stroke:#ff3232;stroke-width:0.740833;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"> + <g + id="g2778" + style="fill:#ff3232;fill-opacity:1;stroke:#ff3232;stroke-width:0.740833;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"> + <path + style="fill:#ff3232;fill-opacity:1;stroke:#ff3232;stroke-width:0.740833;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 5.7681275,287.97901 c 2.2039291,0.43045 3.0640156,5.9996 3.0640156,5.9996 0,0 -0.1619942,-4.32954 -3.4996904,-4.77319 -2.6639615,-0.3541 -4.57067036,3.10161 -4.57067036,3.10161 0,0 2.84131956,-4.75087 5.00634516,-4.32802 z" + id="path2830" + inkscape:connector-curvature="0" + sodipodi:nodetypes="acsca" /> + <path + sodipodi:nodetypes="acsca" + inkscape:connector-curvature="0" + id="path2836" + d="m 6.3791794,285.29038 c 2.2039291,0.43045 3.0640156,5.9996 3.0640156,5.9996 0,0 -0.1619942,-4.32954 -3.4996904,-4.77319 -2.6639615,-0.3541 -4.5706703,3.10161 -4.5706703,3.10161 0,0 2.8413195,-4.75087 5.0063451,-4.32802 z" + style="fill:#ff3232;fill-opacity:1;stroke:#ff3232;stroke-width:0.740833;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + <path + style="fill:#ff3232;fill-opacity:1;stroke:#ff3232;stroke-width:0.740833;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 6.9291261,282.60175 c 2.2039291,0.43045 3.0640156,5.9996 3.0640156,5.9996 0,0 -0.1619942,-4.32954 -3.4996904,-4.77319 -2.6639615,-0.3541 -4.5706703,3.10161 -4.5706703,3.10161 0,0 2.8413195,-4.75087 5.0063451,-4.32802 z" + id="path2849" + inkscape:connector-curvature="0" + sodipodi:nodetypes="acsca" /> + </g> + </g> + </g> + </g> + </g> +</svg> diff --git a/iosApp/iosApp/Assets.xcassets/AboutLogo.imageset/logo_text.svg b/iosApp/iosApp/Assets.xcassets/AboutLogo.imageset/logo_text.svg new file mode 100644 index 0000000..07a9757 --- /dev/null +++ b/iosApp/iosApp/Assets.xcassets/AboutLogo.imageset/logo_text.svg @@ -0,0 +1,216 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + width="180" + height="120" + viewBox="0 0 47.625 31.75" + version="1.1" + id="svg5" + inkscape:version="1.1 (c4e8f9ed74, 2021-05-24)" + sodipodi:docname="logo_text.svg" + inkscape:export-filename="/home/avalos/Desktop/TrackerMap/Assets/logo_text.png" + inkscape:export-xdpi="317.87" + inkscape:export-ydpi="317.87" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg"> + <sodipodi:namedview + id="namedview7" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageshadow="2" + inkscape:pageopacity="0.0" + inkscape:pagecheckerboard="0" + inkscape:document-units="px" + showgrid="false" + height="120px" + inkscape:zoom="2.9111111" + inkscape:cx="90" + inkscape:cy="62.003817" + inkscape:window-width="1314" + inkscape:window-height="735" + inkscape:window-x="1673" + inkscape:window-y="187" + inkscape:window-maximized="0" + inkscape:current-layer="layer1" /> + <defs + id="defs2"> + <rect + x="1.1984541" + y="1.7311003" + width="80.372868" + height="18.800312" + id="rect835" /> + <linearGradient + inkscape:collect="always" + id="linearGradient2792"> + <stop + style="stop-color:#b80000;stop-opacity:1" + offset="0" + id="stop2788" /> + <stop + style="stop-color:#070707;stop-opacity:1" + offset="1" + id="stop2790" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + id="linearGradient839"> + <stop + style="stop-color:#000000;stop-opacity:1;" + offset="0" + id="stop835" /> + <stop + style="stop-color:#ff3232;stop-opacity:1" + offset="1" + id="stop837" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient839" + id="linearGradient841" + x1="5.5334458" + y1="9.2972012" + x2="175.42072" + y2="62.367378" + gradientUnits="userSpaceOnUse" /> + <filter + style="color-interpolation-filters:sRGB;" + inkscape:label="Drop Shadow" + id="filter1825"> + <feFlood + flood-opacity="0.447059" + flood-color="rgb(0,0,0)" + result="flood" + id="feFlood1815" /> + <feComposite + in="flood" + in2="SourceGraphic" + operator="out" + result="composite1" + id="feComposite1817" /> + <feGaussianBlur + in="composite1" + stdDeviation="5.3" + result="blur" + id="feGaussianBlur1819" /> + <feOffset + dx="0" + dy="-0.1" + result="offset" + id="feOffset1821" /> + <feComposite + in="offset" + in2="SourceGraphic" + operator="atop" + result="composite2" + id="feComposite1823" /> + </filter> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient2792" + id="linearGradient2768" + x1="3.9858818e-09" + y1="288.42419" + x2="11.706436" + y2="288.42419" + gradientUnits="userSpaceOnUse" /> + </defs> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1"> + <rect + style="fill:#f9f9f9;stroke-width:0.269399" + id="rect264" + width="47.625" + height="31.75" + x="0" + y="0" /> + <g + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:10.5833px;line-height:1.25;font-family:'Red Hat Display';-inkscape-font-specification:'Red Hat Display Bold';white-space:pre;shape-inside:url(#rect835);fill:#000000;fill-opacity:1;stroke:none" + id="text833" + transform="matrix(0.5703574,0,0,0.5703574,4.0262782,14.95041)" + aria-label="TrackerMap.mx"> + <path + id="path73" + style="shape-inside:url(#rect835)" + d="M 4.9563111,5.1431949 V 3.7885326 H 11.475624 V 5.1431949 H 8.9885483 V 11.196842 H 7.4539699 V 5.1431949 Z" /> + <path + id="path75" + style="shape-inside:url(#rect835)" + d="M 11.786508,11.196842 V 5.6829432 h 1.449912 v 0.6032481 q 0.264583,-0.3598322 0.634998,-0.5397483 0.380999,-0.1904994 0.836081,-0.1904994 0.211666,0.010583 0.349249,0.042333 0.148166,0.021167 0.253999,0.084666 V 6.9529391 Q 15.151997,6.878856 14.961498,6.8471062 14.770999,6.804773 14.569916,6.804773 q -0.423332,0 -0.783164,0.2116659 -0.349249,0.211666 -0.550332,0.6138314 v 3.5665717 z" /> + <path + id="path77" + style="shape-inside:url(#rect835)" + d="m 17.666854,11.292092 q -0.888997,0 -1.449912,-0.465665 -0.560915,-0.476249 -0.560915,-1.2276629 0,-0.7831642 0.603248,-1.2276628 0.603248,-0.4444986 1.661578,-0.4444986 0.338666,0 0.677331,0.052917 0.338666,0.052917 0.666748,0.1587495 V 7.7466866 q 0,-0.4762485 -0.296332,-0.7196644 -0.296333,-0.2434158 -0.867831,-0.2434158 -0.349249,0 -0.761997,0.1164162 -0.402166,0.105833 -0.920747,0.3386656 L 15.88886,6.169775 q 0.645581,-0.2963324 1.248829,-0.4444986 0.613831,-0.1481662 1.206496,-0.1481662 1.111247,0 1.725078,0.5397483 0.624415,0.529165 0.624415,1.5028285 v 3.577155 h -1.428746 v -0.380998 q -0.349249,0.243415 -0.740831,0.359832 -0.380999,0.116416 -0.857247,0.116416 z M 17.042439,9.5670142 q 0,0.3174989 0.275166,0.5079988 0.275166,0.179916 0.730248,0.179916 0.359832,0 0.656164,-0.08467 0.306916,-0.09525 0.560915,-0.2645823 V 9.0801824 q -0.264582,-0.105833 -0.560915,-0.1481662 -0.285749,-0.052917 -0.603248,-0.052917 -0.497415,0 -0.783164,0.1904994 -0.275166,0.1799161 -0.275166,0.4974156 z" /> + <path + id="path79" + style="shape-inside:url(#rect835)" + d="m 24.489775,10.032679 q 0.370416,0 0.687915,-0.1481659 0.328082,-0.1481661 0.624414,-0.4656651 l 0.867831,0.89958 q -0.423332,0.465666 -1.015997,0.730248 -0.592665,0.253999 -1.227663,0.253999 -0.603248,0 -1.142996,-0.222249 -0.529165,-0.222249 -0.920747,-0.603248 -0.380999,-0.380999 -0.603248,-0.8995805 -0.222249,-0.529165 -0.222249,-1.1324131 0,-0.6032481 0.222249,-1.1218298 0.222249,-0.5291649 0.603248,-0.9101637 0.391582,-0.3915821 0.920747,-0.6138314 0.539748,-0.2222493 1.142996,-0.2222493 0.656165,0 1.259413,0.2645825 0.603248,0.2539992 1.02658,0.7196644 L 25.823271,7.5032707 Q 25.526939,7.1751884 25.188273,7.0058556 24.849607,6.8365229 24.458025,6.8365229 q -0.624414,0 -1.05833,0.4656651 -0.423332,0.4656652 -0.423332,1.1429964 0,0.6773312 0.433916,1.1324131 0.444498,0.4550815 1.079496,0.4550815 z" /> + <path + id="path81" + style="shape-inside:url(#rect835)" + d="M 27.413411,11.196842 V 3.7885326 l 1.449912,-0.317499 v 4.5402355 l 2.381243,-2.3283259 h 1.640411 l -2.582325,2.5294086 2.741075,2.9844902 H 31.191649 L 28.863323,8.678017 v 2.518825 z" /> + <path + id="path83" + style="shape-inside:url(#rect835)" + d="m 37.95752,10.508928 q -0.507999,0.412749 -1.047747,0.603248 -0.529165,0.190499 -1.18533,0.190499 -0.624414,0 -1.174746,-0.222249 -0.539748,-0.222249 -0.941914,-0.603248 -0.391582,-0.380999 -0.624414,-0.8995805 -0.222249,-0.529165 -0.222249,-1.1324131 0,-0.5926648 0.211665,-1.1112465 0.22225,-0.5291649 0.603249,-0.9101637 0.380998,-0.3915821 0.89958,-0.6138314 0.529165,-0.2222493 1.12183,-0.2222493 0.582081,0 1.079496,0.2328326 0.507999,0.2222493 0.867831,0.6138314 0.370415,0.3915821 0.571498,0.9419136 0.211666,0.5397483 0.211666,1.1747463 v 0.3809988 h -4.10632 q 0.148166,0.5185817 0.571498,0.8360806 0.423332,0.3174992 0.99483,0.3174992 0.359832,0 0.677331,-0.1164165 0.317499,-0.1164163 0.539749,-0.3280822 z M 35.565694,6.7836064 q -0.497415,0 -0.857247,0.3069156 -0.359833,0.2963324 -0.497415,0.8043308 h 2.698741 Q 36.77219,7.408021 36.401775,7.1011053 36.041942,6.7836064 35.565694,6.7836064 Z" /> + <path + id="path85" + style="shape-inside:url(#rect835)" + d="M 39.21627,11.196842 V 5.6829432 h 1.449912 v 0.6032481 q 0.264582,-0.3598322 0.634998,-0.5397483 0.380998,-0.1904994 0.83608,-0.1904994 0.211666,0.010583 0.349249,0.042333 0.148166,0.021167 0.253999,0.084666 V 6.9529391 Q 42.581759,6.878856 42.391259,6.8471062 42.20076,6.804773 41.999677,6.804773 q -0.423332,0 -0.783164,0.2116659 -0.349249,0.211666 -0.550331,0.6138314 v 3.5665717 z" /> + <path + id="path87" + style="fill:#ff3232;fill-opacity:1" + d="M 47.590309,10.667677 45.02915,5.746443 v 5.450399 H 43.610988 V 3.7885326 h 1.968494 l 2.031994,3.9793206 2.031993,-3.9793206 h 1.968494 V 11.196842 H 50.162051 V 5.7570263 Z" /> + <path + id="path89" + style="fill:#ff3232;fill-opacity:1" + d="m 54.501699,11.292092 q -0.888998,0 -1.449912,-0.465665 -0.560915,-0.476249 -0.560915,-1.2276629 0,-0.7831642 0.603248,-1.2276628 0.603248,-0.4444986 1.661578,-0.4444986 0.338665,0 0.677331,0.052917 0.338666,0.052917 0.666748,0.1587495 V 7.7466866 q 0,-0.4762485 -0.296333,-0.7196644 -0.296332,-0.2434158 -0.86783,-0.2434158 -0.349249,0 -0.761998,0.1164162 -0.402165,0.105833 -0.920747,0.3386656 L 52.723704,6.169775 q 0.645582,-0.2963324 1.24883,-0.4444986 0.613831,-0.1481662 1.206496,-0.1481662 1.111246,0 1.725078,0.5397483 0.624414,0.529165 0.624414,1.5028285 v 3.577155 h -1.428745 v -0.380998 q -0.349249,0.243415 -0.740831,0.359832 -0.380999,0.116416 -0.857247,0.116416 z M 53.877284,9.5670142 q 0,0.3174989 0.275166,0.5079988 0.275165,0.179916 0.730247,0.179916 0.359833,0 0.656165,-0.08467 0.306916,-0.09525 0.560915,-0.2645823 V 9.0801824 q -0.264583,-0.105833 -0.560915,-0.1481662 -0.285749,-0.052917 -0.603248,-0.052917 -0.497415,0 -0.783164,0.1904994 -0.275166,0.1799161 -0.275166,0.4974156 z" /> + <path + id="path91" + style="fill:#ff3232;fill-opacity:1" + d="M 58.625877,13.408752 V 5.6829432 h 1.428745 v 0.4550819 q 0.328082,-0.2645825 0.730248,-0.3915821 0.402165,-0.1375829 0.83608,-0.1375829 0.582082,0 1.09008,0.2222493 0.518582,0.2222493 0.899581,0.6032481 0.380998,0.3809988 0.592664,0.8995804 0.22225,0.5185817 0.22225,1.1112465 0,0.5926648 -0.22225,1.1112465 -0.222249,0.5185821 -0.603248,0.8995801 -0.380998,0.380999 -0.910163,0.603248 -0.518582,0.211666 -1.111247,0.211666 -0.402165,0 -0.793747,-0.105833 -0.380999,-0.116416 -0.709081,-0.328082 v 2.571742 z m 2.762241,-6.5616458 q -0.391582,0 -0.730248,0.1375828 -0.338666,0.1269996 -0.582081,0.3809988 v 2.1695765 q 0.232832,0.2328325 0.571498,0.3704154 0.349249,0.1375833 0.740831,0.1375833 0.677331,0 1.142996,-0.4550822 0.465665,-0.4656652 0.465665,-1.1429964 0,-0.6773312 -0.476248,-1.1324131 -0.465665,-0.4656651 -1.132413,-0.4656651 z" /> + </g> + <g + id="g2873" + transform="matrix(0.74760439,0,0,0.74760439,5.9928839,-214.01106)"> + <g + id="g2752" + transform="translate(22.397061,13.468716)" + style="fill:#ff3232;fill-opacity:1;stroke:#ff3232;stroke-width:0.740833;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"> + <g + id="g2773" + style="fill:#ff3232;fill-opacity:1;stroke:#ff3232;stroke-width:0.740833;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"> + <g + id="g2778" + style="fill:#ff3232;fill-opacity:1;stroke:#ff3232;stroke-width:0.740833;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"> + <path + style="fill:#ff3232;fill-opacity:1;stroke:#ff3232;stroke-width:0.740833;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 5.7681275,287.97901 c 2.2039291,0.43045 3.0640156,5.9996 3.0640156,5.9996 0,0 -0.1619942,-4.32954 -3.4996904,-4.77319 -2.6639615,-0.3541 -4.57067036,3.10161 -4.57067036,3.10161 0,0 2.84131956,-4.75087 5.00634516,-4.32802 z" + id="path2830" + inkscape:connector-curvature="0" + sodipodi:nodetypes="acsca" /> + <path + sodipodi:nodetypes="acsca" + inkscape:connector-curvature="0" + id="path2836" + d="m 6.3791794,285.29038 c 2.2039291,0.43045 3.0640156,5.9996 3.0640156,5.9996 0,0 -0.1619942,-4.32954 -3.4996904,-4.77319 -2.6639615,-0.3541 -4.5706703,3.10161 -4.5706703,3.10161 0,0 2.8413195,-4.75087 5.0063451,-4.32802 z" + style="fill:#ff3232;fill-opacity:1;stroke:#ff3232;stroke-width:0.740833;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + <path + style="fill:#ff3232;fill-opacity:1;stroke:#ff3232;stroke-width:0.740833;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 6.9291261,282.60175 c 2.2039291,0.43045 3.0640156,5.9996 3.0640156,5.9996 0,0 -0.1619942,-4.32954 -3.4996904,-4.77319 -2.6639615,-0.3541 -4.5706703,3.10161 -4.5706703,3.10161 0,0 2.8413195,-4.75087 5.0063451,-4.32802 z" + id="path2849" + inkscape:connector-curvature="0" + sodipodi:nodetypes="acsca" /> + </g> + </g> + </g> + </g> + </g> +</svg> diff --git a/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/Contents.json b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/Contents.json index fb88a39..0e1c1ba 100644 --- a/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,98 +1,176 @@ { "images" : [ { + "filename" : "icon-40.png", "idiom" : "iphone", "scale" : "2x", "size" : "20x20" }, { + "filename" : "icon-60.png", "idiom" : "iphone", "scale" : "3x", "size" : "20x20" }, { + "filename" : "icon-58.png", "idiom" : "iphone", "scale" : "2x", "size" : "29x29" }, { + "filename" : "icon-87.png", "idiom" : "iphone", "scale" : "3x", "size" : "29x29" }, { + "filename" : "icon-80.png", "idiom" : "iphone", "scale" : "2x", "size" : "40x40" }, { + "filename" : "icon-120.png", "idiom" : "iphone", "scale" : "3x", "size" : "40x40" }, { + "filename" : "icon-120.png", "idiom" : "iphone", "scale" : "2x", "size" : "60x60" }, { + "filename" : "icon-180.png", "idiom" : "iphone", "scale" : "3x", "size" : "60x60" }, { + "filename" : "icon-20.png", "idiom" : "ipad", "scale" : "1x", "size" : "20x20" }, { + "filename" : "icon-40.png", "idiom" : "ipad", "scale" : "2x", "size" : "20x20" }, { + "filename" : "icon-29.png", "idiom" : "ipad", "scale" : "1x", "size" : "29x29" }, { + "filename" : "icon-58.png", "idiom" : "ipad", "scale" : "2x", "size" : "29x29" }, { + "filename" : "icon-40.png", "idiom" : "ipad", "scale" : "1x", "size" : "40x40" }, { + "filename" : "icon-80.png", "idiom" : "ipad", "scale" : "2x", "size" : "40x40" }, { + "filename" : "icon-76.png", "idiom" : "ipad", "scale" : "1x", "size" : "76x76" }, { + "filename" : "icon-152.png", "idiom" : "ipad", "scale" : "2x", "size" : "76x76" }, { + "filename" : "icon-167.png", "idiom" : "ipad", "scale" : "2x", "size" : "83.5x83.5" }, { + "filename" : "icon-1024.png", "idiom" : "ios-marketing", "scale" : "1x", "size" : "1024x1024" + }, + { + "filename" : "icon-16.png", + "idiom" : "mac", + "scale" : "1x", + "size" : "16x16" + }, + { + "filename" : "icon-32.png", + "idiom" : "mac", + "scale" : "2x", + "size" : "16x16" + }, + { + "filename" : "icon-32.png", + "idiom" : "mac", + "scale" : "1x", + "size" : "32x32" + }, + { + "filename" : "icon-64.png", + "idiom" : "mac", + "scale" : "2x", + "size" : "32x32" + }, + { + "filename" : "icon-128.png", + "idiom" : "mac", + "scale" : "1x", + "size" : "128x128" + }, + { + "filename" : "icon-256.png", + "idiom" : "mac", + "scale" : "2x", + "size" : "128x128" + }, + { + "filename" : "icon-256.png", + "idiom" : "mac", + "scale" : "1x", + "size" : "256x256" + }, + { + "filename" : "icon-512.png", + "idiom" : "mac", + "scale" : "2x", + "size" : "256x256" + }, + { + "filename" : "icon-512.png", + "idiom" : "mac", + "scale" : "1x", + "size" : "512x512" + }, + { + "filename" : "icon-1024.png", + "idiom" : "mac", + "scale" : "2x", + "size" : "512x512" } ], "info" : { "author" : "xcode", "version" : 1 } -}
\ No newline at end of file +} diff --git a/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-1024.png b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-1024.png Binary files differnew file mode 100644 index 0000000..7c53b0c --- /dev/null +++ b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-1024.png diff --git a/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-120.png b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-120.png Binary files differnew file mode 100644 index 0000000..a4743e4 --- /dev/null +++ b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-120.png diff --git a/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-128.png b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-128.png Binary files differnew file mode 100644 index 0000000..25cdaa0 --- /dev/null +++ b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-128.png diff --git a/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-152.png b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-152.png Binary files differnew file mode 100644 index 0000000..5987065 --- /dev/null +++ b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-152.png diff --git a/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-16.png b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-16.png Binary files differnew file mode 100644 index 0000000..b43c1b2 --- /dev/null +++ b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-16.png diff --git a/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-167.png b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-167.png Binary files differnew file mode 100644 index 0000000..af7bcd5 --- /dev/null +++ b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-167.png diff --git a/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-180.png b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-180.png Binary files differnew file mode 100644 index 0000000..4d85db7 --- /dev/null +++ b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-180.png diff --git a/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-20.png b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-20.png Binary files differnew file mode 100644 index 0000000..bf72c03 --- /dev/null +++ b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-20.png diff --git a/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-256.png b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-256.png Binary files differnew file mode 100644 index 0000000..54a55e4 --- /dev/null +++ b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-256.png diff --git a/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-29.png b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-29.png Binary files differnew file mode 100644 index 0000000..d33b7b0 --- /dev/null +++ b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-29.png diff --git a/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-32.png b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-32.png Binary files differnew file mode 100644 index 0000000..c81e46d --- /dev/null +++ b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-32.png diff --git a/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-40.png b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-40.png Binary files differnew file mode 100644 index 0000000..b9ecaf2 --- /dev/null +++ b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-40.png diff --git a/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-512.png b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-512.png Binary files differnew file mode 100644 index 0000000..3895874 --- /dev/null +++ b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-512.png diff --git a/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-58.png b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-58.png Binary files differnew file mode 100644 index 0000000..1fbb039 --- /dev/null +++ b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-58.png diff --git a/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-60.png b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-60.png Binary files differnew file mode 100644 index 0000000..e7c3960 --- /dev/null +++ b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-60.png diff --git a/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-64.png b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-64.png Binary files differnew file mode 100644 index 0000000..9f37f06 --- /dev/null +++ b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-64.png diff --git a/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-76.png b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-76.png Binary files differnew file mode 100644 index 0000000..0408826 --- /dev/null +++ b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-76.png diff --git a/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-80.png b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-80.png Binary files differnew file mode 100644 index 0000000..44083db --- /dev/null +++ b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-80.png diff --git a/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-87.png b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-87.png Binary files differnew file mode 100644 index 0000000..c6ca1cf --- /dev/null +++ b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/icon-87.png diff --git a/iosApp/iosApp/Assets.xcassets/Contents.json b/iosApp/iosApp/Assets.xcassets/Contents.json index 4aa7c53..73c0059 100644 --- a/iosApp/iosApp/Assets.xcassets/Contents.json +++ b/iosApp/iosApp/Assets.xcassets/Contents.json @@ -3,4 +3,4 @@ "author" : "xcode", "version" : 1 } -}
\ No newline at end of file +} diff --git a/iosApp/iosApp/Authentication/LoginView.swift b/iosApp/iosApp/Authentication/LoginView.swift new file mode 100644 index 0000000..5014ca5 --- /dev/null +++ b/iosApp/iosApp/Authentication/LoginView.swift @@ -0,0 +1,143 @@ +import SwiftUI +import shared + +struct LoginContainerView: View { + @State private var username = "" + @State private var password = "" + @State private var server = "" + + private var sessionController = SessionController( + sessionApi: SessionApi(defaultBaseUrl: "https://etbsa.net/api"), + usersApi: UsersApi(defaultBaseUrl: "https://etbsa.net/api")) + + init() { + sessionController.loginStateFlow.collect(collector: Kotlinx_coroutines_coreFlowCollector) { <#KotlinUnit?#>, <#Error?#> in + <#code#> + } + } + + var body: some View { + LoginView(username: $username, + password: $password, + server: $server, + onLogin: login) + } + + private func login() { + print("Username: \(username)") + print("Password: \(password)") + print("Server URL: \(server)") + sessionController.login( + body: SessionBody(url: server, + email: username, + password: password, + fcmToken: nil)) + } +} + +struct LoginView: View { + @Binding var username: String + @Binding var password: String + @Binding var server: String + + let onLogin: () -> Void + + var body: some View { + VStack { + Spacer() + LoginTitleView() + + Spacer() + LoginForm(username: $username, + password: $password, + server: $server) + + Button(action: { + self.onLogin() + }) { + Text("login") + .font(.system(size: 18)) + .bold() + } + .padding([.top, .bottom], 30) + + Spacer() + } + .padding() + } +} + +struct LoginTitleView: View { + var body: some View { + return VStack { + Text("app-name") + .font(.title) + .bold() + } + } +} + +struct LoginForm: View { + @Binding var username: String + @Binding var password: String + @Binding var server: String + + var body: some View { + VStack { + FormTextField(title: "username", text: $username) + + FormTextField(title: "password", text: $password, isSecure: true) + + #if os(macOS) + FormTextField(title: "server-url", text: $server) + #else + FormTextField(title: "server-url", text: $server, keyboardType: .URL) + #endif + } + } +} + +private struct FormTextField: View { + @Environment(\.colorScheme) private var colorScheme + + let title: LocalizedStringKey + @Binding var text: String + var onEditingChanged: ((Bool) -> Void)? + + #if os(macOS) + #else + var keyboardType: UIKeyboardType = .default + #endif + + var isSecure = false + + var body: some View { + ZStack { + Capsule(style: .continuous) + .foregroundColor(colorScheme == .light + ? Color(#colorLiteral(red: 0.9395676295, green: 0.9395676295, blue: 0.9395676295, alpha: 1)) + : Color(#colorLiteral(red: 0.2293992357, green: 0.2293992357, blue: 0.2293992357, alpha: 1))) + .frame(height: 50) + if isSecure { + SecureField(title, text: $text) + .padding() + .textContentType(.password) + } else { + #if os(macOS) + TextField(title, text: $text, onEditingChanged: onEditingChanged ?? { _ in }) + .padding() + .autocapitalization(.none) + .disableAutocorrection(true) + #else + TextField(title, text: $text, onEditingChanged: onEditingChanged ?? { _ in }) + .padding() + .autocapitalization(.none) + .disableAutocorrection(true) + .keyboardType(keyboardType) + #endif + } + } + .padding(.horizontal) + .frame(maxWidth: 400) + } +} diff --git a/iosApp/iosApp/ContentView.swift b/iosApp/iosApp/ContentView.swift deleted file mode 100644 index 4c626ac..0000000 --- a/iosApp/iosApp/ContentView.swift +++ /dev/null @@ -1,16 +0,0 @@ -import SwiftUI -import shared - -struct ContentView: View { - let greet = Greeting().greeting() - - var body: some View { - Text(greet) - } -} - -struct ContentView_Previews: PreviewProvider { - static var previews: some View { - ContentView() - } -}
\ No newline at end of file diff --git a/iosApp/iosApp/Info.plist b/iosApp/iosApp/Info.plist index 8044709..237f735 100644 --- a/iosApp/iosApp/Info.plist +++ b/iosApp/iosApp/Info.plist @@ -4,6 +4,8 @@ <dict> <key>CFBundleDevelopmentRegion</key> <string>$(DEVELOPMENT_LANGUAGE)</string> + <key>CFBundleDisplayName</key> + <string>TrackerMap</string> <key>CFBundleExecutable</key> <string>$(EXECUTABLE_NAME)</string> <key>CFBundleIdentifier</key> @@ -25,6 +27,8 @@ <key>UIApplicationSupportsMultipleScenes</key> <false/> </dict> + <key>UILaunchScreen</key> + <dict/> <key>UIRequiredDeviceCapabilities</key> <array> <string>armv7</string> @@ -42,7 +46,5 @@ <string>UIInterfaceOrientationLandscapeLeft</string> <string>UIInterfaceOrientationLandscapeRight</string> </array> - <key>UILaunchScreen</key> - <dict/> </dict> -</plist>
\ No newline at end of file +</plist> diff --git a/iosApp/iosApp/Koin.swift b/iosApp/iosApp/Koin.swift new file mode 100644 index 0000000..ffa0819 --- /dev/null +++ b/iosApp/iosApp/Koin.swift @@ -0,0 +1,14 @@ +// +// Koin.swift +// iosApp +// +// Created by Iván on 23/01/22. +// Copyright © 2022 orgName. All rights reserved. +// + +import Foundation +import shared + +func startKoin() { + let koinApplication = KoinIosKt. +} diff --git a/iosApp/iosApp/iOSApp.swift b/iosApp/iosApp/iOSApp.swift index 0648e86..241beca 100644 --- a/iosApp/iosApp/iOSApp.swift +++ b/iosApp/iosApp/iOSApp.swift @@ -1,10 +1,16 @@ import SwiftUI +import shared @main struct iOSApp: App { + + init() { + startKoin() + } + var body: some Scene { WindowGroup { - ContentView() + LoginContainerView() } } -}
\ No newline at end of file +} diff --git a/shared/build.gradle.kts b/shared/build.gradle.kts index 8832b1d..61c42f3 100644 --- a/shared/build.gradle.kts +++ b/shared/build.gradle.kts @@ -24,7 +24,6 @@ kotlin { val commonMain by getting { dependencies { implementation("io.ktor:ktor-client-core:$ktor_version") - implementation("io.ktor:ktor-client-cio:$ktor_version") implementation("io.ktor:ktor-client-logging:$ktor_version") implementation("io.ktor:ktor-client-serialization:$ktor_version") implementation("ch.qos.logback:logback-classic:1.2.6") @@ -41,7 +40,11 @@ kotlin { implementation(kotlin("test-annotations-common")) } } - val androidMain by getting + val androidMain by getting { + dependencies { + implementation("io.ktor:ktor-client-cio:$ktor_version") + } + } val androidTest by getting { dependencies { implementation(kotlin("test-junit")) @@ -56,6 +59,10 @@ kotlin { iosX64Main.dependsOn(this) iosArm64Main.dependsOn(this) //iosSimulatorArm64Main.dependsOn(this) + dependencies { + implementation("io.insert-koin:koin-ios:3.1.4") + implementation("io.ktor:ktor-client-ios:$ktor_version") + } } val iosX64Test by getting val iosArm64Test by getting diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/AttributesApi.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/AttributesApi.kt index 388df19..2a67fd0 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/AttributesApi.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/AttributesApi.kt @@ -15,7 +15,7 @@ import mx.trackermap.TrackerMap.client.models.Attribute import mx.trackermap.TrackerMap.client.infrastructure.* -class AttributesApi(basePath: kotlin.String = "https://demo.traccar.org/api") : ApiClient(basePath) { +class AttributesApi(defaultBaseUrl: String) : ApiClient(defaultBaseUrl) { /** * Fetch a list of Attributes @@ -28,18 +28,18 @@ class AttributesApi(basePath: kotlin.String = "https://demo.traccar.org/api") : * @return kotlin.Array<Attribute> */ @Suppress("UNCHECKED_CAST") - suspend fun attributesComputedGet(all: kotlin.Boolean? = null, userId: kotlin.Int? = null, deviceId: kotlin.Int? = null, groupId: kotlin.Int? = null, refresh: kotlin.Boolean? = null): kotlin.Array<Attribute> { + suspend fun attributesComputedGet(all: Boolean? = null, userId: Int? = null, deviceId: Int? = null, groupId: Int? = null, refresh: Boolean? = null): Array<Attribute> { val localVariableQuery: MultiValueMap = mapOf("all" to listOf("$all"), "userId" to listOf("$userId"), "deviceId" to listOf("$deviceId"), "groupId" to listOf("$groupId"), "refresh" to listOf("$refresh")) val localVariableConfig = RequestConfig( RequestMethod.GET, "/attributes/computed", query = localVariableQuery ) - val response = request<kotlin.Array<Attribute>>( + val response = request<Array<Attribute>>( localVariableConfig ) return when (response.responseType) { - ResponseType.Success -> (response as Success<*>).data as kotlin.Array<Attribute> + ResponseType.Success -> (response as Success<*>).data as Array<Attribute> ResponseType.Informational -> TODO() ResponseType.Redirection -> TODO() ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") @@ -52,7 +52,7 @@ class AttributesApi(basePath: kotlin.String = "https://demo.traccar.org/api") : * @param id * @return void */ - suspend fun attributesComputedIdDelete(id: kotlin.Int): Unit { + suspend fun attributesComputedIdDelete(id: Int) { val localVariableConfig = RequestConfig( RequestMethod.DELETE, @@ -78,8 +78,8 @@ class AttributesApi(basePath: kotlin.String = "https://demo.traccar.org/api") : * @return Attribute */ @Suppress("UNCHECKED_CAST") - suspend fun attributesComputedIdPut(body: Attribute, id: kotlin.Int): Attribute { - val localVariableBody: kotlin.Any? = body + suspend fun attributesComputedIdPut(body: Attribute, id: Int): Attribute { + val localVariableBody: Any = body val localVariableConfig = RequestConfig( RequestMethod.PUT, @@ -105,7 +105,7 @@ class AttributesApi(basePath: kotlin.String = "https://demo.traccar.org/api") : */ @Suppress("UNCHECKED_CAST") suspend fun attributesComputedPost(body: Attribute): Attribute { - val localVariableBody: kotlin.Any? = body + val localVariableBody: Any = body val localVariableConfig = RequestConfig( RequestMethod.POST, diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/CalendarsApi.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/CalendarsApi.kt index 70e3a02..8dd2da8 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/CalendarsApi.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/CalendarsApi.kt @@ -15,7 +15,7 @@ import mx.trackermap.TrackerMap.client.models.Calendar import mx.trackermap.TrackerMap.client.infrastructure.* -class CalendarsApi(basePath: kotlin.String = "https://demo.traccar.org/api") : ApiClient(basePath) { +class CalendarsApi(defaultBaseUrl: String) : ApiClient(defaultBaseUrl) { /** * Fetch a list of Calendars @@ -25,18 +25,18 @@ class CalendarsApi(basePath: kotlin.String = "https://demo.traccar.org/api") : A * @return kotlin.Array<Calendar> */ @Suppress("UNCHECKED_CAST") - suspend fun calendarsGet(all: kotlin.Boolean? = null, userId: kotlin.Int? = null): kotlin.Array<Calendar> { + suspend fun calendarsGet(all: Boolean? = null, userId: Int? = null): Array<Calendar> { val localVariableQuery: MultiValueMap = mapOf("all" to listOf("$all"), "userId" to listOf("$userId")) val localVariableConfig = RequestConfig( RequestMethod.GET, "/calendars", query = localVariableQuery ) - val response = request<kotlin.Array<Calendar>>( + val response = request<Array<Calendar>>( localVariableConfig ) return when (response.responseType) { - ResponseType.Success -> (response as Success<*>).data as kotlin.Array<Calendar> + ResponseType.Success -> (response as Success<*>).data as Array<Calendar> ResponseType.Informational -> TODO() ResponseType.Redirection -> TODO() ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") @@ -49,7 +49,7 @@ class CalendarsApi(basePath: kotlin.String = "https://demo.traccar.org/api") : A * @param id * @return void */ - suspend fun calendarsIdDelete(id: kotlin.Int): Unit { + suspend fun calendarsIdDelete(id: Int) { val localVariableConfig = RequestConfig( RequestMethod.DELETE, @@ -75,8 +75,8 @@ class CalendarsApi(basePath: kotlin.String = "https://demo.traccar.org/api") : A * @return Calendar */ @Suppress("UNCHECKED_CAST") - suspend fun calendarsIdPut(body: Calendar, id: kotlin.Int): Calendar { - val localVariableBody: kotlin.Any? = body + suspend fun calendarsIdPut(body: Calendar, id: Int): Calendar { + val localVariableBody: Any = body val localVariableConfig = RequestConfig( RequestMethod.PUT, @@ -102,7 +102,7 @@ class CalendarsApi(basePath: kotlin.String = "https://demo.traccar.org/api") : A */ @Suppress("UNCHECKED_CAST") suspend fun calendarsPost(body: Calendar): Calendar { - val localVariableBody: kotlin.Any? = body + val localVariableBody: Any = body val localVariableConfig = RequestConfig( RequestMethod.POST, diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/CommandsApi.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/CommandsApi.kt index e840888..8ee7436 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/CommandsApi.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/CommandsApi.kt @@ -16,7 +16,7 @@ import mx.trackermap.TrackerMap.client.models.CommandType import mx.trackermap.TrackerMap.client.infrastructure.* -class CommandsApi(basePath: kotlin.String = "https://demo.traccar.org/api") : ApiClient(basePath) { +class CommandsApi(defaultBaseUrl: String) : ApiClient(defaultBaseUrl) { /** * Fetch a list of Saved Commands @@ -29,7 +29,7 @@ class CommandsApi(basePath: kotlin.String = "https://demo.traccar.org/api") : Ap * @return kotlin.Array<Command> */ @Suppress("UNCHECKED_CAST") - suspend fun commandsGet(all: kotlin.Boolean? = null, userId: kotlin.Int? = null, deviceId: kotlin.Int? = null, groupId: kotlin.Int? = null, refresh: kotlin.Boolean? = null): kotlin.Array<Command> { + suspend fun commandsGet(all: Boolean? = null, userId: Int? = null, deviceId: Int? = null, groupId: Int? = null, refresh: Boolean? = null): Array<Command> { val query: MutableMap<String, List<String>> = mutableMapOf() all?.let { query["all"] = listOf("$it") } userId?.let { query["userId"] = listOf("$it") } @@ -42,12 +42,12 @@ class CommandsApi(basePath: kotlin.String = "https://demo.traccar.org/api") : Ap RequestMethod.GET, "/commands", query = localVariableQuery ) - val response = request<kotlin.Array<Command>>( + val response = request<Array<Command>>( localVariableConfig ) return when (response.responseType) { - ResponseType.Success -> (response as Success<*>).data as kotlin.Array<Command> + ResponseType.Success -> (response as Success<*>).data as Array<Command> ResponseType.Informational -> TODO() ResponseType.Redirection -> TODO() ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") @@ -60,7 +60,7 @@ class CommandsApi(basePath: kotlin.String = "https://demo.traccar.org/api") : Ap * @param id * @return void */ - suspend fun commandsIdDelete(id: kotlin.Int): Unit { + suspend fun commandsIdDelete(id: Int) { val localVariableConfig = RequestConfig( RequestMethod.DELETE, @@ -86,8 +86,8 @@ class CommandsApi(basePath: kotlin.String = "https://demo.traccar.org/api") : Ap * @return Command */ @Suppress("UNCHECKED_CAST") - suspend fun commandsIdPut(body: Command, id: kotlin.Int): Command { - val localVariableBody: kotlin.Any? = body + suspend fun commandsIdPut(body: Command, id: Int): Command { + val localVariableBody: Any = body val localVariableConfig = RequestConfig( RequestMethod.PUT, @@ -113,7 +113,7 @@ class CommandsApi(basePath: kotlin.String = "https://demo.traccar.org/api") : Ap */ @Suppress("UNCHECKED_CAST") suspend fun commandsPost(body: Command): Command { - val localVariableBody: kotlin.Any? = body + val localVariableBody: Any = body val localVariableConfig = RequestConfig( RequestMethod.POST, @@ -138,18 +138,18 @@ class CommandsApi(basePath: kotlin.String = "https://demo.traccar.org/api") : Ap * @return kotlin.Array<Command> */ @Suppress("UNCHECKED_CAST") - suspend fun commandsSendGet(deviceId: kotlin.Int? = null): kotlin.Array<Command> { + suspend fun commandsSendGet(deviceId: Int? = null): Array<Command> { val localVariableQuery: MultiValueMap = mapOf("deviceId" to listOf("$deviceId")) val localVariableConfig = RequestConfig( RequestMethod.GET, "/commands/send", query = localVariableQuery ) - val response = request<kotlin.Array<Command>>( + val response = request<Array<Command>>( localVariableConfig ) return when (response.responseType) { - ResponseType.Success -> (response as Success<*>).data as kotlin.Array<Command> + ResponseType.Success -> (response as Success<*>).data as Array<Command> ResponseType.Informational -> TODO() ResponseType.Redirection -> TODO() ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") @@ -164,7 +164,7 @@ class CommandsApi(basePath: kotlin.String = "https://demo.traccar.org/api") : Ap */ @Suppress("UNCHECKED_CAST") suspend fun commandsSendPost(body: Command): Command { - val localVariableBody: kotlin.Any? = body + val localVariableBody: Any = body val localVariableConfig = RequestConfig( RequestMethod.POST, @@ -191,18 +191,18 @@ class CommandsApi(basePath: kotlin.String = "https://demo.traccar.org/api") : Ap * @return kotlin.Array<CommandType> */ @Suppress("UNCHECKED_CAST") - suspend fun commandsTypesGet(deviceId: kotlin.Int? = null, protocol: kotlin.String? = null, textChannel: kotlin.Boolean? = null): kotlin.Array<CommandType> { + suspend fun commandsTypesGet(deviceId: Int? = null, protocol: String? = null, textChannel: Boolean? = null): Array<CommandType> { val localVariableQuery: MultiValueMap = mapOf("deviceId" to listOf("$deviceId"), "protocol" to listOf("$protocol"), "textChannel" to listOf("$textChannel")) val localVariableConfig = RequestConfig( RequestMethod.GET, "/commands/types", query = localVariableQuery ) - val response = request<kotlin.Array<CommandType>>( + val response = request<Array<CommandType>>( localVariableConfig ) return when (response.responseType) { - ResponseType.Success -> (response as Success<*>).data as kotlin.Array<CommandType> + ResponseType.Success -> (response as Success<*>).data as Array<CommandType> ResponseType.Informational -> TODO() ResponseType.Redirection -> TODO() ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/DevicesApi.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/DevicesApi.kt index 331cc4e..74d105f 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/DevicesApi.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/DevicesApi.kt @@ -16,7 +16,7 @@ import mx.trackermap.TrackerMap.client.models.DeviceAccumulators import mx.trackermap.TrackerMap.client.infrastructure.* -class DevicesApi(basePath: kotlin.String = "https://demo.traccar.org/api") : ApiClient(basePath) { +class DevicesApi(defaultBaseUrl: String) : ApiClient(defaultBaseUrl) { /** * Fetch a list of Devices @@ -28,24 +28,24 @@ class DevicesApi(basePath: kotlin.String = "https://demo.traccar.org/api") : Api * @return kotlin.Array<Device> */ @Suppress("UNCHECKED_CAST") - suspend fun devicesGet(all: kotlin.Boolean? = null, userId: kotlin.Int? = null, id: kotlin.Int? = null, uniqueId: kotlin.String? = null): kotlin.Array<Device> { + suspend fun devicesGet(all: Boolean? = null, userId: Int? = null, id: Int? = null, uniqueId: String? = null): Array<Device> { val query: MutableMap<String, List<String>> = mutableMapOf() all?.let { query["all"] = listOf("$it") } userId?.let { query["userId"] = listOf("$it") } id?.let { query["id"] = listOf("$it") } - uniqueId?.let { query["uniqueId"] = listOf("$it") } + uniqueId?.let { query["uniqueId"] = listOf(it) } val localVariableQuery: MultiValueMap = query val localVariableConfig = RequestConfig( RequestMethod.GET, "/devices", query = localVariableQuery ) - val response = request<kotlin.Array<Device>>( + val response = request<Array<Device>>( localVariableConfig ) return when (response.responseType) { - ResponseType.Success -> (response as Success<*>).data as kotlin.Array<Device> + ResponseType.Success -> (response as Success<*>).data as Array<Device> ResponseType.Informational -> TODO() ResponseType.Redirection -> TODO() ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") @@ -59,8 +59,8 @@ class DevicesApi(basePath: kotlin.String = "https://demo.traccar.org/api") : Api * @param id * @return void */ - suspend fun devicesIdAccumulatorsPut(body: DeviceAccumulators, id: kotlin.Int): Unit { - val localVariableBody: kotlin.Any? = body + suspend fun devicesIdAccumulatorsPut(body: DeviceAccumulators, id: Int) { + val localVariableBody: Any = body val localVariableConfig = RequestConfig( RequestMethod.PUT, @@ -84,7 +84,7 @@ class DevicesApi(basePath: kotlin.String = "https://demo.traccar.org/api") : Api * @param id * @return void */ - suspend fun devicesIdDelete(id: kotlin.Int): Unit { + suspend fun devicesIdDelete(id: Int) { val localVariableConfig = RequestConfig( RequestMethod.DELETE, @@ -110,8 +110,8 @@ class DevicesApi(basePath: kotlin.String = "https://demo.traccar.org/api") : Api * @return Device */ @Suppress("UNCHECKED_CAST") - suspend fun devicesIdPut(body: Device, id: kotlin.Int): Device { - val localVariableBody: kotlin.Any? = body + suspend fun devicesIdPut(body: Device, id: Int): Device { + val localVariableBody: Any = body val localVariableConfig = RequestConfig( RequestMethod.PUT, @@ -137,7 +137,7 @@ class DevicesApi(basePath: kotlin.String = "https://demo.traccar.org/api") : Api */ @Suppress("UNCHECKED_CAST") suspend fun devicesPost(body: Device): Device { - val localVariableBody: kotlin.Any? = body + val localVariableBody: Any = body val localVariableConfig = RequestConfig( RequestMethod.POST, diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/DriversApi.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/DriversApi.kt index 2a8f92c..a9f47b8 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/DriversApi.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/DriversApi.kt @@ -15,7 +15,7 @@ import mx.trackermap.TrackerMap.client.models.Driver import mx.trackermap.TrackerMap.client.infrastructure.* -class DriversApi(basePath: kotlin.String = "https://demo.traccar.org/api") : ApiClient(basePath) { +class DriversApi(defaultBaseUrl: String) : ApiClient(defaultBaseUrl) { /** * Fetch a list of Drivers @@ -28,18 +28,18 @@ class DriversApi(basePath: kotlin.String = "https://demo.traccar.org/api") : Api * @return kotlin.Array<Driver> */ @Suppress("UNCHECKED_CAST") - suspend fun driversGet(all: kotlin.Boolean? = null, userId: kotlin.Int? = null, deviceId: kotlin.Int? = null, groupId: kotlin.Int? = null, refresh: kotlin.Boolean? = null): kotlin.Array<Driver> { + suspend fun driversGet(all: Boolean? = null, userId: Int? = null, deviceId: Int? = null, groupId: Int? = null, refresh: Boolean? = null): Array<Driver> { val localVariableQuery: MultiValueMap = mapOf("all" to listOf("$all"), "userId" to listOf("$userId"), "deviceId" to listOf("$deviceId"), "groupId" to listOf("$groupId"), "refresh" to listOf("$refresh")) val localVariableConfig = RequestConfig( RequestMethod.GET, "/drivers", query = localVariableQuery ) - val response = request<kotlin.Array<Driver>>( + val response = request<Array<Driver>>( localVariableConfig ) return when (response.responseType) { - ResponseType.Success -> (response as Success<*>).data as kotlin.Array<Driver> + ResponseType.Success -> (response as Success<*>).data as Array<Driver> ResponseType.Informational -> TODO() ResponseType.Redirection -> TODO() ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") @@ -52,7 +52,7 @@ class DriversApi(basePath: kotlin.String = "https://demo.traccar.org/api") : Api * @param id * @return void */ - suspend fun driversIdDelete(id: kotlin.Int): Unit { + suspend fun driversIdDelete(id: Int) { val localVariableConfig = RequestConfig( RequestMethod.DELETE, @@ -78,8 +78,8 @@ class DriversApi(basePath: kotlin.String = "https://demo.traccar.org/api") : Api * @return Driver */ @Suppress("UNCHECKED_CAST") - suspend fun driversIdPut(body: Driver, id: kotlin.Int): Driver { - val localVariableBody: kotlin.Any? = body + suspend fun driversIdPut(body: Driver, id: Int): Driver { + val localVariableBody: Any = body val localVariableConfig = RequestConfig( RequestMethod.PUT, @@ -105,7 +105,7 @@ class DriversApi(basePath: kotlin.String = "https://demo.traccar.org/api") : Api */ @Suppress("UNCHECKED_CAST") suspend fun driversPost(body: Driver): Driver { - val localVariableBody: kotlin.Any? = body + val localVariableBody: Any = body val localVariableConfig = RequestConfig( RequestMethod.POST, diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/EventsApi.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/EventsApi.kt index 8c1f2b0..360d6e1 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/EventsApi.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/EventsApi.kt @@ -15,7 +15,7 @@ import mx.trackermap.TrackerMap.client.models.Event import mx.trackermap.TrackerMap.client.infrastructure.* -class EventsApi(basePath: kotlin.String = "https://demo.traccar.org/api") : ApiClient(basePath) { +class EventsApi(defaultBaseUrl: String) : ApiClient(defaultBaseUrl) { /** * @@ -24,7 +24,7 @@ class EventsApi(basePath: kotlin.String = "https://demo.traccar.org/api") : ApiC * @return Event */ @Suppress("UNCHECKED_CAST") - suspend fun eventsIdGet(id: kotlin.Int): Event { + suspend fun eventsIdGet(id: Int): Event { val localVariableConfig = RequestConfig( RequestMethod.GET, diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/GeofencesApi.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/GeofencesApi.kt index dd9c89d..d7174e5 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/GeofencesApi.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/GeofencesApi.kt @@ -15,7 +15,7 @@ import mx.trackermap.TrackerMap.client.models.Geofence import mx.trackermap.TrackerMap.client.infrastructure.* -class GeofencesApi(basePath: String = "https://demo.traccar.org/api") : ApiClient(basePath) { +class GeofencesApi(defaultBaseUrl: String) : ApiClient(defaultBaseUrl) { /** * Fetch a list of Geofences diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/GroupsApi.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/GroupsApi.kt index c86e66c..620a25e 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/GroupsApi.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/GroupsApi.kt @@ -15,7 +15,7 @@ import mx.trackermap.TrackerMap.client.models.Group import mx.trackermap.TrackerMap.client.infrastructure.* -class GroupsApi(basePath: kotlin.String = "https://demo.traccar.org/api") : ApiClient(basePath) { +class GroupsApi(defaultBaseUrl: String) : ApiClient(defaultBaseUrl) { /** * Fetch a list of Groups @@ -25,18 +25,18 @@ class GroupsApi(basePath: kotlin.String = "https://demo.traccar.org/api") : ApiC * @return kotlin.Array<Group> */ @Suppress("UNCHECKED_CAST") - suspend fun groupsGet(all: kotlin.Boolean? = null, userId: kotlin.Int? = null): kotlin.Array<Group> { + suspend fun groupsGet(all: Boolean? = null, userId: Int? = null): Array<Group> { val localVariableQuery: MultiValueMap = mapOf("all" to listOf("$all"), "userId" to listOf("$userId")) val localVariableConfig = RequestConfig( RequestMethod.GET, "/groups", query = localVariableQuery ) - val response = request<kotlin.Array<Group>>( + val response = request<Array<Group>>( localVariableConfig ) return when (response.responseType) { - ResponseType.Success -> (response as Success<*>).data as kotlin.Array<Group> + ResponseType.Success -> (response as Success<*>).data as Array<Group> ResponseType.Informational -> TODO() ResponseType.Redirection -> TODO() ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") @@ -49,7 +49,7 @@ class GroupsApi(basePath: kotlin.String = "https://demo.traccar.org/api") : ApiC * @param id * @return void */ - suspend fun groupsIdDelete(id: kotlin.Int): Unit { + suspend fun groupsIdDelete(id: Int) { val localVariableConfig = RequestConfig( RequestMethod.DELETE, @@ -75,8 +75,8 @@ class GroupsApi(basePath: kotlin.String = "https://demo.traccar.org/api") : ApiC * @return Group */ @Suppress("UNCHECKED_CAST") - suspend fun groupsIdPut(body: Group, id: kotlin.Int): Group { - val localVariableBody: kotlin.Any? = body + suspend fun groupsIdPut(body: Group, id: Int): Group { + val localVariableBody: Any = body val localVariableConfig = RequestConfig( RequestMethod.PUT, @@ -102,7 +102,7 @@ class GroupsApi(basePath: kotlin.String = "https://demo.traccar.org/api") : ApiC */ @Suppress("UNCHECKED_CAST") suspend fun groupsPost(body: Group): Group { - val localVariableBody: kotlin.Any? = body + val localVariableBody: Any = body val localVariableConfig = RequestConfig( RequestMethod.POST, diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/MaintenanceApi.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/MaintenanceApi.kt index 7fcee92..5b10e9e 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/MaintenanceApi.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/MaintenanceApi.kt @@ -15,7 +15,7 @@ import mx.trackermap.TrackerMap.client.models.Maintenance import mx.trackermap.TrackerMap.client.infrastructure.* -class MaintenanceApi(basePath: kotlin.String = "https://demo.traccar.org/api") : ApiClient(basePath) { +class MaintenanceApi(defaultBaseUrl: String) : ApiClient(defaultBaseUrl) { /** * Fetch a list of Maintenance @@ -28,18 +28,18 @@ class MaintenanceApi(basePath: kotlin.String = "https://demo.traccar.org/api") : * @return kotlin.Array<Maintenance> */ @Suppress("UNCHECKED_CAST") - suspend fun maintenanceGet(all: kotlin.Boolean? = null, userId: kotlin.Int? = null, deviceId: kotlin.Int? = null, groupId: kotlin.Int? = null, refresh: kotlin.Boolean? = null): kotlin.Array<Maintenance> { + suspend fun maintenanceGet(all: Boolean? = null, userId: Int? = null, deviceId: Int? = null, groupId: Int? = null, refresh: Boolean? = null): Array<Maintenance> { val localVariableQuery: MultiValueMap = mapOf("all" to listOf("$all"), "userId" to listOf("$userId"), "deviceId" to listOf("$deviceId"), "groupId" to listOf("$groupId"), "refresh" to listOf("$refresh")) val localVariableConfig = RequestConfig( RequestMethod.GET, "/maintenance", query = localVariableQuery ) - val response = request<kotlin.Array<Maintenance>>( + val response = request<Array<Maintenance>>( localVariableConfig ) return when (response.responseType) { - ResponseType.Success -> (response as Success<*>).data as kotlin.Array<Maintenance> + ResponseType.Success -> (response as Success<*>).data as Array<Maintenance> ResponseType.Informational -> TODO() ResponseType.Redirection -> TODO() ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") @@ -52,7 +52,7 @@ class MaintenanceApi(basePath: kotlin.String = "https://demo.traccar.org/api") : * @param id * @return void */ - suspend fun maintenanceIdDelete(id: kotlin.Int): Unit { + suspend fun maintenanceIdDelete(id: Int) { val localVariableConfig = RequestConfig( RequestMethod.DELETE, @@ -78,8 +78,8 @@ class MaintenanceApi(basePath: kotlin.String = "https://demo.traccar.org/api") : * @return Maintenance */ @Suppress("UNCHECKED_CAST") - suspend fun maintenanceIdPut(body: Maintenance, id: kotlin.Int): Maintenance { - val localVariableBody: kotlin.Any? = body + suspend fun maintenanceIdPut(body: Maintenance, id: Int): Maintenance { + val localVariableBody: Any = body val localVariableConfig = RequestConfig( RequestMethod.PUT, @@ -105,7 +105,7 @@ class MaintenanceApi(basePath: kotlin.String = "https://demo.traccar.org/api") : */ @Suppress("UNCHECKED_CAST") suspend fun maintenancePost(body: Maintenance): Maintenance { - val localVariableBody: kotlin.Any? = body + val localVariableBody: Any = body val localVariableConfig = RequestConfig( RequestMethod.POST, diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/NotificationsApi.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/NotificationsApi.kt index 86c34d0..290a14d 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/NotificationsApi.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/NotificationsApi.kt @@ -16,7 +16,7 @@ import mx.trackermap.TrackerMap.client.models.NotificationType import mx.trackermap.TrackerMap.client.infrastructure.* -class NotificationsApi(basePath: kotlin.String = "https://demo.traccar.org/api") : ApiClient(basePath) { +class NotificationsApi(defaultBaseUrl: String) : ApiClient(defaultBaseUrl) { /** * Fetch a list of Notifications @@ -29,18 +29,18 @@ class NotificationsApi(basePath: kotlin.String = "https://demo.traccar.org/api") * @return kotlin.Array<Notification> */ @Suppress("UNCHECKED_CAST") - suspend fun notificationsGet(all: kotlin.Boolean? = null, userId: kotlin.Int? = null, deviceId: kotlin.Int? = null, groupId: kotlin.Int? = null, refresh: kotlin.Boolean? = null): kotlin.Array<Notification> { + suspend fun notificationsGet(all: Boolean? = null, userId: Int? = null, deviceId: Int? = null, groupId: Int? = null, refresh: Boolean? = null): Array<Notification> { val localVariableQuery: MultiValueMap = mapOf("all" to listOf("$all"), "userId" to listOf("$userId"), "deviceId" to listOf("$deviceId"), "groupId" to listOf("$groupId"), "refresh" to listOf("$refresh")) val localVariableConfig = RequestConfig( RequestMethod.GET, "/notifications", query = localVariableQuery ) - val response = request<kotlin.Array<Notification>>( + val response = request<Array<Notification>>( localVariableConfig ) return when (response.responseType) { - ResponseType.Success -> (response as Success<*>).data as kotlin.Array<Notification> + ResponseType.Success -> (response as Success<*>).data as Array<Notification> ResponseType.Informational -> TODO() ResponseType.Redirection -> TODO() ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") @@ -53,7 +53,7 @@ class NotificationsApi(basePath: kotlin.String = "https://demo.traccar.org/api") * @param id * @return void */ - suspend fun notificationsIdDelete(id: kotlin.Int): Unit { + suspend fun notificationsIdDelete(id: Int) { val localVariableConfig = RequestConfig( RequestMethod.DELETE, @@ -79,8 +79,8 @@ class NotificationsApi(basePath: kotlin.String = "https://demo.traccar.org/api") * @return Notification */ @Suppress("UNCHECKED_CAST") - suspend fun notificationsIdPut(body: Notification, id: kotlin.Int): Notification { - val localVariableBody: kotlin.Any? = body + suspend fun notificationsIdPut(body: Notification, id: Int): Notification { + val localVariableBody: Any = body val localVariableConfig = RequestConfig( RequestMethod.PUT, @@ -106,7 +106,7 @@ class NotificationsApi(basePath: kotlin.String = "https://demo.traccar.org/api") */ @Suppress("UNCHECKED_CAST") suspend fun notificationsPost(body: Notification): Notification { - val localVariableBody: kotlin.Any? = body + val localVariableBody: Any = body val localVariableConfig = RequestConfig( RequestMethod.POST, @@ -129,7 +129,7 @@ class NotificationsApi(basePath: kotlin.String = "https://demo.traccar.org/api") * * @return void */ - suspend fun notificationsTestPost(): Unit { + suspend fun notificationsTestPost(){ val localVariableConfig = RequestConfig( RequestMethod.POST, @@ -153,18 +153,18 @@ class NotificationsApi(basePath: kotlin.String = "https://demo.traccar.org/api") * @return kotlin.Array<NotificationType> */ @Suppress("UNCHECKED_CAST") - suspend fun notificationsTypesGet(): kotlin.Array<NotificationType> { + suspend fun notificationsTypesGet(): Array<NotificationType> { val localVariableConfig = RequestConfig( RequestMethod.GET, "/notifications/types" ) - val response = request<kotlin.Array<NotificationType>>( + val response = request<Array<NotificationType>>( localVariableConfig ) return when (response.responseType) { - ResponseType.Success -> (response as Success<*>).data as kotlin.Array<NotificationType> + ResponseType.Success -> (response as Success<*>).data as Array<NotificationType> ResponseType.Informational -> TODO() ResponseType.Redirection -> TODO() ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/PermissionsApi.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/PermissionsApi.kt index bfa2c2e..33aab48 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/PermissionsApi.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/PermissionsApi.kt @@ -15,7 +15,7 @@ import mx.trackermap.TrackerMap.client.models.Permission import mx.trackermap.TrackerMap.client.infrastructure.* -class PermissionsApi(basePath: kotlin.String = "https://demo.traccar.org/api") : ApiClient(basePath) { +class PermissionsApi(defaultBaseUrl: String) : ApiClient(defaultBaseUrl) { /** * Unlink an Object from another Object @@ -23,8 +23,8 @@ class PermissionsApi(basePath: kotlin.String = "https://demo.traccar.org/api") : * @param body * @return void */ - suspend fun permissionsDelete(body: Permission): Unit { - val localVariableBody: kotlin.Any? = body + suspend fun permissionsDelete(body: Permission) { + val localVariableBody: Any = body val localVariableConfig = RequestConfig( RequestMethod.DELETE, @@ -50,7 +50,7 @@ class PermissionsApi(basePath: kotlin.String = "https://demo.traccar.org/api") : */ @Suppress("UNCHECKED_CAST") suspend fun permissionsPost(body: Permission): Permission { - val localVariableBody: kotlin.Any? = body + val localVariableBody: Any = body val localVariableConfig = RequestConfig( RequestMethod.POST, diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/PositionsApi.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/PositionsApi.kt index 278611f..61285e9 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/PositionsApi.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/PositionsApi.kt @@ -15,7 +15,7 @@ import mx.trackermap.TrackerMap.client.models.Position import mx.trackermap.TrackerMap.client.infrastructure.* -class PositionsApi(basePath: kotlin.String = "https://demo.traccar.org/api") : ApiClient(basePath) { +class PositionsApi(defaultBaseUrl: String) : ApiClient(defaultBaseUrl) { /** * Fetches a list of Positions @@ -27,7 +27,7 @@ class PositionsApi(basePath: kotlin.String = "https://demo.traccar.org/api") : A * @return kotlin.Array<Position> */ @Suppress("UNCHECKED_CAST") - suspend fun positionsGet(deviceId: kotlin.Int? = null, from: LocalDateTimeAdapter? = null, to: LocalDateTimeAdapter? = null, id: kotlin.Int? = null): kotlin.Array<Position> { + suspend fun positionsGet(deviceId: Int? = null, from: LocalDateTimeAdapter? = null, to: LocalDateTimeAdapter? = null, id: Int? = null): Array<Position> { val query: MutableMap<String, List<String>> = mutableMapOf() deviceId?.let { query["deviceId"] = listOf("$it") } from?.let { query["from"] = listOf("$it") } @@ -39,12 +39,12 @@ class PositionsApi(basePath: kotlin.String = "https://demo.traccar.org/api") : A RequestMethod.GET, "/positions", query = localVariableQuery ) - val response = request<kotlin.Array<Position>>( + val response = request<Array<Position>>( localVariableConfig ) return when (response.responseType) { - ResponseType.Success -> (response as Success<*>).data as kotlin.Array<Position> + ResponseType.Success -> (response as Success<*>).data as Array<Position> ResponseType.Informational -> TODO() ResponseType.Redirection -> TODO() ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/ReportsApi.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/ReportsApi.kt index d77064e..eff40ad 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/ReportsApi.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/ReportsApi.kt @@ -12,6 +12,7 @@ package mx.trackermap.TrackerMap.client.apis import io.ktor.content.* +import kotlinx.datetime.LocalDateTime import mx.trackermap.TrackerMap.client.models.Event import mx.trackermap.TrackerMap.client.models.Position import mx.trackermap.TrackerMap.client.models.Stop @@ -20,7 +21,7 @@ import mx.trackermap.TrackerMap.client.models.ReportTrips import mx.trackermap.TrackerMap.client.infrastructure.* -class ReportsApi(basePath: String = "https://demo.traccar.org/api") : ApiClient(basePath) { +class ReportsApi(defaultBaseUrl: String) : ApiClient(defaultBaseUrl) { /** * Fetch a list of Events within the time period for the Devices or Groups @@ -248,8 +249,8 @@ class ReportsApi(basePath: String = "https://demo.traccar.org/api") : ApiClient( */ @Suppress("UNCHECKED_CAST") suspend fun reportsSummaryGet( - from: java.time.LocalDateTime, - to: java.time.LocalDateTime, + from: LocalDateTime, + to: LocalDateTime, deviceId: Array<Int>? = null, groupId: Array<Int>? = null ): Array<ReportSummary> { @@ -291,8 +292,8 @@ class ReportsApi(basePath: String = "https://demo.traccar.org/api") : ApiClient( */ @Suppress("UNCHECKED_CAST") suspend fun reportsTripsGet( - from: java.time.LocalDateTime, - to: java.time.LocalDateTime, + from: LocalDateTime, + to: LocalDateTime, deviceId: Array<Int>? = null, groupId: Array<Int>? = null ): Array<ReportTrips> { diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/ServerApi.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/ServerApi.kt index 659761b..bf65dfe 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/ServerApi.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/ServerApi.kt @@ -15,7 +15,7 @@ import mx.trackermap.TrackerMap.client.models.Server import mx.trackermap.TrackerMap.client.infrastructure.* -class ServerApi(basePath: kotlin.String = "https://demo.traccar.org/api") : ApiClient(basePath) { +class ServerApi(defaultBaseUrl: String) : ApiClient(defaultBaseUrl) { /** * Fetch Server information @@ -49,7 +49,7 @@ class ServerApi(basePath: kotlin.String = "https://demo.traccar.org/api") : ApiC */ @Suppress("UNCHECKED_CAST") suspend fun serverPut(body: Server): Server { - val localVariableBody: kotlin.Any? = body + val localVariableBody: Any = body val localVariableConfig = RequestConfig( RequestMethod.PUT, diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/SessionApi.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/SessionApi.kt index b57f126..3f90c4c 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/SessionApi.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/SessionApi.kt @@ -15,9 +15,10 @@ import com.russhwolf.settings.Settings import mx.trackermap.TrackerMap.client.models.User import mx.trackermap.TrackerMap.client.infrastructure.* +const val SERVER_URL_KEY = "server_url" const val ACCESS_TOKEN_KEY = "access_token" -class SessionApi(basePath: String = "https://demo.traccar.org/api") : ApiClient(basePath) { +class SessionApi(defaultBaseUrl: String) : ApiClient(defaultBaseUrl) { /** * Close the Session @@ -90,7 +91,6 @@ class SessionApi(basePath: String = "https://demo.traccar.org/api") : ApiClient( @Suppress("UNCHECKED_CAST") suspend fun sessionPost(email: String, password: String): User { val localVariableBody = mapOf("email" to email, "password" to password) - val localVariableHeaders = mapOf("Content-Type" to "application/x-www-form-urlencoded") val localVariableConfig = RequestConfig( RequestMethod.POST, diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/StatisticsApi.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/StatisticsApi.kt index f7651ac..296e589 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/StatisticsApi.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/StatisticsApi.kt @@ -11,11 +11,12 @@ */ package mx.trackermap.TrackerMap.client.apis +import kotlinx.datetime.LocalDateTime import mx.trackermap.TrackerMap.client.models.Statistics import mx.trackermap.TrackerMap.client.infrastructure.* -class StatisticsApi(basePath: kotlin.String = "https://demo.traccar.org/api") : ApiClient(basePath) { +class StatisticsApi(defaultBaseUrl: String) : ApiClient(defaultBaseUrl) { /** * Fetch server Statistics @@ -25,18 +26,18 @@ class StatisticsApi(basePath: kotlin.String = "https://demo.traccar.org/api") : * @return kotlin.Array<Statistics> */ @Suppress("UNCHECKED_CAST") - suspend fun statisticsGet(from: java.time.LocalDateTime, to: java.time.LocalDateTime): kotlin.Array<Statistics> { + suspend fun statisticsGet(from: LocalDateTime, to: LocalDateTime): Array<Statistics> { val localVariableQuery: MultiValueMap = mapOf("from" to listOf("$from"), "to" to listOf("$to")) val localVariableConfig = RequestConfig( RequestMethod.GET, "/statistics", query = localVariableQuery ) - val response = request<kotlin.Array<Statistics>>( + val response = request<Array<Statistics>>( localVariableConfig ) return when (response.responseType) { - ResponseType.Success -> (response as Success<*>).data as kotlin.Array<Statistics> + ResponseType.Success -> (response as Success<*>).data as Array<Statistics> ResponseType.Informational -> TODO() ResponseType.Redirection -> TODO() ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/UsersApi.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/UsersApi.kt index 858cd10..51f2138 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/UsersApi.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/apis/UsersApi.kt @@ -15,7 +15,7 @@ import mx.trackermap.TrackerMap.client.models.User import mx.trackermap.TrackerMap.client.infrastructure.* -class UsersApi(basePath: String = "https://demo.traccar.org/api") : ApiClient(basePath) { +class UsersApi(defaultBaseUrl: String) : ApiClient(defaultBaseUrl) { /** * Fetch a list of Users diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/infrastructure/ApiAbstractions.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/infrastructure/ApiAbstractions.kt index f63f301..47ab320 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/infrastructure/ApiAbstractions.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/infrastructure/ApiAbstractions.kt @@ -1,3 +1,20 @@ +/** + * TrackerMap + * Copyright (C) 2021-2022 Iván Ávalos <avalos@disroot.org>, Henoch Ojeda <imhenoch@protonmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ package mx.trackermap.TrackerMap.client.infrastructure typealias MultiValueMap = Map<String, List<String>> diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/infrastructure/ApiClient.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/infrastructure/ApiClient.kt index 606fef0..dd61893 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/infrastructure/ApiClient.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/infrastructure/ApiClient.kt @@ -1,10 +1,26 @@ +/** + * TrackerMap + * Copyright (C) 2021-2022 Iván Ávalos <avalos@disroot.org>, Henoch Ojeda <imhenoch@protonmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ package mx.trackermap.TrackerMap.client.infrastructure import com.russhwolf.settings.Settings -import com.russhwolf.settings.string import io.ktor.client.* import io.ktor.client.call.* -import io.ktor.client.engine.cio.* +import io.ktor.client.features.* import io.ktor.client.features.json.* import io.ktor.client.features.json.serializer.KotlinxSerializer import io.ktor.client.features.logging.DEFAULT @@ -17,9 +33,12 @@ import io.ktor.client.statement.* import io.ktor.http.* import io.ktor.util.* import mx.trackermap.TrackerMap.client.apis.ACCESS_TOKEN_KEY +import mx.trackermap.TrackerMap.client.apis.SERVER_URL_KEY import kotlinx.serialization.json.Json as KotlinJson -open class ApiClient(val baseUrl: String) { +open class ApiClient( + defaultBaseUrl: String = "", +) { companion object { protected const val ApiContentType = "Content-Type" protected const val ApiAccept = "Accept" @@ -28,7 +47,11 @@ open class ApiClient(val baseUrl: String) { protected const val ApiFormURLType = "application/x-www-form-urlencoded" protected const val ApiXmlMediaType = "application/xml" - val client: HttpClient = HttpClient(CIO) { + val client: HttpClient = HttpClient { + install(HttpTimeout) { + connectTimeoutMillis = 20_000 + requestTimeoutMillis = 20_000 + } install(JsonFeature) { serializer = KotlinxSerializer( KotlinJson { @@ -40,9 +63,6 @@ open class ApiClient(val baseUrl: String) { logger = Logger.DEFAULT level = LogLevel.ALL } - engine { - requestTimeout = 20_000 - } } val defaultHeaders: Map<String, String> = @@ -58,10 +78,12 @@ open class ApiClient(val baseUrl: String) { ) } + var baseUrl: String = "" var token: String = "" init { val settings = Settings() + baseUrl = settings.getString(SERVER_URL_KEY, defaultBaseUrl) token = settings.getString(ACCESS_TOKEN_KEY, "") } diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/infrastructure/ApiInfrastructureResponse.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/infrastructure/ApiInfrastructureResponse.kt index bc0b4fb..3e8cbed 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/infrastructure/ApiInfrastructureResponse.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/infrastructure/ApiInfrastructureResponse.kt @@ -1,3 +1,20 @@ +/** + * TrackerMap + * Copyright (C) 2021-2022 Iván Ávalos <avalos@disroot.org>, Henoch Ojeda <imhenoch@protonmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ package mx.trackermap.TrackerMap.client.infrastructure enum class ResponseType { diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/infrastructure/Errors.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/infrastructure/Errors.kt index 3c44140..737f98c 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/infrastructure/Errors.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/infrastructure/Errors.kt @@ -1,3 +1,20 @@ +/** + * TrackerMap + * Copyright (C) 2021-2022 Iván Ávalos <avalos@disroot.org>, Henoch Ojeda <imhenoch@protonmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ package mx.trackermap.TrackerMap.client.infrastructure open class ClientException : RuntimeException { diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/infrastructure/LocalDateAdapter.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/infrastructure/LocalDateAdapter.kt index 7142665..f60d986 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/infrastructure/LocalDateAdapter.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/infrastructure/LocalDateAdapter.kt @@ -1,3 +1,20 @@ +/** + * TrackerMap + * Copyright (C) 2021-2022 Iván Ávalos <avalos@disroot.org>, Henoch Ojeda <imhenoch@protonmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ package mx.trackermap.TrackerMap.client.infrastructure import kotlinx.datetime.LocalDate diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/infrastructure/LocalDateTimeAdapter.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/infrastructure/LocalDateTimeAdapter.kt index d073ff4..cbfc311 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/infrastructure/LocalDateTimeAdapter.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/infrastructure/LocalDateTimeAdapter.kt @@ -1,3 +1,20 @@ +/** + * TrackerMap + * Copyright (C) 2021-2022 Iván Ávalos <avalos@disroot.org>, Henoch Ojeda <imhenoch@protonmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ package mx.trackermap.TrackerMap.client.infrastructure import kotlinx.datetime.LocalDateTime diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/infrastructure/RequestConfig.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/infrastructure/RequestConfig.kt index 73205ff..ba5b12f 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/infrastructure/RequestConfig.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/infrastructure/RequestConfig.kt @@ -1,3 +1,20 @@ +/** + * TrackerMap + * Copyright (C) 2021-2022 Iván Ávalos <avalos@disroot.org>, Henoch Ojeda <imhenoch@protonmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ package mx.trackermap.TrackerMap.client.infrastructure /** diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/infrastructure/RequestMethod.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/infrastructure/RequestMethod.kt index f118678..2488ccb 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/infrastructure/RequestMethod.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/infrastructure/RequestMethod.kt @@ -1,3 +1,20 @@ +/** + * TrackerMap + * Copyright (C) 2021-2022 Iván Ávalos <avalos@disroot.org>, Henoch Ojeda <imhenoch@protonmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ package mx.trackermap.TrackerMap.client.infrastructure /** diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/Attribute.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/Attribute.kt index 0404967..7c139b5 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/Attribute.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/Attribute.kt @@ -11,6 +11,8 @@ */ package mx.trackermap.TrackerMap.client.models +import kotlinx.serialization.Serializable + /** * @@ -20,13 +22,14 @@ package mx.trackermap.TrackerMap.client.models * @param expression * @param type String|Number|Boolean */ +@Serializable data class Attribute ( - val id: kotlin.Int? = null, - val description: kotlin.String? = null, - val attribute: kotlin.String? = null, - val expression: kotlin.String? = null, + val id: Int? = null, + val description: String? = null, + val attribute: String? = null, + val expression: String? = null, /* String|Number|Boolean */ - val type: kotlin.String? = null + val type: String? = null ) { }
\ No newline at end of file diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/Calendar.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/Calendar.kt index c528673..6501ff4 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/Calendar.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/Calendar.kt @@ -11,6 +11,7 @@ */ package mx.trackermap.TrackerMap.client.models +import kotlinx.serialization.Serializable import kotlinx.serialization.json.JsonPrimitive @@ -19,8 +20,9 @@ import kotlinx.serialization.json.JsonPrimitive * @param id * @param name * @param `data` base64 encoded in iCalendar format - * @param attributes + * @param attributes */ +@Serializable data class Calendar ( val id: Int? = null, diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/CommandType.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/CommandType.kt index 7b1a742..fa00d24 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/CommandType.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/CommandType.kt @@ -11,13 +11,16 @@ */ package mx.trackermap.TrackerMap.client.models +import kotlinx.serialization.Serializable + /** * * @param type */ +@Serializable data class CommandType ( - val type: kotlin.String? = null + val type: String? = null ) { }
\ No newline at end of file diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/DeviceAccumulators.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/DeviceAccumulators.kt index 43c8fb9..87cb0a7 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/DeviceAccumulators.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/DeviceAccumulators.kt @@ -11,6 +11,8 @@ */ package mx.trackermap.TrackerMap.client.models +import kotlinx.serialization.Serializable + /** * @@ -18,11 +20,12 @@ package mx.trackermap.TrackerMap.client.models * @param totalDistance in meters * @param hours */ +@Serializable data class DeviceAccumulators ( - val deviceId: kotlin.Int? = null, + val deviceId: Int? = null, /* in meters */ - val totalDistance: java.math.BigDecimal? = null, - val hours: java.math.BigDecimal? = null + val totalDistance: Double? = null, + val hours: Long? = null ) { }
\ No newline at end of file diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/Driver.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/Driver.kt index c83543e..309e4b9 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/Driver.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/Driver.kt @@ -11,6 +11,7 @@ */ package mx.trackermap.TrackerMap.client.models +import kotlinx.serialization.Serializable import kotlinx.serialization.json.JsonPrimitive @@ -21,6 +22,7 @@ import kotlinx.serialization.json.JsonPrimitive * @param uniqueId * @param attributes */ +@Serializable data class Driver ( val id: Int? = null, diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/EventInformation.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/EventInformation.kt index 5e4b2d5..a008fa8 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/EventInformation.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/EventInformation.kt @@ -1,5 +1,8 @@ package mx.trackermap.TrackerMap.client.models +import kotlinx.serialization.Serializable + +@Serializable data class EventInformation( val event: Event, val position: Position?, diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/Group.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/Group.kt index b90e591..6ab32cd 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/Group.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/Group.kt @@ -11,6 +11,7 @@ */ package mx.trackermap.TrackerMap.client.models +import kotlinx.serialization.Serializable import kotlinx.serialization.json.JsonPrimitive @@ -21,6 +22,7 @@ import kotlinx.serialization.json.JsonPrimitive * @param groupId * @param attributes */ +@Serializable data class Group ( val id: Int? = null, diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/Maintenance.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/Maintenance.kt index f9d4fcd..1979e1a 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/Maintenance.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/Maintenance.kt @@ -11,6 +11,7 @@ */ package mx.trackermap.TrackerMap.client.models +import kotlinx.serialization.Serializable import kotlinx.serialization.json.JsonPrimitive @@ -23,13 +24,14 @@ import kotlinx.serialization.json.JsonPrimitive * @param period * @param attributes */ +@Serializable data class Maintenance ( val id: Int? = null, val name: String? = null, val type: String? = null, - val start: java.math.BigDecimal? = null, - val period: java.math.BigDecimal? = null, + val start: Double? = null, + val period: Double? = null, val attributes: Map<String, JsonPrimitive> = mapOf() ) { }
\ No newline at end of file diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/Notification.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/Notification.kt index 2be5468..eb35ecd 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/Notification.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/Notification.kt @@ -11,6 +11,7 @@ */ package mx.trackermap.TrackerMap.client.models +import kotlinx.serialization.Serializable import kotlinx.serialization.json.JsonPrimitive @@ -25,6 +26,7 @@ import kotlinx.serialization.json.JsonPrimitive * @param calendarId * @param attributes */ +@Serializable data class Notification ( val id: Int? = null, diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/NotificationType.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/NotificationType.kt index 55763ca..486c67b 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/NotificationType.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/NotificationType.kt @@ -11,13 +11,16 @@ */ package mx.trackermap.TrackerMap.client.models +import kotlinx.serialization.Serializable + /** * * @param type */ +@Serializable data class NotificationType ( - val type: kotlin.String? = null + val type: String? = null ) { }
\ No newline at end of file diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/Permission.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/Permission.kt index c4c236b..0d1be29 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/Permission.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/Permission.kt @@ -11,6 +11,8 @@ */ package mx.trackermap.TrackerMap.client.models +import kotlinx.serialization.Serializable + /** * This is a permission map that contain two object indexes. It is used to link/unlink objects. Order is important. Example: { deviceId:8, geofenceId: 16 } @@ -23,23 +25,24 @@ package mx.trackermap.TrackerMap.client.models * @param driverId Driver Id, can be second parameter only * @param managedUserId User Id, can be second parameter only and only in combination with userId */ +@Serializable data class Permission ( /* User Id, can be only first parameter */ - val userId: kotlin.Int? = null, + val userId: Int? = null, /* Device Id, can be first parameter or second only in combination with userId */ - val deviceId: kotlin.Int? = null, + val deviceId: Int? = null, /* Group Id, can be first parameter or second only in combination with userId */ - val groupId: kotlin.Int? = null, + val groupId: Int? = null, /* Geofence Id, can be second parameter only */ - val geofenceId: kotlin.Int? = null, + val geofenceId: Int? = null, /* Calendar Id, can be second parameter only and only in combination with userId */ - val calendarId: kotlin.Int? = null, + val calendarId: Int? = null, /* Computed Attribute Id, can be second parameter only */ - val attributeId: kotlin.Int? = null, + val attributeId: Int? = null, /* Driver Id, can be second parameter only */ - val driverId: kotlin.Int? = null, + val driverId: Int? = null, /* User Id, can be second parameter only and only in combination with userId */ - val managedUserId: kotlin.Int? = null + val managedUserId: Int? = null ) { }
\ No newline at end of file diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/ReportSummary.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/ReportSummary.kt index c6f59a6..25f5b9d 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/ReportSummary.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/ReportSummary.kt @@ -11,6 +11,8 @@ */ package mx.trackermap.TrackerMap.client.models +import kotlinx.serialization.Serializable + /** * @@ -22,18 +24,19 @@ package mx.trackermap.TrackerMap.client.models * @param spentFuel in liters * @param engineHours */ +@Serializable data class ReportSummary ( - val deviceId: kotlin.Int? = null, - val deviceName: kotlin.String? = null, + val deviceId: Int? = null, + val deviceName: String? = null, /* in knots */ - val maxSpeed: java.math.BigDecimal? = null, + val maxSpeed: Double? = null, /* in knots */ - val averageSpeed: java.math.BigDecimal? = null, + val averageSpeed: Double? = null, /* in meters */ - val distance: java.math.BigDecimal? = null, + val distance: Double? = null, /* in liters */ - val spentFuel: java.math.BigDecimal? = null, - val engineHours: kotlin.Int? = null + val spentFuel: Double? = null, + val engineHours: Double? = null ) { }
\ No newline at end of file diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/ReportTrips.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/ReportTrips.kt index d7e9598..666b2ad 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/ReportTrips.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/ReportTrips.kt @@ -11,6 +11,9 @@ */ package mx.trackermap.TrackerMap.client.models +import kotlinx.datetime.LocalDateTime +import kotlinx.serialization.Serializable + /** * @@ -32,30 +35,31 @@ package mx.trackermap.TrackerMap.client.models * @param driverUniqueId * @param driverName */ +@Serializable data class ReportTrips ( - val deviceId: kotlin.Int? = null, - val deviceName: kotlin.String? = null, + val deviceId: Int? = null, + val deviceName: String? = null, /* in knots */ - val maxSpeed: java.math.BigDecimal? = null, + val maxSpeed: Double? = null, /* in knots */ - val averageSpeed: java.math.BigDecimal? = null, + val averageSpeed: Double? = null, /* in meters */ - val distance: java.math.BigDecimal? = null, + val distance: Double? = null, /* in liters */ - val spentFuel: java.math.BigDecimal? = null, - val duration: kotlin.Int? = null, + val spentFuel: Double? = null, + val duration: Int? = null, /* in IS0 8601 format. eg. `1963-11-22T18:30:00Z` */ - val startTime: java.time.LocalDateTime? = null, - val startAddress: kotlin.String? = null, - val startLat: java.math.BigDecimal? = null, - val startLon: java.math.BigDecimal? = null, + val startTime: String? = null, + val startAddress: String? = null, + val startLat: Double? = null, + val startLon: Double? = null, /* in IS0 8601 format. eg. `1963-11-22T18:30:00Z` */ - val endTime: java.time.LocalDateTime? = null, - val endAddress: kotlin.String? = null, - val endLat: java.math.BigDecimal? = null, - val endLon: java.math.BigDecimal? = null, - val driverUniqueId: kotlin.Int? = null, - val driverName: kotlin.String? = null + val endTime: String? = null, + val endAddress: String? = null, + val endLat: Double? = null, + val endLon: Double? = null, + val driverUniqueId: Int? = null, + val driverName: String? = null ) { }
\ No newline at end of file diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/Server.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/Server.kt index d2ea44e..0c1e790 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/Server.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/Server.kt @@ -11,6 +11,7 @@ */ package mx.trackermap.TrackerMap.client.models +import kotlinx.serialization.Serializable import kotlinx.serialization.json.JsonPrimitive @@ -34,6 +35,7 @@ import kotlinx.serialization.json.JsonPrimitive * @param coordinateFormat * @param attributes */ +@Serializable data class Server ( val id: Int? = null, @@ -45,8 +47,8 @@ data class Server ( val bingKey: String? = null, val mapUrl: String? = null, val poiLayer: String? = null, - val latitude: java.math.BigDecimal? = null, - val longitude: java.math.BigDecimal? = null, + val latitude: Double? = null, + val longitude: Double? = null, val zoom: Int? = null, val twelveHourFormat: Boolean? = null, val version: String? = null, diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/Session_body.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/Session_body.kt index e98ff34..52c5abc 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/Session_body.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/Session_body.kt @@ -12,11 +12,14 @@ package mx.trackermap.TrackerMap.client.models /** - * + * + * @param url * @param email - * @param password + * @param password + * @param fcmToken */ data class SessionBody ( + val url: String, val email: String, val password: String, val fcmToken: String? = null diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/Statistics.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/Statistics.kt index 32027b9..4ad71ce 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/Statistics.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/client/models/Statistics.kt @@ -11,6 +11,8 @@ */ package mx.trackermap.TrackerMap.client.models +import kotlinx.serialization.Serializable + /** * @@ -21,14 +23,15 @@ package mx.trackermap.TrackerMap.client.models * @param messagesReceived * @param messagesStored */ +@Serializable data class Statistics ( /* in IS0 8601 format. eg. `1963-11-22T18:30:00Z` */ - val captureTime: java.time.LocalDateTime? = null, - val activeUsers: kotlin.Int? = null, - val activeDevices: kotlin.Int? = null, - val requests: kotlin.Int? = null, - val messagesReceived: kotlin.Int? = null, - val messagesStored: kotlin.Int? = null + val captureTime: String? = null, + val activeUsers: Int? = null, + val activeDevices: Int? = null, + val requests: Int? = null, + val messagesReceived: Int? = null, + val messagesStored: Int? = null ) { }
\ No newline at end of file diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/GeofencesController.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/GeofencesController.kt index e9b19b6..0e4c5c9 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/GeofencesController.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/GeofencesController.kt @@ -1,3 +1,20 @@ +/** + * TrackerMap + * Copyright (C) 2021-2022 Iván Ávalos <avalos@disroot.org>, Henoch Ojeda <imhenoch@protonmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ package mx.trackermap.TrackerMap.controllers import kotlinx.coroutines.DelicateCoroutinesApi diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/ReportController.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/ReportController.kt index fcde002..b60a034 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/ReportController.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/ReportController.kt @@ -1,6 +1,22 @@ +/** + * TrackerMap + * Copyright (C) 2021-2022 Iván Ávalos <avalos@disroot.org>, Henoch Ojeda <imhenoch@protonmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ package mx.trackermap.TrackerMap.controllers -import android.util.Log import kotlinx.coroutines.DelicateCoroutinesApi import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.flow.MutableStateFlow @@ -44,10 +60,6 @@ class ReportController( } val (currentDate, previousDate) = ReportDates.getDates(reportPeriod) - Log.d("UnitReportsVM", "Current report type: $reportType") - Log.d("UnitReportsVM", "Current report period: $reportType") - Log.d("UnitReportsVM", "Current date:${currentDate}") - Log.d("UnitReportsVM", "Previous date:${previousDate}") if (!xlsx) { reportFlow.value = Report.LoadingReport @@ -67,15 +79,11 @@ class ReportController( to: String, xlsx: Boolean ) { - Log.d("UnitReportsVM", "Fetching positions") - if (!xlsx) { val result = reportsApi.reportsRouteGet(from, to, deviceId) - Log.d("UnitReportsVM", "Positions report: $result") reportFlow.value = Report.PositionsReport(result) } else { val result = reportsApi.reportsRouteGetXlsx(from, to, deviceId) - Log.d("UnitReportsVM", "Positions report: $result") reportFlow.value = Report.XlsxReport(result) } @@ -88,7 +96,6 @@ class ReportController( types: List<EventInformation.Type>, xlsx: Boolean ) { - Log.d("UnitReportsVM", "Fetching events") if (!xlsx) { val positionsResult = reportsApi.reportsRouteGet(from, to, deviceId) @@ -106,14 +113,12 @@ class ReportController( )) } - Log.d("UnitReportsVM", "Events report: $result") reportFlow.value = Report.EventsReport(result.toTypedArray()) } else { val result = reportsApi.reportsEventsGetXlsx( from, to, EventInformation.reportTypesToStrings(types), deviceId ) - Log.d("UnitReportsVM", "Events report: $result") reportFlow.value = Report.XlsxReport(result) } } @@ -124,15 +129,11 @@ class ReportController( to: String, xlsx: Boolean ) { - Log.d("UnitReportsVM", "Fetching stops") - if (!xlsx) { val result = reportsApi.reportsStopsGet(from, to, deviceId) - Log.d("UnitReportsVM", "Stops report: $result") reportFlow.value = Report.StopsReport(result) } else { val result = reportsApi.reportsStopsGetXlsx(from, to, deviceId) - Log.d("UnitReportsVM", "Stops report: $result") reportFlow.value = Report.XlsxReport(result) } diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/SessionController.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/SessionController.kt index 2ce4dc6..a945ee9 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/SessionController.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/SessionController.kt @@ -1,9 +1,24 @@ +/** + * TrackerMap + * Copyright (C) 2021-2022 Iván Ávalos <avalos@disroot.org>, Henoch Ojeda <imhenoch@protonmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ package mx.trackermap.TrackerMap.controllers -import android.util.Log import kotlinx.coroutines.DelicateCoroutinesApi import kotlinx.coroutines.GlobalScope -import kotlinx.coroutines.delay import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.launch import kotlinx.serialization.json.JsonPrimitive @@ -20,6 +35,7 @@ class SessionController( sealed class LoginState { object Nothing: LoginState() object Loading: LoginState() + object UrlMissing: LoginState() object EmailMissing : LoginState() object PasswordMissing : LoginState() object Failure : LoginState() @@ -35,7 +51,6 @@ class SessionController( GlobalScope.launch { try { userFlow.value = sessionApi.sessionGet() - Log.d("LoginViewModel", userFlow.value.toString()) loginStateFlow.value = LoginState.Success } catch (e: Exception) { loginStateFlow.value = LoginState.Failure @@ -48,20 +63,24 @@ class SessionController( GlobalScope.launch { try { userFlow.value = sessionApi.sessionGet() - Log.d("LoginViewModel", userFlow.value.toString()) loginStateFlow.value = LoginState.Success } catch (e: Exception) { - Log.d("LoginViewModel", "No session") loginStateFlow.value = LoginState.Nothing } } } fun login(body: SessionBody) { + val url = body.url.trim() val email = body.email.trim() val password = body.password.trim() val token = body.fcmToken + if (url.isEmpty()) { + loginStateFlow.value = LoginState.UrlMissing + return + } + if (email.isEmpty()) { loginStateFlow.value = LoginState.EmailMissing return @@ -75,6 +94,8 @@ class SessionController( loginStateFlow.value = LoginState.Loading GlobalScope.launch { try { + sessionApi.baseUrl = url + usersApi.baseUrl = sessionApi.baseUrl val session = sessionApi.sessionPost(email, password) userFlow.value = session usersApi.token = sessionApi.token diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/UnitsController.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/UnitsController.kt index a9ebae2..b282a34 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/UnitsController.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/UnitsController.kt @@ -1,3 +1,20 @@ +/** + * TrackerMap + * Copyright (C) 2021-2022 Iván Ávalos <avalos@disroot.org>, Henoch Ojeda <imhenoch@protonmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ package mx.trackermap.TrackerMap.controllers import kotlinx.coroutines.CoroutineScope diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/utils/Coroutines.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/utils/Coroutines.kt index c953887..21b6fc1 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/utils/Coroutines.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/utils/Coroutines.kt @@ -1,3 +1,20 @@ +/** + * TrackerMap + * Copyright (C) 2021-2022 Iván Ávalos <avalos@disroot.org>, Henoch Ojeda <imhenoch@protonmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ package mx.trackermap.TrackerMap.utils import kotlinx.coroutines.delay diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/utils/Formatter.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/utils/Formatter.kt index c113bef..77d0d14 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/utils/Formatter.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/utils/Formatter.kt @@ -1,3 +1,20 @@ +/** + * TrackerMap + * Copyright (C) 2021-2022 Iván Ávalos <avalos@disroot.org>, Henoch Ojeda <imhenoch@protonmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ package mx.trackermap.TrackerMap.utils import kotlinx.datetime.* diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/utils/MapCalculus.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/utils/MapCalculus.kt index 1a0d27b..4476e39 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/utils/MapCalculus.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/utils/MapCalculus.kt @@ -1,7 +1,22 @@ +/** + * TrackerMap + * Copyright (C) 2021-2022 Iván Ávalos <avalos@disroot.org>, Henoch Ojeda <imhenoch@protonmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ package mx.trackermap.TrackerMap.utils -import kotlin.math.roundToLong - class MapCalculus { companion object { /** diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/utils/MarkerType.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/utils/MarkerType.kt index 58d8d1c..cb2d159 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/utils/MarkerType.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/utils/MarkerType.kt @@ -1,3 +1,20 @@ +/** + * TrackerMap + * Copyright (C) 2021-2022 Iván Ávalos <avalos@disroot.org>, Henoch Ojeda <imhenoch@protonmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ package mx.trackermap.TrackerMap.utils enum class MarkerType { diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/utils/ReportDates.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/utils/ReportDates.kt index 360cce8..5672536 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/utils/ReportDates.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/utils/ReportDates.kt @@ -1,3 +1,20 @@ +/** + * TrackerMap + * Copyright (C) 2021-2022 Iván Ávalos <avalos@disroot.org>, Henoch Ojeda <imhenoch@protonmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ package mx.trackermap.TrackerMap.utils import kotlinx.coroutines.DelicateCoroutinesApi diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/utils/SpeedUnit.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/utils/SpeedUnit.kt index bc9cdb4..a696b67 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/utils/SpeedUnit.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/utils/SpeedUnit.kt @@ -1,3 +1,20 @@ +/** + * TrackerMap + * Copyright (C) 2021-2022 Iván Ávalos <avalos@disroot.org>, Henoch Ojeda <imhenoch@protonmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ package mx.trackermap.TrackerMap.utils enum class SpeedUnit { |