Uh oh!
There was an error while loading. Please reload this page.
Blacklist content of user - #218
Conversation
76900db to
b27da6bCompare82a264a to
bd11a2aCompare| import Cookie from 'cookie-universal' | ||
| const authKey = 'feathers-jwt' | ||
| const endpoint = urlHelper.buildEndpointURL(process.env.API_HOST, { port: process.env.API_PORT }) |
There was a problem hiding this comment.
@appinteractive help! After merging/rebasing on fix-docker-setup I'm facing the problem again, that process.env is set at build time. I cannot see a solution here. 😿
There was a problem hiding this comment.
@roschaefer
Try adding the variables you need at runtime from env in the webpack.EnvironmentPlugin like so (the second parameter is the 'default' value in case the env variable isn't set):
diff --git a/nuxt.config.js b/nuxt.config.js
index 6e88623..e4be132 100644
--- a/nuxt.config.js
+++ b/nuxt.config.js
@@ -1,5 +1,6 @@
require('dotenv').config()
const path = require('path')
+const webpack = require('webpack')
module.exports = {
env: {
@@ -90,6 +91,7 @@ module.exports = {
// Mapbox-gl throws error after being uglified
// https://github.com/mapbox/mapbox-gl-js/issues/4359
config.module.noParse = /(mapbox-gl)\.js$/
+ config.plugins.unshift(new webpack.EnvironmentPlugin({API_HOST: 'localhost'}))
}
},
plugins: [
frankgerhardt
commented
Sep 16, 2018
What is the status of this, still WIP? Or DONE? |
appinteractive
commented
Sep 16, 2018
Definitely a WIP as the branch that was merged into it is also not ready for develop. |
0fbd106 to
2414f0aCompare51d8030 to
82bc7a5CompareLulalaby
commented
Oct 13, 2018
appinteractive
left a comment
There was a problem hiding this comment.
Just some minor things that I coughed.
| :class="{'is-primary': !follow.isPending && !follow.isFollowing}" | ||
| @click="toggleFollow" | ||
| :disabled="follow.isPending" | ||
| :disabled="follow.isPending || this.isBlacklisted()" |
There was a problem hiding this comment.
Dont use this inside Templates.
Also is it possible to use a computed property instead of a method?
There was a problem hiding this comment.
@appinteractive I find it odd that this comment is still visible although the code has been altered a long time ago 🤔
There was a problem hiding this comment.
Seems to be a Microsoft Bug 😅
| :disabled="isPending || isFollowing" | ||
| :isLoading="isPending" | ||
| @click="toggleBlacklist"> | ||
| <template v-if="isBlacklisted()"> |
Uh oh!
There was an error while loading. Please reload this page.
``` session on the server side (SSR) is not destroyed which leads to the following scenario: 1. login as admin (test@test.de) 2. logout 3. login as regular user (test3@test3.de) 4. refresh page after you are logged in 5. see that you are logged in again as the last user (admin) instead of your last loggin (user) You need to remove that session also on the server side, maybe there is a cookie still flying around in the browser which is then send on SSR and the backend responds with the logged in user from the token in the cookie. ``` This is not possible now, as the lazy-loading happens with `app.$api` and not the socket.
Thus ava and jest can be used in combination
on blacklist settings. This button was requested by a couple of users.
Show it on initial request for the entire box but if you click on the block button just rely on the block button's own loading behaviour.
3793efd to
cf78a3aCompareroschaefer
commented
Nov 12, 2018
@appinteractive can you give me another review please? |
roschaefer
commented
Nov 12, 2018
Things to fix:
|
|
Only if comment.isBlacklisted is set by the backend
roschaefer
commented
Nov 13, 2018
this PR assumes Human-Connection/API#180 has been merged |
close#211