Merge PR #633: Disable main view configuration with branding
This commit is contained in:
commit
5782bb3fc9
@ -161,7 +161,8 @@ Drawer {
|
|||||||
text: qsTr("Configure main view")
|
text: qsTr("Configure main view")
|
||||||
iconName: "../images/configure.svg"
|
iconName: "../images/configure.svg"
|
||||||
progressive: false
|
progressive: false
|
||||||
visible: root.currentEngine && root.currentEngine.jsonRpcClient.currentHost
|
visible: root.currentEngine && root.currentEngine.jsonRpcClient.currentHost &&
|
||||||
|
!Configuration.hasOwnProperty("mainViewsFilter")
|
||||||
onClicked: {
|
onClicked: {
|
||||||
root.configureMainView();
|
root.configureMainView();
|
||||||
root.close();
|
root.close();
|
||||||
|
|||||||
@ -44,7 +44,14 @@ Page {
|
|||||||
id: root
|
id: root
|
||||||
|
|
||||||
function configureViews() {
|
function configureViews() {
|
||||||
|
if (Configuration.hasOwnProperty("mainViewsFilter")) {
|
||||||
|
console.warn("Main views configuration is disabled by app configuration")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
PlatformHelper.vibrate(PlatformHelper.HapticsFeedbackSelection)
|
||||||
d.configOverlay = configComponent.createObject(contentContainer)
|
d.configOverlay = configComponent.createObject(contentContainer)
|
||||||
|
mainHeader.menuOpen = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
header: ToolBar {
|
header: ToolBar {
|
||||||
@ -287,9 +294,7 @@ Page {
|
|||||||
iconSource: "../images/" + model.icon + ".svg"
|
iconSource: "../images/" + model.icon + ".svg"
|
||||||
|
|
||||||
onPressAndHold: {
|
onPressAndHold: {
|
||||||
PlatformHelper.vibrate(PlatformHelper.HapticsFeedbackSelection)
|
root.configureViews();
|
||||||
d.configOverlay = configComponent.createObject(contentContainer)
|
|
||||||
mainHeader.menuOpen = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -464,8 +469,11 @@ Page {
|
|||||||
|
|
||||||
header: RowLayout {
|
header: RowLayout {
|
||||||
id: headerRow
|
id: headerRow
|
||||||
|
width: parent.width
|
||||||
Label {
|
Label {
|
||||||
text: model.displayName
|
text: model.displayName
|
||||||
|
Layout.fillWidth: true
|
||||||
|
elide: Text.ElideRight
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user