Skip to content

Commit

Permalink
chore: fix storybook regressions
Browse files Browse the repository at this point in the history
  • Loading branch information
caybro committed Nov 14, 2022
1 parent c0e9c28 commit 77fa884
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 16 deletions.
1 change: 0 additions & 1 deletion storybook/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ int main(int argc, char *argv[])
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
#endif
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts);
QtWebEngine::initialize();
QGuiApplication app(argc, argv);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ Item {
{colorId: 19, segmentLength: 2}])
}

function isCompressedPubKey() {
return true
}

Component.onCompleted: {
Utils.globalUtilsInst = this
globalUtilsReady = true
Expand Down
19 changes: 12 additions & 7 deletions storybook/pages/LanguageCurrencySettingsPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ SplitView {
contentWidth: parent.width

languageStore: LanguageStore {
readonly property string currentLanguage: "en"
property string currentLanguage: "en"
readonly property bool isDDMMYYDateFormat: true
readonly property bool is24hTimeFormat: true

readonly property ListModel languageModel: ListModel {
ListElement {
Expand All @@ -31,18 +33,21 @@ SplitView {
shortName: "العربية"
flag: "🇸🇦"
state: 0
selected: false
}
ListElement {
locale: "en"
name: "English"
shortName: "English"
flag: "🏴󠁧󠁢󠁥󠁮󠁧󠁿"
state: 2
selected: true
}
}

function changeLanguage(locale) {
logs.logEvent("languageStore::changeLanguage", ["locale"], arguments)
function changeLanguage(language) {
logs.logEvent("languageStore::changeLanguage", ["language"], arguments)
currentLanguage = language
}

function setIsDDMMYYDateFormat(isDDMMYYDateFormat) {
Expand All @@ -56,7 +61,7 @@ SplitView {

currencyStore: QtObject {
property string currentCurrency: "usd"
property string currentCurrencySymbol: "usd"
property string currentCurrencySymbol: "$"

readonly property ListModel currenciesModel: ListModel {
ListElement {
Expand All @@ -65,8 +70,8 @@ SplitView {
name: "US Dollars"
symbol: "$"
category: ""
imageSource: "../../../../imports/shared/assets/twemoji/svg/1f1fa-1f1f8.svg"
selected: false
imageSource: "../../assets/twemoji/svg/1f1fa-1f1f8.svg"
selected: true
}

ListElement {
Expand All @@ -75,7 +80,7 @@ SplitView {
name: "British Pound"
symbol: "£"
category: ""
imageSource: "../../../../imports/shared/assets/twemoji/svg/1f1ec-1f1e7.svg"
imageSource: "../../assets/twemoji/svg/1f1ec-1f1e7.svg"
selected: false
}
}
Expand Down
12 changes: 10 additions & 2 deletions storybook/pages/LoginViewPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ SplitView {
readonly property string stateType: Constants.startupState.welcome
}

function setPassword() {
function setPassword(password) {
logs.logEvent("StartupStore::setPassword", ["password"], arguments)
}

Expand All @@ -75,7 +75,15 @@ SplitView {
logs.logEvent("StartupStore::doTertiaryAction")
}

function setSelectedLoginAccountByIndex() {
function doQuaternaryAction() {
logs.logEvent("StartupStore::doQuaternaryAction")
}

function doQuinaryAction() {
logs.logEvent("StartupStore::doQuinaryAction")
}

function setSelectedLoginAccountByIndex(index) {
logs.logEvent("StartupStore::setSelectedLoginAccountByIndex", ["index"], arguments)
}
}
Expand Down
4 changes: 2 additions & 2 deletions ui/app/AppLayouts/Profile/stores/LanguageStore.qml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ QtObject {
readonly property bool isDDMMYYDateFormat: localAccountSensitiveSettings.isDDMMYYDateFormat
readonly property bool is24hTimeFormat: localAccountSensitiveSettings.is24hTimeFormat

function changeLanguage(locale) {
root.languageModule.changeLanguage(locale)
function changeLanguage(language) {
root.languageModule.changeLanguage(language)
}

function setIsDDMMYYDateFormat(isDDMMYYDateFormat) {
Expand Down

0 comments on commit 77fa884

Please sign in to comment.