From 0b7824d433ec5029da17114389f425f816b7be74 Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Fri, 28 Apr 2017 17:22:57 +0100 Subject: Updated some Vue specific JS --- .../deploy_keys/components/action_btn.vue | 3 +- .../javascripts/deploy_keys/components/app.vue | 10 ++--- .../javascripts/deploy_keys/components/key.vue | 4 +- .../javascripts/deploy_keys/components/keys.vue | 52 ---------------------- .../deploy_keys/components/keys_panel.vue | 52 ++++++++++++++++++++++ app/assets/javascripts/deploy_keys/store/index.js | 4 -- 6 files changed, 61 insertions(+), 64 deletions(-) delete mode 100644 app/assets/javascripts/deploy_keys/components/keys.vue create mode 100644 app/assets/javascripts/deploy_keys/components/keys_panel.vue (limited to 'app/assets/javascripts') diff --git a/app/assets/javascripts/deploy_keys/components/action_btn.vue b/app/assets/javascripts/deploy_keys/components/action_btn.vue index 7da2915a45e..3ff3a9d977e 100644 --- a/app/assets/javascripts/deploy_keys/components/action_btn.vue +++ b/app/assets/javascripts/deploy_keys/components/action_btn.vue @@ -47,7 +47,8 @@ diff --git a/app/assets/javascripts/deploy_keys/components/app.vue b/app/assets/javascripts/deploy_keys/components/app.vue index e0443e2e0df..ee2f85bde53 100644 --- a/app/assets/javascripts/deploy_keys/components/app.vue +++ b/app/assets/javascripts/deploy_keys/components/app.vue @@ -3,15 +3,13 @@ import eventHub from '../eventhub'; import DeployKeysService from '../service'; import DeployKeysStore from '../store'; - import keysPanel from './keys.vue'; + import keysPanel from './keys_panel.vue'; export default { data() { - const store = new DeployKeysStore(); - return { isLoading: false, - store, + store: new DeployKeysStore(), }; }, props: { @@ -84,7 +82,9 @@ class="text-center" v-if="isLoading && !hasKeys"> + class="fa fa-spinner fa-spin fa-2x" + aria-hidden="true" + aria-label="Loading deploy keys">
diff --git a/app/assets/javascripts/deploy_keys/components/key.vue b/app/assets/javascripts/deploy_keys/components/key.vue index af842a3bb39..1b47cceba78 100644 --- a/app/assets/javascripts/deploy_keys/components/key.vue +++ b/app/assets/javascripts/deploy_keys/components/key.vue @@ -56,9 +56,9 @@
+ :href="project.full_path"> {{ project.full_name }}
diff --git a/app/assets/javascripts/deploy_keys/components/keys.vue b/app/assets/javascripts/deploy_keys/components/keys.vue deleted file mode 100644 index 2470831eddf..00000000000 --- a/app/assets/javascripts/deploy_keys/components/keys.vue +++ /dev/null @@ -1,52 +0,0 @@ - - - diff --git a/app/assets/javascripts/deploy_keys/components/keys_panel.vue b/app/assets/javascripts/deploy_keys/components/keys_panel.vue new file mode 100644 index 00000000000..2470831eddf --- /dev/null +++ b/app/assets/javascripts/deploy_keys/components/keys_panel.vue @@ -0,0 +1,52 @@ + + + diff --git a/app/assets/javascripts/deploy_keys/store/index.js b/app/assets/javascripts/deploy_keys/store/index.js index 7177d9bed7f..6210361af26 100644 --- a/app/assets/javascripts/deploy_keys/store/index.js +++ b/app/assets/javascripts/deploy_keys/store/index.js @@ -6,8 +6,4 @@ export default class DeployKeysStore { findEnabledKey(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); - } } -- cgit v1.2.1