mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-06-28 20:02:44 +08:00
345 lines
7.8 KiB
HTML
345 lines
7.8 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<title>对话框</title>
|
|
<style>
|
|
:root {
|
|
--bg-color: #fff;
|
|
--text-color: #333;
|
|
--border-color: #ddd;
|
|
--title-bg: #f5f5f5;
|
|
--input-bg: #fff;
|
|
--input-border: #ddd;
|
|
--input-focus: #0d6efd;
|
|
--button-bg: #0d6efd;
|
|
--button-hover: #0b5ed7;
|
|
--button-text: #fff;
|
|
--cancel-bg: #6c757d;
|
|
--cancel-border: #6c757d;
|
|
}
|
|
|
|
:root[data-theme="dark"] {
|
|
--bg-color: #282727;
|
|
--text-color: #e0e0e0;
|
|
--border-color: #404040;
|
|
--title-bg: #2d2d2d;
|
|
--input-bg: #2d2d2d;
|
|
--input-border: #404040;
|
|
--input-focus: #0d6efd;
|
|
--button-bg: #0d6efd;
|
|
--button-hover: #0b5ed7;
|
|
--button-text: #fff;
|
|
--cancel-bg: #4a4a4a;
|
|
--cancel-border: #4a4a4a;
|
|
}
|
|
|
|
body {
|
|
margin: 0;
|
|
padding: 0;
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
|
|
"Helvetica Neue", Arial, sans-serif;
|
|
background: var(--bg-color);
|
|
color: var(--text-color);
|
|
user-select: none;
|
|
height: 100vh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* 标题栏样式 */
|
|
.title-bar {
|
|
background: var(--title-bg);
|
|
border-bottom: 1px solid var(--border-color);
|
|
padding: 4px 12px;
|
|
-webkit-app-region: drag;
|
|
display: flex;
|
|
align-items: center;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.title-left {
|
|
flex: 1;
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.logo {
|
|
width: 20px;
|
|
height: 20px;
|
|
margin-right: 6px;
|
|
}
|
|
|
|
.title-text {
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
color: var(--text-color);
|
|
margin: 0;
|
|
}
|
|
|
|
.close-btn {
|
|
-webkit-app-region: no-drag;
|
|
background-color: rgba(0, 0, 0, 0.05);
|
|
width: 16px;
|
|
height: 16px;
|
|
min-width: 16px;
|
|
min-height: 16px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
border-radius: 50%;
|
|
cursor: pointer;
|
|
opacity: 0.8;
|
|
transition: all 0.2s;
|
|
margin-left: 8px;
|
|
position: relative;
|
|
}
|
|
|
|
:root[data-theme="dark"] .close-btn {
|
|
background-color: rgba(255, 255, 255, 0.1);
|
|
}
|
|
|
|
.close-btn:hover {
|
|
opacity: 1;
|
|
background-color: #ff4d4d;
|
|
}
|
|
|
|
.close-btn::before,
|
|
.close-btn::after {
|
|
content: "";
|
|
position: absolute;
|
|
width: 8px;
|
|
height: 1px;
|
|
background-color: var(--text-color);
|
|
transform-origin: center;
|
|
}
|
|
|
|
.close-btn::before {
|
|
transform: rotate(45deg);
|
|
}
|
|
|
|
.close-btn::after {
|
|
transform: rotate(-45deg);
|
|
}
|
|
|
|
.close-btn:hover::before,
|
|
.close-btn:hover::after {
|
|
background-color: #fff;
|
|
}
|
|
|
|
.container {
|
|
display: flex;
|
|
flex-direction: column;
|
|
height: 100vh;
|
|
}
|
|
|
|
.content-wrapper {
|
|
padding: 16px;
|
|
min-height: 60px;
|
|
max-height: 449px;
|
|
overflow-y: auto;
|
|
overflow-x: hidden;
|
|
flex: 1;
|
|
}
|
|
|
|
#content {
|
|
line-height: 1.4;
|
|
font-size: 13px;
|
|
user-select: text;
|
|
}
|
|
|
|
.button-bar {
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
gap: 8px;
|
|
padding: 0 16px 16px;
|
|
flex-shrink: 0;
|
|
background: var(--bg-color);
|
|
}
|
|
|
|
button {
|
|
padding: 4px 12px;
|
|
border-radius: 4px;
|
|
border: 1px solid var(--button-bg);
|
|
background: linear-gradient(
|
|
180deg,
|
|
rgba(255, 255, 255, 0.08) 0%,
|
|
rgba(0, 0, 0, 0.05) 100%
|
|
),
|
|
var(--button-bg);
|
|
color: var(--button-text);
|
|
cursor: pointer;
|
|
font-size: 13px;
|
|
min-width: 70px;
|
|
transition: all 0.2s ease;
|
|
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
|
|
}
|
|
|
|
button:hover {
|
|
background: linear-gradient(
|
|
180deg,
|
|
rgba(255, 255, 255, 0.1) 0%,
|
|
rgba(0, 0, 0, 0.05) 100%
|
|
),
|
|
var(--button-hover);
|
|
}
|
|
|
|
button:active {
|
|
background: linear-gradient(
|
|
180deg,
|
|
rgba(0, 0, 0, 0.05) 0%,
|
|
rgba(255, 255, 255, 0.08) 100%
|
|
),
|
|
var(--button-bg);
|
|
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
#ok-btn {
|
|
padding: 0 12px;
|
|
height: 20px;
|
|
}
|
|
|
|
#cancel-btn {
|
|
padding: 0 12px;
|
|
background: linear-gradient(
|
|
180deg,
|
|
rgba(255, 255, 255, 0.08) 0%,
|
|
rgba(0, 0, 0, 0.05) 100%
|
|
),
|
|
var(--cancel-bg);
|
|
border: 1px solid var(--cancel-border);
|
|
height: 20px;
|
|
}
|
|
|
|
#cancel-btn:hover {
|
|
background: linear-gradient(
|
|
180deg,
|
|
rgba(255, 255, 255, 0.1) 0%,
|
|
rgba(0, 0, 0, 0.05) 100%
|
|
),
|
|
var(--cancel-bg);
|
|
}
|
|
|
|
#input-container {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
}
|
|
|
|
.input-group label {
|
|
display: block;
|
|
padding: 0 0 4px 2px;
|
|
color: var(--text-color);
|
|
font-size: 13px;
|
|
}
|
|
|
|
.input-group input {
|
|
width: 100%;
|
|
padding: 6px 8px;
|
|
border: 1px solid var(--input-border);
|
|
border-radius: 4px;
|
|
font-size: 13px;
|
|
box-sizing: border-box;
|
|
background: var(--input-bg);
|
|
color: var(--text-color);
|
|
}
|
|
|
|
.input-group input:focus {
|
|
border-color: var(--input-focus);
|
|
outline: none;
|
|
box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.25);
|
|
}
|
|
|
|
/* 文本区域样式 */
|
|
textarea {
|
|
width: 100%;
|
|
height: 400px;
|
|
padding: 6px 8px;
|
|
border: 1px solid var(--input-border);
|
|
border-radius: 4px;
|
|
font-size: 13px;
|
|
resize: none;
|
|
box-sizing: border-box;
|
|
background: var(--input-bg);
|
|
color: var(--text-color);
|
|
}
|
|
|
|
textarea:focus {
|
|
border-color: var(--input-focus);
|
|
outline: none;
|
|
box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.25);
|
|
}
|
|
|
|
/* 按钮组样式 */
|
|
#button-container {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 10px;
|
|
padding-top: 4px;
|
|
}
|
|
|
|
#button-container button {
|
|
width: 100%;
|
|
text-align: center;
|
|
padding: 6px 12px;
|
|
}
|
|
|
|
/* 根据对话框类型显示/隐藏取消按钮 */
|
|
.dialog-message #cancel-btn {
|
|
display: none;
|
|
}
|
|
|
|
.dialog-buttons .button-bar {
|
|
display: none;
|
|
}
|
|
|
|
/* 隐藏所有对话框内容 */
|
|
#input,
|
|
#confirm,
|
|
#buttons,
|
|
#textarea {
|
|
display: none;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<!-- 标题栏 -->
|
|
<div class="title-bar">
|
|
<div class="title-left">
|
|
<img src="../../logo.png" alt="logo" class="logo" />
|
|
<h1 class="title-text" id="title-text">对话框</h1>
|
|
</div>
|
|
<div class="close-btn"></div>
|
|
</div>
|
|
|
|
<div class="content-wrapper">
|
|
<div id="content"></div>
|
|
|
|
<!-- 输入对话框 -->
|
|
<div id="input">
|
|
<div id="input-container"></div>
|
|
</div>
|
|
|
|
<!-- 确认对话框 -->
|
|
<div id="confirm"></div>
|
|
|
|
<!-- 按钮选择对话框 -->
|
|
<div id="buttons">
|
|
<div id="button-container"></div>
|
|
</div>
|
|
|
|
<!-- 文本区域对话框 -->
|
|
<div id="textarea">
|
|
<textarea id="text-content"></textarea>
|
|
</div>
|
|
</div>
|
|
<div class="button-bar">
|
|
<button id="cancel-btn">取消</button>
|
|
<button id="ok-btn">确定</button>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|