mirror of
https://github.com/kuaifan/dootask.git
synced 2026-03-03 07:37:05 +00:00
隐私政策同意相关
This commit is contained in:
parent
7ab20707c3
commit
7ab858088b
2
public/css/app.css
vendored
2
public/css/app.css
vendored
File diff suppressed because one or more lines are too long
2
public/js/app.js
vendored
2
public/js/app.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/build/225.js
vendored
Normal file
1
public/js/build/225.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
public/js/build/492.js
vendored
1
public/js/build/492.js
vendored
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
38a09a69a7591dbd
|
||||
639608afadc6cadc
|
||||
|
||||
@ -14,9 +14,12 @@
|
||||
{{ $L('更新客户端') }}
|
||||
</div>
|
||||
</template>
|
||||
<a v-if="showPrivacy" class="common-right-bottom-link" target="_blank" :href="$A.apiUrl('../privacy.html')">
|
||||
《{{ $L('隐私政策') }}》
|
||||
</a>
|
||||
<div v-if="showPrivacy" class="common-right-bottom-link privacy" :class="{shake:privacyShake}">
|
||||
<Checkbox v-model="privacyAgreed"></Checkbox>
|
||||
<a target="_blank" :href="$A.apiUrl('../privacy.html')" @click="privacyAgreed=true">
|
||||
《{{ $L('隐私政策') }}》
|
||||
</a>
|
||||
</div>
|
||||
<Modal
|
||||
v-model="updateShow"
|
||||
:closable="false"
|
||||
@ -62,6 +65,8 @@ export default {
|
||||
updateIng: false,
|
||||
|
||||
downloadUrl: '',
|
||||
|
||||
privacyAgreed: false,
|
||||
}
|
||||
},
|
||||
|
||||
@ -93,10 +98,20 @@ export default {
|
||||
if (show) {
|
||||
this.updateBottomShow = true
|
||||
}
|
||||
}
|
||||
},
|
||||
privacyAgreed(val) {
|
||||
this.$store.state.privacyAgreed = val
|
||||
},
|
||||
privacyShake(val) {
|
||||
if (val) {
|
||||
setTimeout(_ => this.$store.state.privacyShake = false, 600)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapState(['privacyShake']),
|
||||
|
||||
isSoftware() {
|
||||
return this.$Electron || this.$isEEUiApp;
|
||||
},
|
||||
|
||||
@ -198,6 +198,8 @@ export default {
|
||||
|
||||
'themeMode',
|
||||
'themeList',
|
||||
|
||||
'privacyAgreed',
|
||||
]),
|
||||
|
||||
isSoftware() {
|
||||
@ -219,6 +221,15 @@ export default {
|
||||
text += "成功..."
|
||||
}
|
||||
return text
|
||||
},
|
||||
|
||||
showPrivacy() {
|
||||
return [
|
||||
'127.0.0.1:2222',
|
||||
'dootask.com',
|
||||
'www.dootask.com',
|
||||
't.hitosea.com',
|
||||
].includes($A.getDomain($A.apiUrl('../'))) && this.$isEEUiApp && ['login'].includes(this.$route.name)
|
||||
}
|
||||
},
|
||||
|
||||
@ -391,6 +402,11 @@ export default {
|
||||
},
|
||||
|
||||
onLogin() {
|
||||
if (this.showPrivacy && !this.privacyAgreed) {
|
||||
this.$store.state.privacyShake = true
|
||||
$A.messageWarning("请阅读《隐私政策》并同意");
|
||||
return;
|
||||
}
|
||||
this.chackServerUrl(true).then(() => {
|
||||
this.email = $A.trim(this.email)
|
||||
this.password = $A.trim(this.password)
|
||||
|
||||
4
resources/assets/js/store/state.js
vendored
4
resources/assets/js/store/state.js
vendored
@ -11,6 +11,10 @@ const stateData = {
|
||||
// 窗口是否激活
|
||||
windowActive: true,
|
||||
|
||||
// 隐私政策同意/抖动
|
||||
privacyAgreed: false,
|
||||
privacyShake: false,
|
||||
|
||||
// App通知权限
|
||||
appNotificationPermission: true,
|
||||
|
||||
|
||||
@ -20,6 +20,14 @@
|
||||
color: #fff;
|
||||
background-color: $primary-color;
|
||||
border-color: $primary-color;
|
||||
&.privacy {
|
||||
.ivu-checkbox-wrapper {
|
||||
margin-right: 2px;
|
||||
}
|
||||
&.shake {
|
||||
animation: ani-privacy-agreed-shake 500ms ease-in-out;
|
||||
}
|
||||
}
|
||||
&:hover {
|
||||
color: #fff;
|
||||
opacity: 0.9;
|
||||
@ -88,6 +96,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes ani-privacy-agreed-shake {
|
||||
10%, 90% { transform: translate3d(-1px, 0, 0); }
|
||||
20%, 80% { transform: translate3d(+2px, 0, 0); }
|
||||
30%, 70% { transform: translate3d(-4px, 0, 0); }
|
||||
40%, 60% { transform: translate3d(+4px, 0, 0); }
|
||||
50% { transform: translate3d(-4px, 0, 0); }
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.common-right-bottom {
|
||||
bottom: 20px;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user