Optimize confirm experience (#99)
Co-authored-by: AceDataCloud <office@acedata.cloud>
This commit is contained in:
1 parent
5039da774f
commit
e4c9e0b5d3
4 files changed
+15
-141
No files matched your search
@@ -19,10 +19,9 @@
|
||||
<div class="policy">
|
||||
<el-checkbox v-model="checked" size="large" class="policy-checkbox" />
|
||||
<span class="policy-title"> {{ $t('application.message.readPolicy') }} </span>
|
||||
<span class="policy-title highlight" @click="showPolicy = true">
|
||||
{{ $t('application.message.policy') }}</span
|
||||
>
|
||||
<application-policy v-model.visible="showPolicy" />
|
||||
<a class="policy-title highlight" target="_blank" :href="getBaseUrlPlatform() + '/terms'">
|
||||
{{ $t('application.message.policy') }}
|
||||
</a>
|
||||
</div>
|
||||
<el-button round type="primary" @click="onApply">{{ $t('common.button.apply') }}</el-button>
|
||||
</div>
|
||||
@@ -33,7 +32,7 @@
|
||||
import { defineComponent } from 'vue';
|
||||
import { ElDialog, ElDescriptions, ElDescriptionsItem, ElDivider, ElCheckbox, ElButton, ElMessage } from 'element-plus';
|
||||
import { IService } from '@/models';
|
||||
import ApplicationPolicy from './Policy.vue';
|
||||
import { getBaseUrlPlatform } from '@/utils';
|
||||
|
||||
interface IData {
|
||||
checked: boolean;
|
||||
@@ -48,8 +47,7 @@ export default defineComponent({
|
||||
ElDescriptionsItem,
|
||||
ElDivider,
|
||||
ElCheckbox,
|
||||
ElButton,
|
||||
ApplicationPolicy
|
||||
ElButton
|
||||
},
|
||||
props: {
|
||||
service: {
|
||||
@@ -65,12 +63,12 @@ export default defineComponent({
|
||||
emits: ['update:visible', 'apply'],
|
||||
data(): IData {
|
||||
return {
|
||||
checked: false,
|
||||
showPolicy: false
|
||||
checked: true
|
||||
};
|
||||
},
|
||||
watch: {},
|
||||
methods: {
|
||||
getBaseUrlPlatform,
|
||||
onApply() {
|
||||
if (!this.checked) {
|
||||
ElMessage.error(this.$t('application.message.notAgreePolicy'));
|
||||
@@ -97,6 +95,7 @@ export default defineComponent({
|
||||
&.highlight {
|
||||
color: var(--el-color-primary);
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
class="dialog-policy"
|
||||
:model-value="visible"
|
||||
:title="$t('application.message.policy')"
|
||||
width="700px"
|
||||
@close="$emit('update:visible', false)"
|
||||
>
|
||||
<markdown-renderer :content="policyText" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import { ElDialog } from 'element-plus';
|
||||
import policyText from '../../assets/mds/policy.md';
|
||||
import MarkdownRenderer from '@/components/common/MarkdownRenderer.vue';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'ApplicationPolicy',
|
||||
components: {
|
||||
ElDialog,
|
||||
MarkdownRenderer
|
||||
},
|
||||
props: {
|
||||
visible: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
emits: ['update:visible'],
|
||||
data() {
|
||||
return {
|
||||
policyText
|
||||
};
|
||||
},
|
||||
methods: {}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.dialog-policy {
|
||||
height: 400px;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user