merge develop, fix conflicts, fix logged out bug
This commit is contained in:
commit
16c7bd0199
19 changed files with 61 additions and 65 deletions
|
@ -5,7 +5,7 @@ const getOrCreateApp = ({oauth, instance}) => {
|
|||
const form = new window.FormData()
|
||||
|
||||
form.append('client_name', `PleromaFE_${Math.random()}`)
|
||||
form.append('redirect_uris', `${window.location.origin}/~/oauth-callback`)
|
||||
form.append('redirect_uris', `${window.location.origin}/oauth-callback`)
|
||||
form.append('scopes', 'read write follow')
|
||||
|
||||
return window.fetch(url, {
|
||||
|
@ -64,7 +64,7 @@ const getToken = ({app, instance, code}) => {
|
|||
form.append('client_secret', app.client_secret)
|
||||
form.append('grant_type', 'authorization_code')
|
||||
form.append('code', code)
|
||||
form.append('redirect_uri', `${window.location.origin}/~/oauth-callback`)
|
||||
form.append('redirect_uri', `${window.location.origin}/oauth-callback`)
|
||||
|
||||
return window.fetch(url, {
|
||||
method: 'POST',
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
const generateProfileLink = (id, screenName) => {
|
||||
import { includes } from 'lodash'
|
||||
|
||||
const generateProfileLink = (id, screenName, restrictedNicknames) => {
|
||||
const complicated = (isExternal(screenName) || includes(restrictedNicknames, screenName))
|
||||
return {
|
||||
name: (isExternal(screenName) ? 'external-user-profile' : 'user-profile'),
|
||||
params: (isExternal(screenName) ? { id } : { name: screenName })
|
||||
name: (complicated ? 'external-user-profile' : 'user-profile'),
|
||||
params: (complicated ? { id } : { name: screenName })
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue