此專案尚未連結 GitLab Repository。
@can('update', $project)
前往專案設定填入 GitLab Project ID
@endcan
{{ $info['name_with_namespace'] ?? $project->name }}
@if(!empty($info['web_url']))
{{ $info['web_url'] }}
@endif
{{-- ── Repository (Files) ── --}}
{{-- Toolbar --}}
{{-- Latest commit bar --}}
@php $headCommit = $commits[0] ?? null; @endphp
{{ $headCommit['title'] ?? '—' }}
·
{{ $headCommit['author_name'] ?? '' }}
·
{{ isset($headCommit['created_at']) ? \Carbon\Carbon::parse($headCommit['created_at'])->diffForHumans() : '' }}
@if(!empty($headCommit['short_id']) && !empty($info['web_url']))
{{ $headCommit['short_id'] }}
@endif
{{-- Split pane: tree + viewer --}}
{{-- Left: file tree --}}
{{-- Right: file content viewer (hidden by default) --}}
{{-- ── Commits ── --}}
| 提交碼 | 訊息 | 作者 | 時間 |
@forelse($commits as $c)
|
@if(!empty($info['web_url']))
{{ $c['short_id'] }}
@else
{{ $c['short_id'] }}
@endif
|
{{ $c['title'] }} |
{{ $c['author_name'] }} |
{{ \Carbon\Carbon::parse($c['created_at'])->diffForHumans() }} |
@empty
| 無提交記錄 |
@endforelse
{{-- ── Branches / Tags ── --}}
{{-- Branches --}}
| 名稱 | 最後提交 | 時間 |
@forelse($branches as $b)
|
{{ $b['name'] }}
@if($b['default'] ?? false)
default
@endif
|
{{ $b['commit']['title'] ?? '—' }}
|
{{ isset($b['commit']['committed_date']) ? \Carbon\Carbon::parse($b['commit']['committed_date'])->diffForHumans() : '—' }}
|
@empty
| 無資料 |
@endforelse
{{-- Tags --}}
| 名稱 | 提交 |
@forelse($tags as $t)
| {{ $t['name'] }} |
{{ substr($t['commit']['short_id'] ?? '', 0, 8) }} |
@empty
| 無標籤 |
@endforelse
{{-- ── Merge Requests ── --}}
@php
$mrsByState = collect($mrs)->groupBy('state');
$mrStates = [
'opened' => ['label' => '開放', 'color' => 'success'],
'merged' => ['label' => '已合併', 'color' => 'primary'],
'closed' => ['label' => '已關閉', 'color' => 'secondary'],
];
@endphp
@foreach($mrStates as $state => $cfg)
@php $cnt = ($mrsByState[$state] ?? collect())->count(); @endphp
@if($cnt > 0)
-
@endif
@endforeach
@foreach($mrStates as $state => $cfg)
| # | 標題 | 分支 | 作者 | 時間 |
@forelse($mrsByState[$state] ?? [] as $mr)
| !{{ $mr['iid'] }} |
@if(!empty($mr['web_url']))
{{ $mr['title'] }}
@else
{{ $mr['title'] }}
@endif
|
{{ Str::limit($mr['source_branch'], 18) }}
{{ $mr['target_branch'] }}
|
{{ $mr['author']['name'] ?? '—' }} |
{{ \Carbon\Carbon::parse($mr['updated_at'])->diffForHumans() }} |
@empty
| 無資料 |
@endforelse
@endforeach
{{-- ── Pipelines ── --}}
| ID | 狀態 | 分支 / 標籤 | 提交碼 | 時間 |
@php
$pipeColors = ['success'=>'success','failed'=>'danger','running'=>'primary','pending'=>'warning','canceled'=>'secondary','skipped'=>'secondary'];
$pipeLabels = ['success'=>'成功','failed'=>'失敗','running'=>'執行中','pending'=>'等待','canceled'=>'已取消','skipped'=>'略過'];
@endphp
@forelse($pipes as $p)
@php $pStatus = $p['status'] ?? 'unknown'; @endphp
|
@if(!empty($info['web_url']))
#{{ $p['id'] }}
@else
#{{ $p['id'] }}
@endif
|
{{ $pipeLabels[$pStatus] ?? $pStatus }}
|
{{ $p['ref'] ?? '—' }} |
{{ substr($p['sha'] ?? '', 0, 8) }} |
{{ isset($p['created_at']) ? \Carbon\Carbon::parse($p['created_at'])->diffForHumans() : '—' }} |
@empty
| 無流水線記錄 |
@endforelse