Use html list for changed files list (#2346)

![image](https://github.com/woodpecker-ci/woodpecker/assets/3391958/743317fa-cce6-4eb5-aaa4-7f38aadfcb66)
This commit is contained in:
Robert Kaussow 2023-08-29 15:06:56 +02:00 committed by GitHub
parent 5bd12aa646
commit d155dfdecb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 9 deletions

View file

@ -1,11 +1,8 @@
<template>
<Panel v-if="pipeline">
<div v-if="pipeline.changed_files === undefined || pipeline.changed_files.length < 1" class="w-full">
<span class="text-wp-text-100">{{ $t('repo.pipeline.no_files') }}</span>
</div>
<div v-for="file in pipeline.changed_files" v-else :key="file" class="w-full">
<div>- {{ file }}</div>
</div>
<Panel>
<ul class="list-disc list-inside w-full">
<li v-for="file in pipeline.changed_files" :key="file">{{ file }}</li>
</ul>
</Panel>
</template>

View file

@ -61,9 +61,13 @@
<Tab id="tasks" :title="$t('repo.pipeline.tasks')" />
<Tab id="config" :title="$t('repo.pipeline.config')" />
<Tab
v-if="pipeline.event === 'push' || pipeline.event === 'pull_request'"
v-if="
(pipeline.event === 'push' || pipeline.event === 'pull_request') &&
pipeline.changed_files &&
pipeline.changed_files.length > 0
"
id="changed-files"
:title="$t('repo.pipeline.files', { files: pipeline.changed_files?.length || 0 })"
:title="$t('repo.pipeline.files', { files: pipeline.changed_files.length })"
/>
<router-view />
</Scaffold>