fix(storybook): fix broken pages
It was mostly some missing or non-existing properties or the component got moved somewhere else Fixes #12285
This commit is contained in:
parent
7bdec15353
commit
7171094f01
|
@ -32,7 +32,7 @@ SplitView {
|
||||||
|
|
||||||
QtObject {
|
QtObject {
|
||||||
id: d
|
id: d
|
||||||
property var recipeintModel: RecipientModel {}
|
property var recipientModel: RecipientModel {}
|
||||||
|
|
||||||
property var store: QtObject {
|
property var store: QtObject {
|
||||||
property var overview: ({
|
property var overview: ({
|
||||||
|
@ -49,7 +49,6 @@ SplitView {
|
||||||
stripTrailingZeroes: false}),
|
stripTrailingZeroes: false}),
|
||||||
isAllAccounts: false,
|
isAllAccounts: false,
|
||||||
includeWatchOnly: false
|
includeWatchOnly: false
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
function getNameForAddress(address) {
|
function getNameForAddress(address) {
|
||||||
|
@ -82,7 +81,7 @@ SplitView {
|
||||||
id: actvityStore
|
id: actvityStore
|
||||||
tokensList: WalletAssetsModel {}
|
tokensList: WalletAssetsModel {}
|
||||||
collectiblesList: CollectiblesModel {}
|
collectiblesList: CollectiblesModel {}
|
||||||
savedAddressesModel: d.recipeintModel.savedAddresses
|
savedAddressesModel: d.recipientModel.savedAddresses
|
||||||
activityController: d.activityController
|
activityController: d.activityController
|
||||||
areTestNetworksEnabled: false
|
areTestNetworksEnabled: false
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ import StatusQ.Popups 0.1
|
||||||
|
|
||||||
import utils 1.0
|
import utils 1.0
|
||||||
|
|
||||||
import AppLayouts.Wallet.addaccount.panels 1.0
|
import shared.popups.addaccount.panels 1.0
|
||||||
|
|
||||||
SplitView {
|
SplitView {
|
||||||
Pane {
|
Pane {
|
||||||
|
@ -23,11 +23,6 @@ SplitView {
|
||||||
DerivationPathInput {
|
DerivationPathInput {
|
||||||
id: testControl
|
id: testControl
|
||||||
|
|
||||||
initialDerivationPath: initialBasePath + (initialBasePath.split("'").length > 4 ? "/0" : "/0'")
|
|
||||||
initialBasePath: stdBaseListView.currentIndex >= 0
|
|
||||||
? standardBasePathModel.get(stdBaseListView.currentIndex).derivationPath
|
|
||||||
: "m/44'/60'/0'/0"
|
|
||||||
|
|
||||||
levelsLimit: levelsLimitSpinBox.value
|
levelsLimit: levelsLimitSpinBox.value
|
||||||
|
|
||||||
onEditingFinished: { lastEvent.text = "Editing finished" }
|
onEditingFinished: { lastEvent.text = "Editing finished" }
|
||||||
|
|
|
@ -30,8 +30,6 @@ SplitView {
|
||||||
isAssetView: isAssetBox.checked
|
isAssetView: isAssetBox.checked
|
||||||
layer1Networks: NetworksModel.layer1Networks
|
layer1Networks: NetworksModel.layer1Networks
|
||||||
layer2Networks: NetworksModel.layer2Networks
|
layer2Networks: NetworksModel.layer2Networks
|
||||||
enabledNetworks: NetworksModel.enabledNetworks
|
|
||||||
allNetworks: enabledNetworks
|
|
||||||
accounts: WalletAccountsModel {}
|
accounts: WalletAccountsModel {}
|
||||||
tokensModel: MintedTokensModel {}
|
tokensModel: MintedTokensModel {}
|
||||||
tokensModelWallet: ListModel {
|
tokensModelWallet: ListModel {
|
||||||
|
|
|
@ -44,19 +44,20 @@ SplitView {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
spacing: 100
|
spacing: 100
|
||||||
StatusTxProgressBar {
|
StatusTxProgressBar {
|
||||||
|
id: progressBar
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
width: 500
|
width: 500
|
||||||
error: failureCheckBox.checked
|
error: failureCheckBox.checked
|
||||||
isLayer1: mainnetCheckbox.checked
|
networkLayer: mainnetCheckbox.checked ? 1 : 2
|
||||||
confirmations: confirmationsSlider.value
|
confirmations: confirmationsSlider.value
|
||||||
duration: durationSlider.to
|
duration: durationSlider.to
|
||||||
progress: durationSlider.value
|
progress: durationSlider.value
|
||||||
chainName: isLayer1 ? "Mainnet" :"Optimism"
|
chainName: isLayer1 ? "Mainnet" : "Optimism"
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
width: root.width
|
width: root.width
|
||||||
height: 400
|
height: 200
|
||||||
border.width: 2
|
border.width: 2
|
||||||
WalletTxProgressBlock {
|
WalletTxProgressBlock {
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
@ -64,10 +65,12 @@ SplitView {
|
||||||
anchors.topMargin: 20
|
anchors.topMargin: 20
|
||||||
width: 500
|
width: 500
|
||||||
error: failureCheckBox.checked
|
error: failureCheckBox.checked
|
||||||
isLayer1: mainnetCheckbox.checked
|
inNetworkConfirmations: confirmationsSlider.value
|
||||||
confirmations: confirmationsSlider.value
|
outNetworkConfirmations: confirmationsSlider.value
|
||||||
chainName: isLayer1 ? "Mainnet" :"Optimism"
|
inChainName: progressBar.isLayer1 ? "Mainnet" : "Optimism"
|
||||||
timeStamp: 1670419848
|
outChainName: inChainName
|
||||||
|
inNetworkTimestamp: 1670419847
|
||||||
|
outNetworkTimestamp: 1670419848
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -77,7 +80,7 @@ SplitView {
|
||||||
id: logsAndControlsPanel
|
id: logsAndControlsPanel
|
||||||
|
|
||||||
SplitView.minimumHeight: 100
|
SplitView.minimumHeight: 100
|
||||||
SplitView.preferredHeight: 200
|
SplitView.preferredHeight: 250
|
||||||
|
|
||||||
logsView.logText: logs.logText
|
logsView.logText: logs.logText
|
||||||
Column {
|
Column {
|
||||||
|
@ -89,7 +92,6 @@ SplitView {
|
||||||
CheckBox {
|
CheckBox {
|
||||||
id: failureCheckBox
|
id: failureCheckBox
|
||||||
text: "Failed"
|
text: "Failed"
|
||||||
checked: false
|
|
||||||
}
|
}
|
||||||
Slider {
|
Slider {
|
||||||
id: confirmationsSlider
|
id: confirmationsSlider
|
||||||
|
@ -104,9 +106,9 @@ SplitView {
|
||||||
text: "Confirmations = " + confirmationsSlider.value
|
text: "Confirmations = " + confirmationsSlider.value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
StatusInput {
|
TextField {
|
||||||
id: duration
|
id: duration
|
||||||
label: "Duration for finalisation"
|
placeholderText: "Duration for finalisation"
|
||||||
text: "7"
|
text: "7"
|
||||||
visible: !mainnetCheckbox.checked && !failureCheckBox.checked
|
visible: !mainnetCheckbox.checked && !failureCheckBox.checked
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@ import QtQuick.Controls 2.15
|
||||||
import Models 1.0
|
import Models 1.0
|
||||||
import Storybook 1.0
|
import Storybook 1.0
|
||||||
|
|
||||||
import shared.views 1.0
|
import shared.popups.send.views 1.0
|
||||||
|
|
||||||
SplitView {
|
SplitView {
|
||||||
orientation: Qt.Vertical
|
orientation: Qt.Vertical
|
||||||
|
|
|
@ -12,20 +12,29 @@ SplitView {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
readonly property QtObject mockupModelData: QtObject {
|
readonly property QtObject mockupModelData: QtObject {
|
||||||
property int timestamp: Date.now() / 1000
|
readonly property int timestamp: Date.now() / 1000
|
||||||
property int txType: ctrlType.currentValue
|
readonly property int status: ctrlStatus.currentValue
|
||||||
property string from: "0xfB8131c260749c7835a08ccBdb64728De432858E"
|
readonly property double amount: 123.45
|
||||||
property string to: "0x3fb81384583b3910BB14Cc72582E8e8a56E83ae9"
|
readonly property double inAmount: amount
|
||||||
property bool isNFT: false
|
readonly property double outAmount: amount
|
||||||
property string tokenID: "4981676894159712808201908443964193325271219637660871887967796332739046670337"
|
readonly property string symbol: "SNT"
|
||||||
property string nftName: "Happy Meow"
|
readonly property string inSymbol: symbol
|
||||||
property string nftImageUrl: Style.png("collectibles/HappyMeow")
|
readonly property string outSymbol: symbol
|
||||||
}
|
readonly property bool isMultiTransaction: ctrlMultiTrans.checked
|
||||||
|
|
||||||
readonly property QtObject mockupStore: QtObject {
|
readonly property int txType: ctrlType.currentValue
|
||||||
function formatCurrencyAmount(cryptoValue, symbol) {
|
readonly property string sender: "0xfB8131c260749c7835a08ccBdb64728De432858E"
|
||||||
return "%1 %2".arg(cryptoValue).arg(symbol)
|
readonly property string recipient: "0x3fb81384583b3910BB14Cc72582E8e8a56E83ae9"
|
||||||
}
|
readonly property bool isNFT: ctrlIsNft.checked
|
||||||
|
readonly property string tokenID: "4981676894159712808201908443964193325271219637660871887967796332739046670337"
|
||||||
|
readonly property string tokenAddress: "0xdeadbeef"
|
||||||
|
readonly property string tokenInAddress: "0xdeadbeef-00"
|
||||||
|
readonly property string tokenOutAddress: "0xdeadbeef-00"
|
||||||
|
readonly property string nftName: "Happy Meow NFT"
|
||||||
|
readonly property string nftImageUrl: Style.png("collectibles/HappyMeow")
|
||||||
|
readonly property string chainId: "NETWORKID"
|
||||||
|
readonly property string chainIdIn: "NETWORKID-IN"
|
||||||
|
readonly property string chainIdOut: "NETWORKID-OUT"
|
||||||
}
|
}
|
||||||
|
|
||||||
SplitView {
|
SplitView {
|
||||||
|
@ -52,20 +61,30 @@ SplitView {
|
||||||
id: delegate
|
id: delegate
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
modelData: root.mockupModelData
|
modelData: root.mockupModelData
|
||||||
swapCryptoValue: 0.18
|
rootStore: QtObject {
|
||||||
swapFiatValue: 340
|
readonly property string currentCurrency: "EUR"
|
||||||
swapSymbol: "SNT"
|
|
||||||
timeStampText: LocaleUtils.formatRelativeTimestamp(modelData.timestamp * 1000)
|
function getFiatValue(cryptoValue, symbol, currentCurrency) {
|
||||||
cryptoValue: 0.1234
|
return cryptoValue * 0.1;
|
||||||
fiatValue: 123123
|
}
|
||||||
currentCurrency: "USD"
|
|
||||||
networkName: "Optimism"
|
function formatCurrencyAmount(cryptoValue, symbol) {
|
||||||
symbol: "ETH"
|
return "%L1 %2".arg(cryptoValue).arg(symbol)
|
||||||
bridgeNetworkName: "Mainnet"
|
}
|
||||||
feeFiatValue: 10.34
|
|
||||||
feeCryptoValue: 0.013
|
function getNetworkFullName(chainId) {
|
||||||
transactionStatus: ctrlStatus.currentValue
|
return chainId
|
||||||
rootStore: root.mockupStore
|
}
|
||||||
|
|
||||||
|
function getNetworkColor(chainId) {
|
||||||
|
return "pink"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
walletRootStore: QtObject {
|
||||||
|
function getNameForAddress(address) {
|
||||||
|
return "NAMEFOR: %1".arg(address)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -96,9 +115,8 @@ SplitView {
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckBox {
|
CheckBox {
|
||||||
|
id: ctrlIsNft
|
||||||
text: "Is NFT"
|
text: "Is NFT"
|
||||||
checked: delegate.isNFT
|
|
||||||
onToggled: root.mockupModelData.isNFT = checked
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
|
@ -113,13 +131,15 @@ SplitView {
|
||||||
textRole: "name"
|
textRole: "name"
|
||||||
valueRole: "type"
|
valueRole: "type"
|
||||||
model: ListModel {
|
model: ListModel {
|
||||||
ListElement { name: "Sent"; type: Constants.TransactionType.Send }
|
ListElement { name: "Send"; type: Constants.TransactionType.Send }
|
||||||
ListElement { name: "Receive"; type: Constants.TransactionType.Receive }
|
ListElement { name: "Receive"; type: Constants.TransactionType.Receive }
|
||||||
ListElement { name: "Buy"; type: Constants.TransactionType.Buy }
|
ListElement { name: "Buy"; type: Constants.TransactionType.Buy }
|
||||||
ListElement { name: "Sell"; type: Constants.TransactionType.Sell }
|
|
||||||
ListElement { name: "Destroy"; type: Constants.TransactionType.Destroy }
|
|
||||||
ListElement { name: "Swap"; type: Constants.TransactionType.Swap }
|
ListElement { name: "Swap"; type: Constants.TransactionType.Swap }
|
||||||
ListElement { name: "Bridge"; type: Constants.TransactionType.Bridge }
|
ListElement { name: "Bridge"; type: Constants.TransactionType.Bridge }
|
||||||
|
ListElement { name: "ContractDeployment"; type: Constants.TransactionType.ContractDeployment }
|
||||||
|
ListElement { name: "Mint"; type: Constants.TransactionType.Mint }
|
||||||
|
ListElement { name: "Sell"; type: Constants.TransactionType.Sell }
|
||||||
|
ListElement { name: "Destroy"; type: Constants.TransactionType.Destroy }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -138,9 +158,14 @@ SplitView {
|
||||||
ListElement { name: "Failed"; status: Constants.TransactionStatus.Failed }
|
ListElement { name: "Failed"; status: Constants.TransactionStatus.Failed }
|
||||||
ListElement { name: "Pending"; status: Constants.TransactionStatus.Pending }
|
ListElement { name: "Pending"; status: Constants.TransactionStatus.Pending }
|
||||||
ListElement { name: "Complete"; status: Constants.TransactionStatus.Complete }
|
ListElement { name: "Complete"; status: Constants.TransactionStatus.Complete }
|
||||||
ListElement { name: "Finished"; status: Constants.TransactionStatus.Finished }
|
ListElement { name: "Finalised"; status: Constants.TransactionStatus.Finalised }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Switch {
|
||||||
|
id: ctrlMultiTrans
|
||||||
|
text: "Multi transaction"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
bool errorsFound = false;
|
bool errorsFound = false;
|
||||||
|
|
||||||
for (auto& fileInfo : files) {
|
for (const auto& fileInfo : files) {
|
||||||
auto fileName = fileInfo.fileName();
|
auto fileName = fileInfo.fileName();
|
||||||
qDebug() << fileName;
|
qDebug() << fileName;
|
||||||
|
|
||||||
|
|
|
@ -233,7 +233,7 @@ QtObject {
|
||||||
return walletSectionSavedAddresses.getEnsForAddress(address)
|
return walletSectionSavedAddresses.getEnsForAddress(address)
|
||||||
}
|
}
|
||||||
|
|
||||||
readonly property var savedAddressesModel: walletSectionSavedAddresses.model
|
property var savedAddressesModel: walletSectionSavedAddresses.model
|
||||||
property bool areTestNetworksEnabled: networksModule.areTestNetworksEnabled
|
property bool areTestNetworksEnabled: networksModule.areTestNetworksEnabled
|
||||||
property var savedAddressList: SortFilterProxyModel {
|
property var savedAddressList: SortFilterProxyModel {
|
||||||
sourceModel: savedAddressesModel
|
sourceModel: savedAddressesModel
|
||||||
|
|
|
@ -621,7 +621,7 @@ StatusListItem {
|
||||||
}
|
}
|
||||||
StatusRoundIcon {
|
StatusRoundIcon {
|
||||||
id: secondTokenImage
|
id: secondTokenImage
|
||||||
visible: root.isModelDataValid && !root.isNFT && !!root.inTokenImage &&modelData.txType === Constants.TransactionType.Swap
|
visible: root.isModelDataValid && !root.isNFT && !!root.inTokenImage && modelData.txType === Constants.TransactionType.Swap
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
asset: StatusAssetSettings {
|
asset: StatusAssetSettings {
|
||||||
width: root.tokenIconAsset.width
|
width: root.tokenIconAsset.width
|
||||||
|
|
Loading…
Reference in New Issue