2021-12-29 15:09:29 +00:00
|
|
|
import QtQuick 2.13
|
|
|
|
import utils 1.0
|
|
|
|
|
|
|
|
QtObject {
|
|
|
|
id: root
|
|
|
|
|
|
|
|
property var profileModule
|
|
|
|
|
|
|
|
property string pubkey: userProfile.pubKey
|
2022-12-13 09:37:27 +00:00
|
|
|
property string name: userProfile.name
|
2021-12-29 15:09:29 +00:00
|
|
|
property string username: userProfile.username
|
2022-03-02 00:14:20 +00:00
|
|
|
property string displayName: userProfile.displayName
|
2022-12-13 09:37:27 +00:00
|
|
|
property string preferredName: userProfile.preferredName
|
2021-12-29 15:09:29 +00:00
|
|
|
property string profileLargeImage: userProfile.largeImage
|
|
|
|
property string icon: userProfile.icon
|
2022-06-03 10:48:03 +00:00
|
|
|
property bool userDeclinedBackupBanner: localAccountSensitiveSettings.userDeclinedBackupBanner
|
2022-07-04 10:37:06 +00:00
|
|
|
property var privacyStore: profileSectionModule.privacyModule
|
|
|
|
|
2022-08-10 08:34:56 +00:00
|
|
|
readonly property string bio: profileModule.bio
|
|
|
|
readonly property string socialLinksJson: profileModule.socialLinksJson
|
|
|
|
readonly property var socialLinksModel: profileModule.socialLinksModel
|
|
|
|
readonly property var temporarySocialLinksModel: profileModule.temporarySocialLinksModel // for editing purposes
|
|
|
|
readonly property bool socialLinksDirty: profileModule.socialLinksDirty
|
|
|
|
|
2022-06-03 10:48:03 +00:00
|
|
|
onUserDeclinedBackupBannerChanged: {
|
|
|
|
if (userDeclinedBackupBanner !== localAccountSensitiveSettings.userDeclinedBackupBanner) {
|
|
|
|
localAccountSensitiveSettings.userDeclinedBackupBanner = userDeclinedBackupBanner
|
|
|
|
}
|
|
|
|
}
|
2021-12-29 15:09:29 +00:00
|
|
|
|
2022-06-22 12:16:21 +00:00
|
|
|
property var details: Utils.getContactDetailsAsJson(pubkey)
|
|
|
|
|
2021-12-29 15:09:29 +00:00
|
|
|
function uploadImage(source, aX, aY, bX, bY) {
|
|
|
|
return root.profileModule.upload(source, aX, aY, bX, bY)
|
|
|
|
}
|
|
|
|
|
|
|
|
function removeImage() {
|
|
|
|
return root.profileModule.remove()
|
|
|
|
}
|
|
|
|
|
|
|
|
function getQrCodeSource(publicKey) {
|
|
|
|
return globalUtils.qrCode(publicKey)
|
|
|
|
}
|
|
|
|
|
|
|
|
function copyToClipboard(value) {
|
|
|
|
globalUtils.copyToClipboard(value)
|
|
|
|
}
|
2022-03-02 00:14:20 +00:00
|
|
|
|
|
|
|
function setDisplayName(displayName) {
|
|
|
|
root.profileModule.setDisplayName(displayName)
|
|
|
|
}
|
2022-08-10 08:34:56 +00:00
|
|
|
|
|
|
|
function createCustomLink(text, url) {
|
|
|
|
root.profileModule.createCustomLink(text, url)
|
|
|
|
}
|
|
|
|
|
|
|
|
function removeCustomLink(uuid) {
|
|
|
|
root.profileModule.removeCustomLink(uuid)
|
|
|
|
}
|
|
|
|
|
|
|
|
function updateLink(uuid, text, url) {
|
|
|
|
root.profileModule.updateLink(uuid, text, url)
|
|
|
|
}
|
|
|
|
|
|
|
|
function resetSocialLinks() {
|
|
|
|
root.profileModule.resetSocialLinks()
|
|
|
|
}
|
|
|
|
|
|
|
|
function saveSocialLinks() {
|
|
|
|
root.profileModule.saveSocialLinks()
|
|
|
|
}
|
|
|
|
|
|
|
|
function setBio(bio) {
|
|
|
|
root.profileModule.setBio(bio)
|
|
|
|
}
|
2021-12-29 15:09:29 +00:00
|
|
|
}
|