TYPO3 v15 dev-main snapshot ()
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
import{AbstractInteractableModule as l}from"@typo3/install/module/abstract-interactable-module.js";import u from"@typo3/backend/modal.js";import h from"@typo3/backend/notification.js";import d from"@typo3/core/ajax/ajax-request.js";import{FlashMessage as p}from"@typo3/install/renderable/flash-message.js";import r from"@typo3/install/renderable/severity.js";import s from"@typo3/install/router.js";import g from"@typo3/core/event/regular-event.js";var o;(function(i){i.output=".t3js-coreUpdate-output",i.updateButton=".t3js-coreUpdate-button"})(o||(o={}));class f extends l{constructor(){super(...arguments),this.actionQueue={coreUpdateIsUpdateAvailable:{loadingMessage:"Checking for possible regular or security update",finishMessage:void 0,nextActionName:void 0},coreUpdateCheckPreConditions:{loadingMessage:"Checking if update is possible",finishMessage:"System can be updated",nextActionName:"coreUpdateDownload"},coreUpdateDownload:{loadingMessage:"Downloading new core",finishMessage:void 0,nextActionName:"coreUpdateVerifyChecksum"},coreUpdateVerifyChecksum:{loadingMessage:"Verifying checksum of downloaded core",finishMessage:void 0,nextActionName:"coreUpdateUnpack"},coreUpdateUnpack:{loadingMessage:"Unpacking core",finishMessage:void 0,nextActionName:"coreUpdateMove"},coreUpdateMove:{loadingMessage:"Moving core",finishMessage:void 0,nextActionName:"coreUpdateActivate"},coreUpdateActivate:{loadingMessage:"Activating core",finishMessage:"Core updated - please reload your browser",nextActionName:void 0}},this.buttonTemplate=null}initialize(e){super.initialize(e),this.loadModuleFrameAgnostic("@typo3/install/renderable/flash-message.js").then(async()=>{await this.getData(),this.buttonTemplate=this.findInModal(o.updateButton)?.cloneNode(!0)}),new g("click",(t,a)=>{if(t.preventDefault(),!a.hasAttribute("data-action")){this.callAction("coreUpdateIsUpdateAvailable");return}const n=a.dataset.action;switch(this.findInModal(o.output).innerHTML="",n){case"updateDevelopment":this.update("development");break;case"updateRegular":this.update("regular");break;default:throw'Unknown update action "'+n+'"'}}).delegateTo(e,".t3js-coreUpdate-init")}getData(){const e=this.getModalBody();return new d(s.getUrl("coreUpdateGetData")).get({cache:"no-cache"}).then(async t=>{const a=await t.resolve();a.success===!0?(e.innerHTML=a.html,u.setButtons(a.buttons)):h.error("Something went wrong","The request was not processed successfully. Please check the browser's console and TYPO3's log.")},t=>{s.handleAjaxError(t,e)})}update(e){e!=="development"&&(e="regular"),this.callAction("coreUpdateCheckPreConditions",e)}callAction(e,t){const a={install:{action:e}};t!==void 0&&(a.install.type=t),this.addLoadingMessage(this.actionQueue[e].loadingMessage),new d(s.getUrl()).withQueryArguments(a).get({cache:"no-cache"}).then(async n=>{const c=await n.resolve();this.handleResult(c,this.actionQueue[e].finishMessage)===!0&&this.actionQueue[e].nextActionName!==void 0&&this.callAction(this.actionQueue[e].nextActionName,t)},n=>{s.handleAjaxError(n,this.getModalBody())})}handleResult(e,t){const a=e.success;return this.removeLoadingMessage(),e.status&&typeof e.status=="object"&&this.showStatusMessages(e.status),e.action&&typeof e.action=="object"&&this.showActionButton(e.action),a&&t&&this.addMessage(r.ok,t),a}addLoadingMessage(e){this.addMessage(r.loading,e)}removeLoadingMessage(){this.findInModal(o.output).querySelector("typo3-install-flashmessage")?.remove()}showStatusMessages(e){for(const t of e)this.addMessage(t.severity,t.title??"",t.message??"")}showActionButton(e){const t=this.buttonTemplate;e.action&&t.setAttribute("data-action",e.action),e.title&&(t.innerText=e.title),this.findInModal(o.updateButton).replaceWith(t)}addMessage(e,t,a){this.findInModal(o.output).append(p.create(e,t,a))}}var m=new f;export{m as default};
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
import"bootstrap";import{AbstractInteractableModule as g}from"@typo3/install/module/abstract-interactable-module.js";import f from"@typo3/backend/modal.js";import p from"@typo3/backend/notification.js";import c from"@typo3/core/ajax/ajax-request.js";import{InfoBox as u}from"@typo3/install/renderable/info-box.js";import h from"@typo3/install/renderable/severity.js";import r from"@typo3/install/router.js";import x from"@typo3/core/event/regular-event.js";var n;(function(l){l.checkTrigger=".t3js-extensionCompatTester-check",l.uninstallTrigger=".t3js-extensionCompatTester-uninstall",l.outputContainer=".t3js-extensionCompatTester-output"})(n||(n={}));class m extends g{initialize(t){super.initialize(t),this.loadModuleFrameAgnostic("@typo3/install/renderable/info-box.js").then(()=>{this.getLoadedExtensionList()}),new x("click",()=>{this.findInModal(n.uninstallTrigger)?.classList?.add("hidden");const s=this.findInModal(n.outputContainer);s&&(s.innerHTML=""),this.getLoadedExtensionList()}).delegateTo(t,n.checkTrigger),new x("click",(s,a)=>{this.uninstallExtension(a.dataset.extension)}).delegateTo(t,n.uninstallTrigger)}getLoadedExtensionList(){this.setModalButtonsState(!1);const t=this.getModalBody(),s=this.findInModal(n.outputContainer);s&&this.renderProgressBar(s,{},"append"),new c(r.getUrl("extensionCompatTesterLoadedExtensionList")).get({cache:"no-cache"}).then(async a=>{const o=await a.resolve();t.innerHTML=o.html,f.setButtons(o.buttons);const e=this.findInModal(n.outputContainer);this.renderProgressBar(e,{},"append"),o.success===!0?this.loadExtLocalconf().then(()=>{e.append(u.create(h.ok,"ext_localconf.php of all loaded extensions successfully loaded"))},async i=>{this.renderFailureMessages("ext_localconf.php",(await i.response.json()).brokenExtensions,e)}).finally(()=>{this.unlockModal()}):(p.error("Something went wrong","The request was not processed successfully. Please check the browser's console and TYPO3's log."),this.unlockModal())},a=>{r.handleAjaxError(a,t),this.unlockModal()})}unlockModal(){this.findInModal(n.outputContainer)?.querySelector("typo3-backend-progress-bar")?.remove(),this.setModalButtonsState(!0)}renderFailureMessages(t,s,a){for(const o of s){let e;o.isProtected||(e=document.createElement("button"),e.classList.add("btn","btn-danger","t3js-extensionCompatTester-uninstall"),e.dataset.extension=o.name,e.innerText='Uninstall extension "'+o.name+'"'),a.append(u.create(h.error,"Loading "+t+' of extension "'+o.name+'" failed',o.isProtected?"Extension is mandatory and cannot be uninstalled.":""),e)}this.unlockModal()}loadExtLocalconf(){const t=this.getModuleContent().dataset.extensionCompatTesterLoadExt_localconfToken;return new c(r.getUrl()).post({install:{action:"extensionCompatTesterLoadExtLocalconf",token:t}})}uninstallExtension(t){const s=this.getModuleContent().dataset.extensionCompatTesterUninstallExtensionToken,a=this.getModalBody(),o=this.findInModal(n.outputContainer);this.renderProgressBar(o,{},"append"),new c(r.getUrl()).post({install:{action:"extensionCompatTesterUninstallExtension",token:s,extension:t}}).then(async e=>{const i=await e.resolve();i.success?(Array.isArray(i.status)&&i.status.forEach(d=>{a.querySelector(n.outputContainer).replaceChildren(u.create(d.severity,d.title,d.message))}),this.findInModal(n.uninstallTrigger).classList.add("hidden"),this.getLoadedExtensionList()):p.error("Something went wrong","The request was not processed successfully. Please check the browser's console and TYPO3's log.")},e=>{r.handleAjaxError(e,a)})}}var T=new m;export{T as default};
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
import{AbstractInteractableModule as u}from"@typo3/install/module/abstract-interactable-module.js";import p from"@typo3/backend/modal.js";import h from"@typo3/core/ajax/ajax-request.js";import{FlashMessage as d}from"@typo3/install/renderable/flash-message.js";import{InfoBox as i}from"@typo3/install/renderable/info-box.js";import c from"@typo3/install/renderable/severity.js";import l from"@typo3/install/router.js";import g from"@typo3/core/event/regular-event.js";var t;(function(a){a.checkTrigger=".t3js-tcaMigrationsCheck-check",a.outputContainer=".t3js-tcaMigrationsCheck-output"})(t||(t={}));class m extends u{initialize(r){super.initialize(r),Promise.all([this.loadModuleFrameAgnostic("@typo3/install/renderable/info-box.js"),this.loadModuleFrameAgnostic("@typo3/install/renderable/flash-message.js")]).then(()=>{this.check()}),new g("click",e=>{e.preventDefault(),this.check()}).delegateTo(r,t.checkTrigger)}check(){this.setModalButtonsState(!1);const r=document.querySelector(t.outputContainer);r!==null&&this.renderProgressBar(r,{},"append");const e=this.getModalBody();new h(l.getUrl("tcaMigrationsCheck")).get({cache:"no-cache"}).then(async n=>{const o=await n.resolve();e.innerHTML=o.html,p.setButtons(o.buttons),o.success===!0&&Array.isArray(o.status)?o.status.length>0?(e.querySelector(t.outputContainer).append(i.create(c.warning,"TCA migrations need to be applied","Check the following list and apply needed changes.")),o.status.forEach(s=>{e.querySelector(t.outputContainer).append(i.create(s.severity,s.title,s.message))})):e.querySelector(t.outputContainer).append(i.create(c.ok,"No TCA migrations need to be applied","Your TCA looks good.")):e.querySelector(t.outputContainer).append(d.create(c.error,"Something went wrong",'Use "Check for broken extensions"'))},n=>{l.handleAjaxError(n,e)}).finally(()=>{this.setModalButtonsState(!0)})}}var f=new m;export{f as default};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user