2025-05-27 15:46:31 +08:00

245 lines
7.8 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>设置页面</title>
<link
rel="apple-touch-icon"
sizes="180x180"
href="{{ url_for('static', filename='images/webapp/apple-touch-icon.png') }}"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="{{ url_for('static', filename='images/webapp/favicon-32x32.png') }}"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="{{ url_for('static', filename='images/webapp/favicon-16x16.png') }}"
/>
<link
rel="icon"
type="image/ico"
href="{{ url_for('static', filename='images/webapp/favicon.ico') }}"
/>
<link
rel="stylesheet"
href="{{ url_for('static', filename='css/all.min.css') }}?v={{ time }}"
/>
<link
rel="stylesheet"
href="{{ url_for('static', filename='css/setting.css') }}?v={{ time }}"
/>
<link
rel="stylesheet"
href="{{ url_for('static', filename='css/ir_list.css') }}?v={{ time }}"
/>
<link
rel="stylesheet"
href="{{ url_for('static', filename='css/volume.css') }}?v={{ time }}"
/>
<script src="{{ url_for('static', filename='js/socketio/socket.io.min.js') }}"></script>
<script src="{{ url_for('static', filename='js/crypto-js.min.js') }}"></script>
<script src="{{ url_for('static', filename='js/pdf.min.js') }}"></script>
<script src="{{ url_for('static', filename='js/marked/marked.min.js') }}"></script>
<script src="{{ url_for('static', filename='css/github-markdown.min.css') }}"></script>
<script>
// 设置本地的 pdf.worker.min.js 路径
pdfjsLib.GlobalWorkerOptions.workerSrc = "/static/js/pdf.worker.min.js";
</script>
<body>
<div class="top-bar">
<a href="{{ url_for('home') }}" class="logo">
<img
src="{{ url_for('static', filename='images/common/首页.svg') }}"
alt="首页"
/>
</a>
<div class="volume-control" id="volume-control">
<!-- 背景 -->
<div class="volume-background"></div>
<!-- 音量值显示 -->
<div class="volume-value" id="volume-value">0%</div>
<!-- 可调节的白色底色 -->
<div class="volume-progress" id="volume-progress"></div>
<div class="volume-icon-box">
<img
id="volume-icon"
src="/static/images/volume/vol-mute.png"
alt="音量"
/>
</div>
</div>
<div class="date-time-container">
<div class="date-box">
<div class="weekday"></div>
<div class="date"></div>
</div>
<div class="time"></div>
</div>
<div class="right-section">
<div class="status" onclick="toggleConnection()">
<img
src="{{ url_for('static', filename='images/common/disconnected.svg') }}"
id="status-icon"
alt="Connection Status"
/>
<span id="status-text"></span>
</div>
<div class="shutdown" onclick="shutdownSystem()">
<img
src="{{ url_for('static', filename='images/common/shutdown.svg') }}"
id="shutdown-icon"
alt="Shutdown"
/>
</div>
</div>
</div>
<div class="container">
<!-- 设置页面的主要区域 -->
<div id="settings-container">
<!-- 红外报告列表 -->
<div id="version-update-section" class="setting-section">
<div class="panel-title">
<h2>健康检测报告列表</h2>
<div class="search" onclick="showInputModal()">
<img src="{{ url_for('static', filename='images/music/search.svg') }}" alt="">
<span>手机号码查询用户</span>
</div>
</div>
<div class="version-selector">
<label for="downloaded-versions">用户列表</label>
<div id="user-list"></div>
</div>
</div>
</div>
</div>
<!-- Popup Modal -->
<div id="popup-modal" class="popup-modal">
<div class="popup-content">
<p id="popup-message">这里是消息内容</p>
<div id="popup-buttons">
<button
id="confirm-btn"
onclick="confirmAction()"
i18n="popup.confirm_btn"
>
确认
</button>
<button
id="cancel-btn"
onclick="cancelAction()"
i18n="popup.cancel_btn"
>
取消
</button>
</div>
</div>
</div>
<div id="report-window" style="display: none">
<div class="report-window-header">
<p class="title">健康检测报告</p>
<div id="close-report-btn" onclick="closeReport()">
<img
src="{{ url_for('static', filename='images/ir_report/close.png') }}"
alt="Close"
/>
</div>
</div>
<div id="report-window-container">
<div id="report-box"></div>
<div id="img-box"></div>
</div>
</div>
<!-- 输入手机号码确认弹窗 -->
<div id="input-modal" class="input-modal" style="display: flex">
<div class="modal-content">
输入手机号码:
<input id="phone-input" type="number" />
<div class="model-btn">
<button
id="input-confirm-btn"
i18n="popup.confirm_btn"
>
确认
</button>
<button id="input-cancel-btn" i18n="popup.cancel_btn">
取消
</button>
</div>
</div>
</div>
<script src="../static/js/i18n/jquery-3.7.1.min.js"></script>
<script src="../static/js/i18n/jquery.i18n.min.js"></script>
<script src="../static/js/i18n/i18n-settingjson.js"></script>
<script src="../static/js/common.js"></script>
<!-- <script src="../static/js/crypto-js.js"></script> -->
<script>
function loadMarkdown(md_file, htmlContainer) {
// 创建一个自定义渲染器
const renderer = new marked.Renderer();
// 自定义图片的渲染方法
renderer.image = function (obj) {
// 将 href、title 和 text 传入自定义 HTML加入自定义属性和样式
const encodedHref = encodeURI(obj.href);
return `
<div class="custom-image-container">
<img src="${obj.href}" alt="${obj.text}" class="custom-image">
</div>
`;
};
marked.setOptions({
renderer: renderer,
// 可选的其他 marked 配置
});
let fetchUrl = `/static/markdown/${md_file}.md`;
let htmlContainerID = htmlContainer || "markdown-section";
fetch(fetchUrl) // 请求你的本地 md 文件
.then((response) => response.text())
.then((mdContent) => {
const htmlContent = marked.parse(mdContent); // 使用 marked.js 转换为 HTML
document.getElementById(htmlContainerID).innerHTML = htmlContent; // 渲染到页面
const imgItem2 = document.getElementById("img-item2");
imgItem2.src = "../static/images/ir_report/image_2.png";
const imgItem3 = document.getElementById("img-item3");
imgItem3.src = "../static/images/ir_report/image_3.png";
})
.catch((error) => console.error("Error loading markdown file:", error));
}
</script>
<script src="{{ url_for('static', filename='js/ir_list.js') }}?v={{ time }}"></script>
<script src="{{ url_for('static', filename='js/set_volume.js') }}?v={{ time }}"></script>
<script>
window.onload = function () {
// let lang = localStorage.getItem("selectedLanguage");
// changeLang(lang);
// changeLang("zh");
};
</script>
</body>
</html>