Browse Source

fix(nc-gui): add tooltip info after enable prefill & survey mode option in sharePage modal

pull/7786/head
Ramesh Mane 9 months ago
parent
commit
7b17a3bb75
  1. 36
      packages/nc-gui/components/dlg/share-and-collaborate/SharePage.vue
  2. 3
      packages/nc-gui/lang/en.json

36
packages/nc-gui/components/dlg/share-and-collaborate/SharePage.vue

@ -315,7 +315,7 @@ watchEffect(() => {})
<GeneralCopyUrl v-model:url="url" /> <GeneralCopyUrl v-model:url="url" />
</div> </div>
<div class="flex flex-col justify-between mt-1 py-2 px-3 bg-gray-50 rounded-md"> <div class="flex flex-col justify-between mt-1 py-2 px-3 bg-gray-50 rounded-md">
<div class="flex flex-row justify-between"> <div class="flex flex-row items-center justify-between">
<div class="flex text-black">{{ $t('activity.restrictAccessWithPassword') }}</div> <div class="flex text-black">{{ $t('activity.restrictAccessWithPassword') }}</div>
<a-switch <a-switch
v-e="['c:share:view:password:toggle']" v-e="['c:share:view:password:toggle']"
@ -323,6 +323,7 @@ watchEffect(() => {})
:loading="isUpdating.password" :loading="isUpdating.password"
class="share-password-toggle !mt-0.25" class="share-password-toggle !mt-0.25"
data-testid="share-password-toggle" data-testid="share-password-toggle"
size="small"
@click="togglePasswordProtected" @click="togglePasswordProtected"
/> />
</div> </div>
@ -345,7 +346,7 @@ watchEffect(() => {})
activeView && activeView &&
[ViewTypes.GRID, ViewTypes.KANBAN, ViewTypes.GALLERY, ViewTypes.MAP, ViewTypes.CALENDAR].includes(activeView.type) [ViewTypes.GRID, ViewTypes.KANBAN, ViewTypes.GALLERY, ViewTypes.MAP, ViewTypes.CALENDAR].includes(activeView.type)
" "
class="flex flex-row justify-between" class="flex flex-row items-center justify-between"
> >
<div class="flex text-black">{{ $t('activity.allowDownload') }}</div> <div class="flex text-black">{{ $t('activity.allowDownload') }}</div>
<a-switch <a-switch
@ -354,25 +355,34 @@ watchEffect(() => {})
:loading="isUpdating.download" :loading="isUpdating.download"
class="public-password-toggle !mt-0.25" class="public-password-toggle !mt-0.25"
data-testid="share-download-toggle" data-testid="share-download-toggle"
size="small"
/> />
</div> </div>
<template v-if="activeView?.type === ViewTypes.FORM"> <template v-if="activeView?.type === ViewTypes.FORM">
<div class="flex flex-row justify-between"> <div class="flex flex-row items-center justify-between">
<div class="text-black">{{ $t('activity.surveyMode') }}</div> <div class="text-black">
{{ $t('activity.surveyMode') }}
<NcTooltip class="inline">
<template #title> {{ $t('tooltip.surveyFormInfo') }}</template>
<GeneralIcon icon="info" class="text-gray-600 cursor-pointer"></GeneralIcon>
</NcTooltip>
</div>
<a-switch <a-switch
v-model:checked="surveyMode" v-model:checked="surveyMode"
v-e="['c:share:view:surver-mode:toggle']" v-e="['c:share:view:surver-mode:toggle']"
data-testid="nc-modal-share-view__surveyMode" data-testid="nc-modal-share-view__surveyMode"
size="small"
> >
</a-switch> </a-switch>
</div> </div>
<div v-if="!isEeUI" class="flex flex-row justify-between"> <div v-if="!isEeUI" class="flex flex-row items-center justify-between">
<div class="text-black">{{ $t('activity.rtlOrientation') }}</div> <div class="text-black">{{ $t('activity.rtlOrientation') }}</div>
<a-switch <a-switch
v-model:checked="withRTL" v-model:checked="withRTL"
v-e="['c:share:view:rtl-orientation:toggle']" v-e="['c:share:view:rtl-orientation:toggle']"
data-testid="nc-modal-share-view__RTL" data-testid="nc-modal-share-view__RTL"
size="small"
> >
</a-switch> </a-switch>
</div> </div>
@ -382,12 +392,24 @@ watchEffect(() => {})
v-if="activeView?.type === ViewTypes.FORM" v-if="activeView?.type === ViewTypes.FORM"
class="nc-pre-filled-mode-wrapper flex flex-col justify-between gap-y-3 mt-1 py-2 px-3 bg-gray-50 rounded-md" class="nc-pre-filled-mode-wrapper flex flex-col justify-between gap-y-3 mt-1 py-2 px-3 bg-gray-50 rounded-md"
> >
<div class="flex flex-row justify-between"> <div class="flex flex-row items-center justify-between">
<div class="text-black">{{ $t('activity.preFilledFields.title') }}</div> <div class="text-black flex-1">
{{ $t('activity.preFilledFields.title') }}
<NcTooltip class="inline">
<template #title
><div class="text-center">
{{ $t('tooltip.preFillFormInfo') }}
</div></template
>
<GeneralIcon icon="info" class="text-gray-600 cursor-pointer"></GeneralIcon>
</NcTooltip>
</div>
<a-switch <a-switch
v-e="['c:share:view:surver-mode:toggle']" v-e="['c:share:view:surver-mode:toggle']"
:checked="formPreFill.preFillEnabled" :checked="formPreFill.preFillEnabled"
data-testid="nc-modal-share-view__preFill" data-testid="nc-modal-share-view__preFill"
size="small"
@update:checked=" @update:checked="
(value) => { (value) => {
formPreFill = { formPreFill = {

3
packages/nc-gui/lang/en.json

@ -964,7 +964,8 @@
"clientKey": "Select .key file", "clientKey": "Select .key file",
"clientCert": "Select .cert file", "clientCert": "Select .cert file",
"clientCA": "Select CA file", "clientCA": "Select CA file",
"fillTheFormFieldFirst": "Fill the form fields first" "preFillFormInfo": "To get a prefilled link, make sure you’ve filled the necessary fields in the form view builder.",
"surveyFormInfo": "Form mode with one field per page"
}, },
"placeholder": { "placeholder": {
"selectSlackChannels": "Select Slack channels", "selectSlackChannels": "Select Slack channels",

Loading…
Cancel
Save