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> <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'; import icon from '../../../vue_shared/components/icon.vue';
/** /**
@ -39,12 +38,8 @@
}, },
computed: { computed: {
actionIconSvg() {
return getActionIcon(this.actionIcon);
},
cssClass() { 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" :class="cssClass"
data-container="body"> data-container="body">
<icon <icon
name="stop" :name="actionIcon"/>
size="16"/>
</a> </a>
</template> </template>

View File

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

View File

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

View File

@ -734,6 +734,15 @@ button.mini-pipeline-graph-dropdown-toggle {
&:focus svg { &:focus svg {
fill: $gl-text-color; 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 // link to the build

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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