mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-09-12 21:58:57 +02:00
80 lines
4.1 KiB
HTML
80 lines
4.1 KiB
HTML
<div class="pr-page">
|
|
<div class="container paper-page pr-page-inner">
|
|
<div class="paper-crumbs">
|
|
<a href="/dashboard">Reviewer</a> /
|
|
<span class="here">Gist</span>
|
|
</div>
|
|
|
|
<header class="pr-header">
|
|
<h1 class="paper-page-title pr-title">
|
|
<span v-if="details?.description" v-text="details?.description"></span>
|
|
<span class="text-muted" v-if="!details?.description">Untitled gist</span>
|
|
<a class="btn btn-sm" aria-label="Edit" v-if="options?.isAdmin || options?.isOwner" :href="safeUrl("/gist-anonymize/" + (gistId))"><i class="far fa-edit"></i><span class="d-none d-md-inline"> Edit</span></a>
|
|
</h1>
|
|
<div class="pr-header-meta">
|
|
<span class="paper-pill" :class="{'good': details?.isPublic, 'warn': !details?.isPublic}">
|
|
{{ details?.isPublic ? 'Public' : 'Secret' }}
|
|
</span>
|
|
<span class="pr-meta-item" v-if="details?.ownerLogin">
|
|
<i class="far fa-user"></i> @<span v-text="details?.ownerLogin"></span>
|
|
</span>
|
|
<span class="pr-meta-item" v-if="details?.updatedDate">
|
|
<i class="far fa-clock"></i> <span v-text="fmt?.date(details?.updatedDate)"></span>
|
|
</span>
|
|
<span class="pr-meta-item" v-if="details?.anonymizeDate">
|
|
<i class="fas fa-user-secret"></i> Anonymized <span v-text="fmt?.date(details?.anonymizeDate)"></span>
|
|
</span>
|
|
</div>
|
|
</header>
|
|
|
|
<nav class="paper-tabs" role="tablist" v-if="(details?.files && details?.files?.length) || (details?.comments && details?.comments?.length)">
|
|
<button class="paper-tab" type="button" role="tab" v-if="details?.files" :class="{'active': tabState?.active == 'files'}" @click="tabState.active = 'files'">
|
|
<i class="fas fa-file-code"></i>
|
|
<span v-text="fmt.plural(details?.files?.length, {'0': 'No files', 'one': '1 file', 'other': '{} files'})"></span>
|
|
</button>
|
|
<button class="paper-tab" type="button" role="tab" v-if="details?.comments" :class="{'active': tabState?.active == 'comments'}" @click="tabState.active = 'comments'">
|
|
<i class="far fa-comment-dots"></i>
|
|
<span v-text="fmt.plural(details?.comments?.length, {'0': 'No comments', 'one': '1 comment', 'other': '{} comments'})"></span>
|
|
</button>
|
|
</nav>
|
|
|
|
<div class="paper-tab-content">
|
|
<div v-if="details?.files && tabState?.active =='files'">
|
|
<ul class="pr-comments">
|
|
<li class="pr-comment" v-for="(file, index) in details?.files">
|
|
<div class="pr-comment-head">
|
|
<strong v-text="file?.filename"></strong>
|
|
<span class="pr-comment-date" v-if="file?.language">{{ file?.language }}</span>
|
|
</div>
|
|
<gist-file :file="file"></gist-file>
|
|
</li>
|
|
<li class="paper-table-empty" v-if="!details?.files?.length">
|
|
<i class="fas fa-file"></i>
|
|
<span>No files in this gist.</span>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div v-if="details?.comments && tabState?.active =='comments'">
|
|
<ul class="pr-comments">
|
|
<li class="pr-comment" v-for="(comment, index) in details?.comments">
|
|
<div class="pr-comment-head">
|
|
<span class="pr-comment-author" v-if="comment?.author">
|
|
<i class="far fa-user"></i> @<span v-text="comment?.author"></span>
|
|
</span>
|
|
<span class="pr-comment-date" v-if="comment?.updatedDate" v-text="fmt?.date(comment?.updatedDate)"></span>
|
|
</div>
|
|
<div class="pr-comment-body" v-if="comment?.body">
|
|
<markdown :content="comment?.body"></markdown>
|
|
</div>
|
|
</li>
|
|
<li class="paper-table-empty" v-if="!details?.comments?.length">
|
|
<i class="far fa-comment-dots"></i>
|
|
<span>No comments on this gist.</span>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|