luci-theme: add missing menu name to page <title>

Signed-off-by: Self-Hosting-Group <selfhostinggroup-git+openwrt@shost.ing>
This commit is contained in:
Self-Hosting-Group
2025-09-25 00:00:00 +00:00
committed by Paul Donald
parent 97733541e5
commit d16ffa3113
4 changed files with 7 additions and 8 deletions

View File

@@ -18,7 +18,7 @@
<html lang="{{ dispatcher.lang }}" {{ darkpref ? `data-darkmode="${darkpref}"` : '' }}>
<head>
<meta charset="utf-8">
<title>{{ striptags(`${boardinfo.hostname ?? '?'}${node ? ` - ${node.title}` : ''}`) }} - LuCI</title>
<title>{{ striptags(`${dispatched ? `${dispatched.title} | ` : ''}${boardinfo.hostname ?? '?'}`) }} | LuCI</title>
{% if (!darkpref): %}
<script>
var mediaQuery = window.matchMedia('(prefers-color-scheme: dark)'),

View File

@@ -22,7 +22,6 @@
import { getuid, getspnam } from 'luci.core';
const boardinfo = ubus.call('system', 'board');
const hostname = striptags(boardinfo?.hostname ?? '?');
http.prepare_content('text/html; charset=UTF-8');
-%}
@@ -37,8 +36,8 @@
<meta name="theme-color" content="#09c">
<meta name="msapplication-tap-highlight" content="no">
<meta name="msapplication-TileColor" content="#09c">
<meta name="application-name" content="{{ hostname }} - LuCI">
<meta name="apple-mobile-web-app-title" content="{{ hostname }} - LuCI">
<meta name="application-name" content="{{ striptags(`${dispatched ? `${dispatched.title} | ` : ''}${boardinfo.hostname ?? '?'}`) }} | LuCI">
<meta name="apple-mobile-web-app-title" content="{{ striptags(`${dispatched ? `${dispatched.title} | ` : ''}${boardinfo.hostname ?? '?'}`) }} | LuCI">
<link rel="stylesheet" href="{{ media }}/cascade.css">
<link rel="icon" href="{{ media }}/logo_48.png" sizes="48x48">
<link rel="icon" href="{{ media }}/logo.svg" sizes="any">
@@ -47,7 +46,7 @@
{% endif %}
<script src="{{ dispatcher.build_url('admin/translations', dispatcher.lang) }}"></script>
<script src="{{ resource }}/cbi.js"></script>
<title>{{ hostname }}{{ node?.title ? ` - ${striptags(node.title)}` : '' }} - LuCI</title>
<title>{{ striptags(`${dispatched ? `${dispatched.title} | ` : ''}${boardinfo.hostname ?? '?'}`) }} | LuCI</title>
{% if (css): %}
<style title="text/css">{{ css }}</style>
{% endif %}
@@ -58,7 +57,7 @@
<div class="container">
<span class="showSide"></span>
<a id="logo" href="{{ ctx.authsession ? dispatcher.build_url('admin/status/overview') : '#' }}"><img src="{{ media }}/brand.png" alt="OpenWrt"></a>
<a class="brand" href="#">{{ hostname }}</a>
<a class="brand" href="#">{{ striptags(`${boardinfo.hostname ?? '?'}`) }}</a>
<span class="status" id="indicators"></span>
</div>
</div>

View File

@@ -22,7 +22,7 @@
<link rel="icon" href="{{ media }}/logo.svg" sizes="any">
<script src="{{ dispatcher.build_url('admin/translations', dispatcher.lang) }}"></script>
<script src="{{ resource }}/cbi.js"></script>
<title>{{ striptags(`${boardinfo.hostname ?? '?'}${node ? ` - ${node.title}` : ''}`) }} - LuCI</title>
<title>{{ striptags(`${dispatched ? `${dispatched.title} | ` : ''}${boardinfo.hostname ?? '?'}`) }} | LuCI</title>
{% if (css): %}
<style title="text/css">{{ css }}</style>
{% endif %}

View File

@@ -28,7 +28,7 @@
<script src="{{ dispatcher.build_url('admin/translations', dispatcher.lang) }}"></script>
<script src="{{ resource }}/cbi.js"></script>
<title>{{ striptags(`${boardinfo.hostname ?? '?'}${node ? ` - ${_(node.title)}` : ''}`) }} - LuCI</title>
<title>{{ striptags(`${dispatched ? `${dispatched.title} | ` : ''}${boardinfo.hostname ?? '?'}`) }} | LuCI</title>
</head>
<body class="lang_{{ dispatcher.lang }}" data-page="{{ entityencode(join('-', ctx.request_path), true) }}">