This commit is contained in:
Yutousama 2022-05-16 02:14:57 +08:00
commit ceb02aa09a
21 changed files with 10953 additions and 0 deletions

BIN
ad1e0ac3-0.0.1.upx Normal file

Binary file not shown.

BIN
icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

103
index.html Normal file
View File

@ -0,0 +1,103 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="layui/css/layui.css">
</head>
<body>
<form class="layui-form" action="">
<div class="layui-form-item">
<button id="clear" type="button" class="layui-btn layui-btn-normal layui-btn-sm"><i
class="layui-icon"></i></button>
<button id="reload" type="button" class="layui-btn layui-btn-normal layui-btn-sm"><i
class="layui-icon">&#xe669;</i></button>
</div>
<!-- <div class="layui-form-item">
<label class="layui-form-label">输入框</label>
<div class="layui-input-block">
<input type="text" name="title" required lay-verify="required" placeholder="请输入标题" autocomplete="off"
class="layui-input">
</div>
</div> -->
<div class="layui-form-item">
<table id="table" lay-filter="table"></table>
</div>
</form>
<script src="layui/layui.js"></script>
<script src="layui/jquery-3.2.1.js"></script>
<script>
layui.use(['layer', 'form', 'table'], function () {
let table = layui.table;
let form = layui.form;
$('#clear').click(function () {
utools.db.remove('token')
history.go(0);
})
$('#reload').click(function () {
history.go(0);
})
let token = utools.db.get("token");
if (token === null) {
console.log("数据库为空")
layer.prompt({
formType: 0,
value: '',
closeBtn: 0,
title: '请输入Key',
area: ['250px', '50px'], //自定义文本域宽高
}, function (value, index, elem) {
utools.db.put({
_id: "token",
data: value
})
layer.close(index);
init();
});
return;
} else {
init()
}
function init() {
let purl = 'http://tools.yutou233.cn/tools/password/get/all.do?token=' + utools.db.get('token').data
utools.onPluginOut(() => {
//utools.removeSubInput();
})
utools.onPluginEnter(({ code, type, payload }) => {
utools.setSubInput(({ text }) => {
purl = 'http://tools.yutou233.cn/tools/password/get/all.do?token=' + utools.db.get('token').data + '&search=' + text
table.reload('table', {
url: purl
});
}, '搜索', true)
utools.subInputSelect()
})
table.render({
elem: "#table"
, url: purl
, toolbar: '#topTools'
, page: true
, cols: [[
{ field: "id", title: "", width: 60, sort: true, fixed: 'left' }
, { field: 'title', title: '标题', width: 150 }
, { field: 'account', title: '账号', width: 200 }
, { field: 'password', title: '密码', width: 200 }
, { field: 'desc', title: '备注', width: 200 }
, { field: 'url', title: '网址', width: 400, templet: '<div><a href="{{d.url}}" target="_blank">{{d.url}}</a></div>' }
, { field: "right", width: 200, toolbar: '#listTools' }
]]
, done: function (data) {
}
});
}
})
</script>
</body>
</html>

1
layui/css/layui.css Normal file

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
html #layuicss-skincodecss{display:none;position:absolute;width:1989px}.layui-code-h3,.layui-code-view{position:relative;font-size:12px}.layui-code-view{display:block;margin:10px 0;padding:0;border:1px solid #eee;border-left-width:6px;background-color:#FAFAFA;color:#333;font-family:Courier New}.layui-code-h3{padding:0 10px;height:40px;line-height:40px;border-bottom:1px solid #eee}.layui-code-h3 a{position:absolute;right:10px;top:0;color:#999}.layui-code-view .layui-code-ol{position:relative;overflow:auto}.layui-code-view .layui-code-ol li{position:relative;margin-left:45px;line-height:20px;padding:0 10px;border-left:1px solid #e2e2e2;list-style-type:decimal-leading-zero;*list-style-type:decimal;background-color:#fff}.layui-code-view .layui-code-ol li:first-child{padding-top:10px}.layui-code-view .layui-code-ol li:last-child{padding-bottom:10px}.layui-code-view pre{margin:0}.layui-code-notepad{border:1px solid #0C0C0C;border-left-color:#3F3F3F;background-color:#0C0C0C;color:#C2BE9E}.layui-code-notepad .layui-code-h3{border-bottom:none}.layui-code-notepad .layui-code-ol li{background-color:#3F3F3F;border-left:none}.layui-code-demo .layui-code{visibility:visible!important;margin:-15px;border-top:none;border-right:none;border-bottom:none}.layui-code-demo .layui-tab-content{padding:15px;border-top:none}

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 701 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
layui/font/iconfont.eot Normal file

Binary file not shown.

554
layui/font/iconfont.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 299 KiB

BIN
layui/font/iconfont.ttf Normal file

Binary file not shown.

BIN
layui/font/iconfont.woff Normal file

Binary file not shown.

BIN
layui/font/iconfont.woff2 Normal file

Binary file not shown.

10253
layui/jquery-3.2.1.js vendored Normal file

File diff suppressed because it is too large Load Diff

5
layui/layui.js Normal file

File diff suppressed because one or more lines are too long

15
plugin.json Normal file
View File

@ -0,0 +1,15 @@
{
"pluginName": "密码管理器",
"description": "私人密码管理器",
"main": "index.html",
"version": "1.0.2",
"author": "Yutou",
"logo": "icon.png",
"features": [
{
"code": "password",
"explain": "密码管理",
"cmds":["password", "密码"]
}
]
}

19
preload.js Normal file
View File

@ -0,0 +1,19 @@
window.exports = {
"hello": { // 注意:键对应的是 plugin.json 中的 features.code
mode: "doc", // 文档模式
args: {
// 索引集合
//indexes: require('http://tools.yutou233.cn/tools/password/type/get/list.do?token=zIrsh9TUZP2lfRW753PannG49E7VJvor'),
indexes: require('http://tools.yutou233.cn/public/request.do'),
/*indexes:[
{
t: '这是标题',
d: '这是描述',
p: 'doc/xxx.html' //页面, 只能是相对路径
}
],*/
// 子输入框为空时的占位符,默认为字符串"搜索"
placeholder: "搜索"
}
}
}