-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
57 lines (53 loc) · 2.66 KB
/
Copy pathindex.html
File metadata and controls
57 lines (53 loc) · 2.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>mybatis log helper</title>
<link rel="stylesheet" href="index.css">
</head>
<body>
<div class="container">
<header>
<button id="themeToggle" class="theme-toggle" title="切换主题" aria-label="切换白天/黑夜模式">
<svg class="icon-sun" viewBox="0 0 24 24" width="20" height="20" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="5"/><path d="M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"/></svg>
<svg class="icon-moon" viewBox="0 0 24 24" width="20" height="20" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"/></svg>
</button>
<h1>mybatis log helper</h1>
<p>粘贴 MyBatis 日志,获得可执行的 SQL</p>
</header>
<main>
<div class="panel input-panel">
<div class="panel-header">
<h2>原始日志</h2>
<button id="clearBtn" class="btn secondary">清空</button>
</div>
<textarea id="logInput" placeholder="==> Preparing: SELECT * FROM user WHERE id = ?
==> Parameters: 1(Integer)
==> Preparing: UPDATE user SET name = ?
==> Parameters: 张三(String)"></textarea>
</div>
<div class="actions">
<button id="convertBtn" class="btn primary">
<svg viewBox="0 0 24 24" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round"><path d="M13 2L3 14h9l-1 8 10-12h-9l1-8z"></path></svg>
转换
</button>
</div>
<div class="panel output-panel">
<div class="panel-header">
<h2>可执行 SQL</h2>
<div class="output-actions">
<label class="checkbox-label">
<input type="checkbox" id="formatCheckbox" checked>
排版
</label>
<button id="copyBtn" class="btn secondary">复制</button>
</div>
</div>
<pre id="outputPre"><code id="sqlOutput" tabindex="0">转换后的 SQL 将显示在这里...</code></pre>
</div>
</main>
</div>
<script src="app.js"></script>
</body>
</html>