1
0
mirror of https://github.com/hotomoe/hotomoe synced 2024-11-24 23:26:17 +09:00
This commit is contained in:
syuilo 2018-10-25 06:04:06 +09:00
parent 6c6c003d68
commit 69b730e91a
No known key found for this signature in database
GPG Key ID: BDC4C49D06AB9D69
3 changed files with 93 additions and 373 deletions

414
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -112,7 +112,6 @@
"eslint": "5.7.0",
"eslint-plugin-vue": "4.7.1",
"eventemitter3": "3.1.0",
"exif-js": "2.3.0",
"file-loader": "2.0.0",
"file-type": "10.1.0",
"fuckadblock": "3.2.1",
@ -131,7 +130,6 @@
"gulp-uglify": "3.0.1",
"gulp-util": "3.0.8",
"hard-source-webpack-plugin": "0.12.0",
"highlight.js": "9.13.1",
"html-minifier": "3.5.20",
"http-signature": "1.2.0",
"insert-text-at-cursor": "0.1.1",

View File

@ -5,7 +5,6 @@
:src="file.url"
:alt="file.name"
:title="file.name"
@load="onImageLoaded"
:style="style">
<template v-if="kind != 'image'">%fa:file%</template>
<footer v-if="kind == 'image' && file.properties && file.properties.width && file.properties.height">
@ -46,14 +45,6 @@
<ui-button @click="del">%fa:trash-alt R% %i18n:@delete%</ui-button>
</div>
</div>
<div class="exif" v-show="exif">
<div>
<p>
%fa:camera%%i18n:@exif%
</p>
<pre ref="exif" class="json">{{ exif ? JSON.stringify(exif, null, 2) : '' }}</pre>
</div>
</div>
<div class="hash">
<div>
<p>
@ -67,8 +58,6 @@
<script lang="ts">
import Vue from 'vue';
import * as EXIF from 'exif-js';
import * as hljs from 'highlight.js';
import { gcd } from '../../../../../prelude/math';
export default Vue.extend({
@ -139,15 +128,6 @@ export default Vue.extend({
showCreatedAt() {
alert(new Date(this.file.createdAt).toLocaleString());
},
onImageLoaded() {
const self = this;
EXIF.getData(this.$refs.img, function(this: any) {
const allMetaData = EXIF.getAllTags(this);
self.exif = allMetaData;
hljs.highlightBlock(self.$refs.exif);
});
}
}
});
@ -256,34 +236,4 @@ export default Vue.extend({
border-radius 2px
background #f5f5f5
> .exif
padding 14px
border-top solid 1px var(--faceDivider)
> div
max-width 500px
margin 0 auto
> p
display block
margin 0
padding 0
color var(--text)
font-size 0.9em
> [data-fa]
margin-right 4px
> pre
display block
width 100%
margin 6px 0 0 0
padding 8px
height 128px
overflow auto
font-size 0.9em
border solid 1px #dfdfdf
border-radius 2px
background #f5f5f5
</style>