Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
funkwhale
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
Andy Craze
funkwhale
Commits
9ab3afa4
Verified
Commit
9ab3afa4
authored
5 years ago
by
Eliot Berriot
Browse files
Options
Downloads
Patches
Plain Diff
Fixed broken urls in manifest.json
parent
ef6219e8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
api/funkwhale_api/instance/views.py
+2
-0
2 additions, 0 deletions
api/funkwhale_api/instance/views.py
api/tests/instance/test_views.py
+3
-0
3 additions, 0 deletions
api/tests/instance/test_views.py
front/vue.config.js
+4
-3
4 additions, 3 deletions
front/vue.config.js
with
9 additions
and
3 deletions
api/funkwhale_api/instance/views.py
+
2
−
0
View file @
9ab3afa4
...
...
@@ -10,6 +10,7 @@ from rest_framework.response import Response
from
funkwhale_api.common
import
middleware
from
funkwhale_api.common
import
preferences
from
funkwhale_api.federation
import
utils
as
federation_utils
from
funkwhale_api.users.oauth
import
permissions
as
oauth_permissions
from
.
import
nodeinfo
...
...
@@ -57,6 +58,7 @@ class SpaManifest(views.APIView):
)
parsed_manifest
=
json
.
loads
(
existing_manifest
)
parsed_manifest
[
"
short_name
"
]
=
settings
.
APP_NAME
parsed_manifest
[
"
start_url
"
]
=
federation_utils
.
full_url
(
"
/
"
)
instance_name
=
preferences
.
get
(
"
instance__name
"
)
if
instance_name
:
parsed_manifest
[
"
short_name
"
]
=
instance_name
...
...
This diff is collapsed.
Click to expand it.
api/tests/instance/test_views.py
+
3
−
0
View file @
9ab3afa4
...
...
@@ -2,6 +2,8 @@ import json
from
django.urls
import
reverse
from
funkwhale_api.federation
import
utils
as
federation_utils
def
test_nodeinfo_endpoint
(
db
,
api_client
,
mocker
):
payload
=
{
"
test
"
:
"
test
"
}
...
...
@@ -54,6 +56,7 @@ def test_manifest_endpoint(api_client, mocker, preferences, tmp_path, settings):
"
name
"
:
"
Test pod
"
,
"
short_name
"
:
"
Test pod
"
,
"
description
"
:
"
Test description
"
,
"
start_url
"
:
federation_utils
.
full_url
(
"
/
"
),
}
manifest
.
write_bytes
(
json
.
dumps
(
base_payload
).
encode
())
...
...
This diff is collapsed.
Click to expand it.
front/vue.config.js
+
4
−
3
View file @
9ab3afa4
const
baseUrl
=
process
.
env
.
BASE_URL
||
'
/front/
'
const
BundleAnalyzerPlugin
=
require
(
'
webpack-bundle-analyzer
'
).
BundleAnalyzerPlugin
;
const
webpack
=
require
(
'
webpack
'
);
...
...
@@ -30,7 +31,7 @@ plugins.push(
}),
)
module
.
exports
=
{
baseUrl
:
process
.
env
.
BASE_URL
||
'
/front/
'
,
baseUrl
:
baseUrl
,
productionSourceMap
:
false
,
// Add settings for manifest file
pwa
:
{
...
...
@@ -48,11 +49,11 @@ module.exports = {
categories
:
[
"
music
"
],
icons
:
[
{
'
src
'
:
'
favicon.png
'
,
'
src
'
:
baseUrl
+
'
favicon.png
'
,
'
sizes
'
:
'
192x192
'
,
'
type
'
:
'
image/png
'
},
{
'
src
'
:
'
favicon.png
'
,
'
src
'
:
baseUrl
+
'
favicon.png
'
,
'
sizes
'
:
'
512x512
'
,
'
type
'
:
'
image/png
'
},
...
...
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