This commit is contained in:
Mirco Wittrien 2021-06-14 19:28:10 +02:00
parent c140c73dc1
commit dcb97403e0
3 changed files with 32 additions and 1 deletions

View File

@ -385,12 +385,15 @@ img:not([src]), img[src=""], img[src="null"] {
}
[REPLACE_CLASS_discoverycardtitlebutton] {
display: flex;
margin-left: 4px;
justify-content: center;
align-items: center;
margin-left: 6px;
}
[REPLACE_CLASS_discoverycard] [REPLACE_CLASS_favbuttoncontainer] {
width: 20px;
height: 20px;
flex: 0 0 auto;
margin-left: 3px;
}
[REPLACE_CLASS_discoverycard] [REPLACE_CLASS_favbuttoncontainer] [REPLACE_CLASS_giffavoritesize] {
width: 20px;

View File

@ -352,6 +352,20 @@ module.exports = (_ => {
className: BDFDB.disCN.discoverycardname,
children: this.props.data.name
}),
this.props.data.latestSourceUrl &&
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.TooltipContainer, {
text: BDFDB.LanguageUtils.LanguageStrings.SCREENSHARE_SOURCE,
children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Clickable, {
className: BDFDB.disCN.discoverycardtitlebutton,
children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SvgIcon, {
nativeClass: true,
width: 16,
height: 16,
name: BDFDB.LibraryComponents.SvgIcon.Names.GITHUB
})
}),
onClick: _ => BDFDB.DiscordUtils.openLink(this.props.data.latestSourceUrl)
}),
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FavButton, {
className: BDFDB.disCN.discoverycardtitlebutton,
isFavorite: this.props.data.fav,

View File

@ -785,6 +785,20 @@ module.exports = (_ => {
BDFDB.ReactUtils.forceUpdate(this);
}
}),
this.props.data.latestSourceUrl &&
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.TooltipContainer, {
text: BDFDB.LanguageUtils.LanguageStrings.SCREENSHARE_SOURCE,
children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Clickable, {
className: BDFDB.disCN.discoverycardtitlebutton,
children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SvgIcon, {
nativeClass: true,
width: 16,
height: 16,
name: BDFDB.LibraryComponents.SvgIcon.Names.GITHUB
})
}),
onClick: _ => BDFDB.DiscordUtils.openLink(this.props.data.latestSourceUrl)
}),
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FavButton, {
className: BDFDB.disCN.discoverycardtitlebutton,
isFavorite: this.props.data.fav,