NEXT-16529 - removed double external link icons · riahtu/platform@e4664f1 · GitHub
Skip to content

Commit e4664f1

Browse files
committed
NEXT-16529 - removed double external link icons
1 parent 1ab0f27 commit e4664f1

14 files changed

Lines changed: 48 additions & 41 deletions

File tree

Lines changed: 13 additions & 0 deletions

‎src/Administration/Resources/app/administration/src/app/component/form/sw-gtc-checkbox/index.js‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import template from './sw-gtc-checkbox.html.twig';
2-
import './sw-gtc-checkbox.scss';
32

43
Shopware.Component.register('sw-gtc-checkbox', {
54
template,

‎src/Administration/Resources/app/administration/src/app/component/form/sw-gtc-checkbox/sw-gtc-checkbox.html.twig‎

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,20 @@
99
{% block sw_gtc_checkbox_input_label %}
1010
{{ $tc('global.sw-gtc-checkbox.label') }}
1111

12+
{# @deprecated tag:v6.5.0 - CSS class "sw-gtc-checkbox__link" is deprecated, use "sw-external-link" instead #}
1213
{% block sw_gtc_checkbox_input_label_link %}
13-
<a
14-
:href="$tc('global.sw-gtc-checkbox.url')"
14+
<sw-external-link
1515
class="sw-gtc-checkbox__link"
16-
target="_blank"
16+
:href="$tc('global.sw-gtc-checkbox.url')"
1717
>
18-
1918
{% block sw_gtc_checkbox_input_label_text %}
2019
{{ $tc('global.sw-gtc-checkbox.link') }}
2120
{% endblock %}
2221

22+
{# @deprecated tag:v6.5.0 - Block will be removed completely #}
2323
{% block sw_gtc_checkbox_input_label_link_icon %}
24-
<sw-icon
25-
class="sw-gtc-checkbox__icon"
26-
name="small-arrow-small-external"
27-
/>
2824
{% endblock %}
29-
</a>
25+
</sw-external-link>
3026
{% endblock %}
3127
{% endblock %}
3228
</template>

‎src/Administration/Resources/app/administration/src/app/component/form/sw-gtc-checkbox/sw-gtc-checkbox.scss‎

Lines changed: 0 additions & 13 deletions
This file was deleted.

‎src/Administration/Resources/app/administration/src/app/component/utils/sw-external-link/index.js‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ Component.register('sw-external-link', {
3131
required: false,
3232
default: 'small-arrow-small-external',
3333
},
34+
35+
rel: {
36+
type: String,
37+
required: false,
38+
default: 'noopener',
39+
},
3440
},
3541

3642
computed: {

‎src/Administration/Resources/app/administration/src/app/component/utils/sw-external-link/sw-external-link.html.twig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
v-if="$attrs.hasOwnProperty('href')"
33
v-bind="$attrs"
44
target="_blank"
5+
:rel="rel"
56
class="sw-external-link"
67
:class="classes"
78
>

‎src/Administration/Resources/app/administration/src/app/component/utils/sw-external-link/sw-external-link.scss‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
color: $color-shopware-brand-600;
1212
}
1313

14-
.sw-external-link__icon {
14+
&__icon {
1515
margin-left: 4px;
1616
}
1717

18-
&.sw-external-link--small {
18+
&--small {
1919
font-size: $font-size-extra-small;
2020

2121
.sw-external-link__icon {

‎src/Administration/Resources/app/administration/src/module/sw-dashboard/component/sw-dashboard-external-link/index.js‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@ import './sw-dashboard-external-link.scss';
33

44
const { Component } = Shopware;
55

6+
/**
7+
* @deprecated tag:v6.5.0 - Use sw-external-link instead
8+
* @status deprecated
9+
*/
610
Component.register('sw-dashboard-external-link', {
11+
deprecated: '6.5.0',
712
template,
813
props: {
914
title: {
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
11
{% block sw_dashboard_external_link %}
2-
<a
2+
<sw-external-link
33
class="sw-dashboard-external-link"
44
:href="link"
5-
target="_blank"
6-
rel="noopener"
5+
icon="default-arrow-simple-right"
76
>
87
{{ title }}
9-
<sw-icon
10-
name="default-arrow-simple-right"
11-
small
12-
color="#d1d9e0"
13-
/>
14-
</a>
8+
</sw-external-link>
159
{% endblock %}

‎src/Administration/Resources/app/administration/src/module/sw-dashboard/component/sw-dashboard-external-link/sw-dashboard-external-link.scss‎

Lines changed: 2 additions & 2 deletions

0 commit comments

Comments
 (0)