diff --git a/package.json b/package.json
index 8b73f41..0c2065b 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "zy",
- "version": "0.9.33",
+ "version": "0.9.35",
"private": true,
"author": {
"name": "Hunlongyu",
diff --git a/src/components/Setting.vue b/src/components/Setting.vue
index 99c98ce..f18bf8d 100644
--- a/src/components/Setting.vue
+++ b/src/components/Setting.vue
@@ -60,6 +60,10 @@
+
+ {{$t('clearDB')}}
+ {{$t('clearTips')}}
+
@@ -67,6 +71,7 @@
import { mapMutations } from 'vuex'
import setting from '../lib/dexie/setting'
import { sites } from '../lib/site/sites'
+import db from '../lib/dexie/index'
import '../lib/cloud/index.js'
import { shell } from 'electron'
import pkg from '../../package.json'
@@ -148,6 +153,11 @@ export default {
setting.update(this.s).then(res => {
this.$m.success(this.$t('set_success'))
})
+ },
+ clearDBEvent () {
+ db.delete().then(res => {
+ this.$m.success(this.$t('set_success'))
+ })
}
},
created () {
@@ -248,5 +258,26 @@ export default {
}
}
}
+ .clearDB{
+ margin-top: 20px;
+ margin-bottom: 20px;
+ .clearBtn{
+ margin-left: 20px;
+ color: red;
+ cursor: pointer;
+ border: 1px solid #ff000088;
+ display: inline-block;
+ width: 160px;
+ height: 32px;
+ font-size: 14px;
+ text-align: center;
+ line-height: 32px;
+ }
+ .clearTips{
+ font-size: 12px;
+ color: #ff000088;
+ margin-left: 10px;
+ }
+ }
}
diff --git a/src/locales/en.json b/src/locales/en.json
index dfe1245..2a1f894 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -44,5 +44,7 @@
"copy_success": "has been copied, Download it now",
"async_failed": "Synchronization successful, no updates found.",
"async_success": "Synchronization succeeded, update found.",
- "no_history": "No history data."
+ "no_history": "No history data.",
+ "clearDB": "Reset software",
+ "clearTips": "Click to clear the database and close the software"
}
diff --git a/src/locales/zh-cn.json b/src/locales/zh-cn.json
index 5e68ad0..59a49ca 100644
--- a/src/locales/zh-cn.json
+++ b/src/locales/zh-cn.json
@@ -44,5 +44,7 @@
"copy_success": "已复制,快去下载吧。",
"async_failed": "同步成功, 未查询到更新。",
"async_success": "同步成功, 查询到更新。",
- "no_history": "无历史记录"
+ "no_history": "无历史记录",
+ "clearDB": "重置软件",
+ "clearTips": "软件没有问题,请勿重置软件,否则数据丢失概不负责.点击即清空数据库,并关闭软件."
}
diff --git a/src/mini/Mini.vue b/src/mini/Mini.vue
index cf632c5..6a52099 100644
--- a/src/mini/Mini.vue
+++ b/src/mini/Mini.vue
@@ -2,14 +2,14 @@
-
{{index + 1}} / {{length}}
-
+ {{index + 1}} / {{length}}
+
-
+