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 {
|
||||
id: d
|
||||
property var recipeintModel: RecipientModel {}
|
||||
property var recipientModel: RecipientModel {}
|
||||
|
||||
property var store: QtObject {
|
||||
property var overview: ({
|
||||
|
@ -49,7 +49,6 @@ SplitView {
|
|||
stripTrailingZeroes: false}),
|
||||
isAllAccounts: false,
|
||||
includeWatchOnly: false
|
||||
|
||||
})
|
||||
|
||||
function getNameForAddress(address) {
|
||||
|
@ -82,7 +81,7 @@ SplitView {
|
|||
id: actvityStore
|
||||
tokensList: WalletAssetsModel {}
|
||||
collectiblesList: CollectiblesModel {}
|
||||
savedAddressesModel: d.recipeintModel.savedAddresses
|
||||
savedAddressesModel: d.recipientModel.savedAddresses
|
||||
activityController: d.activityController
|
||||
areTestNetworksEnabled: false
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ import StatusQ.Popups 0.1
|
|||
|
||||
import utils 1.0
|
||||
|
||||
import AppLayouts.Wallet.addaccount.panels 1.0
|
||||
import shared.popups.addaccount.panels 1.0
|
||||
|
||||
SplitView {
|
||||
Pane {
|
||||
|
@ -23,11 +23,6 @@ SplitView {
|
|||
DerivationPathInput {
|
||||
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
|
||||
|
||||
onEditingFinished: { lastEvent.text = "Editing finished" }
|
||||
|
|
|
@ -30,8 +30,6 @@ SplitView {
|
|||
isAssetView: isAssetBox.checked
|
||||
layer1Networks: NetworksModel.layer1Networks
|
||||
layer2Networks: NetworksModel.layer2Networks
|
||||
enabledNetworks: NetworksModel.enabledNetworks
|
||||
allNetworks: enabledNetworks
|
||||
accounts: WalletAccountsModel {}
|
||||
tokensModel: MintedTokensModel {}
|
||||
tokensModelWallet: ListModel {
|
||||
|
|
|
@ -44,19 +44,20 @@ SplitView {
|
|||
anchors.centerIn: parent
|
||||
spacing: 100
|
||||
StatusTxProgressBar {
|
||||
id: progressBar
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
width: 500
|
||||
error: failureCheckBox.checked
|
||||
isLayer1: mainnetCheckbox.checked
|
||||
networkLayer: mainnetCheckbox.checked ? 1 : 2
|
||||
confirmations: confirmationsSlider.value
|
||||
duration: durationSlider.to
|
||||
progress: durationSlider.value
|
||||
chainName: isLayer1 ? "Mainnet" :"Optimism"
|
||||
chainName: isLayer1 ? "Mainnet" : "Optimism"
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
width: root.width
|
||||
height: 400
|
||||
height: 200
|
||||
border.width: 2
|
||||
WalletTxProgressBlock {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
|
@ -64,10 +65,12 @@ SplitView {
|
|||
anchors.topMargin: 20
|
||||
width: 500
|
||||
error: failureCheckBox.checked
|
||||
isLayer1: mainnetCheckbox.checked
|
||||
confirmations: confirmationsSlider.value
|
||||
chainName: isLayer1 ? "Mainnet" :"Optimism"
|
||||
timeStamp: 1670419848
|
||||
inNetworkConfirmations: confirmationsSlider.value
|
||||
outNetworkConfirmations: confirmationsSlider.value
|
||||
inChainName: progressBar.isLayer1 ? "Mainnet" : "Optimism"
|
||||
outChainName: inChainName
|
||||
inNetworkTimestamp: 1670419847
|
||||
outNetworkTimestamp: 1670419848
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -77,7 +80,7 @@ SplitView {
|
|||
id: logsAndControlsPanel
|
||||
|
||||
SplitView.minimumHeight: 100
|
||||
SplitView.preferredHeight: 200
|
||||
SplitView.preferredHeight: 250
|
||||
|
||||
logsView.logText: logs.logText
|
||||
Column {
|
||||
|
@ -89,7 +92,6 @@ SplitView {
|
|||
CheckBox {
|
||||
id: failureCheckBox
|
||||
text: "Failed"
|
||||
checked: false
|
||||
}
|
||||
Slider {
|
||||
id: confirmationsSlider
|
||||
|
@ -104,9 +106,9 @@ SplitView {
|
|||
text: "Confirmations = " + confirmationsSlider.value
|
||||
}
|
||||
}
|
||||
StatusInput {
|
||||
TextField {
|
||||
id: duration
|
||||
label: "Duration for finalisation"
|
||||
placeholderText: "Duration for finalisation"
|
||||
text: "7"
|
||||
visible: !mainnetCheckbox.checked && !failureCheckBox.checked
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ import QtQuick.Controls 2.15
|
|||
import Models 1.0
|
||||
import Storybook 1.0
|
||||
|
||||
import shared.views 1.0
|
||||
import shared.popups.send.views 1.0
|
||||
|
||||
SplitView {
|
||||
orientation: Qt.Vertical
|
||||
|
|
|
@ -12,20 +12,29 @@ SplitView {
|
|||
id: root
|
||||
|
||||
readonly property QtObject mockupModelData: QtObject {
|
||||
property int timestamp: Date.now() / 1000
|
||||
property int txType: ctrlType.currentValue
|
||||
property string from: "0xfB8131c260749c7835a08ccBdb64728De432858E"
|
||||
property string to: "0x3fb81384583b3910BB14Cc72582E8e8a56E83ae9"
|
||||
property bool isNFT: false
|
||||
property string tokenID: "4981676894159712808201908443964193325271219637660871887967796332739046670337"
|
||||
property string nftName: "Happy Meow"
|
||||
property string nftImageUrl: Style.png("collectibles/HappyMeow")
|
||||
}
|
||||
readonly property int timestamp: Date.now() / 1000
|
||||
readonly property int status: ctrlStatus.currentValue
|
||||
readonly property double amount: 123.45
|
||||
readonly property double inAmount: amount
|
||||
readonly property double outAmount: amount
|
||||
readonly property string symbol: "SNT"
|
||||
readonly property string inSymbol: symbol
|
||||
readonly property string outSymbol: symbol
|
||||
readonly property bool isMultiTransaction: ctrlMultiTrans.checked
|
||||
|
||||
readonly property QtObject mockupStore: QtObject {
|
||||
function formatCurrencyAmount(cryptoValue, symbol) {
|
||||
return "%1 %2".arg(cryptoValue).arg(symbol)
|
||||
}
|
||||
readonly property int txType: ctrlType.currentValue
|
||||
readonly property string sender: "0xfB8131c260749c7835a08ccBdb64728De432858E"
|
||||
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 {
|
||||
|
@ -52,20 +61,30 @@ SplitView {
|
|||
id: delegate
|
||||
Layout.fillWidth: true
|
||||
modelData: root.mockupModelData
|
||||
swapCryptoValue: 0.18
|
||||
swapFiatValue: 340
|
||||
swapSymbol: "SNT"
|
||||
timeStampText: LocaleUtils.formatRelativeTimestamp(modelData.timestamp * 1000)
|
||||
cryptoValue: 0.1234
|
||||
fiatValue: 123123
|
||||
currentCurrency: "USD"
|
||||
networkName: "Optimism"
|
||||
symbol: "ETH"
|
||||
bridgeNetworkName: "Mainnet"
|
||||
feeFiatValue: 10.34
|
||||
feeCryptoValue: 0.013
|
||||
transactionStatus: ctrlStatus.currentValue
|
||||
rootStore: root.mockupStore
|
||||
rootStore: QtObject {
|
||||
readonly property string currentCurrency: "EUR"
|
||||
|
||||
function getFiatValue(cryptoValue, symbol, currentCurrency) {
|
||||
return cryptoValue * 0.1;
|
||||
}
|
||||
|
||||
function formatCurrencyAmount(cryptoValue, symbol) {
|
||||
return "%L1 %2".arg(cryptoValue).arg(symbol)
|
||||
}
|
||||
|
||||
function getNetworkFullName(chainId) {
|
||||
return chainId
|
||||
}
|
||||
|
||||
function getNetworkColor(chainId) {
|
||||
return "pink"
|
||||
}
|
||||
}
|
||||
walletRootStore: QtObject {
|
||||
function getNameForAddress(address) {
|
||||
return "NAMEFOR: %1".arg(address)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -96,9 +115,8 @@ SplitView {
|
|||
}
|
||||
|
||||
CheckBox {
|
||||
id: ctrlIsNft
|
||||
text: "Is NFT"
|
||||
checked: delegate.isNFT
|
||||
onToggled: root.mockupModelData.isNFT = checked
|
||||
}
|
||||
|
||||
Label {
|
||||
|
@ -113,13 +131,15 @@ SplitView {
|
|||
textRole: "name"
|
||||
valueRole: "type"
|
||||
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: "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: "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: "Pending"; status: Constants.TransactionStatus.Pending }
|
||||
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;
|
||||
|
||||
for (auto& fileInfo : files) {
|
||||
for (const auto& fileInfo : files) {
|
||||
auto fileName = fileInfo.fileName();
|
||||
qDebug() << fileName;
|
||||
|
||||
|
|
|
@ -233,7 +233,7 @@ QtObject {
|
|||
return walletSectionSavedAddresses.getEnsForAddress(address)
|
||||
}
|
||||
|
||||
readonly property var savedAddressesModel: walletSectionSavedAddresses.model
|
||||
property var savedAddressesModel: walletSectionSavedAddresses.model
|
||||
property bool areTestNetworksEnabled: networksModule.areTestNetworksEnabled
|
||||
property var savedAddressList: SortFilterProxyModel {
|
||||
sourceModel: savedAddressesModel
|
||||
|
|
|
@ -621,7 +621,7 @@ StatusListItem {
|
|||
}
|
||||
StatusRoundIcon {
|
||||
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
|
||||
asset: StatusAssetSettings {
|
||||
width: root.tokenIconAsset.width
|
||||
|
|
Loading…
Reference in New Issue