feat: admin settings page UI/UX pass with WordPress-native patterns

- Header: h1 + logo in a wrapping flex row, hr.wp-header-end before the tabs,
  aria-current on the active tab; own CSS/JS enqueued only on this screen.
- Verbindung: ordered "So verbindest du Claude" steps, copy button (core
  clipboard.js + wp.a11y.speak), Site-Health-style status list, German details.
- Zugriff: roles as form-table fieldset, connections with site date format,
  empty-state row, confirm on revoke; ConnectionUsage records last use via
  WP_Application_Passwords::record_application_password_usage (once a day).
- Tools: plain-language legend, counter as inline notice, groups as core
  postboxes (postbox.js toggles, per-user closed state, summary when closed),
  fixed column widths with new "Art" column, submit above and below.
- Protokoll: site-timezone times with UTC tooltip, result icons, filters with
  labels in the list table nav, retention link to Limits.
- Limits: short labels with units and descriptions; snapshot count hidden but
  preserved.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-26 16:50:58 +02:00
co-authored by Claude Opus 5.5
parent 5965e32acb
commit 843f45aeec
22 changed files with 1535 additions and 242 deletions
+45
View File
@@ -0,0 +1,45 @@
/* Einstellungen → LIT MCP: copy the server URL, collapsible tool groups, filter paging. */
( function () {
'use strict';
document.addEventListener( 'DOMContentLoaded', function () {
var hideTimeout;
// "URL kopieren" – like WordPress' "Copy URL to clipboard" in the media library.
if ( window.ClipboardJS && document.querySelector( '.lit-mcp-copy' ) ) {
new window.ClipboardJS( '.lit-mcp-copy' ).on( 'success', function ( event ) {
var success = event.trigger.parentNode.querySelector( '.success' );
event.clearSelection();
event.trigger.focus();
if ( success ) {
clearTimeout( hideTimeout );
success.classList.remove( 'hidden' );
hideTimeout = setTimeout( function () {
success.classList.add( 'hidden' );
}, 3000 );
}
if ( window.wp && window.wp.a11y && window.litMcpAdmin ) {
window.wp.a11y.speak( window.litMcpAdmin.copied );
}
} );
}
// Tool groups: WordPress' own postbox toggles, closed state saved per user.
if ( window.postboxes && window.pagenow && document.querySelector( '.lit-mcp-groups' ) ) {
window.postboxes.add_postbox_toggles( window.pagenow );
}
// Protokoll: a changed filter starts again on page 1.
document.querySelectorAll( '.lit-mcp .tablenav .actions select, .lit-mcp .tablenav .actions input' ).forEach(
function ( control ) {
control.addEventListener( 'change', function () {
var paged = control.form && control.form.querySelector( 'input[name="paged"]' );
if ( paged ) {
paged.value = '1';
}
} );
}
);
} );
}() );