-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blacklist content of user #218
base: develop
Are you sure you want to change the base?
Conversation
76900db
to
b27da6b
Compare
82a264a
to
bd11a2a
Compare
helpers/createApiClient.js
Outdated
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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: [
What is the status of this, still WIP? Or DONE? |
Definitely a WIP as the branch that was merged into it is also not ready for develop. |
0fbd106
to
2414f0a
Compare
51d8030
to
82bc7a5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some minor things that I coughed.
@click="toggleFollow" | ||
:disabled="follow.isPending" | ||
:disabled="follow.isPending || this.isBlacklisted()" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to be a Microsoft Bug 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤣 🤣 🤣
:disabled="isPending || isFollowing" | ||
:isLoading="isPending" | ||
@click="toggleBlacklist"> | ||
<template v-if="isBlacklisted()"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use computed properties
``` session on the server side (SSR) is not destroyed which leads to the following scenario: 1. login as admin ([email protected]) 2. logout 3. login as regular user ([email protected]) 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
Much easier
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
cf78a3a
Compare
@appinteractive can you give me another review please? |
Things to fix:
|
|
as @appinteractive suggested
Only if comment.isBlacklisted is set by the backend
this PR assumes Human-Connection/API#180 has been merged |
close #211