summaryrefslogtreecommitdiff
path: root/src/web/app/common
diff options
context:
space:
mode:
authorこぴなたみぽ <syuilotan@yahoo.co.jp>2018-02-16 20:55:57 +0900
committerこぴなたみぽ <syuilotan@yahoo.co.jp>2018-02-16 20:55:57 +0900
commitfa142e3e72ff343600cd9560e0898db1bc9dfef7 (patch)
tree4a48bc73d2e4bb0dd8cdda12cd751755de0e37a2 /src/web/app/common
parentwip (diff)
downloadsharkey-fa142e3e72ff343600cd9560e0898db1bc9dfef7.tar.gz
sharkey-fa142e3e72ff343600cd9560e0898db1bc9dfef7.tar.bz2
sharkey-fa142e3e72ff343600cd9560e0898db1bc9dfef7.zip
wip
Diffstat (limited to 'src/web/app/common')
-rw-r--r--src/web/app/common/-tags/file-type-icon.tag10
-rw-r--r--src/web/app/common/views/components/file-type-icon.vue17
2 files changed, 17 insertions, 10 deletions
diff --git a/src/web/app/common/-tags/file-type-icon.tag b/src/web/app/common/-tags/file-type-icon.tag
deleted file mode 100644
index f630efe118..0000000000
--- a/src/web/app/common/-tags/file-type-icon.tag
+++ /dev/null
@@ -1,10 +0,0 @@
-<mk-file-type-icon>
- <template v-if="kind == 'image'">%fa:file-image%</template>
- <style lang="stylus" scoped>
- :scope
- display inline
- </style>
- <script lang="typescript">
- this.kind = this.opts.type.split('/')[0];
- </script>
-</mk-file-type-icon>
diff --git a/src/web/app/common/views/components/file-type-icon.vue b/src/web/app/common/views/components/file-type-icon.vue
new file mode 100644
index 0000000000..aa2f0ed519
--- /dev/null
+++ b/src/web/app/common/views/components/file-type-icon.vue
@@ -0,0 +1,17 @@
+<template>
+<span>
+ <template v-if="kind == 'image'">%fa:file-image%</template>
+</span>
+</template>
+
+<script lang="ts">
+import Vue from 'vue';
+export default Vue.extend({
+ props: ['type'],
+ computed: {
+ kind(): string {
+ return this.type.split('/')[0];
+ }
+ }
+});
+</script>