mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-07-23 17:05:28 +02:00
SettingsView: fix update page visibility
Change-Id: I5c8cc068f0d8c2ab2996b026db88b637f919414c
This commit is contained in:
parent
eba6f8f361
commit
bb54f4527f
4 changed files with 6 additions and 53 deletions
|
@ -23,6 +23,7 @@ import net.jami.Adapters 1.1
|
||||||
import net.jami.Constants 1.1
|
import net.jami.Constants 1.1
|
||||||
import net.jami.Enums 1.1
|
import net.jami.Enums 1.1
|
||||||
import net.jami.Models 1.1
|
import net.jami.Models 1.1
|
||||||
|
import net.jami.Helpers 1.1
|
||||||
|
|
||||||
import "../mainview/components"
|
import "../mainview/components"
|
||||||
import "../commoncomponents"
|
import "../commoncomponents"
|
||||||
|
@ -131,7 +132,7 @@ SidePanelBase {
|
||||||
{
|
{
|
||||||
"id": 11,
|
"id": 11,
|
||||||
"title": JamiStrings.updatesTitle,
|
"title": JamiStrings.updatesTitle,
|
||||||
"visible": "isWindows"
|
"visible": "isUpdatable"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},{
|
},{
|
||||||
|
@ -209,8 +210,8 @@ SidePanelBase {
|
||||||
if (c === undefined)
|
if (c === undefined)
|
||||||
return true
|
return true
|
||||||
var res = false
|
var res = false
|
||||||
if (c === "isWindows") {
|
if (c === "isUpdatable") {
|
||||||
res = Qt.platform.os.toString() === "windows"
|
res = UpdateManager.isUpdaterEnabled()
|
||||||
} else if (c === "isJamiAccount") {
|
} else if (c === "isJamiAccount") {
|
||||||
res = CurrentAccount.type !== Profile.Type.SIP
|
res = CurrentAccount.type !== Profile.Type.SIP
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -49,7 +49,7 @@ ListSelectionView {
|
||||||
"FileTransferSettingsPage": Qt.resolvedUrl("components/FileTransferSettingsPage.qml"),
|
"FileTransferSettingsPage": Qt.resolvedUrl("components/FileTransferSettingsPage.qml"),
|
||||||
"CallRecordingSettingsPage": Qt.resolvedUrl("components/CallRecordingSettingsPage.qml"),
|
"CallRecordingSettingsPage": Qt.resolvedUrl("components/CallRecordingSettingsPage.qml"),
|
||||||
"TroubleshootSettingsPage": Qt.resolvedUrl("components/TroubleshootSettingsPage.qml"),
|
"TroubleshootSettingsPage": Qt.resolvedUrl("components/TroubleshootSettingsPage.qml"),
|
||||||
"UpdatesSettingsPage": Qt.resolvedUrl("components/UpdatesSettingsPage.qml"),
|
"UpdateSettingsPage": Qt.resolvedUrl("components/UpdateSettingsPage.qml"),
|
||||||
"AudioSettingsPage": Qt.resolvedUrl("components/AudioSettingsPage.qml"),
|
"AudioSettingsPage": Qt.resolvedUrl("components/AudioSettingsPage.qml"),
|
||||||
"VideoSettingsPage": Qt.resolvedUrl("components/VideoSettingsPage.qml"),
|
"VideoSettingsPage": Qt.resolvedUrl("components/VideoSettingsPage.qml"),
|
||||||
"ScreenSharingSettingsPage": Qt.resolvedUrl("components/ScreenSharingSettingsPage.qml"),
|
"ScreenSharingSettingsPage": Qt.resolvedUrl("components/ScreenSharingSettingsPage.qml"),
|
||||||
|
@ -127,7 +127,7 @@ ListSelectionView {
|
||||||
replace(currentItem, viewNode.resources["TroubleshootSettingsPage"], StackView.Immediate)
|
replace(currentItem, viewNode.resources["TroubleshootSettingsPage"], StackView.Immediate)
|
||||||
break
|
break
|
||||||
case 11:
|
case 11:
|
||||||
replace(currentItem, viewNode.resources["UpdatesSettingsPage"], StackView.Immediate)
|
replace(currentItem, viewNode.resources["UpdateSettingsPage"], StackView.Immediate)
|
||||||
break
|
break
|
||||||
case 12:
|
case 12:
|
||||||
replace(currentItem, viewNode.resources["AudioSettingsPage"], StackView.Immediate)
|
replace(currentItem, viewNode.resources["AudioSettingsPage"], StackView.Immediate)
|
||||||
|
|
|
@ -1,48 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2019-2023 Savoir-faire Linux Inc.
|
|
||||||
* Author: Yang Wang <yang.wang@savoirfairelinux.com>
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import QtQuick
|
|
||||||
import QtQuick.Layouts
|
|
||||||
|
|
||||||
import net.jami.Models 1.1
|
|
||||||
import net.jami.Adapters 1.1
|
|
||||||
import net.jami.Enums 1.1
|
|
||||||
import net.jami.Constants 1.1
|
|
||||||
import net.jami.Helpers 1.1
|
|
||||||
|
|
||||||
import "../../commoncomponents"
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
id: root
|
|
||||||
|
|
||||||
property int preferredColumnWidth : Math.min(root.width / 2 - 50, 350)
|
|
||||||
property int contentWidth: generalSettingsColumnLayout.width
|
|
||||||
property int preferredHeight: generalSettingsColumnLayout.implicitHeight
|
|
||||||
|
|
||||||
color: JamiTheme.secondaryBackgroundColor
|
|
||||||
|
|
||||||
ColumnLayout {
|
|
||||||
id: generalSettingsColumnLayout
|
|
||||||
|
|
||||||
anchors.horizontalCenter: root.horizontalCenter
|
|
||||||
|
|
||||||
width: Math.min(JamiTheme.maximumWidthSettingsView, root.width)
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Add table
Reference in a new issue