1
0

5804-5804.js 4.4 KB

12
  1. "use strict";(self.webpackChunknextcloud=self.webpackChunknextcloud||[]).push([[5804],{34604:(e,t,n)=>{n.d(t,{A:()=>l});var o=n(71354),i=n.n(o),r=n(76314),s=n.n(r)()(i());s.push([e.id,"\n.note-to-recipient[data-v-77889141] {\n\tmargin-inline: var(--row-height)\n}\n.note-to-recipient__text[data-v-77889141] {\n\t/* respect new lines */\n\twhite-space: pre-line;\n}\n.note-to-recipient__heading[data-v-77889141] {\n\tfont-weight: bold;\n}\n@media screen and (max-width: 512px) {\n.note-to-recipient[data-v-77889141] {\n\t\tmargin-inline: var(--default-grid-baseline);\n}\n}\n","",{version:3,sources:["webpack://./apps/files_sharing/src/views/FilesHeaderNoteToRecipient.vue"],names:[],mappings:";AAsDA;CACA;AACA;AAEA;CACA,sBAAA;CACA,qBAAA;AACA;AAEA;CACA,iBAAA;AACA;AAEA;AACA;EACA,2CAAA;AACA;AACA",sourcesContent:["\x3c!--\n - SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n--\x3e\n<template>\n\t<NcNoteCard v-if=\"note.length > 0\"\n\t\tclass=\"note-to-recipient\"\n\t\ttype=\"info\">\n\t\t<p v-if=\"user\" class=\"note-to-recipient__heading\">\n\t\t\t{{ t('files_sharing', 'Note from') }}\n\t\t\t<NcUserBubble :user=\"user.id\" :display-name=\"user.displayName\" />\n\t\t</p>\n\t\t<p v-else class=\"note-to-recipient__heading\">\n\t\t\t{{ t('files_sharing', 'Note:') }}\n\t\t</p>\n\t\t<p class=\"note-to-recipient__text\" v-text=\"note\" />\n\t</NcNoteCard>\n</template>\n\n<script setup lang=\"ts\">\nimport type { Folder } from '@nextcloud/files'\nimport { getCurrentUser } from '@nextcloud/auth'\nimport { t } from '@nextcloud/l10n'\nimport { computed, ref } from 'vue'\n\nimport NcNoteCard from '@nextcloud/vue/dist/Components/NcNoteCard.js'\nimport NcUserBubble from '@nextcloud/vue/dist/Components/NcUserBubble.js'\n\nconst folder = ref<Folder>()\nconst note = computed<string>(() => folder.value?.attributes.note ?? '')\nconst user = computed(() => {\n\tconst id = folder.value?.attributes?.['owner-id']\n\tconst displayName = folder.value?.attributes?.['owner-display-name']\n\tif (id !== getCurrentUser()?.uid) {\n\t\treturn {\n\t\t\tid,\n\t\t\tdisplayName,\n\t\t}\n\t}\n\treturn null\n})\n\n/**\n * Update the current folder\n * @param newFolder the new folder to show note for\n */\nfunction updateFolder(newFolder: Folder) {\n\tfolder.value = newFolder\n}\n\ndefineExpose({ updateFolder })\n<\/script>\n\n<style scoped>\n.note-to-recipient {\n\tmargin-inline: var(--row-height)\n}\n\n.note-to-recipient__text {\n\t/* respect new lines */\n\twhite-space: pre-line;\n}\n\n.note-to-recipient__heading {\n\tfont-weight: bold;\n}\n\n@media screen and (max-width: 512px) {\n\t.note-to-recipient {\n\t\tmargin-inline: var(--default-grid-baseline);\n\t}\n}\n</style>\n"],sourceRoot:""}]);const l=s},75804:(e,t,n)=>{n.d(t,{default:()=>x});var o=n(85471),i=n(21777),r=n(53334),s=n(52201),l=n(6991);const a=(0,o.pM)({__name:"FilesHeaderNoteToRecipient",setup(e,t){let{expose:n}=t;const a=(0,o.KR)(),d=(0,o.EW)((()=>{var e,t;return null!==(e=null===(t=a.value)||void 0===t?void 0:t.attributes.note)&&void 0!==e?e:""})),u=(0,o.EW)((()=>{var e,t,n;const o=null===(e=a.value)||void 0===e||null===(e=e.attributes)||void 0===e?void 0:e["owner-id"],r=null===(t=a.value)||void 0===t||null===(t=t.attributes)||void 0===t?void 0:t["owner-display-name"];return o!==(null===(n=(0,i.HW)())||void 0===n?void 0:n.uid)?{id:o,displayName:r}:null}));function c(e){a.value=e}return n({updateFolder:c}),{__sfc:!0,folder:a,note:d,user:u,updateFolder:c,t:r.t,NcNoteCard:s.A,NcUserBubble:l.N}}});var d=n(85072),u=n.n(d),c=n(97825),p=n.n(c),A=n(77659),m=n.n(A),f=n(55056),v=n.n(f),_=n(10540),C=n.n(_),h=n(41113),N=n.n(h),g=n(34604),b={};b.styleTagTransform=N(),b.setAttributes=v(),b.insert=m().bind(null,"head"),b.domAPI=p(),b.insertStyleElement=C(),u()(g.A,b),g.A&&g.A.locals&&g.A.locals;const x=(0,n(14486).A)(a,(function(){var e=this,t=e._self._c,n=e._self._setupProxy;return n.note.length>0?t(n.NcNoteCard,{staticClass:"note-to-recipient",attrs:{type:"info"}},[n.user?t("p",{staticClass:"note-to-recipient__heading"},[e._v("\n\t\t"+e._s(n.t("files_sharing","Note from"))+"\n\t\t"),t(n.NcUserBubble,{attrs:{user:n.user.id,"display-name":n.user.displayName}})],1):t("p",{staticClass:"note-to-recipient__heading"},[e._v("\n\t\t"+e._s(n.t("files_sharing","Note:"))+"\n\t")]),e._v(" "),t("p",{staticClass:"note-to-recipient__text",domProps:{textContent:e._s(n.note)}})]):e._e()}),[],!1,null,"77889141",null).exports}}]);
  2. //# sourceMappingURL=5804-5804.js.map?v=bbed62e5611e49a34103