Skip to content

Commit 2cb95e0

Browse files
committed
update
1 parent ee4f54f commit 2cb95e0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+2290
-833
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,8 @@ npm run build -adapter=[chrome|edge|utools|firefox|web]
6262
|websocket调试|`websocket`,`在线调试`|×|
6363
|单位换算|`长度`,`面积`,`体积`,`质量`,`温度`,`压力`,`功率`,``,`密度`,``,`时间`,`速度`,`数据存储`,`角度`||
6464
|时间计算器| - ||
65-
|JSON工具|`格式化`,`校验`,`压缩`,`转义`,`去除转义`,`Unicode转中文`,`中文转Unicode`,`转GET参数`||
65+
|JSON工具|`格式化`,`校验`,`压缩`,`转义`,`去除转义`,`Unicode转中文`,`中文转Unicode`,`转GET参数`,`Java`, `C#`, `Go`, `Dart`,`csv`,`table`||
6666
|UUID|在线生成uuid||
67-
|JSON转实体类|`Java`, `C#`, `Go`, `Dart`||
6867
|ascii编码转换|`十进制`, `十六进制`, `八进制`, `二进制`, `字符串`||
6968
|变量名格式转换|`Var Name`, `var-name`, `VAR_NAME`, `VarName`, `varName`, `var_name`, `var name`||
7069
|jwt解码|`header`, `payload`||

package-lock.json

Lines changed: 277 additions & 220 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "c-tool",
3-
"version": "1.9.3",
3+
"version": "1.10.0",
44
"private": true,
55
"scripts": {
66
"serve": "vue-cli-service serve --port 8081",
@@ -9,63 +9,68 @@
99
"lint": "vue-cli-service lint"
1010
},
1111
"dependencies": {
12-
"@babel/parser": "^7.16.4",
12+
"@babel/parser": "^7.16.7",
1313
"@prettier/plugin-php": "^0.17.6",
14-
"@typescript-eslint/typescript-estree": "^5.4.0",
14+
"@typescript-eslint/typescript-estree": "^5.8.1",
1515
"angular-html-parser": "^1.8.0",
1616
"axios": "^0.21.4",
1717
"babel-runtime": "^6.26.0",
18-
"bignumber.js": "^9.0.1",
18+
"bignumber.js": "^9.0.2",
1919
"code-formatter": "0.0.1",
20-
"codemirror": "^5.64.0",
21-
"codemirror-graphql": "^1.2.4",
20+
"codemirror": "^5.65.0",
21+
"codemirror-graphql": "^1.2.11",
2222
"cosmiconfig": "^7.0.1",
2323
"cron-parser": "^2.16.3",
2424
"cronstrue": "^1.122.0",
2525
"crypto-js": "^3.3.0",
26+
"csv-parse": "^5.0.4",
27+
"csv-stringify": "^6.0.5",
28+
"darkreader": "^4.9.43",
2629
"diff-match-patch": "^1.0.5",
2730
"file": "^0.2.2",
31+
"file-type": "^16.5.3",
2832
"graphql": "15.7.2",
33+
"hexy": "^0.3.4",
2934
"ipinyinjs": "^1.0.0",
3035
"jian_fan": "^1.0.3",
3136
"jimp": "^0.16.1",
32-
"js-base64": "^2.6.4",
37+
"js-base64": "^3.7.2",
3338
"js-htmlencode": "^0.3.0",
3439
"js-yaml": "^3.14.1",
3540
"jsbarcode": "^3.11.5",
3641
"json-to-properties": "^1.1.3",
3742
"json5": "^2.2.0",
3843
"jsonlint": "^1.6.3",
39-
"jsrsasign": "^10.5.0",
44+
"jsrsasign": "^10.5.1",
4045
"jsrsasign-util": "^1.0.5",
4146
"jwt-decode": "^3.1.2",
4247
"lodash": "^4.17.21",
4348
"mime-types": "^2.1.34",
4449
"moment": "^2.29.1",
4550
"php-array-reader": "^1.3.2",
4651
"phparr": "^0.2.0",
47-
"postcss": "^8.4.4",
52+
"postcss": "^8.4.5",
4853
"postcss-less": "^5.0.0",
4954
"postcss-scss": "^4.0.2",
50-
"prettier": "^2.5.0",
55+
"prettier": "^2.5.1",
5156
"prettier-plugin-sql": "^0.3.0",
5257
"properties-to-json": "^0.1.7",
5358
"qrcode": "^1.5.0",
5459
"qrcode-parser": "^1.2.0",
5560
"query-string": "^6.14.1",
5661
"serialize-php": "^1.1.2",
57-
"sm-crypto": "^0.1.4",
62+
"sm-crypto": "^0.3.7",
5863
"system": "^2.0.1",
59-
"typescript": "^4.5.2",
64+
"typescript": "^4.5.4",
6065
"uglify-js": "3.14.3",
6166
"uuid": "^8.3.2",
6267
"view-design": "^4.7.0",
6368
"vue": "^2.6.14",
64-
"vue-i18n": "^8.26.7",
69+
"vue-i18n": "^8.26.8",
6570
"vue-router": "^3.5.3",
6671
"vuedraggable": "^2.24.3",
6772
"x2js": "github:abdolence/x2js",
68-
"xml-formatter": "^2.5.1"
73+
"xml-formatter": "^2.6.0"
6974
},
7075
"devDependencies": {
7176
"@vue/cli-plugin-babel": "^3.12.1",

public/tool.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<meta name="viewport" content="width=device-width,initial-scale=1.0">
77
<title>Ctool 程序开发常用工具</title>
88
</head>
9-
<body style="padding-bottom: 30px">
9+
<body>
1010
<div id="page" style="width: 800px;height: 550px;margin: 0 auto;padding: 0 10px;overflow-y:auto;">
1111
<div id="app"></div>
1212
</div>

src/adapter/chrome/manifest.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "Ctool 程序开发常用工具",
3-
"description": "程序开发常用工具,哈希/加解密/编码转换/时间戳/二维码/拼音/IP查询/代码优化/Unicode/正则等...",
2+
"name": "__MSG_main_manifest_name__",
3+
"description": "__MSG_main_manifest_description__",
44
"version": "##version##",
55
"author": "wo@baiy.org",
66
"offline_enabled": true,
@@ -9,7 +9,7 @@
99
"content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'",
1010
"browser_action": {
1111
"default_icon": "img/icon_chrome.png",
12-
"default_title": "常用开发工具",
12+
"default_title": "__MSG_main_manifest_default_title__",
1313
"default_popup": "index.html"
1414
},
1515
"default_locale": "zh_CN",
@@ -29,7 +29,7 @@
2929
],
3030
"commands": {
3131
"panel": {
32-
"description": "打开独立工具窗口",
32+
"description": "__MSG_main_manifest_commands_panel_description__",
3333
"global": true
3434
}
3535
},

src/adapter/edge/manifest.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "Ctool 程序开发常用工具",
3-
"description": "程序开发常用工具,哈希/加解密/编码转换/时间戳/二维码/拼音/IP查询/代码优化/Unicode/正则等...",
2+
"name": "__MSG_main_manifest_name__",
3+
"description": "__MSG_main_manifest_description__",
44
"version": "##version##",
55
"author": "wo@baiy.org",
66
"offline_enabled": true,
@@ -9,7 +9,7 @@
99
"content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'",
1010
"browser_action": {
1111
"default_icon": "img/icon_chrome.png",
12-
"default_title": "常用开发工具",
12+
"default_title": "__MSG_main_manifest_default_title__",
1313
"default_popup": "index.html"
1414
},
1515
"default_locale": "zh_CN",
@@ -29,7 +29,7 @@
2929
],
3030
"commands": {
3131
"panel": {
32-
"description": "打开独立工具窗口",
32+
"description": "__MSG_main_manifest_commands_panel_description__",
3333
"global": true
3434
}
3535
}

src/adapter/firefox/helper.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
11
export const openUrl = (url) => {
22
return browser.tabs.create({url:url});
33
}
4+
5+
export const getMessage = (messageName, values = {}, placeholders = []) => {
6+
let substitutions = []
7+
placeholders.forEach((key) => {
8+
substitutions.push((key in values) ? values[key] : "")
9+
})
10+
return browser.i18n.getMessage(messageName, substitutions);
11+
}

src/adapter/firefox/manifest.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
{
2-
"name": "Ctool 程序开发常用工具",
3-
"description": "程序开发常用工具,哈希/加解密/编码转换/时间戳/二维码/拼音/IP查询/代码优化/Unicode/正则等...",
2+
"name": "__MSG_main_manifest_name__",
3+
"description": "__MSG_main_manifest_description__",
44
"version": "##version##",
55
"author": "wo@baiy.org",
66
"homepage_url": "https://github.com/baiy/Ctool",
77
"content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'",
88
"manifest_version": 2,
99
"browser_action": {
1010
"default_icon": "img/icon_chrome.png",
11-
"default_title": "常用开发工具",
11+
"default_title": "__MSG_main_manifest_default_title__",
1212
"default_popup": "index.html"
1313
},
14+
"default_locale": "zh_CN",
1415
"background": {
1516
"scripts": ["background.js"]
1617
},
@@ -28,7 +29,7 @@
2829
"commands": {
2930
"_execute_browser_action": {},
3031
"panel": {
31-
"description": "打开独立工具窗口"
32+
"description": "__MSG_main_manifest_commands_panel_description__"
3233
}
3334
}
3435
}

src/bottom.vue

Lines changed: 0 additions & 46 deletions
This file was deleted.

src/components/bottom.vue

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
<template>
2+
<div>
3+
<div class="ctool-bottom">
4+
<div class="ctool-bottom-right" style="width: 210px">
5+
<Tooltip class="ctool-bottom-tooltip" transfer :content="$t('main_tool_'+currentTool) + ' -' + $t('main_history')" placement="top">
6+
<Badge v-if="historyLength>0" dot :offset="[6,10]">
7+
<Icon type="md-time" :size="22" @click="historyShow= true"/>
8+
</Badge>
9+
<template v-else>
10+
<Icon type="md-time" :size="22" @click="historyShow= true"/>
11+
</template>
12+
</Tooltip>
13+
<Tooltip class="ctool-bottom-tooltip" transfer content="Github" placement="top">
14+
<Icon type="logo-github" :size="22" @click="openUrl('https://github.com/baiy/Ctool')"/>
15+
</Tooltip>
16+
<Tooltip class="ctool-bottom-tooltip" transfer :content="$t('main_ui_setting')" placement="top">
17+
<Icon type="md-settings" :size="22" @click="settingShow = true"/>
18+
</Tooltip>
19+
<Tooltip class="ctool-bottom-tooltip" transfer :content="$t('main_ui_issues')" placement="top">
20+
<Icon type="md-help-circle" :size="22" @click="openUrl('https://github.com/baiy/Ctool/issues')"/>
21+
</Tooltip>
22+
<Tooltip class="ctool-bottom-tooltip" transfer :content="$t('main_ui_open_full')" placement="top">
23+
<Icon type="md-expand" :size="22" @click="openUrl('_new')" v-if="!isUtools"/>
24+
</Tooltip>
25+
</div>
26+
<div class="ctool-bottom-block" style="margin-right: 210px">
27+
<notice-block/>
28+
</div>
29+
</div>
30+
<Drawer :title="$t('main_ui_setting')" v-model="settingShow" :width="400">
31+
<setting-block v-if="settingShow"></setting-block>
32+
</Drawer>
33+
<Drawer :title="$t('main_tool_'+currentTool)+' - '+$t('main_history')" v-model="historyShow" :width="100">
34+
<History v-if="historyShow" @close="historyShow = false"/>
35+
</Drawer>
36+
</div>
37+
</template>
38+
<script>
39+
import Notice from './notice'
40+
import History from './history'
41+
import {isUtools, openUrl} from '../helper'
42+
import settingBlock from "../views/setting/block"
43+
import model from "../tool/model";
44+
import historyFactory from "../tool/history";
45+
46+
export default {
47+
name: "bottom",
48+
components: {
49+
"notice-block": Notice,
50+
"setting-block": settingBlock,
51+
History
52+
},
53+
data() {
54+
return {
55+
isUtools,
56+
settingShow: false,
57+
historyShow: false,
58+
currentTool: model.getCurrentTool(),
59+
currentToolSetInterval: null,
60+
}
61+
},
62+
computed: {
63+
historyLength() {
64+
return historyFactory(this.currentTool).length()
65+
}
66+
},
67+
created() {
68+
this.currentToolSetInterval = setInterval(() => {
69+
this.currentTool = model.getCurrentTool()
70+
}, 2000);
71+
},
72+
methods: {
73+
openUrl(url) {
74+
openUrl(url === '_new' ? window.location.href : url)
75+
}
76+
},
77+
destroyed() {
78+
if (this.currentToolSetInterval !== null) {
79+
clearInterval(this.currentToolSetInterval);
80+
this.currentToolSetInterval = null
81+
}
82+
},
83+
}
84+
</script>
85+
86+
<style>
87+
.ctool-bottom {
88+
width: 100%;
89+
position: fixed;
90+
bottom: 0;
91+
left: 0;
92+
height: 33px;
93+
padding-top: 2px;
94+
overflow: hidden;
95+
border-top: 1px solid #dcdee2;
96+
background: #FFF;
97+
}
98+
99+
.ctool-bottom-block {
100+
height: 30px;
101+
line-height: 30px;
102+
overflow: hidden;
103+
}
104+
105+
.ctool-bottom-right {
106+
line-height: 30px;
107+
float: right;
108+
text-align: right;
109+
}
110+
111+
.ctool-bottom-right .ivu-icon {
112+
margin-right: 15px;
113+
cursor: pointer;
114+
}
115+
116+
.ctool-bottom-right .ivu-icon:hover {
117+
color: #1abc9c;
118+
}
119+
</style>

0 commit comments

Comments
 (0)