控制台按钮增加未登录、登录后跳转地址和跳转url配置

This commit is contained in:
mjsoftware 2024-12-03 10:12:55 +08:00
parent 93859a4eb7
commit 1e0f8db9b8
4 changed files with 28 additions and 6 deletions

View File

@ -128,13 +128,33 @@ spec:
name: console_url name: console_url
validation: required validation: required
if: $get(show_console).value if: $get(show_console).value
label: 控制台跳转URL label: 未登录时控制台跳转URL
help: '控制台跳转URL可使用“redirect_uri”参数进行登录后跳转例如“/login?redirect_uri=/”,登录后默认跳转到前台页面。' value: '/login'
help: '未登录时控制台跳转URL可使用“redirect_uri”参数进行登录后跳转例如“/login?redirect_uri=/”,登录后默认跳转到前台页面。'
- $formkit: radio - $formkit: radio
if: $get(show_console).value if: $get(show_console).value
name: console_target name: console_target
validation: required validation: required
label: 控制台跳转方式 value: _blank
label: 未登录时,控制台跳转方式
options:
- value: _blank
label: 新标签页
- value: _self
label: 当前窗口
- $formkit: text
name: console_logon_url
validation: required
if: $get(show_console).value
value: '/console'
label: 登录时控制台跳转URL
help: '登录时控制台跳转URL。'
- $formkit: radio
if: $get(show_console).value
name: console_logon_target
validation: required
value: _blank
label: 登录时,控制台跳转方式
options: options:
- value: _blank - value: _blank
label: 新标签页 label: 新标签页

View File

@ -2,7 +2,8 @@
th:class="${theme.config.basic_style.theme_style}" th:class="${theme.config.basic_style.theme_style}"
th:fragment="layout (title, canonical, content, isPost)"> th:fragment="layout (title, canonical, content, isPost)">
<th:block th:with="contributor = ${contributorFinder.getContributor(theme.config.basic_info.metadata_name)}, <th:block th:with="contributor = ${contributorFinder.getContributor(theme.config.basic_info.metadata_name)},
enableComment = ${baseEnableComment == true && site.comment.enable}"> enableComment = ${baseEnableComment == true && site.comment.enable},
logonUserName = ${#authentication.name != 'anonymousUser' ? #authentication.name : ''}">
<th:block th:with="stats = ${siteStatsFinder.getStats()}"> <th:block th:with="stats = ${siteStatsFinder.getStats()}">
<th:block th:replace="~{common/head :: head}"/> <th:block th:replace="~{common/head :: head}"/>

View File

@ -69,7 +69,8 @@
</div> </div>
<i th:unless="${theme.config.page_config.search.search_enable}" class="ri-search-line navbar-searchicon" onclick="javascript:SearchWidget.open();"></i> <i th:unless="${theme.config.page_config.search.search_enable}" class="ri-search-line navbar-searchicon" onclick="javascript:SearchWidget.open();"></i>
<a th:if="${theme.config.page_config.search.search_enable}" class="navbar-searchicon" target="_self" href="/search"><i class="ri-search-line navbar-searchicon"></i></a> <a th:if="${theme.config.page_config.search.search_enable}" class="navbar-searchicon" target="_self" href="/search"><i class="ri-search-line navbar-searchicon"></i></a>
<a data-not-pjax th:if="${theme.config.basic_style.console.show_console}" class="navbar-console" th:href="@{${theme.config.basic_style.console.console_url}}" th:target="${theme.config.basic_style.console.console_target}" <a data-not-pjax th:if="${theme.config.basic_style.console.show_console}" class="navbar-console" th:href="${!#strings.isEmpty(logonUserName) ? theme.config.basic_style.console.console_logon_url : theme.config.basic_style.console.console_url}"
th:target="${!#strings.isEmpty(logonUserName) ? theme.config.basic_style.console.console_logon_target : theme.config.basic_style.console.console_target}"
th:title="${theme.config.basic_style.console.console_title}"> th:title="${theme.config.basic_style.console.console_title}">
<i th:class="${#strings.defaultString(theme.config.basic_style.console.console_icon, 'ri-equalizer-line')}"></i> <i th:class="${#strings.defaultString(theme.config.basic_style.console.console_icon, 'ri-equalizer-line')}"></i>
</a> </a>

View File

@ -30,7 +30,7 @@ spec:
settingName: theme-dream2-plus-setting settingName: theme-dream2-plus-setting
configMapName: theme-dream2-plus-configMap configMapName: theme-dream2-plus-configMap
# 版本号 # 版本号
version: 1.3.2.beta3 version: 1.3.2.beta4
# 最低支持的 Halo 版本 # 最低支持的 Halo 版本
require: ">=2.20.0" require: ">=2.20.0"
# 许可 # 许可