2022-10-13 20:56:25 +00:00
|
|
|
import QtQuick 2.14
|
|
|
|
import QtQuick.Controls 2.14
|
|
|
|
import QtQuick.Layouts 1.14
|
|
|
|
|
2024-05-22 08:13:39 +00:00
|
|
|
import AppLayouts.stores 1.0 as AppLayoutStores
|
2022-10-13 20:56:25 +00:00
|
|
|
import AppLayouts.Profile.views 1.0
|
|
|
|
import AppLayouts.Profile.stores 1.0
|
|
|
|
|
|
|
|
import Storybook 1.0
|
|
|
|
|
|
|
|
import utils 1.0
|
2024-04-29 12:02:19 +00:00
|
|
|
import mainui 1.0
|
2022-10-13 20:56:25 +00:00
|
|
|
|
2024-05-22 08:13:39 +00:00
|
|
|
import shared.stores 1.0
|
|
|
|
|
2022-10-13 20:56:25 +00:00
|
|
|
SplitView {
|
2024-04-29 12:02:19 +00:00
|
|
|
id: root
|
|
|
|
|
2022-10-13 20:56:25 +00:00
|
|
|
Logs { id: logs }
|
|
|
|
|
2024-04-29 12:02:19 +00:00
|
|
|
Popups {
|
|
|
|
popupParent: root
|
2024-05-22 08:13:39 +00:00
|
|
|
rootStore: AppLayoutStores.RootStore {}
|
|
|
|
communityTokensStore: CommunityTokensStore {}
|
2024-04-29 12:02:19 +00:00
|
|
|
}
|
|
|
|
|
2022-10-13 20:56:25 +00:00
|
|
|
SplitView {
|
|
|
|
orientation: Qt.Vertical
|
|
|
|
SplitView.fillWidth: true
|
|
|
|
|
|
|
|
LanguageView {
|
|
|
|
SplitView.fillWidth: true
|
|
|
|
SplitView.fillHeight: true
|
2024-04-29 12:02:19 +00:00
|
|
|
contentWidth: parent.width - 150
|
2022-10-13 20:56:25 +00:00
|
|
|
|
2024-04-29 12:02:19 +00:00
|
|
|
languageSelectionEnabled: ctrlLanguageSelectionEnabled.checked
|
2022-10-13 20:56:25 +00:00
|
|
|
languageStore: LanguageStore {
|
2022-11-10 14:28:53 +00:00
|
|
|
property string currentLanguage: "en"
|
2022-10-13 20:56:25 +00:00
|
|
|
|
|
|
|
readonly property ListModel languageModel: ListModel {
|
|
|
|
ListElement {
|
|
|
|
locale: "ar"
|
|
|
|
name: "Arabic"
|
|
|
|
shortName: "العربية"
|
|
|
|
flag: "🇸🇦"
|
|
|
|
state: 0
|
2022-11-10 14:28:53 +00:00
|
|
|
selected: false
|
2022-10-13 20:56:25 +00:00
|
|
|
}
|
|
|
|
ListElement {
|
|
|
|
locale: "en"
|
|
|
|
name: "English"
|
|
|
|
shortName: "English"
|
|
|
|
flag: "🏴"
|
|
|
|
state: 2
|
2022-11-10 14:28:53 +00:00
|
|
|
selected: true
|
2022-10-13 20:56:25 +00:00
|
|
|
}
|
2024-04-29 12:02:19 +00:00
|
|
|
ListElement {
|
|
|
|
locale: "cs_CZ"
|
|
|
|
name: "Czech"
|
|
|
|
shortName: "čeština"
|
|
|
|
flag: "🇨🇿"
|
|
|
|
state: 1
|
|
|
|
selected: false
|
|
|
|
}
|
2022-10-13 20:56:25 +00:00
|
|
|
}
|
|
|
|
|
2022-11-10 14:28:53 +00:00
|
|
|
function changeLanguage(language) {
|
|
|
|
logs.logEvent("languageStore::changeLanguage", ["language"], arguments)
|
|
|
|
currentLanguage = language
|
2022-10-13 20:56:25 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-05-22 08:13:39 +00:00
|
|
|
currencyStore: CurrenciesStore {
|
2023-01-17 20:05:21 +00:00
|
|
|
property string currentCurrency: "USD"
|
2022-10-13 20:56:25 +00:00
|
|
|
|
|
|
|
function updateCurrency(currencyKey) {
|
|
|
|
logs.logEvent("currencyStore::updateCurrency", ["currencyKey"], arguments)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
LogsAndControlsPanel {
|
|
|
|
id: logsAndControlsPanel
|
|
|
|
|
|
|
|
SplitView.minimumHeight: 100
|
|
|
|
SplitView.preferredHeight: 200
|
|
|
|
|
|
|
|
logsView.logText: logs.logText
|
|
|
|
|
2024-04-29 12:02:19 +00:00
|
|
|
Switch {
|
|
|
|
id: ctrlLanguageSelectionEnabled
|
|
|
|
text: "Language selection enabled"
|
|
|
|
}
|
|
|
|
}
|
2022-10-13 20:56:25 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-31 12:21:14 +00:00
|
|
|
// category: Components
|
2023-10-03 11:56:30 +00:00
|
|
|
|
|
|
|
// https://www.figma.com/file/idUoxN7OIW2Jpp3PMJ1Rl8/%E2%9A%99%EF%B8%8F-Settings-%7C-Desktop?node-id=701%3A74776
|
|
|
|
// https://www.figma.com/file/idUoxN7OIW2Jpp3PMJ1Rl8/%E2%9A%99%EF%B8%8F-Settings-%7C-Desktop?node-id=1592%3A112840
|
|
|
|
// https://www.figma.com/file/idUoxN7OIW2Jpp3PMJ1Rl8/%E2%9A%99%EF%B8%8F-Settings-%7C-Desktop?node-id=701%3A75345
|