Skip to content

Commit

Permalink
feat: update privacy dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
backrunner committed Mar 15, 2024
1 parent df053ab commit 6c6eb3c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 29 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pixiviz",
"version": "1.31.2",
"version": "1.31.3",
"scripts": {
"serve": "node ./tools/sensitiveWordsGen.js && vue-cli-service serve",
"build": "node ./tools/processVersion.js && set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build",
Expand Down
5 changes: 2 additions & 3 deletions src/components/landing/Banner.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,17 @@
</div>
<div class="about-settings-link">
<a id="about-theme" href="javascript:;" @click="openThemeDialog" @contextmenu.prevent>主题</a>
<a id="about-privacy" href="javascript:;" @click="openPrivacyDialog" @contextmenu.prevent>隐私</a>
</div>
</div>
<div class="about-copyright">
<div class="about-copyright-item">
<span>Copyright &copy; 2023-2024 pwp.app</span>
<span>Copyright &copy; 2024 pixiviz.xyz</span>
</div>
<div class="about-copyright-item">
<span>
<a href="https://pixiviz.xyz/sponsor" target="_blank">发电名录</a>
<span class="about-copyright-split">|</span>
<a href="https://github.com/pwp-app/pixiviz/discussions" target="_blank">交流反馈</a>
<a href="javascript:;" @click="openPrivacyDialog">隐私说明</a>
<span class="about-copyright-split">|</span>
<a :href="`https://pixiviz.xyz/pic/${landingBgId}`" target="_blank">主页背景</a>
</span>
Expand Down
32 changes: 7 additions & 25 deletions src/components/landing/dialogs/PrivacyDialog.vue
Original file line number Diff line number Diff line change
@@ -1,27 +1,18 @@
<template>
<el-dialog
class="dialog dialog-privacy"
title="隐私设置"
title="隐私说明"
:width="dialogWidth"
:visible.sync="show"
append-to-body
>
<el-form label-position="left" :label-width="labelWidth" :model="privacyForm">
<el-form-item label="收集统计数据">
<el-switch
v-model="privacyForm.statistic"
active-color="#E3A7A1"
inactive-color="#3e3e3e"
active-text="允许"
inactive-text="禁止"
@change="statChanged"
>
</el-switch>
</el-form-item>
</el-form>
<div class="dialog-privacy__tip">
<span>
您的数据可能会被 百度统计 与 Cloudflare 收集,<br />这些数据均为匿名数据,有利于我们更好地运营、改进站点。
您的数据可能会被 Cloudflare 收集,这些数据均为匿名数据,主要用于访问分析和安全审查。
<br><br>
您的同步数据全程使用 https 进行传输,通过端到端加密保证数据安全性。
<br><br>
您是唯一有权访问该同步数据的人,您的数据不会以任何方式泄露给任何人,您的密码是访问数据的唯一凭证。
</span>
</div>
</el-dialog>
Expand All @@ -34,10 +25,6 @@ export default {
data() {
return {
show: false,
privacyForm: {
statistic: true,
remote: true,
},
screenWidth: document.documentElement.clientWidth,
};
},
Expand All @@ -53,8 +40,6 @@ export default {
},
created() {
window.addEventListener('resize', this.windowResized);
const privateStats = window.localStorage.getItem('privacy-statistic');
this.privacyForm.statistic = privateStats !== 'false';
},
beforeDestroy() {
window.removeEventListener('resize', this.windowResized);
Expand All @@ -66,18 +51,15 @@ export default {
windowResized() {
this.screenWidth = document.documentElement.clientWidth;
},
statChanged(value) {
window.localStorage.setItem('privacy-statistic', value);
},
},
};
</script>

<style lang="less">
.dialog-privacy {
&__tip {
margin-top: 24px;
user-select: none;
span {
word-break: normal;
}
Expand Down

0 comments on commit 6c6eb3c

Please sign in to comment.