fix: hide UI elements that use file saving
This commit is contained in:
parent
c72d76aec7
commit
09b1f322ba
3 changed files with 15 additions and 7 deletions
|
|
@ -87,6 +87,7 @@ PageType {
|
|||
|
||||
LabelWithButtonType {
|
||||
id: backup
|
||||
visible: !SettingsController.isOnTv()
|
||||
Layout.fillWidth: true
|
||||
|
||||
text: qsTr("Backup")
|
||||
|
|
@ -98,7 +99,9 @@ PageType {
|
|||
}
|
||||
}
|
||||
|
||||
DividerType {}
|
||||
DividerType {
|
||||
visible: !SettingsController.isOnTv()
|
||||
}
|
||||
|
||||
LabelWithButtonType {
|
||||
id: about
|
||||
|
|
|
|||
|
|
@ -373,6 +373,7 @@ PageType {
|
|||
|
||||
LabelWithButtonType {
|
||||
id: exportSitesButton
|
||||
visible: !SettingsController.isOnTv()
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Save site list")
|
||||
|
||||
|
|
@ -396,7 +397,9 @@ PageType {
|
|||
}
|
||||
}
|
||||
|
||||
DividerType {}
|
||||
DividerType {
|
||||
visible: !SettingsController.isOnTv()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -324,14 +324,16 @@ PageType {
|
|||
target: ServersModel
|
||||
|
||||
function onModelReset() {
|
||||
var hasServerWithWriteAccess = ServersModel.hasServerWithWriteAccess()
|
||||
shareTabButton.visible = hasServerWithWriteAccess
|
||||
shareTabButton.width = hasServerWithWriteAccess ? undefined : 0
|
||||
if (!SettingsController.isOnTv()) {
|
||||
var hasServerWithWriteAccess = ServersModel.hasServerWithWriteAccess()
|
||||
shareTabButton.visible = hasServerWithWriteAccess
|
||||
shareTabButton.width = hasServerWithWriteAccess ? undefined : 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
visible: ServersModel.hasServerWithWriteAccess()
|
||||
width: ServersModel.hasServerWithWriteAccess() ? undefined : 0
|
||||
visible: !SettingsController.isOnTv() && ServersModel.hasServerWithWriteAccess()
|
||||
width: !SettingsController.isOnTv() && ServersModel.hasServerWithWriteAccess() ? undefined : 0
|
||||
|
||||
isSelected: tabBar.currentIndex === 1
|
||||
image: "qrc:/images/controls/share-2.svg"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue