czh-20260701-修复协作者权限相关内容;去除帮助中心
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
:footer="null"
|
:footer="null"
|
||||||
:destroy-on-close="true"
|
:destroy-on-close="true"
|
||||||
wrap-class-name="plan-preview-modal"
|
wrap-class-name="plan-preview-modal"
|
||||||
:body-style="{ maxHeight: '80vh', overflowY: 'auto', padding: '0 24px' }"
|
:body-style="{ height: '78vh', overflowY: 'auto', padding: '0 24px' }"
|
||||||
@cancel="emit('update:visible', false)"
|
@cancel="emit('update:visible', false)"
|
||||||
>
|
>
|
||||||
<template #title>
|
<template #title>
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
>
|
>
|
||||||
{{ secretText }}
|
{{ secretText }}
|
||||||
</span>
|
</span>
|
||||||
<div class="collaborator-bar" @click.stop="openCollaborator">
|
<div class="collaborator-bar" :class="{ disabled: !isOwner }" @click.stop="isOwner && openCollaborator()">
|
||||||
<AvatarDisplay
|
<AvatarDisplay
|
||||||
v-if="collaboratorDisplayNames"
|
v-if="collaboratorDisplayNames"
|
||||||
:names="collaboratorDisplayNames"
|
:names="collaboratorDisplayNames"
|
||||||
@@ -322,6 +322,7 @@ const props = defineProps<{
|
|||||||
secretText?: string;
|
secretText?: string;
|
||||||
isFavorited: boolean;
|
isFavorited: boolean;
|
||||||
collaboratorNames?: string;
|
collaboratorNames?: string;
|
||||||
|
myPermission?: string;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
@@ -357,6 +358,7 @@ const pickerEpoch = ref(0);
|
|||||||
|
|
||||||
const collaboratorModalRef = ref();
|
const collaboratorModalRef = ref();
|
||||||
const collaboratorDisplayNames = computed(() => props.collaboratorNames || '');
|
const collaboratorDisplayNames = computed(() => props.collaboratorNames || '');
|
||||||
|
const isOwner = computed(() => props.myPermission === '1');
|
||||||
const collabCount = computed(() => {
|
const collabCount = computed(() => {
|
||||||
if (!props.collaboratorNames) return 0;
|
if (!props.collaboratorNames) return 0;
|
||||||
return props.collaboratorNames.split(/[,,、]/).filter(Boolean).length;
|
return props.collaboratorNames.split(/[,,、]/).filter(Boolean).length;
|
||||||
@@ -824,6 +826,15 @@ function onGroupChange({ key }: { key: string }) { groupDimension.value = key as
|
|||||||
border-color: #d0d0d0;
|
border-color: #d0d0d0;
|
||||||
background: #fafafa;
|
background: #fafafa;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.disabled {
|
||||||
|
cursor: not-allowed;
|
||||||
|
opacity: 0.5;
|
||||||
|
&:hover {
|
||||||
|
border-color: #e8e8e8;
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.collab-btn {
|
.collab-btn {
|
||||||
|
|||||||
@@ -19,11 +19,6 @@
|
|||||||
@search="onSearch"
|
@search="onSearch"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<a-tooltip title="使用帮助">
|
|
||||||
<a-button type="text" size="small" class="help-btn" @click="helpModalOpen = true">
|
|
||||||
<Icon icon="ant-design:question-circle-outlined" />
|
|
||||||
</a-button>
|
|
||||||
</a-tooltip>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
@@ -838,15 +833,13 @@
|
|||||||
:role="1"
|
:role="1"
|
||||||
@confirm="onUserSelectConfirm"
|
@confirm="onUserSelectConfirm"
|
||||||
/>
|
/>
|
||||||
<HelpModal v-model:open="helpModalOpen" />
|
|
||||||
</a-spin>
|
</a-spin>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, shallowRef, computed, watch, nextTick } from 'vue';
|
import { ref, shallowRef, computed, watch, nextTick } from 'vue';
|
||||||
import HelpModal from './HelpModal.vue';
|
import dayjs from 'dayjs';
|
||||||
import dayjs from 'dayjs';
|
|
||||||
import Icon from '/@/components/Icon/index';
|
import Icon from '/@/components/Icon/index';
|
||||||
import AvatarDisplay from './AvatarDisplay.vue';
|
import AvatarDisplay from './AvatarDisplay.vue';
|
||||||
import draggable from 'vuedraggable';
|
import draggable from 'vuedraggable';
|
||||||
@@ -921,7 +914,6 @@
|
|||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const { createConfirm } = useMessage();
|
const { createConfirm } = useMessage();
|
||||||
|
|
||||||
const helpModalOpen = ref(false);
|
|
||||||
|
|
||||||
function onCreateListClick() {
|
function onCreateListClick() {
|
||||||
emit('create-list');
|
emit('create-list');
|
||||||
@@ -2096,14 +2088,6 @@
|
|||||||
margin-left: 16px;
|
margin-left: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.help-btn {
|
|
||||||
color: #888;
|
|
||||||
font-size: 18px;
|
|
||||||
&:hover {
|
|
||||||
color: #1677ff;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.content-header-actions {
|
.content-header-actions {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@@ -111,6 +111,7 @@
|
|||||||
:secret-level="previewSecretLevel"
|
:secret-level="previewSecretLevel"
|
||||||
:secret-text="previewSecretText"
|
:secret-text="previewSecretText"
|
||||||
:collaborator-names="previewCollaboratorNames"
|
:collaborator-names="previewCollaboratorNames"
|
||||||
|
:my-permission="previewMyPermission"
|
||||||
:is-favorited="previewIsFavorited"
|
:is-favorited="previewIsFavorited"
|
||||||
@update:visible="(v) => (previewModalVisible = v)"
|
@update:visible="(v) => (previewModalVisible = v)"
|
||||||
@add-to-favorites="onAddToFavorites"
|
@add-to-favorites="onAddToFavorites"
|
||||||
@@ -219,6 +220,7 @@ import PlanPreviewModal from './components/PlanPreviewModal.vue';
|
|||||||
const previewSecretLevel = ref(1);
|
const previewSecretLevel = ref(1);
|
||||||
const previewSecretText = ref('非密');
|
const previewSecretText = ref('非密');
|
||||||
const previewCollaboratorNames = ref('');
|
const previewCollaboratorNames = ref('');
|
||||||
|
const previewMyPermission = ref('');
|
||||||
const previewIsFavorited = computed(() => favoriteIdMap.value.has(previewListId.value));
|
const previewIsFavorited = computed(() => favoriteIdMap.value.has(previewListId.value));
|
||||||
|
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
@@ -560,6 +562,7 @@ import PlanPreviewModal from './components/PlanPreviewModal.vue';
|
|||||||
previewSecretLevel.value = (list as any).secretLevel || 1;
|
previewSecretLevel.value = (list as any).secretLevel || 1;
|
||||||
previewSecretText.value = (list as any).secretText || '非密';
|
previewSecretText.value = (list as any).secretText || '非密';
|
||||||
previewCollaboratorNames.value = list.collaboratorNames || '';
|
previewCollaboratorNames.value = list.collaboratorNames || '';
|
||||||
|
previewMyPermission.value = list.myPermission || '';
|
||||||
previewModalVisible.value = true;
|
previewModalVisible.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user