diff options
author | kushalpandya <kushal@gitlab.com> | 2017-08-30 11:21:43 +0530 |
---|---|---|
committer | kushalpandya <kushal@gitlab.com> | 2017-08-30 11:21:43 +0530 |
commit | ee0fae8eaf81b267f487abd4bd9c6dc8b704449f (patch) | |
tree | 4261624187377a8914fe3f2e754fc20e320e7dba /app/assets/javascripts/groups | |
parent | 499b640679c0dca5b5d93da945da0ca26db8e58e (diff) | |
download | gitlab-ce-ee0fae8eaf81b267f487abd4bd9c6dc8b704449f.tar.gz |
Renamed to `identicon` and make shared component
Diffstat (limited to 'app/assets/javascripts/groups')
-rw-r--r-- | app/assets/javascripts/groups/components/group_identicon.vue | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/app/assets/javascripts/groups/components/group_identicon.vue b/app/assets/javascripts/groups/components/group_identicon.vue deleted file mode 100644 index 0edd820743f..00000000000 --- a/app/assets/javascripts/groups/components/group_identicon.vue +++ /dev/null @@ -1,45 +0,0 @@ -<script> -export default { - props: { - entityId: { - type: Number, - required: true, - }, - entityName: { - type: String, - required: true, - }, - }, - computed: { - /** - * This method is based on app/helpers/application_helper.rb#project_identicon - */ - identiconStyles() { - const allowedColors = [ - '#FFEBEE', - '#F3E5F5', - '#E8EAF6', - '#E3F2FD', - '#E0F2F1', - '#FBE9E7', - '#EEEEEE', - ]; - - const backgroundColor = allowedColors[this.entityId % 7]; - - return `background-color: ${backgroundColor}; color: #555;`; - }, - identiconTitle() { - return this.entityName.charAt(0).toUpperCase(); - }, - }, -}; -</script> - -<template> - <div - class="avatar s40 identicon" - :style="identiconStyles"> - {{identiconTitle}} - </div> -</template> |