Skip to content

Commit

Permalink
chore: Commit assets to source control
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Ng <[email protected]>
  • Loading branch information
Pytal committed Mar 6, 2024
1 parent 9167baf commit 2e5f6f3
Show file tree
Hide file tree
Showing 10 changed files with 120 additions and 3 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ yarn-error.log*

.marginalia

js/
# Generated css
css/files_downloadlimit-*.css
build/
coverage*
vendor/
Expand Down
21 changes: 21 additions & 0 deletions css/files_downloadlimit-main.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions css/files_downloadlimit-public.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#imgframe{pointer-events:none}
2 changes: 2 additions & 0 deletions js/files_downloadlimit-main.mjs

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions js/files_downloadlimit-main.mjs.map

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions js/files_downloadlimit-public.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/*! third party licenses: js/vendor.LICENSE.txt */
import{g as A,b as $,l as k}from"./logger-DZIvzaVr.mjs";var S=/["'&<>]/,q=C;function C(n){var t=""+n,i=S.exec(t);if(!i)return t;var e,r="",o=0,a=0;for(o=i.index;o<t.length;o++){switch(t.charCodeAt(o)){case 34:e="&quot;";break;case 38:e="&amp;";break;case 39:e="&#39;";break;case 60:e="&lt;";break;case 62:e="&gt;";break;default:continue}a!==o&&(r+=t.substring(a,o)),a=o+1,r+=e}return a!==o?r+t.substring(a,o):r}const D=A(q);function z(n,t,i){const e=document.querySelector("#initial-state-".concat(n,"-").concat(t));if(e===null){if(i!==void 0)return i;throw new Error("Could not find initial state ".concat(t," of ").concat(n))}try{return JSON.parse(atob(e.value))}catch{throw new Error("Could not parse initial state ".concat(t," of ").concat(n))}}function h(n){var t,i,e,r;return{translations:(i=(t=window._oc_l10n_registry_translations)===null||t===void 0?void 0:t[n])!==null&&i!==void 0?i:{},pluralFunction:(r=(e=window._oc_l10n_registry_plural_functions)===null||e===void 0?void 0:e[n])!==null&&r!==void 0?r:o=>o}}function d(n,t,i,e,r){const o=Object.assign({},{escape:!0,sanitize:!0},r||{}),a=m=>m,s=o.sanitize?$.sanitize:a,c=o.escape?D:a,u=(m,w,E)=>m.replace(/%n/g,""+E).replace(/{([^{}]*)}/g,(g,_)=>{if(w===void 0||!(_ in w))return s(g);const p=w[_];return s(typeof p=="string"||typeof p=="number"?c(p):g)});let l=h(n).translations[t]||t;return l=Array.isArray(l)?l[0]:l,s(typeof i=="object"||e!==void 0?u(l,i,e):l)}function O(n,t,i,e,r,o){const a="_"+t+"_::_"+i+"_",s=h(n),c=s.translations[a];if(typeof c<"u"){const u=c;if(Array.isArray(u)){const l=s.pluralFunction(e);return d(n,u[l],r,e,o)}}return e===1?d(n,t,r,e,o):d(n,i,r,e,o)}const{limit:v,downloads:x}=z("files_downloadlimit","download_limit",{limit:-1,downloads:0});k.debug("Download limit",{limit:v,downloads:x});let f=v-x,y=0;const b=(n,t)=>{t===0?n.innerText=d("files_downloadlimit","You have reached the maximum amount of downloads allowed"):n.innerText=O("files_downloadlimit","1 remaining download allowed","{count} remaining downloads allowed",t,{count:t})};window.addEventListener("DOMContentLoaded",()=>{if(v<1)return;const n=document.getElementById("header-primary-action");if(!n)return;const t=document.createElement("span");t.setAttribute("style","color: var(--color-primary-text); padding: 0 10px;"),b(t,f),n.prepend(t);const i=document.querySelector("#files-public-content");if(!i)return;i.oncontextmenu=r=>(r.preventDefault(),r.stopPropagation(),!1);const e=document.querySelectorAll('a[href*="/download/"]')||[];new Set(e).forEach(r=>{r.addEventListener("click",o=>{if(y>0&&!confirm(d("files_downloadlimit","This share has a limited number of downloads. Are you sure you want to trigger a new download?"))){o.preventDefault(),o.stopPropagation();return}f--,y++,b(t,f),f===0&&[...e].forEach(a=>a.remove())})})});
1 change: 1 addition & 0 deletions js/files_downloadlimit-public.mjs.map

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions js/logger-DZIvzaVr.mjs

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions js/logger-DZIvzaVr.mjs.map

Large diffs are not rendered by default.

89 changes: 89 additions & 0 deletions js/vendor.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
Included dependencies:

@nextcloud/auth
version: 2.2.1
license: GPL-3.0-or-later

@nextcloud/axios
version: 2.4.0
license: GPL-3.0

@nextcloud/dialogs
version: 5.1.2
license: GPL-3.0-or-later

@nextcloud/event-bus
version: 3.1.0
license: GPL-3.0-or-later

@nextcloud/initial-state
version: 2.1.0
license: GPL-3.0-or-later

@nextcloud/l10n
version: 2.2.0
license: GPL-3.0-or-later

@nextcloud/logger
version: 2.7.0
license: GPL-3.0-or-later

@nextcloud/router
version: 2.2.1
license: GPL-3.0-or-later

@nextcloud/sharing
version: 0.1.0
license: GPL-3.0-or-later

@nextcloud/vue
version: 8.9.1
license: AGPL-3.0

axios
version: 1.6.1
license: MIT

core-js
version: 3.33.0
license: MIT

dompurify
version: 3.0.5
license: (MPL-2.0 OR Apache-2.0)

escape-html
version: 1.0.3
license: MIT

lodash.get
version: 4.4.2
license: MIT

node-gettext
version: 3.0.0
license: (MIT)

path-browserify
version: 1.0.1
license: MIT

semver
version: 7.5.4
license: ISC

toastify-js
version: 1.12.0
license: MIT

vite-plugin-node-polyfills
version: 0.19.0
license: MIT

vue
version: 2.7.16
license: MIT

vue-frag
version: 1.4.3
license: MIT

0 comments on commit 2e5f6f3

Please sign in to comment.