aboutsummaryrefslogtreecommitdiffstats
path: root/web_src
diff options
context:
space:
mode:
Diffstat (limited to 'web_src')
-rw-r--r--web_src/js/components/RepoActionView.vue20
1 files changed, 18 insertions, 2 deletions
diff --git a/web_src/js/components/RepoActionView.vue b/web_src/js/components/RepoActionView.vue
index e0ec488933..762067f523 100644
--- a/web_src/js/components/RepoActionView.vue
+++ b/web_src/js/components/RepoActionView.vue
@@ -3,7 +3,10 @@
<div class="action-view-header">
<div class="action-info-summary">
{{ run.title }}
- <button class="run_cancel" @click="cancelRun()" v-if="run.canCancel">
+ <button class="run_approve" @click="approveRun()" v-if="run.canApprove">
+ <i class="play circle outline icon"/>
+ </button>
+ <button class="run_cancel" @click="cancelRun()" v-else-if="run.canCancel">
<i class="stop circle outline icon"/>
</button>
</div>
@@ -97,6 +100,7 @@ const sfc = {
link: '',
title: '',
canCancel: false,
+ canApprove: false,
done: false,
jobs: [
// {
@@ -173,6 +177,10 @@ const sfc = {
cancelRun() {
this.fetchPost(`${this.run.link}/cancel`);
},
+ // approve a run
+ approveRun() {
+ this.fetchPost(`${this.run.link}/approve`);
+ },
createLogLine(line) {
const div = document.createElement('div');
@@ -303,7 +311,15 @@ export function initRepositoryActionView() {
cursor: pointer;
transition:transform 0.2s;
};
- .run_cancel:hover{
+ .run_approve {
+ border: none;
+ color: var(--color-green);
+ background-color: transparent;
+ outline: none;
+ cursor: pointer;
+ transition:transform 0.2s;
+ };
+ .run_cancel:hover, .run_approve:hover {
transform:scale(130%);
};
}