|
|
@ -10,6 +10,7 @@ import { |
|
|
|
ref, |
|
|
|
ref, |
|
|
|
useCopy, |
|
|
|
useCopy, |
|
|
|
useDashboard, |
|
|
|
useDashboard, |
|
|
|
|
|
|
|
useDebounceFn, |
|
|
|
useI18n, |
|
|
|
useI18n, |
|
|
|
useNuxtApp, |
|
|
|
useNuxtApp, |
|
|
|
useProject, |
|
|
|
useProject, |
|
|
@ -112,6 +113,8 @@ async function saveTheme() { |
|
|
|
$e(`a:view:share:${viewTheme.value ? 'enable' : 'disable'}-theme`) |
|
|
|
$e(`a:view:share:${viewTheme.value ? 'enable' : 'disable'}-theme`) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const saveTransitionDuration = useDebounceFn(updateSharedViewMeta, 1000, { maxWait: 2000 }) |
|
|
|
|
|
|
|
|
|
|
|
async function updateSharedViewMeta() { |
|
|
|
async function updateSharedViewMeta() { |
|
|
|
try { |
|
|
|
try { |
|
|
|
const meta = shared.value.meta && isString(shared.value.meta) ? JSON.parse(shared.value.meta) : shared.value.meta |
|
|
|
const meta = shared.value.meta && isString(shared.value.meta) ? JSON.parse(shared.value.meta) : shared.value.meta |
|
|
@ -222,10 +225,28 @@ watch(passwordProtected, (value) => { |
|
|
|
v-if="shared.type === ViewTypes.FORM" |
|
|
|
v-if="shared.type === ViewTypes.FORM" |
|
|
|
v-model:checked="surveyMode" |
|
|
|
v-model:checked="surveyMode" |
|
|
|
data-cy="nc-modal-share-view__survey-mode" |
|
|
|
data-cy="nc-modal-share-view__survey-mode" |
|
|
|
class="!text-xs" |
|
|
|
class="!text-sm" |
|
|
|
> |
|
|
|
> |
|
|
|
Use Survey Mode |
|
|
|
Use Survey Mode |
|
|
|
</a-checkbox> |
|
|
|
</a-checkbox> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Transition name="layout" mode="out-in"> |
|
|
|
|
|
|
|
<div v-if="surveyMode" class="flex flex-col justify-center pl-6"> |
|
|
|
|
|
|
|
<a-form-item class="!my-1" :has-feedback="false" name="transitionDuration"> |
|
|
|
|
|
|
|
<template #label> |
|
|
|
|
|
|
|
<div class="text-xs">Transition duration (in MS)</div> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
<a-input |
|
|
|
|
|
|
|
v-model:value="shared.meta.transitionDuration" |
|
|
|
|
|
|
|
data-cy="nc-form-signin__email" |
|
|
|
|
|
|
|
size="small" |
|
|
|
|
|
|
|
class="!w-32" |
|
|
|
|
|
|
|
type="number" |
|
|
|
|
|
|
|
@change="saveTransitionDuration" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</a-form-item> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</Transition> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div> |
|
|
|
<div> |
|
|
@ -234,43 +255,53 @@ watch(passwordProtected, (value) => { |
|
|
|
v-if="shared.type === ViewTypes.FORM" |
|
|
|
v-if="shared.type === ViewTypes.FORM" |
|
|
|
v-model:checked="viewTheme" |
|
|
|
v-model:checked="viewTheme" |
|
|
|
data-cy="nc-modal-share-view__with-theme" |
|
|
|
data-cy="nc-modal-share-view__with-theme" |
|
|
|
class="!text-xs" |
|
|
|
class="!text-sm" |
|
|
|
> |
|
|
|
> |
|
|
|
Use Theme |
|
|
|
Use Theme |
|
|
|
</a-checkbox> |
|
|
|
</a-checkbox> |
|
|
|
|
|
|
|
|
|
|
|
<div v-if="viewTheme" class="flex pl-2"> |
|
|
|
<Transition name="layout" mode="out-in"> |
|
|
|
<LazyGeneralColorPicker |
|
|
|
<div v-if="viewTheme" class="flex pl-6"> |
|
|
|
data-cy="nc-modal-share-view__theme-picker" |
|
|
|
<LazyGeneralColorPicker |
|
|
|
:model-value="shared.meta.theme?.primaryColor" |
|
|
|
data-cy="nc-modal-share-view__theme-picker" |
|
|
|
:colors="projectThemeColors" |
|
|
|
class="!p-0" |
|
|
|
:row-size="9" |
|
|
|
:model-value="shared.meta.theme?.primaryColor" |
|
|
|
:advanced="false" |
|
|
|
:colors="projectThemeColors" |
|
|
|
@input="onChangeTheme" |
|
|
|
:row-size="9" |
|
|
|
/> |
|
|
|
:advanced="false" |
|
|
|
</div> |
|
|
|
@input="onChangeTheme" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</Transition> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<!-- Password Protection --> |
|
|
|
<!-- Password Protection --> |
|
|
|
<a-checkbox v-model:checked="passwordProtected" data-cy="nc-modal-share-view__with-password" class="!text-xs"> |
|
|
|
<a-checkbox v-model:checked="passwordProtected" data-cy="nc-modal-share-view__with-password" class="!text-sm !my-1"> |
|
|
|
{{ $t('msg.info.beforeEnablePwd') }} |
|
|
|
{{ $t('msg.info.beforeEnablePwd') }} |
|
|
|
</a-checkbox> |
|
|
|
</a-checkbox> |
|
|
|
|
|
|
|
|
|
|
|
<div v-if="passwordProtected" class="ml-6 flex gap-2 mt-2 mb-4"> |
|
|
|
<Transition name="layout" mode="out-in"> |
|
|
|
<a-input |
|
|
|
<div v-if="passwordProtected" class="pl-6 flex gap-2 mt-2 mb-4"> |
|
|
|
v-model:value="shared.password" |
|
|
|
<a-input |
|
|
|
data-cy="nc-modal-share-view__password" |
|
|
|
v-model:value="shared.password" |
|
|
|
size="small" |
|
|
|
data-cy="nc-modal-share-view__password" |
|
|
|
class="!text-xs max-w-[250px]" |
|
|
|
size="small" |
|
|
|
type="password" |
|
|
|
class="!text-xs max-w-[250px]" |
|
|
|
:placeholder="$t('placeholder.password.enter')" |
|
|
|
type="password" |
|
|
|
/> |
|
|
|
:placeholder="$t('placeholder.password.enter')" |
|
|
|
|
|
|
|
/> |
|
|
|
<a-button data-cy="nc-modal-share-view__save-password" size="small" class="!text-xs" @click="saveShareLinkPassword"> |
|
|
|
|
|
|
|
{{ $t('placeholder.password.save') }} |
|
|
|
<a-button |
|
|
|
</a-button> |
|
|
|
data-cy="nc-modal-share-view__save-password" |
|
|
|
</div> |
|
|
|
size="small" |
|
|
|
|
|
|
|
class="!text-xs" |
|
|
|
|
|
|
|
@click="saveShareLinkPassword" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
{{ $t('placeholder.password.save') }} |
|
|
|
|
|
|
|
</a-button> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</Transition> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div> |
|
|
|
<div> |
|
|
@ -279,7 +310,7 @@ watch(passwordProtected, (value) => { |
|
|
|
v-if="shared && (shared.type === ViewTypes.GRID || shared.type === ViewTypes.KANBAN)" |
|
|
|
v-if="shared && (shared.type === ViewTypes.GRID || shared.type === ViewTypes.KANBAN)" |
|
|
|
v-model:checked="allowCSVDownload" |
|
|
|
v-model:checked="allowCSVDownload" |
|
|
|
data-cy="nc-modal-share-view__with-csv-download" |
|
|
|
data-cy="nc-modal-share-view__with-csv-download" |
|
|
|
class="!text-xs" |
|
|
|
class="!text-sm" |
|
|
|
> |
|
|
|
> |
|
|
|
{{ $t('labels.downloadAllowed') }} |
|
|
|
{{ $t('labels.downloadAllowed') }} |
|
|
|
</a-checkbox> |
|
|
|
</a-checkbox> |
|
|
|