summaryrefslogtreecommitdiff
path: root/src/web/app/common
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-02-16 17:20:45 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-02-16 17:20:45 +0900
commit35bc0c024f0657057b048e98989d6e6bfa96b25b (patch)
treec68fa295f83c87d8bc167b9dddc732027573d5c7 /src/web/app/common
parent[API] 良い感じに (diff)
downloadsharkey-35bc0c024f0657057b048e98989d6e6bfa96b25b.tar.gz
sharkey-35bc0c024f0657057b048e98989d6e6bfa96b25b.tar.bz2
sharkey-35bc0c024f0657057b048e98989d6e6bfa96b25b.zip
[Client] 良い感じに
Diffstat (limited to 'src/web/app/common')
-rw-r--r--src/web/app/common/scripts/gcd.js2
-rw-r--r--src/web/app/common/tags/file-type-icon.tag7
2 files changed, 5 insertions, 4 deletions
diff --git a/src/web/app/common/scripts/gcd.js b/src/web/app/common/scripts/gcd.js
new file mode 100644
index 0000000000..43bfbc57ae
--- /dev/null
+++ b/src/web/app/common/scripts/gcd.js
@@ -0,0 +1,2 @@
+const gcd = (a, b) => !b ? a : gcd(b, a % b);
+module.exports = gcd;
diff --git a/src/web/app/common/tags/file-type-icon.tag b/src/web/app/common/tags/file-type-icon.tag
index 054457bf03..b4b0c88d66 100644
--- a/src/web/app/common/tags/file-type-icon.tag
+++ b/src/web/app/common/tags/file-type-icon.tag
@@ -1,11 +1,10 @@
-<mk-file-type-icon><i class="fa fa-file-image-o" if={ kind == 'image' }></i>
+<mk-file-type-icon>
+ <i class="fa fa-file-image-o" if={ kind == 'image' }></i>
<style type="stylus">
:scope
display inline
-
</style>
<script>
- @file = @opts.file
- @kind = @file.type.split \/ .0
+ @kind = @opts.type.split \/ .0
</script>
</mk-file-type-icon>