Changeset 3076262
- Timestamp:
- 04/24/2024 09:01:33 AM (20 months ago)
- Location:
- cloud-customer-area
- Files:
-
- 21 added
- 2 deleted
- 3 edited
-
tags/2.0.8 (added)
-
tags/2.0.8/assets (added)
-
tags/2.0.8/assets/css (added)
-
tags/2.0.8/assets/css/backend.css (added)
-
tags/2.0.8/assets/css/frontend.css (added)
-
tags/2.0.8/assets/js (added)
-
tags/2.0.8/assets/js/backend.js (added)
-
tags/2.0.8/assets/js/frontend.js (added)
-
tags/2.0.8/assets/loading.svg (added)
-
tags/2.0.8/cloud-customer-area.php (added)
-
tags/2.0.8/inc (added)
-
tags/2.0.8/inc/class-google-drive.php (added)
-
tags/2.0.8/inc/class-main.php (added)
-
tags/2.0.8/part (added)
-
tags/2.0.8/part/settings_page.php (added)
-
tags/2.0.8/part/settings_page_customize.php (added)
-
tags/2.0.8/part/settings_page_main.php (added)
-
tags/2.0.8/part/settings_page_oauth.php (added)
-
tags/2.0.8/readme.txt (added)
-
trunk/assets/js/frontend.js (modified) (1 diff)
-
trunk/cloud-customer-area.php (modified) (1 diff)
-
trunk/inc/class-google-drive.php (added)
-
trunk/inc/class-main.php (added)
-
trunk/inc/google-api.php (deleted)
-
trunk/inc/main.php (deleted)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cloud-customer-area/trunk/assets/js/frontend.js
r2796544 r3076262 1 !function(e){var t={};function n(o){if(t[o])return t[o].exports;var a=t[o]={i:o,l:!1,exports:{}};return e[o].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(o,a,function(t){return e[t]}.bind(null,a));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=6)}([function(e,t){e.exports=jQuery},function(e,t,n){(function(n){var o,a,r;a=[],void 0===(r="function"==typeof(o=function(){"use strict";function t(e,t,n){var o=new XMLHttpRequest;o.open("GET",e),o.responseType="blob",o.onload=function(){c(o.response,t,n)},o.onerror=function(){console.error("could not download file")},o.send()}function o(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function a(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(n){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var r="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n&&n.global===n?n:void 0,i=r.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),c=r.saveAs||("object"!=typeof window||window!==r?function(){}:"download"in HTMLAnchorElement.prototype&&!i?function(e,n,i){var c=r.URL||r.webkitURL,l=document.createElement("a");n=n||e.name||"download",l.download=n,l.rel="noopener","string"==typeof e?(l.href=e,l.origin===location.origin?a(l):o(l.href)?t(e,n,i):a(l,l.target="_blank")):(l.href=c.createObjectURL(e),setTimeout((function(){c.revokeObjectURL(l.href)}),4e4),setTimeout((function(){a(l)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,n,r){if(n=n||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}(e,r),n);else if(o(e))t(e,n,r);else{var i=document.createElement("a");i.href=e,i.target="_blank",setTimeout((function(){a(i)}))}}:function(e,n,o,a){if((a=a||open("","_blank"))&&(a.document.title=a.document.body.innerText="downloading..."),"string"==typeof e)return t(e,n,o);var c="application/octet-stream"===e.type,l=/constructor/i.test(r.HTMLElement)||r.safari,s=/CriOS\/[\d]+/.test(navigator.userAgent);if((s||c&&l||i)&&"undefined"!=typeof FileReader){var u=new FileReader;u.onloadend=function(){var e=u.result;e=s?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),a?a.location.href=e:location=e,a=null},u.readAsDataURL(e)}else{var d=r.URL||r.webkitURL,f=d.createObjectURL(e);a?a.location=f:location.href=f,a=null,setTimeout((function(){d.revokeObjectURL(f)}),4e4)}});r.saveAs=c.saveAs=c,e.exports=c})?o.apply(t,a):o)||(e.exports=r)}).call(this,n(3))},function(e,t,n){},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},,,function(e,t,n){"use strict";n.r(t);n(2);var o=n(0),a=n.n(o),r=n(1);function i(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.table=a()(".cloud-customer-area-table"),this.table.length<1||(this.tableLoading=this.table?a()(this.table).find(".cloud-customer-area-table-loading"):null,this.getUserFiles(),this.listenDownloadClick(),this.listenUpload(),window.cca_operations=window.cca_operations?window.cca_operations:[],a()(window).on("beforeunload",(function(){if(window.cca_operations&&window.cca_operations.length>0)return!0})))}var t,n,o;return t=e,(n=[{key:"listenUpload",value:function(){var e=this;a()(this.table).on("reload",(function(){e.tryReload=setInterval((function(){console.log("Tento"),window.cca_operations&&window.cca_operations.length<1&&(console.log("Ok"),a()(e.table).find("tbody tr:not(.cloud-customer-area-table-loading)").remove(),a()(e.tableLoading).show(),e.getUserFiles(),clearInterval(e.tryReload))}),1e3)}))}},{key:"getUserFiles",value:function(){var e=this;this.table&&a.a.ajax({type:"POST",dataType:"json",url:frontend_cloud_customer_area.ajaxurl,data:{action:"cca_get_files",token:frontend_cloud_customer_area.token},success:function(t){a()(e.tableLoading).hide(),a.a.each(t,(function(t,n){var o=n.icon&&" - "!==n.icon&&n.icon.length>0?'<span class="cloud-customer-area-table-icon" style="background-image: url('+n.icon+')"></span>':" - ",r=n.id&&n.id.length>0?'<button class="button button-primary" data-id="'+n.id+'" title="'+frontend_cloud_customer_area.download_label+'" aria-label="'+frontend_cloud_customer_area.download_label+'">'+frontend_cloud_customer_area.download_label+"</button>":" - ",i=n.size?n.size:" - ";a()(e.table).append("<tr><td>"+n.name+"</td><td>"+n.date+"</td><td>"+o+"</td><td>"+i+"</td><td>"+r+"</td></tr>")}))},error:function(e){console.log(e.statusText)}})}},{key:"listenDownloadClick",value:function(){a()("body").on("click",".cloud-customer-area-table button",(function(e){e.preventDefault();var t=a()(e.target),n=a()(t).data("id");if(n&&!(n.length<=0)){var o=function(){a()(t).prop("disabled",!1),a()(t).removeClass("loading"),window.cca_operations=window.cca_operations.filter((function(e){return e!=n+"_download"}))};a()(t).prop("disabled",!0),a()(t).addClass("loading"),window.cca_operations.push(n+"_download");for(var i,c=[],l=0,s=function(e){var i={token:frontend_cloud_customer_area.token,file:n,method:u.method,mime:u.mime,part:e},s=new XMLHttpRequest;s.open("POST",frontend_cloud_customer_area.ajaxurl+"?action=cca_download_file",!0),s.setRequestHeader("Content-Type","application/x-www-form-urlencoded;"),s.responseType="arraybuffer",s.onload=function(n){c[e-1]=n.currentTarget.response,function(){if(l++,a()(t).css("--cca-loading-width",100*l/u.parts+"%"),!(l<u.parts)){var e=new Blob(c,{type:u.mime,responseType:"arraybuffer"});Object(r.saveAs)(e,u.name),a()(t).css("--cca-loading-width",0),o()}}()},s.onprogress=function(e){500===e.currentTarget.status&&(console.log(e.currentTarget.statusText),o(),s.abort())},s.send(a.a.param(i))},u=(i=!1,a.a.ajax({type:"POST",dataType:"json",async:!1,url:frontend_cloud_customer_area.ajaxurl,data:{action:"cca_get_file_info",token:frontend_cloud_customer_area.token,file:n},success:function(e){i={name:e.name,mime:e.mime,parts:e.parts,method:e.method}},error:function(e){console.log(e.statusText)}}),i),d=1;d<=u.parts;d++)s(d)}}))}}])&&i(t.prototype,n),o&&i(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}());n.p}]);1 !function(e){var t={};function o(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,o),a.l=!0,a.exports}o.m=e,o.c=t,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)o.d(n,a,function(t){return e[t]}.bind(null,a));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=6)}([function(e,t){e.exports=jQuery},function(e,t,o){(function(o){var n,a,r;a=[],void 0===(r="function"==typeof(n=function(){"use strict";function t(e,t,o){var n=new XMLHttpRequest;n.open("GET",e),n.responseType="blob",n.onload=function(){c(n.response,t,o)},n.onerror=function(){console.error("could not download file")},n.send()}function n(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function a(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(o){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var r="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof o&&o.global===o?o:void 0,i=r.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),c=r.saveAs||("object"!=typeof window||window!==r?function(){}:"download"in HTMLAnchorElement.prototype&&!i?function(e,o,i){var c=r.URL||r.webkitURL,l=document.createElement("a");o=o||e.name||"download",l.download=o,l.rel="noopener","string"==typeof e?(l.href=e,l.origin===location.origin?a(l):n(l.href)?t(e,o,i):a(l,l.target="_blank")):(l.href=c.createObjectURL(e),setTimeout((function(){c.revokeObjectURL(l.href)}),4e4),setTimeout((function(){a(l)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,o,r){if(o=o||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}(e,r),o);else if(n(e))t(e,o,r);else{var i=document.createElement("a");i.href=e,i.target="_blank",setTimeout((function(){a(i)}))}}:function(e,o,n,a){if((a=a||open("","_blank"))&&(a.document.title=a.document.body.innerText="downloading..."),"string"==typeof e)return t(e,o,n);var c="application/octet-stream"===e.type,l=/constructor/i.test(r.HTMLElement)||r.safari,u=/CriOS\/[\d]+/.test(navigator.userAgent);if((u||c&&l||i)&&"undefined"!=typeof FileReader){var s=new FileReader;s.onloadend=function(){var e=s.result;e=u?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),a?a.location.href=e:location=e,a=null},s.readAsDataURL(e)}else{var d=r.URL||r.webkitURL,f=d.createObjectURL(e);a?a.location=f:location.href=f,a=null,setTimeout((function(){d.revokeObjectURL(f)}),4e4)}});r.saveAs=c.saveAs=c,e.exports=c})?n.apply(t,a):n)||(e.exports=r)}).call(this,o(3))},function(e,t,o){},function(e,t){var o;o=function(){return this}();try{o=o||new Function("return this")()}catch(e){"object"==typeof window&&(o=window)}e.exports=o},,,function(e,t,o){"use strict";o.r(t);o(2);var n=o(0),a=o.n(n),r=o(1);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function l(e){var t=function(e,t){if("object"!=i(e)||!e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==i(t)?t:t+""}new(function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.table=a()(".cloud-customer-area-table"),this.table.length<1||(this.tableLoading=this.table?a()(this.table).find(".cloud-customer-area-table-loading"):null,this.getUserFiles(),this.listenDownloadClick(),this.listenUpload(),window.cca_operations=window.cca_operations?window.cca_operations:[],a()(window).on("beforeunload",(function(){if(window.cca_operations&&window.cca_operations.length>0)return!0})))},(t=[{key:"listenUpload",value:function(){var e=this;a()(this.table).on("reload",(function(){e.tryReload=setInterval((function(){console.log("Tento"),window.cca_operations&&window.cca_operations.length<1&&(console.log("Ok"),a()(e.table).find("tbody tr:not(.cloud-customer-area-table-loading)").remove(),a()(e.tableLoading).show(),e.getUserFiles(),clearInterval(e.tryReload))}),1e3)}))}},{key:"getUserFiles",value:function(){var e=this;this.table&&a.a.ajax({type:"POST",dataType:"json",url:frontend_cloud_customer_area.ajaxurl,data:{action:"cca_get_files",token:frontend_cloud_customer_area.token},success:function(t){a()(e.tableLoading).hide(),a.a.each(t,(function(t,o){var n=o.icon&&" - "!==o.icon&&o.icon.length>0?'<span class="cloud-customer-area-table-icon" style="background-image: url('+o.icon+')"></span>':" - ",r=o.id&&o.id.length>0?'<button class="button button-primary" data-id="'+o.id+'" title="'+frontend_cloud_customer_area.download_label+'" aria-label="'+frontend_cloud_customer_area.download_label+'">'+frontend_cloud_customer_area.download_label+"</button>":" - ",i=o.size?o.size:" - ";a()(e.table).append("<tr><td>"+o.name+"</td><td>"+o.date+"</td><td>"+n+"</td><td>"+i+"</td><td>"+r+"</td></tr>")}))},error:function(e){console.log(e.statusText)}})}},{key:"listenDownloadClick",value:function(){a()("body").on("click",".cloud-customer-area-table button",(function(e){e.preventDefault();var t=a()(e.target),o=a()(t).data("id");if(o&&!(o.length<=0)){var n=function(){a()(t).prop("disabled",!1),a()(t).removeClass("loading"),window.cca_operations=window.cca_operations.filter((function(e){return e!=o+"_download"}))};a()(t).prop("disabled",!0),a()(t).addClass("loading"),window.cca_operations.push(o+"_download");for(var i,c=[],l=0,u=function(e){var i={token:frontend_cloud_customer_area.token,file:o,method:s.method,mime:s.mime,part:e},u=new XMLHttpRequest;u.open("POST",frontend_cloud_customer_area.ajaxurl+"?action=cca_download_file",!0),u.setRequestHeader("Content-Type","application/x-www-form-urlencoded;"),u.responseType="arraybuffer",u.onload=function(o){c[e-1]=o.currentTarget.response,function(){if(l++,a()(t).css("--cca-loading-width",100*l/s.parts+"%"),!(l<s.parts)){var e=new Blob(c,{type:s.mime,responseType:"arraybuffer"});Object(r.saveAs)(e,s.name),a()(t).css("--cca-loading-width",0),n()}}()},u.onprogress=function(e){500===e.currentTarget.status&&(console.log(e.currentTarget.statusText),n(),u.abort())},u.send(a.a.param(i))},s=(i=!1,a.a.ajax({type:"POST",dataType:"json",async:!1,url:frontend_cloud_customer_area.ajaxurl,data:{action:"cca_get_file_info",token:frontend_cloud_customer_area.token,file:o},success:function(e){i={name:e.name,mime:e.mime,parts:e.parts,method:e.method}},error:function(e){console.log(e.statusText)}}),i),d=1;d<=s.parts;d++)u(d)}}))}}])&&c(e.prototype,t),o&&c(e,o),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,o}());o.p}]); -
cloud-customer-area/trunk/cloud-customer-area.php
r2945109 r3076262 11 11 Text Domain: cloud-customer-area 12 12 Domain Path: /languages/ 13 Version: 2.0. 713 Version: 2.0.8 14 14 */ 15 15 -
cloud-customer-area/trunk/readme.txt
r2945107 r3076262 4 4 Donate link: https://totalpress.org/donate?utm_source=wordpress_org&utm_medium=plugin_page&utm_campaign=cloud_customer_area 5 5 Requires at least: 4.0 6 Tested up to: 6. 27 Stable tag: 2.0. 76 Tested up to: 6.4 7 Stable tag: 2.0.8 8 8 Requires PHP: 5.6 9 9 License: GPLv2 or later … … 101 101 == Changelog == 102 102 103 = 2.0. 7=104 * 2023-07-30*103 = 2.0.8 - 2024-04-24 = 104 * FIX: recreate Drive folder on 404 api error 105 105 106 * Improvements 106 = 2.0.7 - 2023-07-30 = 107 * FEAT: Improvements 107 108 108 = 2.0.6 = 109 *2023-07-28* 110 111 * Wp 6.2 109 = 2.0.6 - 2023-07-28 = 110 * FEAT: Wp 6.2 112 111 113 112 = 2.0.5 = 114 * Plugin role creation fix [thanks to Kmzerowebmarketing]113 * FIX: Plugin role creation fix [thanks to Kmzerowebmarketing] 115 114 116 115 = 2.0.4 = 117 * No files fix116 * FIX: No files fix 118 117 119 118 = 2.0.3 = 120 * Download using javascript to bypass download limits119 * FEAT: Download using javascript to bypass download limits 121 120 122 121 = 1.1.9 = 123 * WP 6.0 compatibility;124 * Export Google apps file;122 * FEAT: WP 6.0 compatibility; 123 * FEAT: Export Google apps file; 125 124 126 125 = 1.1.8 = 127 * WP 5.8 compatibility.126 * FEAT: WP 5.8 compatibility. 128 127 129 128 = 1.1.7 = 130 * F ix bugs.129 * FIX: Fix bugs. 131 130 132 131 = 1.1.6 = 133 * F ix bugs, add request error log.132 * FIX: Fix bugs, add request error log. 134 133 135 134 = 1.1.5 = 136 * F ix bug.135 * FIX: Fix bug. 137 136 138 137 = 1.1.4 = 139 * Add support for guests.138 * FEAT: Add support for guests. 140 139 141 140 = 1.1.3 = 142 * Add logs description for bugs.141 * FEAT: Add logs description for bugs. 143 142 144 143 = 1.1.2 = 145 * F ix bug.144 * FIX: Fix bug. 146 145 147 146 = 1.1.1 = 148 * Api request now print errors in logs and try again the request.147 * FIX: Api request now print errors in logs and try again the request. 149 148 150 149 = 1.1.0 = 151 * Official distribution of the free version.150 * FEAT: Official distribution of the free version. 152 151 153 152 == Frequently Asked Questions ==
Note: See TracChangeset
for help on using the changeset viewer.