Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
971 changes: 971 additions & 0 deletions js/_plugin-vue2_normalizer-7s-jVsTj.chunk.mjs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ This file is generated from multiple sources. Included packages:
- version: 2.5.1
- license: GPL-3.0-or-later
- @nextcloud/dialogs
- version: 5.3.8
- version: 6.3.1
- license: AGPL-3.0-or-later
- @nextcloud/l10n
- version: 3.2.0
- version: 3.3.0
- license: GPL-3.0-or-later
- @nextcloud/router
- version: 3.0.1
Expand Down
1 change: 1 addition & 0 deletions js/_plugin-vue2_normalizer-7s-jVsTj.chunk.mjs.map

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ This file is generated from multiple sources. Included packages:
- version: 2.5.1
- license: GPL-3.0-or-later
- @nextcloud/dialogs
- version: 5.3.8
- version: 6.3.1
- license: AGPL-3.0-or-later
- @nextcloud/l10n
- version: 3.2.0
- version: 3.3.0
- license: GPL-3.0-or-later
- @nextcloud/router
- version: 3.0.1
Expand Down
938 changes: 0 additions & 938 deletions js/_plugin-vue2_normalizer-BEVGBSht.chunk.mjs

This file was deleted.

1 change: 0 additions & 1 deletion js/_plugin-vue2_normalizer-BEVGBSht.chunk.mjs.map

This file was deleted.

2 changes: 1 addition & 1 deletion js/files_downloadlimit-admin.mjs
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
import{r as o,e as r,n,t as c,c as d,v as m,d as u,N as h,s as p,b as f,V as _}from"./_plugin-vue2_normalizer-BEVGBSht.chunk.mjs";import{l as g,t as s}from"./index-CqY9_Aan.chunk.mjs";o(r);const w={name:"HelpCircleIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var v=function(){var t=this,i=t._self._c;return i("span",t._b({staticClass:"material-design-icon help-circle-icon",attrs:{"aria-hidden":t.title?null:"true","aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[i("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[i("path",{attrs:{d:"M15.07,11.25L14.17,12.17C13.45,12.89 13,13.5 13,15H11V14.5C11,13.39 11.45,12.39 12.17,11.67L13.41,10.41C13.78,10.05 14,9.55 14,9C14,7.89 13.1,7 12,7A2,2 0 0,0 10,9H8A4,4 0 0,1 12,5A4,4 0 0,1 16,9C16,9.88 15.64,10.67 15.07,11.25M13,19H11V17H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,6.47 17.5,2 12,2Z"}},[t.title?i("title",[t._v(t._s(t.title))]):t._e()])])])},C=[],S=n(w,v,C,!1,null,null);const b=S.exports,y={name:"NcSettingsSection",components:{HelpCircle:b},props:{name:{type:String,required:!0},description:{type:String,default:""},docUrl:{type:String,default:""},limitWidth:{type:Boolean,default:!0}},data(){return{docNameTranslated:c("External documentation for {name}",{name:this.name})}},computed:{forceLimitWidth(){if(this.limitWidth)return!0;const[t]=window._oc_config?.version.split(".",2)??[];return t&&Number.parseInt(t)>=30},hasDescription(){return this.description.length>0},hasDocUrl(){return this.docUrl.length>0}}};var x=function(){var t=this,i=t._self._c;return i("div",{staticClass:"settings-section",class:{"settings-section--limit-width":t.forceLimitWidth}},[i("h2",{staticClass:"settings-section__name"},[t._v(" "+t._s(t.name)+" "),t.hasDocUrl?i("a",{staticClass:"settings-section__info",attrs:{href:t.docUrl,title:t.docNameTranslated,"aria-label":t.docNameTranslated,target:"_blank",rel:"noreferrer nofollow"}},[i("HelpCircle",{attrs:{size:20}})],1):t._e()]),t.hasDescription?i("p",{staticClass:"settings-section__desc"},[t._v(" "+t._s(t.description)+" ")]):t._e(),t._t("default")],2)},N=[],T=n(y,x,N,!1,null,"6f6953b5");const L=T.exports,A=async t=>(await d.put(m("/apps/files_downloadlimit/api/v1/limit"),{limit:t})).data.ocs.data,l=g("files_downloadlimit","default-download-limit",-1),a=l===-1?"":l,H=u({name:"AdminSettings",components:{NcSettingsSection:L,NcTextField:h},data(){return{limit:a,savedLimit:a,showSuccess:!1}},computed:{helperText(){return typeof this.limit!="number"||this.limit>0?"":s("files_downloadlimit","The minimum limit is 1")},showTrailingButton(){return typeof this.limit=="number"&&this.limit>0&&this.limit!==this.savedLimit}},methods:{t:s,handleUpdateLimit(t){this.limit=Number(t)},async handleSave(){if(typeof this.limit=="number"&&this.limit>0)try{await A(this.limit),this.savedLimit=this.limit,this.showSuccess=!0,setTimeout(()=>{this.showSuccess=!1},3e3)}catch{p(s("files_downloadlimit","Failed to set default download limit"))}}}});var U=function(){var t=this,i=t._self._c;return t._self._setupProxy,i("NcSettingsSection",{attrs:{name:t.t("files_downloadlimit","Download limit"),description:t.t("files_downloadlimit","Configure the default download limit for external shares.")}},[i("form",{on:{submit:function(e){return e.preventDefault(),t.handleSave.apply(null,arguments)}}},[i("NcTextField",{staticClass:"settings__field",attrs:{label:t.t("files_downloadlimit","Set default download limit"),type:"number",min:"1",value:t.limit,"helper-text":t.helperText,error:!!t.helperText,success:t.showSuccess,"show-trailing-button":t.showTrailingButton,"trailing-button-icon":"arrowRight"},on:{"update:value":t.handleUpdateLimit,"trailing-button-click":t.handleSave}})],1)])},D=[],k=f(H,U,D,!1,null,"a2fa1167");const z=k.exports,B=new _({render:t=>t(z)});B.$mount("#admin-download-limit");
import{r as o,e as r,n,t as c,c as d,v as m,d as u,N as h,s as p,b as f,V as _}from"./_plugin-vue2_normalizer-7s-jVsTj.chunk.mjs";import{l as g,t as s}from"./index-4iYZWvRr.chunk.mjs";o(r);const w={name:"HelpCircleIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var v=function(){var t=this,i=t._self._c;return i("span",t._b({staticClass:"material-design-icon help-circle-icon",attrs:{"aria-hidden":t.title?null:"true","aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[i("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[i("path",{attrs:{d:"M15.07,11.25L14.17,12.17C13.45,12.89 13,13.5 13,15H11V14.5C11,13.39 11.45,12.39 12.17,11.67L13.41,10.41C13.78,10.05 14,9.55 14,9C14,7.89 13.1,7 12,7A2,2 0 0,0 10,9H8A4,4 0 0,1 12,5A4,4 0 0,1 16,9C16,9.88 15.64,10.67 15.07,11.25M13,19H11V17H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,6.47 17.5,2 12,2Z"}},[t.title?i("title",[t._v(t._s(t.title))]):t._e()])])])},C=[],S=n(w,v,C,!1,null,null);const b=S.exports,y={name:"NcSettingsSection",components:{HelpCircle:b},props:{name:{type:String,required:!0},description:{type:String,default:""},docUrl:{type:String,default:""},limitWidth:{type:Boolean,default:!0}},data(){return{docNameTranslated:c("External documentation for {name}",{name:this.name})}},computed:{forceLimitWidth(){if(this.limitWidth)return!0;const[t]=window._oc_config?.version.split(".",2)??[];return t&&Number.parseInt(t)>=30},hasDescription(){return this.description.length>0},hasDocUrl(){return this.docUrl.length>0}}};var x=function(){var t=this,i=t._self._c;return i("div",{staticClass:"settings-section",class:{"settings-section--limit-width":t.forceLimitWidth}},[i("h2",{staticClass:"settings-section__name"},[t._v(" "+t._s(t.name)+" "),t.hasDocUrl?i("a",{staticClass:"settings-section__info",attrs:{href:t.docUrl,title:t.docNameTranslated,"aria-label":t.docNameTranslated,target:"_blank",rel:"noreferrer nofollow"}},[i("HelpCircle",{attrs:{size:20}})],1):t._e()]),t.hasDescription?i("p",{staticClass:"settings-section__desc"},[t._v(" "+t._s(t.description)+" ")]):t._e(),t._t("default")],2)},N=[],T=n(y,x,N,!1,null,"6f6953b5");const L=T.exports,A=async t=>(await d.put(m("/apps/files_downloadlimit/api/v1/limit"),{limit:t})).data.ocs.data,l=g("files_downloadlimit","default-download-limit",-1),a=l===-1?"":l,H=u({name:"AdminSettings",components:{NcSettingsSection:L,NcTextField:h},data(){return{limit:a,savedLimit:a,showSuccess:!1}},computed:{helperText(){return typeof this.limit!="number"||this.limit>0?"":s("files_downloadlimit","The minimum limit is 1")},showTrailingButton(){return typeof this.limit=="number"&&this.limit>0&&this.limit!==this.savedLimit}},methods:{t:s,handleUpdateLimit(t){this.limit=Number(t)},async handleSave(){if(typeof this.limit=="number"&&this.limit>0)try{await A(this.limit),this.savedLimit=this.limit,this.showSuccess=!0,setTimeout(()=>{this.showSuccess=!1},3e3)}catch{p(s("files_downloadlimit","Failed to set default download limit"))}}}});var U=function(){var t=this,i=t._self._c;return t._self._setupProxy,i("NcSettingsSection",{attrs:{name:t.t("files_downloadlimit","Download limit"),description:t.t("files_downloadlimit","Configure the default download limit for external shares.")}},[i("form",{on:{submit:function(e){return e.preventDefault(),t.handleSave.apply(null,arguments)}}},[i("NcTextField",{staticClass:"settings__field",attrs:{label:t.t("files_downloadlimit","Set default download limit"),type:"number",min:"1",value:t.limit,"helper-text":t.helperText,error:!!t.helperText,success:t.showSuccess,"show-trailing-button":t.showTrailingButton,"trailing-button-icon":"arrowRight"},on:{"update:value":t.handleUpdateLimit,"trailing-button-click":t.handleSave}})],1)])},D=[],k=f(H,U,D,!1,null,"a2fa1167");const z=k.exports,B=new _({render:t=>t(z)});B.$mount("#admin-download-limit");
//# sourceMappingURL=files_downloadlimit-admin.mjs.map
2 changes: 1 addition & 1 deletion js/files_downloadlimit-main.mjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/files_downloadlimit-main.mjs.license
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SPDX-FileCopyrightText: Nextcloud GmbH and Nextcloud contributors

This file is generated from multiple sources. Included packages:
- @nextcloud/sharing
- version: 0.2.3
- version: 0.2.5
- license: GPL-3.0-or-later
- @nextcloud/vue
- version: 8.27.0
Expand Down
2 changes: 1 addition & 1 deletion js/files_downloadlimit-main.mjs.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/files_downloadlimit-main.mjs.map.license
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SPDX-FileCopyrightText: Nextcloud GmbH and Nextcloud contributors

This file is generated from multiple sources. Included packages:
- @nextcloud/sharing
- version: 0.2.3
- version: 0.2.5
- license: GPL-3.0-or-later
- @nextcloud/vue
- version: 8.27.0
Expand Down
2 changes: 1 addition & 1 deletion js/files_downloadlimit-public.mjs
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
import{l as w,t as s,a as f}from"./index-CqY9_Aan.chunk.mjs";import{l as p}from"./logger-CCJSJhN1.chunk.mjs";const{limit:a,downloads:c}=w("files_downloadlimit","download_limit",{limit:-1,downloads:0});p.debug("Download limit",{limit:a,downloads:c});let n=a-c,r=0;const m=(e,o)=>{o===0?e.innerText=s("files_downloadlimit","You have reached the maximum amount of downloads allowed"):e.innerText=f("files_downloadlimit","1 remaining download allowed","{count} remaining downloads allowed",o,{count:o})};window.addEventListener("DOMContentLoaded",()=>{if(a<1)return;const e=document.getElementById("header-primary-action");if(!e)return;const o=document.createElement("span");o.setAttribute("style","color: var(--color-primary-text); padding: 0 10px;"),m(o,n),e.prepend(o);const i=document.querySelector("#files-public-content");if(!i)return;i.oncontextmenu=t=>(t.preventDefault(),t.stopPropagation(),!1);const l=Array.from(document.querySelectorAll('a[href*="/download/"]'));new Set(l).forEach(t=>{t.addEventListener("click",d=>{if(r>0&&!confirm(s("files_downloadlimit","This share has a limited number of downloads. Are you sure you want to trigger a new download?"))){d.preventDefault(),d.stopPropagation();return}n--,r++,m(o,n),n===0&&[...l].forEach(u=>u.remove())})})});
import{l as w,t as s,a as f}from"./index-4iYZWvRr.chunk.mjs";import{l as p}from"./logger-C3B-oupr.chunk.mjs";const{limit:a,downloads:c}=w("files_downloadlimit","download_limit",{limit:-1,downloads:0});p.debug("Download limit",{limit:a,downloads:c});let n=a-c,r=0;const m=(e,o)=>{o===0?e.innerText=s("files_downloadlimit","You have reached the maximum amount of downloads allowed"):e.innerText=f("files_downloadlimit","1 remaining download allowed","{count} remaining downloads allowed",o,{count:o})};window.addEventListener("DOMContentLoaded",()=>{if(a<1)return;const e=document.getElementById("header-primary-action");if(!e)return;const o=document.createElement("span");o.setAttribute("style","color: var(--color-primary-text); padding: 0 10px;"),m(o,n),e.prepend(o);const i=document.querySelector("#files-public-content");if(!i)return;i.oncontextmenu=t=>(t.preventDefault(),t.stopPropagation(),!1);const l=Array.from(document.querySelectorAll('a[href*="/download/"]'));new Set(l).forEach(t=>{t.addEventListener("click",d=>{if(r>0&&!confirm(s("files_downloadlimit","This share has a limited number of downloads. Are you sure you want to trigger a new download?"))){d.preventDefault(),d.stopPropagation();return}n--,r++,m(o,n),n===0&&[...l].forEach(u=>u.remove())})})});
//# sourceMappingURL=files_downloadlimit-public.mjs.map
3 changes: 3 additions & 0 deletions js/index-4iYZWvRr.chunk.mjs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ SPDX-FileCopyrightText: escape-html developers

This file is generated from multiple sources. Included packages:
- @nextcloud/auth
- version: 2.4.0
- version: 2.5.2
- license: GPL-3.0-or-later
- @nextcloud/browser-storage
- version: 0.4.0
Expand All @@ -24,7 +24,7 @@ This file is generated from multiple sources. Included packages:
- version: 2.2.0
- license: GPL-3.0-or-later
- @nextcloud/l10n
- version: 3.2.0
- version: 3.3.0
- license: GPL-3.0-or-later
- dompurify
- version: 3.2.6
Expand Down
1 change: 1 addition & 0 deletions js/index-4iYZWvRr.chunk.mjs.map

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ SPDX-FileCopyrightText: escape-html developers

This file is generated from multiple sources. Included packages:
- @nextcloud/auth
- version: 2.4.0
- version: 2.5.2
- license: GPL-3.0-or-later
- @nextcloud/browser-storage
- version: 0.4.0
Expand All @@ -24,7 +24,7 @@ This file is generated from multiple sources. Included packages:
- version: 2.2.0
- license: GPL-3.0-or-later
- @nextcloud/l10n
- version: 3.2.0
- version: 3.3.0
- license: GPL-3.0-or-later
- dompurify
- version: 3.2.6
Expand Down
3 changes: 0 additions & 3 deletions js/index-CqY9_Aan.chunk.mjs

This file was deleted.

1 change: 0 additions & 1 deletion js/index-CqY9_Aan.chunk.mjs.map

This file was deleted.

4 changes: 2 additions & 2 deletions js/logger-CCJSJhN1.chunk.mjs → js/logger-C3B-oupr.chunk.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import{g as c}from"./index-CqY9_Aan.chunk.mjs";var n=(s=>(s[s.Debug=0]="Debug",s[s.Info=1]="Info",s[s.Warn=2]="Warn",s[s.Error=3]="Error",s[s.Fatal=4]="Fatal",s))(n||{}),l=Object.defineProperty,u=(s,e,t)=>e in s?l(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,g=(s,e,t)=>(u(s,e+"",t),t);class h{constructor(e){g(this,"context"),this.context=e||{}}formatMessage(e,t,o){let a="["+n[t].toUpperCase()+"] ";return o&&o.app&&(a+=o.app+": "),typeof e=="string"?a+e:(a+="Unexpected ".concat(e.name),e.message&&(a+=' "'.concat(e.message,'"')),t===n.Debug&&e.stack&&(a+=`
import{g as c}from"./index-4iYZWvRr.chunk.mjs";var n=(s=>(s[s.Debug=0]="Debug",s[s.Info=1]="Info",s[s.Warn=2]="Warn",s[s.Error=3]="Error",s[s.Fatal=4]="Fatal",s))(n||{}),l=Object.defineProperty,u=(s,e,t)=>e in s?l(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,g=(s,e,t)=>(u(s,e+"",t),t);class h{constructor(e){g(this,"context"),this.context=e||{}}formatMessage(e,t,o){let a="["+n[t].toUpperCase()+"] ";return o&&o.app&&(a+=o.app+": "),typeof e=="string"?a+e:(a+="Unexpected ".concat(e.name),e.message&&(a+=' "'.concat(e.message,'"')),t===n.Debug&&e.stack&&(a+=`

Stack trace:
`.concat(e.stack)),a)}log(e,t,o){var a,r;if(!(typeof((a=this.context)==null?void 0:a.level)=="number"&&e<((r=this.context)==null?void 0:r.level)))switch(typeof t=="object"&&o?.error===void 0&&(o.error=t),e){case n.Debug:console.debug(this.formatMessage(t,n.Debug,o),o);break;case n.Info:console.info(this.formatMessage(t,n.Info,o),o);break;case n.Warn:console.warn(this.formatMessage(t,n.Warn,o),o);break;case n.Error:console.error(this.formatMessage(t,n.Error,o),o);break;case n.Fatal:default:console.error(this.formatMessage(t,n.Fatal,o),o);break}}debug(e,t){this.log(n.Debug,e,Object.assign({},this.context,t))}info(e,t){this.log(n.Info,e,Object.assign({},this.context,t))}warn(e,t){this.log(n.Warn,e,Object.assign({},this.context,t))}error(e,t){this.log(n.Error,e,Object.assign({},this.context,t))}fatal(e,t){this.log(n.Fatal,e,Object.assign({},this.context,t))}}function d(s){return new h(s)}var b=Object.defineProperty,f=(s,e,t)=>e in s?b(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,i=(s,e,t)=>(f(s,typeof e!="symbol"?e+"":e,t),t);class v{constructor(e){i(this,"context"),i(this,"factory"),this.context={},this.factory=e}setApp(e){return this.context.app=e,this}setLogLevel(e){return this.context.level=e,this}setUid(e){return this.context.uid=e,this}detectUser(){const e=c();return e!==null&&(this.context.uid=e.uid),this}detectLogLevel(){const e=this,t=()=>{var o,a;document.readyState==="complete"||document.readyState==="interactive"?(e.context.level=(a=(o=window._oc_config)==null?void 0:o.loglevel)!=null?a:n.Warn,window._oc_debug&&(e.context.level=n.Debug),document.removeEventListener("readystatechange",t)):document.addEventListener("readystatechange",t)};return t(),this}build(){return this.context.level===void 0&&this.detectLogLevel(),this.factory(this.context)}}function m(){return new v(d)}const x=m().setApp("files_downloadlimit").detectUser().build();export{x as l};
//# sourceMappingURL=logger-CCJSJhN1.chunk.mjs.map
//# sourceMappingURL=logger-C3B-oupr.chunk.mjs.map
Loading
Loading