Updated some Vue specific JS

This commit is contained in:
Phil Hughes 2017-04-28 17:22:57 +01:00
parent fde9732a27
commit 0b7824d433
7 changed files with 13 additions and 16 deletions

View File

@ -47,7 +47,8 @@
<i <i
v-if="isLoading" v-if="isLoading"
class="fa fa-spinner fa-spin" class="fa fa-spinner fa-spin"
aria-hidden="true"> aria-hidden="true"
aria-label="Loading">
</i> </i>
</button> </button>
</template> </template>

View File

@ -3,15 +3,13 @@
import eventHub from '../eventhub'; import eventHub from '../eventhub';
import DeployKeysService from '../service'; import DeployKeysService from '../service';
import DeployKeysStore from '../store'; import DeployKeysStore from '../store';
import keysPanel from './keys.vue'; import keysPanel from './keys_panel.vue';
export default { export default {
data() { data() {
const store = new DeployKeysStore();
return { return {
isLoading: false, isLoading: false,
store, store: new DeployKeysStore(),
}; };
}, },
props: { props: {
@ -84,7 +82,9 @@
class="text-center" class="text-center"
v-if="isLoading && !hasKeys"> v-if="isLoading && !hasKeys">
<i <i
class="fa fa-spinner fa-spin fa-2x"> class="fa fa-spinner fa-spin fa-2x"
aria-hidden="true"
aria-label="Loading deploy keys">
</i> </i>
</div> </div>
<div v-else-if="hasKeys"> <div v-else-if="hasKeys">

View File

@ -56,9 +56,9 @@
</div> </div>
<div class="deploy-key-content prepend-left-default deploy-key-projects"> <div class="deploy-key-content prepend-left-default deploy-key-projects">
<a <a
v-for="project in deployKey.projects"
class="label deploy-project-label" class="label deploy-project-label"
:href="project.full_path" :href="project.full_path">
v-for="project in deployKey.projects">
{{ project.full_name }} {{ project.full_name }}
</a> </a>
</div> </div>

View File

@ -6,8 +6,4 @@ export default class DeployKeysStore {
findEnabledKey(id) { findEnabledKey(id) {
return this.keys.enabled_keys.find(key => key.id === id); return this.keys.enabled_keys.find(key => key.id === id);
} }
removeKeyForType(deployKey, type) {
this.keys[type] = this.keys[type].filter(key => key.id !== deployKey.id);
}
} }

View File

@ -1,4 +0,0 @@
---
title: Project deploy keys json end point
merge_request:
author:

View File

@ -0,0 +1,4 @@
---
title: Deploy keys load are loaded async
merge_request:
author: