diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2018-01-08 19:19:52 +0000 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2018-01-08 19:19:52 +0000 |
commit | e2b759a2f483663e0771180de6b97bb9344a56cd (patch) | |
tree | 32cd72a70e405dc0858d774ca3354d6aef1bf445 /app/assets/javascripts/groups | |
parent | 7ca5a3f99dd3a3c1800f65da7b4f08395a97395a (diff) | |
parent | df74461014bbdbc691f4f4039b02962dad292362 (diff) | |
download | gitlab-ce-e2b759a2f483663e0771180de6b97bb9344a56cd.tar.gz |
Merge branch 'master' into 34312-eslint-vue-plugin
* master: (140 commits)
Add Gitter room link to I want to contribute since you always have questions
Use workhorse 3.4.0
chore: remove symbolic link
Add memoization for properties
Resolve "Allow QA tests to run with `CHROME_HEADLESS=false`"
Resolve "Add graph value to hover"
Fix slash commands dropdown description
disables the shortcut to the issue boards when issues are disabled
Fix static analysys
Disable STI of ActiveRecord. Refactoring specs.
Fix StaticSnalysys
Fix change log
Add changelog
Revert bulk_insert and bring back AR insert(one by one)
Add a new test for emptified params
Use batch update for Service deactivation
Fix query to look for proper unmanaged kubernetes service
Fix static anylysy
Use bulk_insert instead of AR create
Opitmize migration process by using both unmanaged_kubernetes_service and kubernetes_service_without_template
...
Diffstat (limited to 'app/assets/javascripts/groups')
-rw-r--r-- | app/assets/javascripts/groups/components/group_item.vue | 143 | ||||
-rw-r--r-- | app/assets/javascripts/groups/store/groups_store.js | 2 |
2 files changed, 74 insertions, 71 deletions
diff --git a/app/assets/javascripts/groups/components/group_item.vue b/app/assets/javascripts/groups/components/group_item.vue index 0d795f50d16..42e79a9e17a 100644 --- a/app/assets/javascripts/groups/components/group_item.vue +++ b/app/assets/javascripts/groups/components/group_item.vue @@ -1,72 +1,72 @@ <script> - import { visitUrl } from '../../lib/utils/url_utility'; - import tooltip from '../../vue_shared/directives/tooltip'; - import identicon from '../../vue_shared/components/identicon.vue'; - import eventHub from '../event_hub'; +import { visitUrl } from '../../lib/utils/url_utility'; +import tooltip from '../../vue_shared/directives/tooltip'; +import identicon from '../../vue_shared/components/identicon.vue'; +import eventHub from '../event_hub'; - import itemCaret from './item_caret.vue'; - import itemTypeIcon from './item_type_icon.vue'; - import itemStats from './item_stats.vue'; - import itemActions from './item_actions.vue'; +import itemCaret from './item_caret.vue'; +import itemTypeIcon from './item_type_icon.vue'; +import itemStats from './item_stats.vue'; +import itemActions from './item_actions.vue'; - export default { - directives: { - tooltip, +export default { + directives: { + tooltip, + }, + components: { + identicon, + itemCaret, + itemTypeIcon, + itemStats, + itemActions, + }, + props: { + parentGroup: { + type: Object, + required: false, + default: () => ({}), }, - components: { - identicon, - itemCaret, - itemTypeIcon, - itemStats, - itemActions, + group: { + type: Object, + required: true, }, - props: { - parentGroup: { - type: Object, - required: false, - default: () => ({}), - }, - group: { - type: Object, - required: true, - }, + }, + computed: { + groupDomId() { + return `group-${this.group.id}`; }, - computed: { - groupDomId() { - return `group-${this.group.id}`; - }, - rowClass() { - return { - 'is-open': this.group.isOpen, - 'has-children': this.hasChildren, - 'has-description': this.group.description, - 'being-removed': this.group.isBeingRemoved, - }; - }, - hasChildren() { - return this.group.childrenCount > 0; - }, - hasAvatar() { - return this.group.avatarUrl !== null; - }, - isGroup() { - return this.group.type === 'group'; - }, + rowClass() { + return { + 'is-open': this.group.isOpen, + 'has-children': this.hasChildren, + 'has-description': this.group.description, + 'being-removed': this.group.isBeingRemoved, + }; }, - methods: { - onClickRowGroup(e) { - const NO_EXPAND_CLS = 'no-expand'; - if (!(e.target.classList.contains(NO_EXPAND_CLS) || - e.target.parentElement.classList.contains(NO_EXPAND_CLS))) { - if (this.hasChildren) { - eventHub.$emit('toggleChildren', this.group); - } else { - visitUrl(this.group.relativePath); - } + hasChildren() { + return this.group.childrenCount > 0; + }, + hasAvatar() { + return this.group.avatarUrl !== null; + }, + isGroup() { + return this.group.type === 'group'; + }, + }, + methods: { + onClickRowGroup(e) { + const NO_EXPAND_CLS = 'no-expand'; + if (!(e.target.classList.contains(NO_EXPAND_CLS) || + e.target.parentElement.classList.contains(NO_EXPAND_CLS))) { + if (this.hasChildren) { + eventHub.$emit('toggleChildren', this.group); + } else { + visitUrl(this.group.relativePath); } - }, + } }, - }; + }, +}; </script> <template> @@ -75,7 +75,7 @@ :id="groupDomId" :class="rowClass" class="group-row" - > + > <div class="group-row-contents" :class="{ 'project-row-contents': !isGroup }"> @@ -84,11 +84,14 @@ :group="group" :parent-group="parentGroup" /> - <item-stats :item="group" /> + <item-stats + :item="group" + /> <div - class="folder-toggle-wrap" - > - <item-caret :is-group-open="group.isOpen" /> + class="folder-toggle-wrap"> + <item-caret + :is-group-open="group.isOpen" + /> <item-type-icon :item-type="group.type" :is-group-open="group.isOpen" @@ -110,14 +113,13 @@ <identicon v-else size-class="s24" - :entity-id="group.id" + :entity-id=group.id :entity-name="group.name" /> </a> </div> <div - class="title namespace-title" - > + class="title namespace-title"> <a v-tooltip :href="group.relativePath" @@ -133,13 +135,14 @@ v-if="group.permission" class="user-access-role" > - {{ group.permission }} + {{group.permission}} </span> </div> <div v-if="group.description" class="description"> - {{ group.description }} + <span v-html="group.description"> + </span> </div> </div> <group-folder diff --git a/app/assets/javascripts/groups/store/groups_store.js b/app/assets/javascripts/groups/store/groups_store.js index ffc86175548..4a7569078a1 100644 --- a/app/assets/javascripts/groups/store/groups_store.js +++ b/app/assets/javascripts/groups/store/groups_store.js @@ -71,7 +71,7 @@ export default class GroupsStore { id: rawGroupItem.id, name: rawGroupItem.name, fullName: rawGroupItem.full_name, - description: rawGroupItem.description, + description: rawGroupItem.markdown_description, visibility: rawGroupItem.visibility, avatarUrl: rawGroupItem.avatar_url, relativePath: rawGroupItem.relative_path, |