|
74 | 74 | <SvgIcon name="octicon-gear" :size="18"/>
|
75 | 75 | </button>
|
76 | 76 | <div class="menu transition action-job-menu" :class="{visible: menuVisible}" v-if="menuVisible" v-cloak>
|
77 |
| - <a :class="['item', currentJob.steps.length === 0 ? 'disabled' : '']" :href="run.link+'/jobs/'+jobIndex+'/logs'" target="_blank"> |
78 |
| - <i class="icon"><SvgIcon name="octicon-download"/></i> |
79 |
| - {{ locale.downloadLogs }} |
80 |
| - </a> |
81 | 77 | <a class="item" @click="toggleTimeDisplay('seconds')">
|
82 |
| - <i class="icon"><SvgIcon v-show="timeVisible['log-time-seconds']" name="octicon-check"/></i> |
| 78 | + <i class="icon"><SvgIcon :name="timeVisible['log-time-seconds'] ? 'octicon-check' : 'gitea-empty-checkbox'"/></i> |
83 | 79 | {{ locale.showLogSeconds }}
|
84 | 80 | </a>
|
85 | 81 | <a class="item" @click="toggleTimeDisplay('stamp')">
|
86 |
| - <i class="icon"><SvgIcon v-show="timeVisible['log-time-stamp']" name="octicon-check"/></i> |
| 82 | + <i class="icon"><SvgIcon :name="timeVisible['log-time-stamp'] ? 'octicon-check' : 'gitea-empty-checkbox'"/></i> |
87 | 83 | {{ locale.showTimeStamps }}
|
88 | 84 | </a>
|
89 |
| - <div class="divider"/> |
90 | 85 | <a class="item" @click="toggleFullScreen()">
|
91 |
| - <i class="icon"><SvgIcon v-show="isFullScreen" name="octicon-check"/></i> |
| 86 | + <i class="icon"><SvgIcon :name="isFullScreen ? 'octicon-check' : 'gitea-empty-checkbox'"/></i> |
92 | 87 | {{ locale.showFullScreen }}
|
93 | 88 | </a>
|
| 89 | + <div class="divider"/> |
| 90 | + <a :class="['item', currentJob.steps.length === 0 ? 'disabled' : '']" :href="run.link+'/jobs/'+jobIndex+'/logs'" target="_blank"> |
| 91 | + <i class="icon"><SvgIcon name="octicon-download"/></i> |
| 92 | + {{ locale.downloadLogs }} |
| 93 | + </a> |
94 | 94 | </div>
|
95 | 95 | </div>
|
96 | 96 | </div>
|
@@ -401,20 +401,10 @@ const sfc = {
|
401 | 401 | if (this.menuVisible) this.menuVisible = false;
|
402 | 402 | },
|
403 | 403 |
|
404 |
| - // show at most one of log seconds and timestamp (can be both invisible) |
405 | 404 | toggleTimeDisplay(type) {
|
406 |
| - const toToggleTypes = []; |
407 |
| - const other = type === 'seconds' ? 'stamp' : 'seconds'; |
408 | 405 | this.timeVisible[`log-time-${type}`] = !this.timeVisible[`log-time-${type}`];
|
409 |
| - toToggleTypes.push(type); |
410 |
| - if (this.timeVisible[`log-time-${type}`] && this.timeVisible[`log-time-${other}`]) { |
411 |
| - this.timeVisible[`log-time-${other}`] = false; |
412 |
| - toToggleTypes.push(other); |
413 |
| - } |
414 |
| - for (const toToggle of toToggleTypes) { |
415 |
| - for (const el of this.$refs.steps.querySelectorAll(`.log-time-${toToggle}`)) { |
416 |
| - toggleElem(el, this.timeVisible[`log-time-${toToggle}`]); |
417 |
| - } |
| 406 | + for (const el of this.$refs.steps.querySelectorAll(`.log-time-${type}`)) { |
| 407 | + toggleElem(el, this.timeVisible[`log-time-${type}`]); |
418 | 408 | }
|
419 | 409 | },
|
420 | 410 |
|
|
0 commit comments