code.gitea.io/gitea@v1.21.7/web_src/js/components/ActionRunStatus.vue (about)

     1  <!-- This vue should be kept the same as templates/repo/actions/status.tmpl
     2      Please also update the template file above if this vue is modified.
     3      action status accepted: success, skipped, waiting, blocked, running, failure, cancelled, unknown
     4  -->
     5  <script>
     6  import {SvgIcon} from '../svg.js';
     7  
     8  export default {
     9    components: {SvgIcon},
    10    props: {
    11      status: {
    12        type: String,
    13        required: true
    14      },
    15      size: {
    16        type: Number,
    17        default: 16
    18      },
    19      className: {
    20        type: String,
    21        default: ''
    22      },
    23      localeStatus: {
    24        type: String,
    25        default: ''
    26      }
    27    },
    28  };
    29  </script>
    30  <template>
    31    <span class="gt-df gt-ac" :data-tooltip-content="localeStatus" v-if="status">
    32      <SvgIcon name="octicon-check-circle-fill" class="text green" :size="size" :class-name="className" v-if="status === 'success'"/>
    33      <SvgIcon name="octicon-skip" class="text grey" :size="size" :class-name="className" v-else-if="status === 'skipped'"/>
    34      <SvgIcon name="octicon-clock" class="text yellow" :size="size" :class-name="className" v-else-if="status === 'waiting'"/>
    35      <SvgIcon name="octicon-blocked" class="text yellow" :size="size" :class-name="className" v-else-if="status === 'blocked'"/>
    36      <SvgIcon name="octicon-meter" class="text yellow" :size="size" :class-name="'job-status-rotate ' + className" v-else-if="status === 'running'"/>
    37      <SvgIcon name="octicon-x-circle-fill" class="text red" :size="size" v-else-if="['failure', 'cancelled', 'unknown'].includes(status)"/>
    38    </span>
    39  </template>