From 1b4aaacc10491365e0c0541d84f49f3864b3887a Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Tue, 20 Aug 2024 22:15:11 -0500 Subject: [PATCH] fix: expose settings for app node title, type --- src/wuttaweb/templates/appinfo/configure.mako | 29 +++++++++++++++---- src/wuttaweb/templates/appinfo/index.mako | 3 ++ src/wuttaweb/templates/base_meta.mako | 2 +- src/wuttaweb/templates/configure.mako | 5 ++-- src/wuttaweb/views/settings.py | 2 ++ 5 files changed, 32 insertions(+), 9 deletions(-) diff --git a/src/wuttaweb/templates/appinfo/configure.mako b/src/wuttaweb/templates/appinfo/configure.mako index d8c3af9..5d1f7bb 100644 --- a/src/wuttaweb/templates/appinfo/configure.mako +++ b/src/wuttaweb/templates/appinfo/configure.mako @@ -6,11 +6,30 @@

Basics

- - - + + + + + + + + + ## TODO: should be a dropdown, app handler defines choices + + + + + + + + + diff --git a/src/wuttaweb/templates/appinfo/index.mako b/src/wuttaweb/templates/appinfo/index.mako index 0997544..279a41e 100644 --- a/src/wuttaweb/templates/appinfo/index.mako +++ b/src/wuttaweb/templates/appinfo/index.mako @@ -16,6 +16,9 @@ ${app.get_title()} + + ${app.get_node_title()} + ${config.production()} diff --git a/src/wuttaweb/templates/base_meta.mako b/src/wuttaweb/templates/base_meta.mako index 65d1ede..741ac4a 100644 --- a/src/wuttaweb/templates/base_meta.mako +++ b/src/wuttaweb/templates/base_meta.mako @@ -1,6 +1,6 @@ ## -*- coding: utf-8; -*- -<%def name="global_title()">${app.get_title()} +<%def name="global_title()">${app.get_node_title()} <%def name="extra_styles()"> diff --git a/src/wuttaweb/templates/configure.mako b/src/wuttaweb/templates/configure.mako index 4c89872..f0363e0 100644 --- a/src/wuttaweb/templates/configure.mako +++ b/src/wuttaweb/templates/configure.mako @@ -53,15 +53,14 @@ Cancel - ${h.form(request.current_route_url())} + ${h.form(request.current_route_url(), **{'@submit': 'purgingSettings = true'})} ${h.csrf_token(request)} ${h.hidden('remove_settings', 'true')} + icon-left="trash"> {{ purgingSettings ? "Working, please wait..." : "Remove All Settings for ${config_title}" }} ${h.end_form()} diff --git a/src/wuttaweb/views/settings.py b/src/wuttaweb/views/settings.py index 0cea55b..f4d9551 100644 --- a/src/wuttaweb/views/settings.py +++ b/src/wuttaweb/views/settings.py @@ -99,6 +99,8 @@ class AppInfoView(MasterView): # basics {'name': f'{self.app.appname}.app_title'}, + {'name': f'{self.app.appname}.node_type'}, + {'name': f'{self.app.appname}.node_title'}, {'name': f'{self.app.appname}.production', 'type': bool},