aboutsummaryrefslogtreecommitdiffstats
path: root/web_src/js/components/ActionRunStatus.vue
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2023-09-02 16:59:07 +0200
committerGitHub <noreply@github.com>2023-09-02 14:59:07 +0000
commit9a3de436f452144933888fb1e4f336efeb93293a (patch)
treee49c4037604de030a8552a5deca180c240c28484 /web_src/js/components/ActionRunStatus.vue
parent79f73299710fe8596b6ea31c0fa0ab97ab3dc801 (diff)
downloadgitea-9a3de436f452144933888fb1e4f336efeb93293a.tar.gz
gitea-9a3de436f452144933888fb1e4f336efeb93293a.zip
Reorder blocks in vue SFCs (#26874)
The [recommended order](https://vuejs.org/guide/scaling-up/sfc.html) for SFC blocks is script -> template -> style, which we were violating because template and script were swapped. I do find script first also easier to read because the imports are on top, letting me immideatly see a component's dependencies. This is a pure cut-paste refactor with some removal of some empty lines. --------- Co-authored-by: Lauris BH <lauris@nix.lv>
Diffstat (limited to 'web_src/js/components/ActionRunStatus.vue')
-rw-r--r--web_src/js/components/ActionRunStatus.vue21
1 files changed, 10 insertions, 11 deletions
diff --git a/web_src/js/components/ActionRunStatus.vue b/web_src/js/components/ActionRunStatus.vue
index 1955decc1e..51a7745431 100644
--- a/web_src/js/components/ActionRunStatus.vue
+++ b/web_src/js/components/ActionRunStatus.vue
@@ -2,17 +2,6 @@
Please also update the template file above if this vue is modified.
action status accepted: success, skipped, waiting, blocked, running, failure, cancelled, unknown
-->
-<template>
- <span class="gt-df gt-ac" :data-tooltip-content="localeStatus" v-if="status">
- <SvgIcon name="octicon-check-circle-fill" class="text green" :size="size" :class-name="className" v-if="status === 'success'"/>
- <SvgIcon name="octicon-skip" class="text grey" :size="size" :class-name="className" v-else-if="status === 'skipped'"/>
- <SvgIcon name="octicon-clock" class="text yellow" :size="size" :class-name="className" v-else-if="status === 'waiting'"/>
- <SvgIcon name="octicon-blocked" class="text yellow" :size="size" :class-name="className" v-else-if="status === 'blocked'"/>
- <SvgIcon name="octicon-meter" class="text yellow" :size="size" :class-name="'job-status-rotate ' + className" v-else-if="status === 'running'"/>
- <SvgIcon name="octicon-x-circle-fill" class="text red" :size="size" v-else-if="['failure', 'cancelled', 'unknown'].includes(status)"/>
- </span>
-</template>
-
<script>
import {SvgIcon} from '../svg.js';
@@ -38,3 +27,13 @@ export default {
},
};
</script>
+<template>
+ <span class="gt-df gt-ac" :data-tooltip-content="localeStatus" v-if="status">
+ <SvgIcon name="octicon-check-circle-fill" class="text green" :size="size" :class-name="className" v-if="status === 'success'"/>
+ <SvgIcon name="octicon-skip" class="text grey" :size="size" :class-name="className" v-else-if="status === 'skipped'"/>
+ <SvgIcon name="octicon-clock" class="text yellow" :size="size" :class-name="className" v-else-if="status === 'waiting'"/>
+ <SvgIcon name="octicon-blocked" class="text yellow" :size="size" :class-name="className" v-else-if="status === 'blocked'"/>
+ <SvgIcon name="octicon-meter" class="text yellow" :size="size" :class-name="'job-status-rotate ' + className" v-else-if="status === 'running'"/>
+ <SvgIcon name="octicon-x-circle-fill" class="text red" :size="size" v-else-if="['failure', 'cancelled', 'unknown'].includes(status)"/>
+ </span>
+</template>