Skip to content

Commit

Permalink
Use favicon from admin client
Browse files Browse the repository at this point in the history
  • Loading branch information
attemoi committed Mar 12, 2024
1 parent d76126c commit c042c6c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion api/admin/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@ class OperationalMode(str, Enum):
class Configuration(LoggerMixin):
APP_NAME = "E-kirjasto Collection Manager"
PACKAGE_NAME = "@natlibfi/ekirjasto-circulation-admin"
PACKAGE_VERSION = "0.2.0"
PACKAGE_VERSION = "0.3.0"

STATIC_ASSETS = {
"admin_js": "circulation-admin.js",
"admin_css": "circulation-admin.css",
"admin_logo": "PalaceCollectionManagerLogo.svg",
"favicon": "favicon.ico",
}

# For proper operation, `package_url` MUST end with a slash ('/') and
Expand Down
2 changes: 2 additions & 0 deletions api/admin/controller/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ def __call__(self, collection, book, path=None):
)
admin_js = AdminClientConfig.lookup_asset_url(key="admin_js")
admin_css = AdminClientConfig.lookup_asset_url(key="admin_css")
favicon_url = AdminClientConfig.lookup_asset_url(key="favicon")

# Find the URL and text to use when rendering the Terms of
# Service link in the footer.
Expand Down Expand Up @@ -101,6 +102,7 @@ def __call__(self, collection, book, path=None):
auth_type=auth_type,
admin_js=admin_js,
admin_css=admin_css,
favicon_url=favicon_url,
)
)

Expand Down
2 changes: 1 addition & 1 deletion api/admin/templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
<title>{{ app_name }}</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="/images/favicon.ico">
<link rel="shortcut icon" href="{{ favicon_url }}">
<link href="{{ admin_css }}" rel="stylesheet" />
</head>
<body>
Expand Down
Binary file removed resources/images/favicon.ico
Binary file not shown.

0 comments on commit c042c6c

Please sign in to comment.