Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

Commit

Permalink
Offline Mode, v0.1.150
Browse files Browse the repository at this point in the history
  • Loading branch information
xavierfiechter committed Mar 27, 2024
1 parent 77fa451 commit 4bd368b
Show file tree
Hide file tree
Showing 3 changed files with 350 additions and 196 deletions.
52 changes: 52 additions & 0 deletions src/brainbow.kv
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,44 @@ MDScreen:
halign: "center"
on_release: app.goto_slide('login')

# ------------------

MDFloatLayout:
name: "offline_or_not"
Image:
id: offline_or_not_image
source: "assets/dark-online.png"
pos_hint: {"center_x": .5, "center_y": .7}
size_hint: .66, .66
#size_hint: .42, .42
MDLabel:
text: "[b]Offline Mode[/b]"
markup: True
pos_hint: {"center_y": .485}
halign: "center"
font_size: "25sp"
color: rgba(1, 3, 23, 225)
MDSwitch:
active: app.is_offline_mode
size_hint: None, None
size: "48dp", "48dp"
pos_hint: {"center_x": .5, "center_y": .4}
on_active: app.offline_on_off_switch(*args)
MDLabel:
margin: "8dp"
pos_hint: {"center_y": .225}
opacity: 0.95
halign: 'center'
font_size: '16sp'
text: "By enabling 'Offline Mode', Brainbow does\nnot establish any network connections.\n\nThis mode only supports key generation."

MDTextButton:
text: "SKIP AND CONNECT TO BITCOIN"
font_size: '18sp'
pos_hint: {"center_x": .5, "center_y": .081}
halign: "center"
on_release: app.goto_slide('login')

# ----------------------------------------------------------
MDFloatLayout:
name: "onboarding_logoff"
Expand Down Expand Up @@ -773,6 +811,7 @@ MDScreen:

Tab:
name: "receive"
id: receive
title: "RECEIVE"
title_icon_mode: "Top"
icon: "database-import"
Expand Down Expand Up @@ -1094,6 +1133,7 @@ MDScreen:
MDNavigationDrawerItem:
icon: "database-import"
text: "Receive"
id: receive_nav_item
text_color: "#c9c9c9"
selected_color: [0.97, 0.58, 0.10, 1.0]
icon_color: "#c9c9c9"
Expand All @@ -1103,6 +1143,7 @@ MDScreen:
icon: "database-export"
text: "Send"
text_color: "#c9c9c9"
id: send_nav_item
selected_color: [0.97, 0.58, 0.10, 1.0]
icon_color: "#c9c9c9"
on_release: app.goto_screen('main', 'SEND')
Expand Down Expand Up @@ -1151,6 +1192,7 @@ MDScreen:
selected_color: [0.97, 0.58, 0.10, 1.0]
icon_color: "#c9c9c9"
text: "UTXOs (Coins)"
id: utxos_nav_item
on_release: app.goto_screen('main', "UTXOs (Coins)")

# on_release: app.nfc_toggle()
Expand Down Expand Up @@ -1192,19 +1234,23 @@ MDScreen:

MDNavigationDrawerItem:
icon: "counter"
id: block_height_nav_item
text_color: "#c9c9c9"
selected_color: [0.97, 0.58, 0.10, 1.0]
icon_color: "#c9c9c9"
text: "Block Height"
disabled: app.is_offline_mode
on_release: app.load_blockheight_view()


MDNavigationDrawerItem:
id: exchange_rate_nav_item
icon: "currency-usd"
text_color: "#c9c9c9"
selected_color: [0.97, 0.58, 0.10, 1.0]
icon_color: "#c9c9c9"
text: "Live Exchange Rates"
disabled: app.is_offline_mode
on_release: app.load_exchangerate_view()

MDNavigationDrawerDivider:
Expand Down Expand Up @@ -1343,6 +1389,12 @@ MDScreen:
icon: "toggle-switch-off"
text: "Testnet Playground"
on_release: app.goto_slide('testnet_or_not')
MDNavigationDrawerItem:
text_color: "#c9c9c9"
selected_color: [0.97, 0.58, 0.10, 1.0]
icon: "toggle-switch-off"
text: "Offline Mode"
on_release: app.goto_slide('offline_or_not')
MDNavigationDrawerItem:
text_color: "#c9c9c9"
selected_color: [0.97, 0.58, 0.10, 1.0]
Expand Down
Loading

0 comments on commit 4bd368b

Please sign in to comment.