mirror of
https://github.com/markqvist/Sideband.git
synced 2026-11-26 01:46:23 -05:00
Refactored keys screen
This commit is contained in:
parent
199d9f9bdf
commit
2e8a17854e
3 changed files with 281 additions and 255 deletions
|
|
@ -1053,127 +1053,6 @@ MDScreen:
|
|||
id: map_layout
|
||||
"""
|
||||
|
||||
layout_keys_screen = """
|
||||
MDScreen:
|
||||
name: "keys_screen"
|
||||
|
||||
BoxLayout:
|
||||
orientation: "vertical"
|
||||
|
||||
MDTopAppBar:
|
||||
title: "Backup & Keys"
|
||||
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_keys_action(self)],
|
||||
]
|
||||
|
||||
ScrollView:
|
||||
id:keys_scrollview
|
||||
|
||||
MDBoxLayout:
|
||||
orientation: "vertical"
|
||||
spacing: "24dp"
|
||||
size_hint_y: None
|
||||
height: self.minimum_height
|
||||
padding: [dp(35), dp(35), dp(35), dp(35)]
|
||||
|
||||
|
||||
MDLabel:
|
||||
id: backup_info
|
||||
markup: True
|
||||
text: ""
|
||||
size_hint_y: None
|
||||
text_size: self.width, None
|
||||
height: self.texture_size[1]
|
||||
|
||||
MDRectangleFlatIconButton:
|
||||
id: keys_backup
|
||||
icon: "home-export-outline"
|
||||
text: "Backup Sideband Profile"
|
||||
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.profile_backup_action(self)
|
||||
|
||||
MDRectangleFlatIconButton:
|
||||
id: keys_restore
|
||||
icon: "home-import-outline"
|
||||
text: "Restore Sideband Profile"
|
||||
disabled: True
|
||||
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.profile_backup_action(self)
|
||||
|
||||
MDLabel:
|
||||
id: keys_info
|
||||
markup: True
|
||||
text: ""
|
||||
size_hint_y: None
|
||||
text_size: self.width, None
|
||||
height: self.texture_size[1]
|
||||
|
||||
MDRectangleFlatIconButton:
|
||||
id: keys_display
|
||||
icon: "eye"
|
||||
text: "Display Identity Key"
|
||||
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.identity_display_action(self)
|
||||
|
||||
MDRectangleFlatIconButton:
|
||||
id: keys_copy
|
||||
icon: "file-key"
|
||||
text: "Copy Key To Clipboard"
|
||||
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.identity_copy_action(self)
|
||||
|
||||
MDRectangleFlatIconButton:
|
||||
id: keys_share
|
||||
icon: "upload-lock"
|
||||
text: "Send Key To Other App"
|
||||
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.identity_share_action(self)
|
||||
|
||||
MDBoxLayout:
|
||||
orientation: "vertical"
|
||||
# spacing: "24dp"
|
||||
size_hint_y: None
|
||||
height: self.minimum_height
|
||||
padding: [dp(0), dp(12), dp(0), dp(0)]
|
||||
|
||||
MDTextField:
|
||||
id: key_restore_text
|
||||
hint_text: "Enter base32 key for import"
|
||||
mode: "rectangle"
|
||||
# size_hint: [1.0, None]
|
||||
pos_hint: {"center_x": .5}
|
||||
|
||||
MDRectangleFlatIconButton:
|
||||
id: keys_restore
|
||||
icon: "download-lock"
|
||||
text: "Restore Identity From Key"
|
||||
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.identity_restore_action(self)
|
||||
"""
|
||||
|
||||
layout_plugins_screen = """
|
||||
MDScreen:
|
||||
name: "plugins_screen"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue