Update Action Icons

This commit is contained in:
Tim Zallmann 2017-10-09 14:16:21 +02:00
parent d01d509bd8
commit 4731eba4c3
10 changed files with 20 additions and 25 deletions

View File

@ -1,6 +1,5 @@
<script>
import getActionIcon from '../../../vue_shared/ci_action_icons';
import tooltip from '../../../vue_shared/directives/tooltip';
import tooltip from '../../../vue_shared/directives/tooltip';
import icon from '../../../vue_shared/components/icon.vue';
/**
@ -39,12 +38,8 @@
},
computed: {
actionIconSvg() {
return getActionIcon(this.actionIcon);
},
cssClass() {
return `js-${gl.text.dasherize(this.actionIcon)}`;
return `${gl.text.dasherize(this.actionIcon)} js-${gl.text.dasherize(this.actionIcon)}`;
},
},
};
@ -59,7 +54,6 @@
:class="cssClass"
data-container="body">
<icon
name="stop"
size="16"/>
:name="actionIcon"/>
</a>
</template>

View File

@ -37,13 +37,6 @@
directives: {
tooltip,
},
computed: {
actionIconSvg() {
alert('LA');
return getActionIcon(this.actionIcon);
},
},
};
</script>
<template>
@ -56,8 +49,7 @@
class="ci-action-icon-wrapper js-ci-status-icon"
data-container="body"
aria-label="Job's action">
{{actionIcon}}
<icon
name="retry"/>
:name="actionIcon"/>
</a>
</template>

View File

@ -40,7 +40,7 @@
},
fullCssClass() {
let classString = '' || this.cssClass;
// if (this.size) classString += `s${this.size}`
if (this.size) classString += `s${this.size}`
return classString;
},
},

View File

@ -734,6 +734,15 @@ button.mini-pipeline-graph-dropdown-toggle {
&:focus svg {
fill: $gl-text-color;
}
&.icon-action-retry,
&.icon-action-play {
svg {
width: calc($ci-action-icon-size-6);
height: calc($ci-action-icon-size-6);
left: 8px;
}
}
}
// link to the build

View File

@ -8,7 +8,7 @@ module Gitlab
end
def action_icon
'icon_action_cancel'
'cancel'
end
def action_path

View File

@ -8,7 +8,7 @@ module Gitlab
end
def icon
'icon_status_warning'
'warning'
end
def group

View File

@ -12,7 +12,7 @@ module Gitlab
end
def action_icon
'icon_action_play'
'play'
end
def action_title

View File

@ -8,7 +8,7 @@ module Gitlab
end
def action_icon
'icon_action_retry'
'retry'
end
def action_title

View File

@ -12,7 +12,7 @@ module Gitlab
end
def action_icon
'icon_action_stop'
'stop'
end
def action_title

View File

@ -11,7 +11,7 @@ describe('action component', () => {
tooltipText: 'bar',
link: 'foo',
actionMethod: 'post',
actionIcon: 'icon_action_cancel',
actionIcon: 'cancel',
},
}).$mount();