status-desktop/ui/app/AppLayouts/Chat/components/StickerPackDetails.qml
emizzle ac7deb3af0 feat: Un/install free sticker packs in sticker market
Sticker pack details retreived from contract:
 - pack data decoded from contract response
 - data contains contentHash which, once decoded, contains an IPFS identifier
 - futher pack data in EDN format is downloaded from IPFS
 - the EDN info is decoded in to a StickerPack

List of available packs from contract are obtained separately from list of installed contracts (stored as a setting in Status-go).

Sticker market contains dynamic list of sticker packs. The sticker button shown for each pack has all states defined (in the design) for all UI states (ie bought, free, installed, pending, etc)

Add modal popup showing sticker pack details and list of stickers to be un/installed. Contains a "larger" version of the sticker pack button with many differnt UI states defined.

Uninstallation of a sticker pack removes those sticker pack's stickers from the recent sticker list and persists the list

Simplify the view model by including stickers, instead of setting an "activeStickerPackId" property. This allowed for display of sticker pack stickers to be displayed in the modal popup separately from the sticker packs shown in the market.
2020-07-15 15:53:48 -04:00

47 lines
1.3 KiB
QML

import QtQuick 2.13
import QtQuick.Controls 2.13
import QtQuick.Layouts 1.3
import "../../../../imports"
import "../../../../shared"
Item {
id: root
default property alias content: rest.children
property string packThumb: "QmfZrHmLR5VvkXSDbArDR3TX6j4FgpDcrvNz2fHSJk1VvG"
property string packName: "Status Cat"
property string packAuthor: "cryptoworld1373"
property int packNameFontSize: 15
property int spacing: Style.current.padding
RoundedImage {
id: imgThumb
anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter
width: 40
height: 40
source: "https://ipfs.infura.io/ipfs/" + packThumb
}
Column {
anchors.left: imgThumb.right
anchors.leftMargin: root.spacing
anchors.verticalCenter: parent.verticalCenter
Text {
id: txtPackName
text: packName
color: Style.current.black
font.family: Style.current.fontBold.name
font.weight: Font.Bold
font.pixelSize: packNameFontSize
}
Text {
color: Style.current.darkGrey
text: packAuthor
font.family: Style.current.fontRegular.name
font.pixelSize: 15
}
}
Item {
anchors.right: parent.right
id: rest
}
}