add time-range and auto-refresh

This commit is contained in:
2026-04-25 17:41:11 +02:00
parent a58393d89e
commit 5543e2fe1d
2 changed files with 100 additions and 78 deletions

View File

@@ -1,4 +1,4 @@
# https://github.com/zauberzeug/nicegui/blob/main/examples/local_file_picker/local_file_picker.py
# based on https://github.com/zauberzeug/nicegui/blob/main/examples/local_file_picker/local_file_picker.py
import platform
from pathlib import Path
@@ -30,9 +30,19 @@ class local_file_picker(ui.dialog):
with self, ui.card():
self.add_drives_toggle()
self.grid = ui.aggrid({
'columnDefs': [{'field': 'name', 'headerName': 'File'}],
'rowSelection': {'mode': 'multiRow' if multiple else 'singleRow'},
}, html_columns=[0]).classes('w-96').on('cellDoubleClicked', self.handle_double_click)
'columnDefs': [{
'field': 'name', 'headerName': 'File', 'sort': 'desc',
'filter': 'agTextColumnFilter', 'floatingFilter': True,
}],
'rowSelection': {
'mode': 'multiRow' if multiple else 'singleRow',
#'checkboxes': True if multiple else False,
'enableClickSelection': True,
},
'selectionColumnDef': {'width': 28, 'cellStyle': {'textAlign': 'center'} }, # will be width+20 and min 48
}, html_columns=[0], theme='balham').classes('w-96').on('cellDoubleClicked', self.handle_double_click)
#\
#.on('cellClicked', self.handle_click)
with ui.row().classes('w-full justify-end'):
ui.button('Cancel', on_click=self.close).props('outline')
ui.button('Ok', on_click=self._handle_ok)