Browse Source

refactor/Added password toggle to share view modal

pull/3197/head
Muhammed Mustafa 2 years ago
parent
commit
69769f6106
  1. 16
      packages/nc-gui-v2/components/smartsheet-toolbar/ShareView.vue

16
packages/nc-gui-v2/components/smartsheet-toolbar/ShareView.vue

@ -21,7 +21,7 @@ const { isUIAllowed } = useUIPermission()
let showShareModel = $ref(false) let showShareModel = $ref(false)
const passwordProtected = $ref(false) let passwordProtected = $ref(false)
const shared = ref() const shared = ref()
@ -100,6 +100,20 @@ const copyLink = () => {
copy(sharedViewUrl?.value as string) copy(sharedViewUrl?.value as string)
message.success('Copied to clipboard') message.success('Copied to clipboard')
} }
watch(
() => passwordProtected,
(value) => {
if (!value) {
shared.value.password = ''
saveShareLinkPassword()
}
},
)
onMounted(() => {
if (shared.value?.password?.length) passwordProtected = true
})
</script> </script>
<template> <template>

Loading…
Cancel
Save