mirror of
https://github.com/sissbruecker/linkding.git
synced 2025-08-08 03:08:29 +02:00
Improve PWA capabilities (#630)
* Improve PWA capabilities * Invert background_color theme logic * Revert build changes
This commit is contained in:

committed by
GitHub

parent
2deecc5c91
commit
6f52bafda8
@@ -11,9 +11,91 @@ class MetadataViewTestCase(TestCase):
|
||||
response_body = response.json()
|
||||
expected_body = {
|
||||
"short_name": "linkding",
|
||||
"name": "linkding",
|
||||
"description": "Self-hosted bookmark service",
|
||||
"start_url": "bookmarks",
|
||||
"display": "standalone",
|
||||
"scope": "/",
|
||||
"theme_color": "#5856e0",
|
||||
"background_color": "#ffffff",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/static/logo.svg",
|
||||
"type": "image/svg+xml",
|
||||
"sizes": "512x512",
|
||||
"purpose": "any"
|
||||
},
|
||||
{
|
||||
"src": "/static/logo-512.png",
|
||||
"type": "image/png",
|
||||
"sizes": "512x512",
|
||||
"purpose": "any"
|
||||
},
|
||||
{
|
||||
"src": "/static/logo-192.png",
|
||||
"type": "image/png",
|
||||
"sizes": "192x192",
|
||||
"purpose": "any"
|
||||
},
|
||||
{
|
||||
"src": "/static/maskable-logo.svg",
|
||||
"type": "image/svg+xml",
|
||||
"sizes": "512x512",
|
||||
"purpose": "maskable"
|
||||
},
|
||||
{
|
||||
"src": "/static/maskable-logo-512.png",
|
||||
"type": "image/png",
|
||||
"sizes": "512x512",
|
||||
"purpose": "maskable"
|
||||
},
|
||||
{
|
||||
"src": "/static/maskable-logo-192.png",
|
||||
"type": "image/png",
|
||||
"sizes": "192x192",
|
||||
"purpose": "maskable"
|
||||
},
|
||||
],
|
||||
"shortcuts": [
|
||||
{
|
||||
"name": "Add bookmark",
|
||||
"url": "/bookmarks/new",
|
||||
},
|
||||
{
|
||||
"name": "Archived",
|
||||
"url": "/bookmarks/archived",
|
||||
},
|
||||
{
|
||||
"name": "Unread",
|
||||
"url": "/bookmarks?unread=yes",
|
||||
},
|
||||
{
|
||||
"name": "Untagged",
|
||||
"url": "/bookmarks?q=!untagged",
|
||||
},
|
||||
{
|
||||
"name": "Shared",
|
||||
"url": "/bookmarks/shared",
|
||||
}
|
||||
],
|
||||
"screenshots": [
|
||||
{
|
||||
"src": "/static/linkding-screenshot.png",
|
||||
"type": "image/png",
|
||||
"sizes": "2158x1160",
|
||||
"form_factor": "wide"
|
||||
}
|
||||
],
|
||||
"share_target": {
|
||||
"action": "/bookmarks/new",
|
||||
"method": "GET",
|
||||
"enctype": "application/x-www-form-urlencoded",
|
||||
"params": {
|
||||
"url": "url",
|
||||
"text": "url",
|
||||
"title": "title",
|
||||
}
|
||||
}
|
||||
}
|
||||
self.assertDictEqual(response_body, expected_body)
|
||||
|
||||
@@ -26,8 +108,90 @@ class MetadataViewTestCase(TestCase):
|
||||
response_body = response.json()
|
||||
expected_body = {
|
||||
"short_name": "linkding",
|
||||
"name": "linkding",
|
||||
"description": "Self-hosted bookmark service",
|
||||
"start_url": "bookmarks",
|
||||
"display": "standalone",
|
||||
"scope": "/linkding/",
|
||||
"theme_color": "#5856e0",
|
||||
"background_color": "#ffffff",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/linkding/static/logo.svg",
|
||||
"type": "image/svg+xml",
|
||||
"sizes": "512x512",
|
||||
"purpose": "any"
|
||||
},
|
||||
{
|
||||
"src": "/linkding/static/logo-512.png",
|
||||
"type": "image/png",
|
||||
"sizes": "512x512",
|
||||
"purpose": "any"
|
||||
},
|
||||
{
|
||||
"src": "/linkding/static/logo-192.png",
|
||||
"type": "image/png",
|
||||
"sizes": "192x192",
|
||||
"purpose": "any"
|
||||
},
|
||||
{
|
||||
"src": "/linkding/static/maskable-logo.svg",
|
||||
"type": "image/svg+xml",
|
||||
"sizes": "512x512",
|
||||
"purpose": "maskable"
|
||||
},
|
||||
{
|
||||
"src": "/linkding/static/maskable-logo-512.png",
|
||||
"type": "image/png",
|
||||
"sizes": "512x512",
|
||||
"purpose": "maskable"
|
||||
},
|
||||
{
|
||||
"src": "/linkding/static/maskable-logo-192.png",
|
||||
"type": "image/png",
|
||||
"sizes": "192x192",
|
||||
"purpose": "maskable"
|
||||
},
|
||||
],
|
||||
"shortcuts": [
|
||||
{
|
||||
"name": "Add bookmark",
|
||||
"url": "/linkding/bookmarks/new",
|
||||
},
|
||||
{
|
||||
"name": "Archived",
|
||||
"url": "/linkding/bookmarks/archived",
|
||||
},
|
||||
{
|
||||
"name": "Unread",
|
||||
"url": "/linkding/bookmarks?unread=yes",
|
||||
},
|
||||
{
|
||||
"name": "Untagged",
|
||||
"url": "/linkding/bookmarks?q=!untagged",
|
||||
},
|
||||
{
|
||||
"name": "Shared",
|
||||
"url": "/linkding/bookmarks/shared",
|
||||
}
|
||||
],
|
||||
"screenshots": [
|
||||
{
|
||||
"src": "/linkding/static/linkding-screenshot.png",
|
||||
"type": "image/png",
|
||||
"sizes": "2158x1160",
|
||||
"form_factor": "wide"
|
||||
}
|
||||
],
|
||||
"share_target": {
|
||||
"action": "/linkding/bookmarks/new",
|
||||
"method": "GET",
|
||||
"enctype": "application/x-www-form-urlencoded",
|
||||
"params": {
|
||||
"url": "url",
|
||||
"text": "url",
|
||||
"title": "title",
|
||||
}
|
||||
}
|
||||
}
|
||||
self.assertDictEqual(response_body, expected_body)
|
||||
|
Reference in New Issue
Block a user