Skip to content

Commit

Permalink
for now, just do not show the reboot shutdown actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Consti10 committed Nov 6, 2023
1 parent 2254f0f commit aea6fdc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 5 additions & 2 deletions qml/ui/configpopup/status/FooterRebootShutdownWarning.qml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ Item {
anchors.fill: parent
property int m_type: 0 // 0 = ground, 1= air, 2=FC


property bool m_supports_reboot_actions: true

function get_show_power_actions(){
if(m_type==0){
return _ohdSystemGround.is_alive
Expand Down Expand Up @@ -48,7 +51,7 @@ Item {
anchors.fill: parent
//visible: get_show_power_actions()
Button{
visible: get_show_power_actions()
visible: get_show_power_actions() && m_supports_reboot_actions
Layout.alignment: Qt.AlignLeft
Layout.leftMargin: 10
text: qsTr("REBOOT")
Expand All @@ -57,7 +60,7 @@ Item {
}
}
Button{
visible: get_show_power_actions()
visible: get_show_power_actions() && m_supports_reboot_actions
Layout.alignment: Qt.AlignRight
Layout.rightMargin: 10
text: qsTr("SHUTDOWN")
Expand Down
1 change: 1 addition & 0 deletions qml/ui/configpopup/status/StatusCardsColumn.qml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ RowLayout{

hasFooter: true
cardFooter: FooterRebootShutdownWarning{
m_supports_reboot_actions: false
m_type: 2
}
}
Expand Down

0 comments on commit aea6fdc

Please sign in to comment.