Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pleroma-fe
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pleroma
pleroma-fe
Commits
504d48fc
Commit
504d48fc
authored
4 years ago
by
lain
Browse files
Options
Downloads
Patches
Plain Diff
After Store: Remove last statusnet vestiges.
parent
143da55c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!1217
2.1.0 into master
,
!1084
Remove StatusNet config endpoint usage
Pipeline
#27641
passed
4 years ago
Stage: lint
Stage: build
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/boot/after_store.js
+7
-6
7 additions, 6 deletions
src/boot/after_store.js
with
7 additions
and
6 deletions
src/boot/after_store.js
+
7
−
6
View file @
504d48fc
...
...
@@ -8,14 +8,15 @@ import backendInteractorService from '../services/backend_interactor_service/bac
import
{
CURRENT_VERSION
}
from
'
../services/theme_data/theme_data.service.js
'
import
{
applyTheme
}
from
'
../services/style_setter/style_setter.js
'
const
get
Statusnet
Config
=
async
({
store
})
=>
{
const
get
Instance
Config
=
async
({
store
})
=>
{
try
{
const
res
=
await
window
.
fetch
(
'
/api/
statusnet/config.json
'
)
const
res
=
await
window
.
fetch
(
'
/api/
v1/instance
'
)
if
(
res
.
ok
)
{
const
data
=
await
res
.
json
()
const
{
textlimit
,
vapidPublicKey
}
=
data
.
site
const
textlimit
=
data
.
max_toot_chars
const
vapidPublicKey
=
data
.
pleroma
.
vapid_public_key
store
.
dispatch
(
'
setInstanceOption
'
,
{
name
:
'
textlimit
'
,
value
:
parseInt
(
textlimit
)
})
store
.
dispatch
(
'
setInstanceOption
'
,
{
name
:
'
textlimit
'
,
value
:
textlimit
})
if
(
vapidPublicKey
)
{
store
.
dispatch
(
'
setInstanceOption
'
,
{
name
:
'
vapidPublicKey
'
,
value
:
vapidPublicKey
})
...
...
@@ -24,7 +25,7 @@ const getStatusnetConfig = async ({ store }) => {
throw
(
res
)
}
}
catch
(
error
)
{
console
.
error
(
'
Could not load sta
tusnet
config, potentially fatal
'
)
console
.
error
(
'
Could not load
in
sta
nce
config, potentially fatal
'
)
console
.
error
(
error
)
}
}
...
...
@@ -319,7 +320,7 @@ const afterStoreSetup = async ({ store, i18n }) => {
getInstancePanel
({
store
}),
getStickers
({
store
}),
getNodeInfo
({
store
}),
get
Statusnet
Config
({
store
})
get
Instance
Config
({
store
})
])
// Start fetching things that don't need to block the UI
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment