Skip to content

Commit

Permalink
Merge pull request #242 from bprattes/BLOCKS-229
Browse files Browse the repository at this point in the history
BLOCKS-229 Script Icon Bug
  • Loading branch information
Hiebl authored Dec 17, 2020
2 parents f04f1bf + 7d07c8a commit 46de23b
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 31 deletions.
5 changes: 0 additions & 5 deletions assets/scripts.svg

This file was deleted.

4 changes: 4 additions & 0 deletions src/library/css/share.css
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ img {
cursor: pointer;
}

.catblocks-tab-script {
height: 2rem;
}

.catblocks-tab-icon {
height: 2rem;
font-size: 2rem;
Expand Down
19 changes: 0 additions & 19 deletions src/library/js/blocks/categories/control.js
Original file line number Diff line number Diff line change
Expand Up @@ -462,24 +462,5 @@ export default {
name: 'DROPDOWN_INFO'
}
]
},
OpenUrlBrick: {
message0: '%{BKY_CONTROL_OPEN_URL}',
args0: [
{
type: 'field_input',
name: 'brick_open_url_edit_text',
text: 'unset'
},
{
type: 'field_image',
src: `${document.location.pathname}media/info_icon.svg`,
height: 24,
width: 24,
alt: '(i)',
flip_rtl: true,
name: 'brick_open_url_edit_text_INFO'
}
]
}
};
2 changes: 1 addition & 1 deletion src/library/js/blocks/categories/device.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export default {
ResetTimerBrick: {
message0: '%{BKY_DEVICE_RESET_TIMER}'
},
TouchAndSlide: {
TouchAndSlideBrick: {
message0: '%{BKY_CONTROL_TOUCH_AND_SLIDE}',
args0: [
{
Expand Down
15 changes: 9 additions & 6 deletions src/library/js/share/share.js
Original file line number Diff line number Diff line change
Expand Up @@ -1109,11 +1109,6 @@ export class Share {
const liScript = this.generateOrInjectNewDOM(ul, 'li', {
class: 'nav-item'
});
let mediapath = `${this.config.shareRoot}${this.config.media}`;
// full link or absolute path given
if (this.config.media.startsWith('http') || this.config.media.startsWith('/')) {
mediapath = this.config.media;
}

this.generateOrInjectNewDOM(
liScript,
Expand All @@ -1127,7 +1122,15 @@ export class Share {
'aria-controls': 'scripts',
'aria-selected': 'true'
},
`<img class="catblocks-tab-icon" src="${mediapath}scripts.svg" /> (${object.scriptList.length})`
`
<div class="catblocks-tab-script">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32px" viewBox="0 0 32 32" version="1.1">
<g id="surface1">
<path style="fill:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 27.322266 11.595703 C 27.322266 11.595703 20.138672 9.339844 14.958984 9.333984 C 10.564453 9.375 8.033203 10.904297 8.033203 10.904297 L 7.998047 22.740234 L 7.998047 37.125 L 12.228516 37.125 L 14.039062 40.001953 L 21.445312 40.001953 L 23.255859 37.125 L 40.001953 37.125 L 40.001953 11.595703 Z M 27.322266 11.595703 " transform="matrix(0.666667,0,0,0.666667,0,0)"/>
<path style="fill:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 7.998047 24.123047 L 12.228516 24.123047 L 14.039062 27 L 21.445312 27 L 23.255859 24.123047 L 40.001953 24.123047 " transform="matrix(0.666667,0,0,0.666667,0,0)"/>
</g>
</svg>(${object.scriptList.length})
</div>`
);
}

Expand Down

0 comments on commit 46de23b

Please sign in to comment.