feat: add basic browser settings and go to them on browser button click
This commit is contained in:
parent
23b8c6ab57
commit
af2af0700c
|
@ -5,6 +5,7 @@ import "../../../shared"
|
||||||
import "../../../shared/status"
|
import "../../../shared/status"
|
||||||
import "../../../imports"
|
import "../../../imports"
|
||||||
import "../Chat/ChatColumn/ChatComponents"
|
import "../Chat/ChatColumn/ChatComponents"
|
||||||
|
import "../Profile/LeftTab/constants.js" as ProfileConstants
|
||||||
|
|
||||||
PopupMenu {
|
PopupMenu {
|
||||||
property var addNewTab: function () {}
|
property var addNewTab: function () {}
|
||||||
|
@ -83,7 +84,8 @@ PopupMenu {
|
||||||
text: qsTr("Settings")
|
text: qsTr("Settings")
|
||||||
shortcut: "Ctrl+,"
|
shortcut: "Ctrl+,"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
console.log('Open settings in Profile')
|
appMain.changeAppSection(Constants.profile)
|
||||||
|
profileLayoutContainer.changeProfileSection(ProfileConstants.BROWSER_SETTINGS)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,7 @@ import "./LeftTab"
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
property alias currentTab: profileMenu.profileCurrentIndex
|
property alias currentTab: profileMenu.profileCurrentIndex
|
||||||
|
property alias changeProfileSection: profileMenu.changeProfileSection
|
||||||
|
|
||||||
id: profileInfoContainer
|
id: profileInfoContainer
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,9 @@ ScrollView {
|
||||||
property int profileCurrentIndex: ProfileConstants.PROFILE
|
property int profileCurrentIndex: ProfileConstants.PROFILE
|
||||||
readonly property int btnheight: 42
|
readonly property int btnheight: 42
|
||||||
readonly property int w: 340
|
readonly property int w: 340
|
||||||
|
property var changeProfileSection: function (sectionId) {
|
||||||
|
profileCurrentIndex = sectionId
|
||||||
|
}
|
||||||
|
|
||||||
id: profileMenu
|
id: profileMenu
|
||||||
|
|
||||||
|
|
|
@ -8,9 +8,10 @@ var LANGUAGE = 6
|
||||||
var NOTIFICATIONS = 7
|
var NOTIFICATIONS = 7
|
||||||
var SYNC_SETTINGS = 8
|
var SYNC_SETTINGS = 8
|
||||||
var DEVICES_SETTINGS = 9
|
var DEVICES_SETTINGS = 9
|
||||||
var ADVANCED = 10
|
var BROWSER_SETTINGS = 10
|
||||||
var NEED_HELP = 11
|
var ADVANCED = 11
|
||||||
var ABOUT = 12
|
var NEED_HELP = 12
|
||||||
|
var ABOUT = 13
|
||||||
|
|
||||||
var menuButtons = [{
|
var menuButtons = [{
|
||||||
"id": PROFILE,
|
"id": PROFILE,
|
||||||
|
@ -52,7 +53,11 @@ var menuButtons = [{
|
||||||
"id": DEVICES_SETTINGS,
|
"id": DEVICES_SETTINGS,
|
||||||
"text": qsTr("Devices settings"),
|
"text": qsTr("Devices settings"),
|
||||||
"filename": "sync.svg"
|
"filename": "sync.svg"
|
||||||
}, {
|
}, {
|
||||||
|
"id": BROWSER_SETTINGS,
|
||||||
|
"text": qsTr("Browser settings"),
|
||||||
|
"filename": "../compassActive.svg"
|
||||||
|
}, {
|
||||||
"id": ADVANCED,
|
"id": ADVANCED,
|
||||||
"text": qsTr("Advanced"),
|
"text": qsTr("Advanced"),
|
||||||
"filename": "advanced.svg"
|
"filename": "advanced.svg"
|
||||||
|
|
|
@ -7,6 +7,7 @@ import "./Sections"
|
||||||
|
|
||||||
SplitView {
|
SplitView {
|
||||||
property int contentMargin: 120
|
property int contentMargin: 120
|
||||||
|
property alias changeProfileSection: leftTab.changeProfileSection
|
||||||
|
|
||||||
id: profileView
|
id: profileView
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
|
@ -77,6 +78,8 @@ SplitView {
|
||||||
|
|
||||||
DevicesContainer {}
|
DevicesContainer {}
|
||||||
|
|
||||||
|
BrowserContainer {}
|
||||||
|
|
||||||
AdvancedContainer {}
|
AdvancedContainer {}
|
||||||
|
|
||||||
HelpContainer {}
|
HelpContainer {}
|
||||||
|
|
|
@ -6,8 +6,6 @@ import "../../../../shared"
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: aboutContainer
|
id: aboutContainer
|
||||||
width: 200
|
|
||||||
height: 200
|
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,6 @@ import "../../../../shared/status"
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: advancedContainer
|
id: advancedContainer
|
||||||
width: 200
|
|
||||||
height: 200
|
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
import QtQuick 2.13
|
||||||
|
import QtQuick.Controls 2.13
|
||||||
|
import QtQuick.Layouts 1.13
|
||||||
|
import "../../../../imports"
|
||||||
|
import "../../../../shared"
|
||||||
|
import "../../../../shared/status"
|
||||||
|
|
||||||
|
Item {
|
||||||
|
id: root
|
||||||
|
Layout.fillHeight: true
|
||||||
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
StyledText {
|
||||||
|
id: titl
|
||||||
|
text: qsTr("Browser Settings")
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: 24
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.topMargin: 24
|
||||||
|
font.weight: Font.Bold
|
||||||
|
font.pixelSize: 20
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO add browser settings here
|
||||||
|
}
|
||||||
|
|
||||||
|
/*##^##
|
||||||
|
Designer {
|
||||||
|
D{i:0;height:400;width:700}
|
||||||
|
}
|
||||||
|
##^##*/
|
|
@ -24,6 +24,22 @@ RowLayout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function changeAppSection(section) {
|
||||||
|
let sectionId = -1
|
||||||
|
switch (section) {
|
||||||
|
case Constants.chat: sectionId = 0; break;
|
||||||
|
case Constants.wallet: sectionId = 1; break;
|
||||||
|
case Constants.browser: sectionId = 2; break;
|
||||||
|
case Constants.profile: sectionId = 3; break;
|
||||||
|
case Constants.node: sectionId = 4; break;
|
||||||
|
case Constants.ui: sectionId = 5; break;
|
||||||
|
}
|
||||||
|
if (sectionId === -1) {
|
||||||
|
throw new Exception ("Unknown section name. Check the Constants to know the available ones")
|
||||||
|
}
|
||||||
|
tabBar.setCurrentIndex(sectionId)
|
||||||
|
}
|
||||||
|
|
||||||
TabBar {
|
TabBar {
|
||||||
id: tabBar
|
id: tabBar
|
||||||
width: 78
|
width: 78
|
||||||
|
|
|
@ -15,6 +15,13 @@ QtObject {
|
||||||
readonly property int limitLongChatText: 500
|
readonly property int limitLongChatText: 500
|
||||||
readonly property int limitLongChatTextCompactMode: 1000
|
readonly property int limitLongChatTextCompactMode: 1000
|
||||||
|
|
||||||
|
readonly property string chat: "chat"
|
||||||
|
readonly property string wallet: "wallet"
|
||||||
|
readonly property string browser: "browser"
|
||||||
|
readonly property string profile: "profile"
|
||||||
|
readonly property string node: "node"
|
||||||
|
readonly property string ui: "ui"
|
||||||
|
|
||||||
readonly property int notifyAllMessages: 0
|
readonly property int notifyAllMessages: 0
|
||||||
readonly property int notifyJustMentions: 1
|
readonly property int notifyJustMentions: 1
|
||||||
readonly property int notifyNone: 2
|
readonly property int notifyNone: 2
|
||||||
|
|
|
@ -174,6 +174,7 @@ DISTFILES += \
|
||||||
app/AppLayouts/Chat/data/EmojiReactions.qml \
|
app/AppLayouts/Chat/data/EmojiReactions.qml \
|
||||||
app/AppLayouts/Profile/Sections/AppearanceContainer.qml \
|
app/AppLayouts/Profile/Sections/AppearanceContainer.qml \
|
||||||
app/AppLayouts/Profile/Sections/BackupSeedModal.qml \
|
app/AppLayouts/Profile/Sections/BackupSeedModal.qml \
|
||||||
|
app/AppLayouts/Profile/Sections/BrowserContainer.qml \
|
||||||
app/AppLayouts/Profile/Sections/MyProfileContainer.qml \
|
app/AppLayouts/Profile/Sections/MyProfileContainer.qml \
|
||||||
app/AppLayouts/Profile/Sections/SoundsContainer.qml \
|
app/AppLayouts/Profile/Sections/SoundsContainer.qml \
|
||||||
app/AppLayouts/UIComponents/UIComponents.qml \
|
app/AppLayouts/UIComponents/UIComponents.qml \
|
||||||
|
|
Loading…
Reference in New Issue