diff --git a/config/index.js b/config/index.js index 6652048c..c48d91b8 100644 --- a/config/index.js +++ b/config/index.js @@ -23,9 +23,15 @@ module.exports = { assetsPublicPath: '/', proxyTable: { '/api': { - target: 'https://social.heldscal.la/', + target: 'htts://localhost:4000/', changeOrigin: true, cookieDomainRewrite: 'localhost' + }, + '/socket': { + target: 'htts://localhost:4000/', + changeOrigin: true, + cookieDomainRewrite: 'localhost', + ws: true } }, // CSS Sourcemaps off by default because relative paths are "buggy" diff --git a/package.json b/package.json index e8d84274..4e98647b 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "localforage": "^1.5.0", "node-sass": "^3.10.1", "object-path": "^0.11.3", + "phoenix": "^1.3.0", "sanitize-html": "^1.13.0", "sass-loader": "^4.0.2", "vue": "^2.3.4", diff --git a/src/App.scss b/src/App.scss index 9aa3ee98..95a653ce 100644 --- a/src/App.scss +++ b/src/App.scss @@ -16,7 +16,13 @@ h4 { } #content { - padding-top: 60px; + box-sizing: border-box; + padding-top: 60px; + margin: auto; + min-height: 100vh; + max-width: 980px; + background-color: rgba(0,0,0,0.15); + align-content: flex-start; } .text-center { @@ -157,15 +163,6 @@ main-router { margin: 0; } - -#content { - margin: auto; - min-height: 100vh; - max-width: 980px; - padding-bottom: 1em; - background-color: rgba(0,0,0,0.1); -} - .container > * { min-width: 0px; } @@ -210,10 +207,11 @@ nav { .panel-switcher { display: none; width: 100%; - + height: 46px; button { display: block; flex: 1; + max-height: 32px; margin: 0.5em; padding: 0.5em; } diff --git a/src/components/attachment/attachment.vue b/src/components/attachment/attachment.vue index 20d10cce..d6a51ffd 100644 --- a/src/components/attachment/attachment.vue +++ b/src/components/attachment/attachment.vue @@ -34,6 +34,13 @@ display: flex; flex-wrap: wrap; margin-right: -0.7em; + + .attachment.media-upload-container { + flex: 0 0 auto; + max-height: 300px; + max-width: 100%; + } + .attachment { flex: 1 0 30%; margin: 0.5em 0.7em 0.6em 0.0em; @@ -82,9 +89,7 @@ img.media-upload { margin-bottom: -2px; max-height: 300px; - width: 100%; - height: 100%; - flex: 1; + max-width: 100%; } .oembed { @@ -126,6 +131,7 @@ width: 100%; height: 100%; /* If this isn't here, chrome will stretch the images */ max-height: 500px; + image-orientation: from-image; } } } diff --git a/src/components/chat/chat.js b/src/components/chat/chat.js new file mode 100644 index 00000000..ef326d4a --- /dev/null +++ b/src/components/chat/chat.js @@ -0,0 +1,21 @@ +const chat = { + data () { + return { + currentMessage: '', + channel: null + } + }, + computed: { + messages () { + return this.$store.state.chat.messages + } + }, + methods: { + submit (message) { + this.$store.state.chat.channel.push('new_msg', {text: message}, 10000) + this.currentMessage = '' + } + } +} + +export default chat diff --git a/src/components/chat/chat.vue b/src/components/chat/chat.vue new file mode 100644 index 00000000..6c1e2c38 --- /dev/null +++ b/src/components/chat/chat.vue @@ -0,0 +1,59 @@ + + + + + + diff --git a/src/components/delete_button/delete_button.vue b/src/components/delete_button/delete_button.vue index 304f8a63..845ac777 100644 --- a/src/components/delete_button/delete_button.vue +++ b/src/components/delete_button/delete_button.vue @@ -1,7 +1,7 @@ diff --git a/src/components/favorite_button/favorite_button.vue b/src/components/favorite_button/favorite_button.vue index 0abece31..dcf28e35 100644 --- a/src/components/favorite_button/favorite_button.vue +++ b/src/components/favorite_button/favorite_button.vue @@ -1,6 +1,6 @@ @@ -15,7 +15,7 @@ color: orange; } } - .icon-star { + .favorite-button.icon-star { color: orange; } diff --git a/src/components/media_upload/media_upload.vue b/src/components/media_upload/media_upload.vue index b839067b..9e6ad608 100644 --- a/src/components/media_upload/media_upload.vue +++ b/src/components/media_upload/media_upload.vue @@ -1,8 +1,8 @@ - +