Skip to content
Snippets Groups Projects
Commit bb54f452 authored by Franck Laurent's avatar Franck Laurent Committed by Sébastien Blin
Browse files

SettingsView: fix update page visibility

Change-Id: I5c8cc068f0d8c2ab2996b026db88b637f919414c
parent eba6f8f3
Branches
Tags
No related merge requests found
......@@ -23,6 +23,7 @@ import net.jami.Adapters 1.1
import net.jami.Constants 1.1
import net.jami.Enums 1.1
import net.jami.Models 1.1
import net.jami.Helpers 1.1
import "../mainview/components"
import "../commoncomponents"
......@@ -131,7 +132,7 @@ SidePanelBase {
{
"id": 11,
"title": JamiStrings.updatesTitle,
"visible": "isWindows"
"visible": "isUpdatable"
}
]
},{
......@@ -209,8 +210,8 @@ SidePanelBase {
if (c === undefined)
return true
var res = false
if (c === "isWindows") {
res = Qt.platform.os.toString() === "windows"
if (c === "isUpdatable") {
res = UpdateManager.isUpdaterEnabled()
} else if (c === "isJamiAccount") {
res = CurrentAccount.type !== Profile.Type.SIP
} else {
......
......@@ -49,7 +49,7 @@ ListSelectionView {
"FileTransferSettingsPage": Qt.resolvedUrl("components/FileTransferSettingsPage.qml"),
"CallRecordingSettingsPage": Qt.resolvedUrl("components/CallRecordingSettingsPage.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"),
"VideoSettingsPage": Qt.resolvedUrl("components/VideoSettingsPage.qml"),
"ScreenSharingSettingsPage": Qt.resolvedUrl("components/ScreenSharingSettingsPage.qml"),
......@@ -127,7 +127,7 @@ ListSelectionView {
replace(currentItem, viewNode.resources["TroubleshootSettingsPage"], StackView.Immediate)
break
case 11:
replace(currentItem, viewNode.resources["UpdatesSettingsPage"], StackView.Immediate)
replace(currentItem, viewNode.resources["UpdateSettingsPage"], StackView.Immediate)
break
case 12:
replace(currentItem, viewNode.resources["AudioSettingsPage"], StackView.Immediate)
......
/*
* 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)
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment