This commit is contained in:
Mirco Wittrien 2021-05-03 15:26:32 +02:00
parent 15b7361575
commit 38f261a694
3 changed files with 14 additions and 3 deletions

View File

@ -403,6 +403,9 @@
},
"icon": "<svg width='%%width' height='%%height' viewBox='0 0 16 16'><g fill='none'><path d='M-4-4h24v24H-4z'/><path class='%%foreground' fill='%%color' d='M14.994 1.006C13.858-.257 11.904-.3 10.72.89L8.637 2.975l-.696-.697-1.387 1.388 5.557 5.557 1.387-1.388-.697-.697 1.964-1.964c1.13-1.13 1.3-2.985.23-4.168zm-13.25 10.25c-.225.224-.408.48-.55.764L.02 14.37l1.39 1.39 2.35-1.174c.283-.14.54-.33.765-.55l4.808-4.808-2.776-2.776-4.813 4.803z'/></g></svg>"
},
"EYE": {
"icon": "<svg name='Eye' width='%%width' height='%%height' viewBox='0 0 24 24'><path fill='%%color' d='m 12,4.8468858 c -4.5854555,0 -8.7437859,2.5087448 -11.8122114,6.5836142 -0.2503836,0.333845 -0.2503836,0.800246 0,1.13409 C 3.2562141,16.644369 7.4145445,19.153114 12,19.153114 c 4.585455,0 8.743786,-2.508745 11.812211,-6.583614 0.250384,-0.333845 0.250384,-0.800246 0,-1.13409 C 20.743786,7.3556306 16.585455,4.8468858 12,4.8468858 Z M 12.328935,17.037128 C 9.2850571,17.228597 6.7714025,14.719852 6.9628723,11.671065 7.1199757,9.1574101 9.1574101,7.1199755 11.671065,6.9628721 c 3.043878,-0.1914698 5.557532,2.317275 5.366063,5.3660629 -0.162013,2.508745 -2.199448,4.54618 -4.708193,4.708193 z m -0.152194,-2.327094 c -1.639766,0.103099 -2.9947829,-1.247009 -2.8867749,-2.886775 0.08346,-1.355017 1.1831849,-2.4498317 2.5382019,-2.5382024 1.639767,-0.1030991 2.994784,1.2470084 2.886775,2.8867754 -0.08837,1.359926 -1.188094,2.45474 -2.538202,2.538202 z'/></svg>"
},
"FOLDER": {
"icon": "<svg name='Folder' width='%%width' height='%%height' viewBox='0 0 24 24'><path fill='%%color' d='M20 7H12L10.553 5.106C10.214 4.428 9.521 4 8.764 4H3C2.447 4 2 4.447 2 5V19C2 20.104 2.895 21 4 21H20C21.104 21 22 20.104 22 19V9C22 7.896 21.104 7 20 7Z'/></svg>"
},
@ -593,6 +596,7 @@
"discoveryCardTag": "tag-PbPfwP",
"discoveryCardTags": "tags-9KJ-1X",
"discoveryCardTitle": "title-SSzExd",
"discoveryCardTitleButton": "button-SxdSzE",
"favButtonContainer": "favbutton-8Fzu45",
"guild": "guild-r3yAE_",
"guildLowerLeftBadge": "lowerLeftBadge-zr4T_9",
@ -1936,6 +1940,7 @@
"discoverycardtag": ["BDFDB", "discoveryCardTag"],
"discoverycardtags": ["BDFDB", "discoveryCardTags"],
"discoverycardtitle": ["BDFDB", "discoveryCardTitle"],
"discoverycardtitlebutton": ["BDFDB", "discoveryCardTitleButton"],
"favbuttoncontainer": ["BDFDB", "favButtonContainer"],
"fileattachment": ["File", "attachment"],
"fileattachmentinner": ["File", "attachmentInner"],

View File

@ -366,6 +366,11 @@ img:not([src]), img[src=""], img[src="null"] {
text-overflow: ellipsis;
flex: 1 1 auto;
}
[REPLACE_CLASS_discoverycardtitlebutton] {
width: 20px;
height: 20px;
margin-left: 4px;
}
[REPLACE_CLASS_discoverycard] [REPLACE_CLASS_favbuttoncontainer] {
width: 20px;
height: 20px;

View File

@ -318,6 +318,7 @@ module.exports = (_ => {
children: this.props.data.name
}),
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FavButton, {
className: BDFDB.disCN.discoverycardtitlebutton,
isFavorite: this.props.data.fav,
onClick: value => {
this.props.data.fav = value && 1;
@ -516,7 +517,7 @@ module.exports = (_ => {
type: BDFDB.LibraryComponents.TabBar.Types.TOP,
selectedItem: this.props.tab,
items: [{value: "Plugins"}, {value: BDFDB.LanguageUtils.LanguageStrings.SETTINGS}],
onItemSelect: (value, instance) => {
onItemSelect: value => {
this.props.tab = list.props.tab = value;
BDFDB.ReactUtils.forceUpdate(list);
}
@ -533,7 +534,7 @@ module.exports = (_ => {
label: sortKeys[key],
value: key
})),
onChange: (key, instance) => {
onChange: key => {
this.props.sortKey = list.props.sortKey = key;
BDFDB.ReactUtils.forceUpdate(this, list);
}
@ -550,7 +551,7 @@ module.exports = (_ => {
label: BDFDB.LanguageUtils.LibraryStrings[orderKeys[key]],
value: key
})),
onChange: (key, instance) => {
onChange: key => {
this.props.orderKey = list.props.orderKey = key;
BDFDB.ReactUtils.forceUpdate(this, list);
}