1
0
Fork 0

Replace spaces with tabs
the build was successful Details

pull/2/head
Ambrose Chua 2018-09-29 16:37:40 +08:00
parent 7eef45f747
commit 7d7146dde9
15 changed files with 230 additions and 227 deletions

View File

@ -1,24 +1,24 @@
<template> <template>
<router-view/> <router-view/>
</template> </template>
<style> <style>
*, *::before, *::after { *, *::before, *::after {
box-sizing: border-box; box-sizing: border-box;
} }
html, body { html, body {
padding: 0; padding: 0;
margin: 0; margin: 0;
} }
html { html {
font-size: 16px; font-size: 16px;
} }
body { body {
font-size: 1rem; font-size: 1rem;
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
} }
pre, code, kbd, samp { pre, code, kbd, samp {
font-family: 'Source Code Pro'; font-family: 'Source Code Pro';
} }
</style> </style>

View File

@ -1,5 +1,5 @@
<template> <template>
<LoadableText :text="text" /> <LoadableText :text="text" />
</template> </template>
<script> <script>

View File

@ -1,5 +1,5 @@
<template> <template>
<div v-if="message">{{ message }}</div> <div v-if="message">{{ message }}</div>
</template> </template>
<script> <script>
@ -12,11 +12,11 @@ export default {
<style scoped> <style scoped>
div { div {
text-align: center; text-align: center;
background: #fdd; background: #fdd;
color: #800; color: #800;
padding: 0.5rem 0.75rem; padding: 0.5rem 0.75rem;
margin: 1rem; margin: 1rem;
border-radius: 0.5rem; border-radius: 0.5rem;
} }
</style> </style>

View File

@ -1,23 +1,23 @@
<template> <template>
<div class="wrapper"> <div class="wrapper">
<header> <header>
<slot name="title" /> <slot name="title" />
<slot name="error" /> <slot name="error" />
<slot name="toolbar" /> <slot name="toolbar" />
</header> </header>
<main> <main>
<div class="content"> <div class="content">
<slot /> <slot />
</div> </div>
</main> </main>
<footer> <footer>
<p> <p>
<a :href="source">dri</a> <a :href="source">dri</a>
{{ version }} {{ version }}
by <a href="https://github.com/serverwentdown">@serverwentdown</a> by <a href="https://github.com/serverwentdown">@serverwentdown</a>
</p> </p>
</footer> </footer>
</div> </div>
</template> </template>
<script> <script>
@ -35,20 +35,20 @@ export default {
<style scoped> <style scoped>
header, footer, main { header, footer, main {
margin: 0 auto; margin: 0 auto;
} }
header, footer, .content { header, footer, .content {
padding: 1rem; padding: 1rem;
} }
.content { .content {
width: fit-content;} width: fit-content;}
header, footer { header, footer {
max-width: 38rem; max-width: 38rem;
text-align: center; text-align: center;
} }
main { main {
width: fit-content; width: fit-content;
max-width: 100%; max-width: 100%;
overflow-x: auto; overflow-x: auto;
} }
</style> </style>

View File

@ -1,17 +1,17 @@
<template> <template>
<table> <table>
<thead> <thead>
<slot name="header" /> <slot name="header" />
</thead> </thead>
<tbody> <tbody>
<slot /> <slot />
</tbody> </tbody>
</table> </table>
</template> </template>
<style scoped> <style scoped>
table { table {
min-width: 28rem; min-width: 28rem;
border-spacing: 0; border-spacing: 0;
} }
</style> </style>

View File

@ -1,23 +1,23 @@
<template> <template>
<tr> <tr>
<th class="col title"><slot name="title" /></th> <th class="col title"><slot name="title" /></th>
<th class="col detail" v-if="$slots.detail"><slot name="detail" /></th> <th class="col detail" v-if="$slots.detail"><slot name="detail" /></th>
<th class="col date" v-if="$slots.date"><slot name="date" /></th> <th class="col date" v-if="$slots.date"><slot name="date" /></th>
<th class="col size" v-if="$slots.size"><slot name="size" /></th> <th class="col size" v-if="$slots.size"><slot name="size" /></th>
<th class="col buttons" v-if="$slots.buttons"><slot name="buttons" /></th> <th class="col buttons" v-if="$slots.buttons"><slot name="buttons" /></th>
</tr> </tr>
</template> </template>
<style scoped> <style scoped>
th { th {
padding: 0.5rem; padding: 0.5rem;
white-space: nowrap; white-space: nowrap;
font-size: 0.8em; font-size: 0.8em;
text-align: left; text-align: left;
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
text-align: right; text-align: right;
} }
.title { .title {
text-align: left; text-align: left;
} }
</style> </style>

View File

@ -1,11 +1,11 @@
<template> <template>
<router-link tag="tr" :to="to || {}"> <router-link tag="tr" :to="to || {}">
<td class="col title"><slot name="title" /></td> <td class="col title"><slot name="title" /></td>
<td class="col detail" v-if="$slots.detail"><slot name="detail" /></td> <td class="col detail" v-if="$slots.detail"><slot name="detail" /></td>
<td class="col date" v-if="$slots.date"><slot name="date" /></td> <td class="col date" v-if="$slots.date"><slot name="date" /></td>
<td class="col size" v-if="$slots.size"><slot name="size" /></td> <td class="col size" v-if="$slots.size"><slot name="size" /></td>
<td class="col buttons" v-if="$slots.buttons"><slot name="buttons" /></td> <td class="col buttons" v-if="$slots.buttons"><slot name="buttons" /></td>
</router-link> </router-link>
</template> </template>
<script> <script>
@ -18,19 +18,19 @@ export default {
<style scoped> <style scoped>
tr:hover { tr:hover {
background: #f4f4f4; background: #f4f4f4;
} }
td { td {
padding: 0.5rem 0.75rem; padding: 0.5rem 0.75rem;
white-space: nowrap; white-space: nowrap;
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
border-bottom-width: 0.5px; border-bottom-width: 0.5px;
text-align: right; text-align: right;
} }
.title { .title {
text-align: left; text-align: left;
} }
.detail { .detail {
font-size: 0.8em; font-size: 0.8em;
} }
</style> </style>

View File

@ -1,5 +1,5 @@
<template> <template>
<span :class="{ loading: !text }">{{ text }}<span /><span /><span /></span> <span :class="{ loading: !text }">{{ text }}<span /><span /><span /></span>
</template> </template>
<script> <script>
@ -12,35 +12,35 @@ export default {
<style scoped> <style scoped>
span.loading > span { span.loading > span {
display: inline-block; display: inline-block;
background: #000; background: #000;
border-radius: 0.09375em; border-radius: 0.09375em;
width: 0.1875em; width: 0.1875em;
height: 0.1875em; height: 0.1875em;
margin: 0.25em 0.075em; margin: 0.25em 0.075em;
opacity: 0.5; opacity: 0.5;
} }
span.loading > span:nth-child(1) { span.loading > span:nth-child(1) {
animation: fade 1s ease 0s infinite; animation: fade 1s ease 0s infinite;
} }
span.loading > span:nth-child(2) { span.loading > span:nth-child(2) {
animation: fade 1s ease 0.333s infinite; animation: fade 1s ease 0.333s infinite;
} }
span.loading > span:nth-child(3) { span.loading > span:nth-child(3) {
animation: fade 1s ease 0.666s infinite; animation: fade 1s ease 0.666s infinite;
} }
@keyframes fade { @keyframes fade {
0% { 0% {
opacity: 1; opacity: 1;
} }
33.3% { 33.3% {
opacity: 0.25; opacity: 0.25;
} }
66.6% { 66.6% {
opacity: 0.25; opacity: 0.25;
} }
100% { 100% {
opacity: 1; opacity: 1;
} }
} }
</style> </style>

View File

@ -1,8 +1,8 @@
<template> <template>
<div> <div>
<!-- <span class="prev" @click="prev">Previous</span> --> <!-- <span class="prev" @click="prev">Previous</span> -->
<span class="next" @click="next" v-if="nextLast">Next</span> <span class="next" @click="next" v-if="nextLast">Next</span>
</div> </div>
</template> </template>
<script> <script>
@ -23,12 +23,12 @@ export default {
<style scoped> <style scoped>
div { div {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
padding-top: 0.75rem; padding-top: 0.75rem;
} }
div > span { div > span {
padding: 0.75rem; padding: 0.75rem;
color: #008; color: #008;
} }
</style> </style>

View File

@ -1,5 +1,5 @@
<template> <template>
<LoadableText :text="text" /> <LoadableText :text="text" />
</template> </template>
<script> <script>

View File

@ -19,7 +19,7 @@ button {
outline: none; outline: none;
border-radius: 0.5rem; border-radius: 0.5rem;
background: #66f; background: #66f;
padding: 0.5rem 0.75rem; padding: 0.5rem 0.75rem;
color: #fff; color: #fff;
tap-highlight-color: transparent; tap-highlight-color: transparent;
} }

View File

@ -1,19 +1,19 @@
<template> <template>
<Layout> <Layout>
<h1 slot="title">{{ $route.params.repo }}</h1> <h1 slot="title">{{ $route.params.repo }}</h1>
<Error slot="error" :message='error' /> <Error slot="error" :message='error' />
<h2>Details</h2> <h2>Details</h2>
<List> <List>
<ListItem> <ListItem>
<span slot="title">Full Digest</span> <span slot="title">Full Digest</span>
<span slot="detail">{{ $route.params.digest }}</span> <span slot="detail">{{ $route.params.digest }}</span>
</ListItem> </ListItem>
<ListItem> <ListItem>
<span slot="title">Size</span> <span slot="title">Size</span>
<BlobSize slot="detail" :repo="$route.params.repo" :blob="$route.params.digest" /> <BlobSize slot="detail" :repo="$route.params.repo" :blob="$route.params.digest" />
</ListItem> </ListItem>
</List> </List>
</Layout> </Layout>
</template> </template>
<script> <script>

View File

@ -1,35 +1,35 @@
<template> <template>
<Layout> <Layout>
<h1 slot="title">{{ $route.params.repo }}</h1> <h1 slot="title">{{ $route.params.repo }}</h1>
<Error slot="error" :message='error' /> <Error slot="error" :message='error' />
<Toolbar slot="toolbar"> <Toolbar slot="toolbar">
<ToolbarButton v-if="repoCanDelete" @click="deleteRepo" danger>Delete</ToolbarButton> <ToolbarButton v-if="repoCanDelete" @click="deleteRepo" danger>Delete</ToolbarButton>
</Toolbar> </Toolbar>
<List> <List>
<ListHeader slot="header"> <ListHeader slot="header">
<span slot="title">Tag</span> <span slot="title">Tag</span>
<span slot="detail">Pull Commmand</span> <span slot="detail">Pull Commmand</span>
<span slot="date">Created</span> <span slot="date">Created</span>
<span slot="size">Size</span> <span slot="size">Size</span>
</ListHeader> </ListHeader>
<ListItem <ListItem
v-for="(tag, i) in tags" v-for="(tag, i) in tags"
:key="tag" :key="tag"
:to="{ name: 'tag', params: { tag, }}"> :to="{ name: 'tag', params: { tag, }}">
<span slot="title"> <span slot="title">
{{ tag }} {{ tag }}
</span> </span>
<span slot="detail"> <span slot="detail">
<code>docker pull {{ registryHost }}/{{ $route.params.repo }}:{{ tag }}</code> <code>docker pull {{ registryHost }}/{{ $route.params.repo }}:{{ tag }}</code>
</span> </span>
<time slot="date" :datetime="dates[i]"> <time slot="date" :datetime="dates[i]">
{{ dates[i].toLocaleString() }} {{ dates[i].toLocaleString() }}
</time> </time>
<TagSize slot="size" :repo="$route.params.repo" :tag="tag" /> <TagSize slot="size" :repo="$route.params.repo" :tag="tag" />
</ListItem> </ListItem>
</List> </List>
<Paginator :nextLast="nextLast" /> <Paginator :nextLast="nextLast" />
</Layout> </Layout>
</template> </template>
<script> <script>
@ -74,6 +74,7 @@ export default {
}, },
methods: { methods: {
async deleteRepo() { async deleteRepo() {
// eslint-disable-next-line no-alert
if (!window.confirm(`Are you sure you want to delete ${this.$route.params.repo}?`)) { if (!window.confirm(`Are you sure you want to delete ${this.$route.params.repo}?`)) {
return; return;
} }

View File

@ -1,26 +1,26 @@
<template> <template>
<Layout> <Layout>
<h1 slot="title">Repositories</h1> <h1 slot="title">Repositories</h1>
<Error slot="error" :message='error' /> <Error slot="error" :message='error' />
<List> <List>
<ListHeader slot="header"> <ListHeader slot="header">
<span slot="title">Repository</span> <span slot="title">Repository</span>
<span slot="detail">Pull Commmand</span> <span slot="detail">Pull Commmand</span>
</ListHeader> </ListHeader>
<ListItem <ListItem
v-for="repo in repos" v-for="repo in repos"
:key="repo" :key="repo"
:to="{ name: 'repo', params: { repo, }}"> :to="{ name: 'repo', params: { repo, }}">
<span slot="title"> <span slot="title">
{{ repo }} {{ repo }}
</span> </span>
<span slot="detail"> <span slot="detail">
<code>docker pull {{ registryHost }}/{{ repo }}</code> <code>docker pull {{ registryHost }}/{{ repo }}</code>
</span> </span>
</ListItem> </ListItem>
</List> </List>
<Paginator :nextLast="nextLast" /> <Paginator :nextLast="nextLast" />
</Layout> </Layout>
</template> </template>
<script> <script>

View File

@ -1,36 +1,37 @@
<template> <template>
<Layout> <Layout>
<h1 slot="title">{{ $route.params.repo }}:{{ $route.params.tag }}</h1> <h1 slot="title">{{ $route.params.repo }}:{{ $route.params.tag }}</h1>
<Error slot="error" :message='error' /> <Error slot="error" :message='error' />
<Toolbar slot="toolbar"> <Toolbar slot="toolbar">
<ToolbarButton v-if="tagCanDelete" @click="deleteTag" danger>Delete</ToolbarButton> </Toolbar> <ToolbarButton v-if="tagCanDelete" @click="deleteTag" danger>Delete</ToolbarButton>
<h2>Details</h2> </Toolbar>
<List> <h2>Details</h2>
<ListItem> <List>
<span slot="title">Schema Version</span> <ListItem>
<span slot="detail">{{ tag.schemaVersion }}</span> <span slot="title">Schema Version</span>
</ListItem> <span slot="detail">{{ tag.schemaVersion }}</span>
<ListItem> </ListItem>
<ListItem>
<span slot="title">Full Digest</span> <span slot="title">Full Digest</span>
<span slot="detail">{{ tag.headers.get('Docker-Content-Digest') }}</span> <span slot="detail">{{ tag.headers.get('Docker-Content-Digest') }}</span>
</ListItem> </ListItem>
<ListItem> <ListItem>
<span slot="title">Date Created</span> <span slot="title">Date Created</span>
<span slot="date">{{ new Date(config.created).toLocaleString() }}</span> <span slot="date">{{ new Date(config.created).toLocaleString() }}</span>
</ListItem> </ListItem>
<ListItem> <ListItem>
<span slot="title">Platform</span> <span slot="title">Platform</span>
<span slot="detail">{{ config.os }} {{ config.architecture }}</span> <span slot="detail">{{ config.os }} {{ config.architecture }}</span>
</ListItem> </ListItem>
<ListItem> <ListItem>
<span slot="title">Entrypoint</span> <span slot="title">Entrypoint</span>
<span slot="detail"><code>{{ config.config.Entrypoint }}</code></span> <span slot="detail"><code>{{ config.config.Entrypoint }}</code></span>
</ListItem> </ListItem>
<ListItem> <ListItem>
<span slot="title">Command</span> <span slot="title">Command</span>
<span slot="detail"><code>{{ config.config.Cmd }}</code></span> <span slot="detail"><code>{{ config.config.Cmd }}</code></span>
</ListItem> </ListItem>
<ListItem> <ListItem>
<span slot="title">Labels</span> <span slot="title">Labels</span>
<span slot="detail"> <span slot="detail">
<ul style="text-align: left; list-style: none;"> <ul style="text-align: left; list-style: none;">
@ -39,35 +40,35 @@
</li> </li>
</ul> </ul>
</span> </span>
</ListItem> </ListItem>
<ListItem> <ListItem>
<span slot="title">Layers</span> <span slot="title">Layers</span>
<span slot="size">{{ tag.layers.length }}</span> <span slot="size">{{ tag.layers.length }}</span>
</ListItem> </ListItem>
<ListItem> <ListItem>
<span slot="title">Size</span> <span slot="title">Size</span>
<span slot="size"> <span slot="size">
<TagSize :repo="$route.params.repo" :tag="$route.params.tag" /> <TagSize :repo="$route.params.repo" :tag="$route.params.tag" />
</span> </span>
</ListItem> </ListItem>
</List> </List>
<h2>Layers</h2> <h2>Layers</h2>
<List> <List>
<ListHeader slot="header"> <ListHeader slot="header">
<span slot="title">Digest</span> <span slot="title">Digest</span>
<span slot="detail">Summary</span> <span slot="detail">Summary</span>
<span slot="size">Size</span> <span slot="size">Size</span>
</ListHeader> </ListHeader>
<ListItem <ListItem
v-for="(layer, i) in tag.layers" v-for="(layer, i) in tag.layers"
:key="i" :key="i"
:to="{ name: 'blob', params: { repo: $route.params.repo, digest: layer.digest }}"> :to="{ name: 'blob', params: { repo: $route.params.repo, digest: layer.digest }}">
<span slot="title" :title="layer.digest">{{ identifier(tag, i) }}</span> <span slot="title" :title="layer.digest">{{ identifier(tag, i) }}</span>
<span slot="detail">{{ command(tag, i) }}</span> <span slot="detail">{{ command(tag, i) }}</span>
<BlobSize slot="size" :size="layer.size" /> <BlobSize slot="size" :size="layer.size" />
</ListItem> </ListItem>
</List> </List>
</Layout> </Layout>
</template> </template>
<script> <script>
@ -112,6 +113,7 @@ export default {
}, },
methods: { methods: {
async deleteTag() { async deleteTag() {
// eslint-disable-next-line no-alert
if (!window.confirm(`Are you sure you want to delete ${this.$route.params.repo}:${this.$route.params.tag}?`)) { if (!window.confirm(`Are you sure you want to delete ${this.$route.params.repo}:${this.$route.params.tag}?`)) {
return; return;
} }