summaryrefslogtreecommitdiff
path: root/src/web/app/common
diff options
context:
space:
mode:
authorrinsuki <428rinsuki+git@gmail.com>2018-03-26 16:56:46 +0900
committerrinsuki <428rinsuki+git@gmail.com>2018-03-26 16:56:46 +0900
commit2dba24d0da54b5be3d5435c250af832276ae2c8e (patch)
treeebcdc364e6e483dc39b2ccb60714d9f2822fa5b6 /src/web/app/common
parentMerge pull request #1297 from rinsuki/fix/1296-broken (diff)
downloadsharkey-2dba24d0da54b5be3d5435c250af832276ae2c8e.tar.gz
sharkey-2dba24d0da54b5be3d5435c250af832276ae2c8e.tar.bz2
sharkey-2dba24d0da54b5be3d5435c250af832276ae2c8e.zip
mk-images -> mk-media-list, mk-images-image -> mk-media-image
Diffstat (limited to 'src/web/app/common')
-rw-r--r--src/web/app/common/views/components/index.ts4
-rw-r--r--src/web/app/common/views/components/media-list.vue (renamed from src/web/app/common/views/components/images.vue)18
2 files changed, 11 insertions, 11 deletions
diff --git a/src/web/app/common/views/components/index.ts b/src/web/app/common/views/components/index.ts
index fbf9d22a0b..b58ba37ecb 100644
--- a/src/web/app/common/views/components/index.ts
+++ b/src/web/app/common/views/components/index.ts
@@ -11,7 +11,7 @@ import reactionIcon from './reaction-icon.vue';
import reactionsViewer from './reactions-viewer.vue';
import time from './time.vue';
import timer from './timer.vue';
-import images from './images.vue';
+import mediaList from './media-list.vue';
import uploader from './uploader.vue';
import specialMessage from './special-message.vue';
import streamIndicator from './stream-indicator.vue';
@@ -36,7 +36,7 @@ Vue.component('mk-reaction-icon', reactionIcon);
Vue.component('mk-reactions-viewer', reactionsViewer);
Vue.component('mk-time', time);
Vue.component('mk-timer', timer);
-Vue.component('mk-images', images);
+Vue.component('mk-media-list', mediaList);
Vue.component('mk-uploader', uploader);
Vue.component('mk-special-message', specialMessage);
Vue.component('mk-stream-indicator', streamIndicator);
diff --git a/src/web/app/common/views/components/images.vue b/src/web/app/common/views/components/media-list.vue
index dc802a0180..b0e6685082 100644
--- a/src/web/app/common/views/components/images.vue
+++ b/src/web/app/common/views/components/media-list.vue
@@ -1,6 +1,6 @@
<template>
-<div class="mk-images">
- <mk-images-image v-for="image in images" ref="image" :image="image" :key="image.id"/>
+<div class="mk-media-list">
+ <mk-media-image v-for="media in mediaList" ref="media" :image="media" :key="media.id"/>
</div>
</template>
@@ -8,16 +8,16 @@
import Vue from 'vue';
export default Vue.extend({
- props: ['images'],
+ props: ['mediaList'],
mounted() {
- const tags = this.$refs.image as Vue[];
+ const tags = this.$refs.media as Vue[];
- if (this.images.length == 1) {
+ if (this.mediaList.length == 1) {
(this.$el.style as any).gridTemplateRows = '1fr';
(tags[0].$el.style as any).gridColumn = '1 / 2';
(tags[0].$el.style as any).gridRow = '1 / 2';
- } else if (this.images.length == 2) {
+ } else if (this.mediaList.length == 2) {
(this.$el.style as any).gridTemplateColumns = '1fr 1fr';
(this.$el.style as any).gridTemplateRows = '1fr';
@@ -25,7 +25,7 @@ export default Vue.extend({
(tags[0].$el.style as any).gridRow = '1 / 2';
(tags[1].$el.style as any).gridColumn = '2 / 3';
(tags[1].$el.style as any).gridRow = '1 / 2';
- } else if (this.images.length == 3) {
+ } else if (this.mediaList.length == 3) {
(this.$el.style as any).gridTemplateColumns = '1fr 0.5fr';
(this.$el.style as any).gridTemplateRows = '1fr 1fr';
@@ -35,7 +35,7 @@ export default Vue.extend({
(tags[1].$el.style as any).gridRow = '1 / 2';
(tags[2].$el.style as any).gridColumn = '2 / 3';
(tags[2].$el.style as any).gridRow = '2 / 3';
- } else if (this.images.length == 4) {
+ } else if (this.mediaList.length == 4) {
(this.$el.style as any).gridTemplateColumns = '1fr 1fr';
(this.$el.style as any).gridTemplateRows = '1fr 1fr';
@@ -53,7 +53,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
-.mk-images
+.mk-media-list
display grid
grid-gap 4px
height 256px