updated
This commit is contained in:
4
main.py
4
main.py
@@ -32,7 +32,8 @@ from screens.get_trip_from_server import GetTripFromServer
|
||||
from screens.create_animation_screen import CreateAnimationScreen
|
||||
from screens.settings_screen import SettingsScreen
|
||||
from screens.settings_screen import RegisterScreen
|
||||
from config import RESOURCES_FOLDER, CREDENTIALS_FILE
|
||||
from screens.pause_edit_screen import PauseEditScreen
|
||||
from config import RESOURCES_FOLDER
|
||||
kivy.require("2.0.0")
|
||||
from kivy.core.window import Window
|
||||
Window.size = (360, 780)
|
||||
@@ -49,6 +50,7 @@ class TraccarApp(App):
|
||||
sm.add_widget(SettingsScreen(name="settings"))
|
||||
sm.add_widget(RegisterScreen(name="register"))
|
||||
sm.add_widget(CreateAnimationScreen(name="create_animation"))
|
||||
sm.add_widget(PauseEditScreen(name="pause_edit"))
|
||||
print("Screens added to ScreenManager:", [screen.name for screen in sm.screens])
|
||||
return sm
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
gAAAAABoSC6DwXztGeQ4SwHb6XVAErzxHacSu0oMwBsedH1EJw2u0Z9AxLb5JKN1qK8jeuX2MWul2MA5IDOB2SM7TCcwbiw_o22VVDv7CkkceFfwJ8SpMpRHJqTNDdUmulnQoGMG2BJ2
|
||||
gAAAAABoZPqiU5moDgLAGyehIgyLPV8d2Bdf2Fg8PZHf-d0O3MX1BopCMa_-9iEMeuiLoO9i2UFiafydQxVrGtH7db57u8CrjFKA383mrHn8O6yqvxa3GcIQmoIlCO1d0I5cWwNWQzEd
|
||||
@@ -1,38 +0,0 @@
|
||||
[
|
||||
{
|
||||
"start_time": "2025-06-08T09:07:16.000+00:00",
|
||||
"end_time": "2025-06-08T09:15:50.000+00:00",
|
||||
"duration_seconds": 502,
|
||||
"location": {
|
||||
"latitude": 45.780139444444444,
|
||||
"longitude": 24.16857333333333
|
||||
}
|
||||
},
|
||||
{
|
||||
"start_time": "2025-06-08T09:41:11.000+00:00",
|
||||
"end_time": "2025-06-08T09:44:52.000+00:00",
|
||||
"duration_seconds": 221,
|
||||
"location": {
|
||||
"latitude": 45.66133388888888,
|
||||
"longitude": 24.167794999999998
|
||||
}
|
||||
},
|
||||
{
|
||||
"start_time": "2025-06-08T09:56:09.000+00:00",
|
||||
"end_time": "2025-06-08T10:06:48.728+00:00",
|
||||
"duration_seconds": 627,
|
||||
"location": {
|
||||
"latitude": 45.63627,
|
||||
"longitude": 24.077436666666667
|
||||
}
|
||||
},
|
||||
{
|
||||
"start_time": "2025-06-08T10:49:38.000+00:00",
|
||||
"end_time": "2025-06-08T10:52:42.171+00:00",
|
||||
"duration_seconds": 184,
|
||||
"location": {
|
||||
"latitude": 45.54065277777777,
|
||||
"longitude": 23.951960000000003
|
||||
}
|
||||
}
|
||||
]
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
Binary file not shown.
|
Before Width: | Height: | Size: 766 KiB |
101
resources/projects/Transapuseana/pauses.json
Normal file
101
resources/projects/Transapuseana/pauses.json
Normal file
@@ -0,0 +1,101 @@
|
||||
[
|
||||
{
|
||||
"start_time": "2025-06-19T05:25:20.000+00:00",
|
||||
"end_time": "2025-06-19T14:09:05.000+00:00",
|
||||
"duration_seconds": 31426,
|
||||
"location": {
|
||||
"latitude": 45.79909222222222,
|
||||
"longitude": 24.085676666666668
|
||||
}
|
||||
},
|
||||
{
|
||||
"start_time": "2025-06-20T05:18:03.000+00:00",
|
||||
"end_time": "2025-06-20T14:05:26.784+00:00",
|
||||
"duration_seconds": 31644,
|
||||
"location": {
|
||||
"latitude": 45.798976111111116,
|
||||
"longitude": 24.085469444444445
|
||||
}
|
||||
},
|
||||
{
|
||||
"start_time": "2025-06-21T07:45:07.000+00:00",
|
||||
"end_time": "2025-06-21T08:04:04.000+00:00",
|
||||
"duration_seconds": 1049,
|
||||
"location": {
|
||||
"latitude": 45.82062444444445,
|
||||
"longitude": 24.151072222222222
|
||||
}
|
||||
},
|
||||
{
|
||||
"start_time": "2025-06-23T05:16:09.000+00:00",
|
||||
"end_time": "2025-06-23T05:18:52.000+00:00",
|
||||
"duration_seconds": 163,
|
||||
"location": {
|
||||
"latitude": 45.79242277777778,
|
||||
"longitude": 24.139758888888892
|
||||
}
|
||||
},
|
||||
{
|
||||
"start_time": "2025-06-23T05:26:59.000+00:00",
|
||||
"end_time": "2025-06-23T13:42:32.000+00:00",
|
||||
"duration_seconds": 29558,
|
||||
"location": {
|
||||
"latitude": 45.79897166666667,
|
||||
"longitude": 24.085509444444444
|
||||
}
|
||||
},
|
||||
{
|
||||
"start_time": "2025-06-24T05:02:36.000+00:00",
|
||||
"end_time": "2025-06-24T05:06:24.161+00:00",
|
||||
"duration_seconds": 228,
|
||||
"location": {
|
||||
"latitude": 45.79917111111111,
|
||||
"longitude": 24.086246666666668
|
||||
}
|
||||
},
|
||||
{
|
||||
"start_time": "2025-06-24T05:06:26.000+00:00",
|
||||
"end_time": "2025-06-24T13:44:34.000+00:00",
|
||||
"duration_seconds": 31088,
|
||||
"location": {
|
||||
"latitude": 45.79897666666667,
|
||||
"longitude": 24.08552166666667
|
||||
}
|
||||
},
|
||||
{
|
||||
"start_time": "2025-06-25T05:23:38.000+00:00",
|
||||
"end_time": "2025-06-25T13:52:00.000+00:00",
|
||||
"duration_seconds": 30500,
|
||||
"location": {
|
||||
"latitude": 45.799183888888884,
|
||||
"longitude": 24.085637777777777
|
||||
}
|
||||
},
|
||||
{
|
||||
"start_time": "2025-06-26T05:10:24.000+00:00",
|
||||
"end_time": "2025-06-26T14:09:48.774+00:00",
|
||||
"duration_seconds": 32365,
|
||||
"location": {
|
||||
"latitude": 45.799045,
|
||||
"longitude": 24.085640555555557
|
||||
}
|
||||
},
|
||||
{
|
||||
"start_time": "2025-06-27T05:13:04.000+00:00",
|
||||
"end_time": "2025-06-27T14:08:01.630+00:00",
|
||||
"duration_seconds": 32098,
|
||||
"location": {
|
||||
"latitude": 45.79897444444445,
|
||||
"longitude": 24.085511666666665
|
||||
}
|
||||
},
|
||||
{
|
||||
"start_time": "2025-06-30T04:39:06.000+00:00",
|
||||
"end_time": "2025-06-30T13:13:43.000+00:00",
|
||||
"duration_seconds": 30878,
|
||||
"location": {
|
||||
"latitude": 45.798997222222226,
|
||||
"longitude": 24.085517777777778
|
||||
}
|
||||
}
|
||||
]
|
||||
336220
resources/projects/Transapuseana/positions.json
Normal file
336220
resources/projects/Transapuseana/positions.json
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
Before Width: | Height: | Size: 5.6 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 77 KiB |
@@ -1,12 +0,0 @@
|
||||
[
|
||||
{
|
||||
"start_time": "2025-06-06T04:45:45.000+00:00",
|
||||
"end_time": "2025-06-06T13:49:07.000+00:00",
|
||||
"duration_seconds": 32563,
|
||||
"location": {
|
||||
"latitude": 45.79917944444444,
|
||||
"longitude": 24.085654444444444
|
||||
},
|
||||
"name": "Lucru greu"
|
||||
}
|
||||
]
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
Binary file not shown.
|
Before Width: | Height: | Size: 877 KiB |
@@ -1 +0,0 @@
|
||||
[]
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
Binary file not shown.
|
Before Width: | Height: | Size: 892 KiB |
@@ -1,11 +0,0 @@
|
||||
[
|
||||
{
|
||||
"start_time": "2025-06-06T04:45:45.000+00:00",
|
||||
"end_time": "2025-06-06T13:49:07.000+00:00",
|
||||
"duration_seconds": 32563,
|
||||
"location": {
|
||||
"latitude": 45.79917944444444,
|
||||
"longitude": 24.085654444444444
|
||||
}
|
||||
}
|
||||
]
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
Binary file not shown.
|
Before Width: | Height: | Size: 877 KiB |
@@ -1 +1 @@
|
||||
gAAAAABoSC8ETq7zYpfWzXgrdkV84SLWn1h77ozX8l4wPFySWQQG8oO0kFEurAmDnPnlggBy2HR7U2J8wBhckLOo7xFfcppibTLBlqW6Pu_krITGBokWDUJ9rm8rZrjZwnbH1qr8qWupaAW84y-uMpJ9gnE0lR6MAhxqgkHpqnHp6SQZZuNAwDVrEC77LeUL1tp64gel0jxpTdiTUXdKQmLpPVyl0PSkHL2YgM4TyFNzQrTuzvtu91huqO5EbkxLOi5JCXZ5NzFxET81MM_80xSTj5j1ZSroJp4Zgc7JigqUhavQsCOjwqG8QRP8yAx-EhMKSim_6B8gKvYj5kLdWfKbUIFJxzixGPUKPeKQxZFEFo-R5eaiSt3N2to4przQTco7ev6a9Q8wL4htPfyaWYATRBqb_ULLqQRxNH8c7Kj9V0B2K-EonZK4ptcpryR4Ve_7Eyee533d
|
||||
gAAAAABoY8pRV-Q85rU5krZOR_0dyq0MEBWpw35Mxz6scGhReSBw4yDI7f_-v1qmIaiEwaq0jXlNtA9T12JTY1rH4XJL6CGXTvhyChXeSAjx2xtuVtPzgrMtQZZwqdjbiy2izWUMCH71nNRNVTPHmgnQ-U0do_zxQyXuXV9gD6XI_BSS51d5B67Hg06iQzbgbqB7SJoPBfu-QGigBiAxmoF_snkfx10rnJoySx59kmI6w0ZV4lAwd_BCH1H58ylHtZWvin14Oruhu_0RWLtUipqHplYmgXskvXvtMFxOBg-1dpVq3zqZ_nW425xTWLGw4ElIGgXPYXO4cgPiDrMTTTi6y4Ymyt193r4jhVeU5A-UswEdhdEEJ4sEOV57UHdjSdPNVj8Ce3ZKAXPJ1DWQhpLCKpoLu4unQTp3V89wxZ63PcbrqglnFwtFNFmjVAQ97Q5qSZH6-VvA
|
||||
Binary file not shown.
BIN
screens/__pycache__/pause_edit_screen.cpython-311.pyc
Normal file
BIN
screens/__pycache__/pause_edit_screen.cpython-311.pyc
Normal file
Binary file not shown.
@@ -1,42 +1,20 @@
|
||||
import kivy
|
||||
from kivy.app import App
|
||||
from kivy.uix.screenmanager import ScreenManager, Screen
|
||||
from kivy.uix.screenmanager import Screen
|
||||
import os
|
||||
import json
|
||||
import math
|
||||
from kivy.clock import Clock
|
||||
from kivy.properties import StringProperty, NumericProperty, AliasProperty
|
||||
from utils import (
|
||||
generate_key, load_key, encrypt_data, decrypt_data,
|
||||
check_server_settings, save_server_settings,
|
||||
test_connection, get_devices_from_server, save_route_to_file, fetch_positions_for_selected_day,
|
||||
process_preview_util, optimize_route_entries_util
|
||||
)
|
||||
from datetime import date
|
||||
from kivy.uix.popup import Popup
|
||||
from kivy.uix.gridlayout import GridLayout
|
||||
from kivy.uix.button import Button
|
||||
from kivy.uix.label import Label
|
||||
from kivy.uix.boxlayout import BoxLayout
|
||||
from threading import Thread
|
||||
from kivy.clock import mainthread
|
||||
from kivy.uix.image import Image
|
||||
from kivy.uix.behaviors import ButtonBehavior
|
||||
from kivy.uix.progressbar import ProgressBar
|
||||
from config import RESOURCES_FOLDER, CREDENTIALS_FILE
|
||||
from selenium import webdriver
|
||||
from selenium.webdriver.chrome.options import Options
|
||||
from PIL import Image
|
||||
import time
|
||||
from selenium import webdriver
|
||||
from selenium.webdriver.chrome.service import Service
|
||||
from selenium.webdriver.chrome.options import Options
|
||||
from PIL import Image
|
||||
import time
|
||||
import os
|
||||
import math
|
||||
from kivy.uix.filechooser import FileChooserIconView
|
||||
from kivy.uix.textinput import TextInput
|
||||
from widgets.pause_edit_popup import open_pauses_popup
|
||||
from config import RESOURCES_FOLDER
|
||||
|
||||
class CreateAnimationScreen(Screen):
|
||||
project_name = StringProperty("")
|
||||
@@ -187,5 +165,8 @@ class CreateAnimationScreen(Screen):
|
||||
)
|
||||
|
||||
def open_pauses_popup(self):
|
||||
open_pauses_popup(self, self.project_name, RESOURCES_FOLDER, on_save_callback=self.on_pre_enter)
|
||||
"""Navigate to the pause edit screen"""
|
||||
pause_edit_screen = self.manager.get_screen("pause_edit")
|
||||
pause_edit_screen.set_project_and_callback(self.project_name, self.on_pre_enter)
|
||||
self.manager.current = "pause_edit"
|
||||
|
||||
|
||||
1877
screens/pause_edit_screen.py
Normal file
1877
screens/pause_edit_screen.py
Normal file
File diff suppressed because it is too large
Load Diff
12
traccar.kv
12
traccar.kv
@@ -735,3 +735,15 @@
|
||||
font_size: 16
|
||||
on_press: app.root.current = "home"
|
||||
|
||||
<PauseEditScreen>:
|
||||
BoxLayout:
|
||||
orientation: "vertical"
|
||||
spacing: 8
|
||||
padding: 8
|
||||
canvas.before:
|
||||
Color:
|
||||
rgba: 0.11, 0.10, 0.15, 1
|
||||
Rectangle:
|
||||
pos: self.pos
|
||||
size: self.size
|
||||
|
||||
|
||||
Reference in New Issue
Block a user