mirror of
https://github.com/markqvist/Sideband.git
synced 2026-12-04 13:50:02 -05:00
Trusted-only display mode, object view skeleton
This commit is contained in:
parent
77b6509059
commit
1aa2131d17
5 changed files with 128 additions and 9 deletions
|
|
@ -866,6 +866,8 @@ MDScreen:
|
|||
[['menu', lambda x: root.app.nav_drawer.set_state("open")]]
|
||||
right_action_items:
|
||||
[
|
||||
['arrow-down-bold-hexagon-outline', lambda x: root.app.telemetry_request_action(self)],
|
||||
['upload-lock', lambda x: root.app.telemetry_send_update(self)],
|
||||
['close', lambda x: root.app.close_any_action(self)],
|
||||
]
|
||||
|
||||
|
|
@ -924,11 +926,11 @@ MDScreen:
|
|||
spacing: dp(24)
|
||||
size_hint_y: None
|
||||
padding: [dp(0),dp(24),dp(0),dp(0)]
|
||||
height: dp(74)
|
||||
height: dp(160)
|
||||
|
||||
MDRectangleFlatIconButton:
|
||||
id: telemetry_icons_button
|
||||
icon: "update"
|
||||
icon: "upload-lock"
|
||||
text: "Send Telemetry Update Now"
|
||||
padding: [dp(0), dp(14), dp(0), dp(14)]
|
||||
icon_size: dp(24)
|
||||
|
|
@ -937,6 +939,17 @@ MDScreen:
|
|||
on_release: root.app.telemetry_send_update(self)
|
||||
disabled: False
|
||||
|
||||
MDRectangleFlatIconButton:
|
||||
id: telemetry_icons_button
|
||||
icon: "arrow-down-bold-hexagon-outline"
|
||||
text: "Request Telemetry From Collector"
|
||||
padding: [dp(0), dp(14), dp(0), dp(14)]
|
||||
icon_size: dp(24)
|
||||
font_size: dp(16)
|
||||
size_hint: [1.0, None]
|
||||
on_release: root.app.telemetry_request_action(self)
|
||||
disabled: False
|
||||
|
||||
MDRectangleFlatIconButton:
|
||||
id: telemetry_icons_button
|
||||
icon: "content-copy"
|
||||
|
|
@ -993,6 +1006,21 @@ MDScreen:
|
|||
pos_hint: {"center_y": 0.3}
|
||||
active: False
|
||||
|
||||
MDBoxLayout:
|
||||
orientation: "horizontal"
|
||||
size_hint_y: None
|
||||
padding: [0,0,dp(24),dp(0)]
|
||||
height: dp(48)
|
||||
|
||||
MDLabel:
|
||||
text: "Only display from trusted"
|
||||
font_style: "H6"
|
||||
|
||||
MDSwitch:
|
||||
id: telemetry_display_trusted_only
|
||||
pos_hint: {"center_y": 0.3}
|
||||
active: False
|
||||
|
||||
MDBoxLayout:
|
||||
orientation: "horizontal"
|
||||
size_hint_y: None
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ import time
|
|||
import RNS
|
||||
|
||||
from kivy.metrics import dp,sp
|
||||
from kivy.uix.label import MDLabel
|
||||
from kivy.lang.builder import Builder
|
||||
|
||||
if RNS.vendor.platformutils.get_platform() == "android":
|
||||
|
|
@ -16,6 +15,12 @@ class ObjectDetails():
|
|||
self.widget = None
|
||||
self.object_hash = object_hash
|
||||
|
||||
if not self.app.root.ids.screen_manager.has_screen("object_details_screen"):
|
||||
self.screen = Builder.load_string(layou_object_details)
|
||||
self.screen.app = self.app
|
||||
self.ids = self.screen.ids
|
||||
self.app.root.ids.screen_manager.add_widget(self.screen)
|
||||
|
||||
def reload(self):
|
||||
self.clear_widget()
|
||||
self.update()
|
||||
|
|
@ -35,6 +40,44 @@ class ObjectDetails():
|
|||
def get_widget(self):
|
||||
return self.widget
|
||||
|
||||
Builder.load_string("""
|
||||
layou_object_details = """
|
||||
MDScreen:
|
||||
name: "object_details_screen"
|
||||
|
||||
BoxLayout:
|
||||
orientation: "vertical"
|
||||
|
||||
""")
|
||||
MDTopAppBar:
|
||||
title: "Details"
|
||||
anchor_title: "left"
|
||||
elevation: 0
|
||||
left_action_items:
|
||||
[['menu', lambda x: root.app.nav_drawer.set_state("open")]]
|
||||
right_action_items:
|
||||
[
|
||||
['close', lambda x: root.app.close_sub_map_action(self)],
|
||||
]
|
||||
|
||||
ScrollView:
|
||||
id: object_details_scrollview
|
||||
|
||||
MDBoxLayout:
|
||||
orientation: "vertical"
|
||||
spacing: dp(48)
|
||||
size_hint_y: None
|
||||
height: self.minimum_height
|
||||
padding: [dp(28), dp(48), dp(28), dp(16)]
|
||||
|
||||
MDLabel:
|
||||
id: name_label
|
||||
markup: True
|
||||
text: "Object Name"
|
||||
font_style: "H6"
|
||||
|
||||
MDLabel:
|
||||
id: test_label
|
||||
markup: True
|
||||
text: "Test"
|
||||
font_style: "H6"
|
||||
|
||||
"""
|
||||
Loading…
Add table
Add a link
Reference in a new issue