2022-08-10 08:27:45 +00:00
|
|
|
import QtQuick 2.14
|
|
|
|
|
|
|
|
import utils 1.0
|
|
|
|
|
|
|
|
import StatusQ.Core 0.1
|
|
|
|
import StatusQ.Controls 0.1
|
|
|
|
|
|
|
|
StatusInput {
|
|
|
|
id: root
|
|
|
|
|
|
|
|
property int linkType
|
|
|
|
|
2022-08-16 17:22:19 +00:00
|
|
|
leftPadding: 18 // by design
|
|
|
|
|
2022-08-10 08:27:45 +00:00
|
|
|
placeholderText: {
|
|
|
|
if (linkType === Constants.socialLinkType.twitter) return qsTr("Twitter Handle")
|
|
|
|
if (linkType === Constants.socialLinkType.personalSite) return qsTr("Personal Site")
|
|
|
|
if (linkType === Constants.socialLinkType.github) return qsTr("Github")
|
|
|
|
if (linkType === Constants.socialLinkType.youtube) return qsTr("YouTube Channel")
|
|
|
|
if (linkType === Constants.socialLinkType.discord) return qsTr("Discord Handle")
|
|
|
|
if (linkType === Constants.socialLinkType.telegram) return qsTr("Telegram Handle")
|
|
|
|
return ""
|
|
|
|
}
|
2022-08-11 11:55:08 +00:00
|
|
|
input.asset {
|
2022-08-10 08:27:45 +00:00
|
|
|
name: {
|
|
|
|
if (linkType === Constants.socialLinkType.twitter) return "twitter"
|
|
|
|
if (linkType === Constants.socialLinkType.personalSite) return "language"
|
|
|
|
if (linkType === Constants.socialLinkType.github) return "github"
|
|
|
|
if (linkType === Constants.socialLinkType.youtube) return "youtube"
|
|
|
|
if (linkType === Constants.socialLinkType.discord) return "discord"
|
|
|
|
if (linkType === Constants.socialLinkType.telegram) return "telegram"
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
width: 20
|
|
|
|
height: 20
|
|
|
|
}
|
|
|
|
}
|