Skip to content

Commit

Permalink
🔨 chore: wevdav 输入密码时设置隐藏
Browse files Browse the repository at this point in the history
  • Loading branch information
dlzmoe committed Sep 24, 2024
1 parent dae3cc3 commit 5e24561
Show file tree
Hide file tree
Showing 6 changed files with 178 additions and 60 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
- 优化:AI 功能的 API 地址自定义优化
- 优化:wevdav 输入密码时设置隐藏
87 changes: 60 additions & 27 deletions dist/linuxdo-scripts.user.js

Large diffs are not rendered by default.

87 changes: 60 additions & 27 deletions linuxdo-scripts.user.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "linuxdo-scripts",
"version": "0.3.44",
"version": "0.3.45",
"author": "dlzmoe",
"description": "An enhanced script for the linux.do forum",
"type": "module",
Expand Down
56 changes: 52 additions & 4 deletions src/components/Sync/SyncBackup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,31 @@
</div>
<div class="item">
<div class="tit">WebDav 密码:</div>
<input type="text" v-model="tableData.webdavPassword" @blur="handleChange" />
<input
:type="password ? 'password' : 'text'"
v-model="tableData.webdavPassword"
@blur="handleChange"
/>
<em @click="showpsw">
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="icon icon-tabler icons-tabler-outline icon-tabler-eye"
>
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path d="M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0" />
<path
d="M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6"
/>
</svg>
</em>
</div>

<div class="btnwrapper">
Expand Down Expand Up @@ -51,6 +75,7 @@ export default {
},
data() {
return {
password: true,
tableData: this.value,
// webdavUrl: "",
// webdavUsername: "",
Expand All @@ -67,14 +92,16 @@ export default {
},
handleChange() {
this.$emit("update:value", this.tableData);
let linxudoscriptssetting = JSON.parse(localStorage.getItem("linxudoscriptssetting"));
let linxudoscriptssetting = JSON.parse(
localStorage.getItem("linxudoscriptssetting")
);
let data = {
webdavUrl: this.tableData.webdavUrl,
webdavUsername: this.tableData.webdavUsername,
webdavPassword: this.tableData.webdavPassword,
};
linxudoscriptssetting.syncbackup = data;
localStorage.setItem(
"linxudoscriptssetting",
Expand Down Expand Up @@ -242,6 +269,10 @@ export default {
this.messageToast("下载失败,请检查是否存在备份!");
}
},
// 显示/隐藏密码
showpsw() {
this.password = !this.password;
},
},
created() {
const linxudoscriptssetting =
Expand All @@ -260,6 +291,7 @@ export default {
border: none !important;
padding: 0 !important;
margin-top: 15px;
position: relative;
.tit {
white-space: nowrap;
Expand All @@ -268,6 +300,22 @@ export default {
input {
margin: 0;
width: 100%;
}
em {
position: absolute;
right: 10px;
top: 50%;
transform: translateY(-50%);
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
svg {
color: #999;
}
}
}
Expand Down
4 changes: 4 additions & 0 deletions version-log.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.3.45

- 优化:wevdav 输入密码时设置隐藏。

## 0.3.44

- 优化:AI 功能的 API 地址自定义优化。
Expand Down

0 comments on commit 5e24561

Please sign in to comment.