TYPO3 v15 dev-main snapshot ()

This commit is contained in:
2026-08-10 22:31:00 +02:00
commit f9941541b7
1178 changed files with 135377 additions and 0 deletions
@@ -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 u from"@typo3/core/ajax/ajax-request.js";import l from"@typo3/backend/icons.js";import s from"@typo3/backend/notification.js";import f from"@typo3/backend/viewport.js";import g from"@typo3/core/event/regular-event.js";import t from"~labels/core.cache";var e;(function(a){a.containerSelector="#typo3-cms-backend-backend-toolbaritems-clearcachetoolbaritem",a.menuItemSelector=".t3js-toolbar-cache-flush-action",a.toolbarIconSelector=".toolbar-item-icon .t3js-icon"})(e||(e={}));class p{constructor(){this.initializeEvents=()=>{const n=document.querySelector(e.containerSelector);new g("click",(o,r)=>{o.preventDefault(),r.dataset.endpoint&&this.clearCache(r.dataset.endpoint)}).delegateTo(n,e.menuItemSelector)},f.Topbar.Toolbar.registerEvent(this.initializeEvents)}clearCache(n){const o=document.querySelector(e.containerSelector);o.classList.remove("open");const r=o.querySelector(e.toolbarIconSelector),m=r.cloneNode(!0);l.getIcon("spinner-circle",l.sizes.small).then(i=>{r.replaceWith(document.createRange().createContextualFragment(i))}),new u(n).post({}).then(async i=>{const c=await i.resolve();c?.success===!1?s.error(c.title??t.get("notification.error.title"),c.message??t.get("notification.error.message")):s.success(c?.title??t.get("notification.success.title"),c?.message??t.get("notification.success.message"))},()=>{s.error(t.get("notification.error.title"),t.get("notification.error.message"))}).finally(()=>{o.querySelector(e.toolbarIconSelector).replaceWith(m)})}}var b=new p;export{b 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 u from"@typo3/core/ajax/ajax-request.js";import g from"@typo3/core/event/regular-event.js";import d from"@typo3/backend/icons.js";import r from"@typo3/backend/storage/persistent.js";import c from"@typo3/backend/viewport.js";import"@typo3/backend/element/status-indicator-element.js";var a;(function(o){o.element="#typo3-cms-backend-backend-toolbaritems-systeminformationtoolbaritem",o.icon="#typo3-cms-backend-backend-toolbaritems-systeminformationtoolbaritem .toolbar-item-icon .t3js-icon",o.menu="#typo3-cms-backend-backend-toolbaritems-systeminformationtoolbaritem .dropdown-menu",o.data="[data-systeminformation-data]",o.badge="[data-systeminformation-badge]",o.message="[data-systeminformation-message-module]",o.messageLink="[data-systeminformation-message-module] a"})(a||(a={}));class n{constructor(){this.timer=null,this.updateMenu=()=>{const t=document.querySelector(a.icon),e=t.cloneNode(!0);this.timer!==null&&(clearTimeout(this.timer),this.timer=null),d.getIcon("spinner-circle",d.sizes.small).then(s=>{t.replaceWith(document.createRange().createContextualFragment(s))}),new u(TYPO3.settings.ajaxUrls.systeminformation_render).get().then(async s=>{document.querySelector(a.menu).innerHTML=await s.resolve(),n.updateBadge()}).finally(()=>{document.querySelector(a.icon).replaceWith(e),this.timer=setTimeout(this.updateMenu,1e3*300)})},new g("click",this.handleMessageLinkClick).delegateTo(document,a.messageLink),c.Topbar.Toolbar.registerEvent(this.updateMenu),document.addEventListener("typo3:system-information-menu:update",()=>this.updateMenu())}static getData(){const e=document.querySelector(a.data)?.dataset;return{count:e?.systeminformationDataCount?parseInt(e.systeminformationDataCount,10):0,severityBadgeClass:e?.systeminformationDataSeveritybadgeclass??""}}static getMessageDataFromElement(t){const e=t.dataset;return{count:e.systeminformationMessageCount?parseInt(e.systeminformationMessageCount,10):0,status:e.systeminformationMessageStatus??"",module:e.systeminformationMessageModule??"",params:e.systeminformationMessageParams??""}}static updateBadge(){const t=n.getData(),e=document.querySelector(a.badge);e.removeAttribute("class"),e.classList.add("toolbar-item-badge"),e.classList.add("badge"),e.classList.add("badge-pill"),t.severityBadgeClass!==""&&e.classList.add(t.severityBadgeClass),e.textContent=t.count.toString(),e.classList.toggle("hidden",!(t.count>0))}handleMessageLinkClick(t,e){const s=n.getMessageDataFromElement(e.closest(a.message));if(s.module==="")return;t.preventDefault(),t.stopPropagation();const m={},l=Math.floor(Date.now()/1e3);let i={};r.isset("systeminformation")&&(i=JSON.parse(r.get("systeminformation"))),m[s.module]={lastAccess:l},Object.assign(i,m),r.set("systeminformation",JSON.stringify(i)).then(()=>{TYPO3.ModuleMenu.App.showModule(s.module,s.params),c.Topbar.refresh()})}}var p=new n;export{p as default};