Posts was previously just dark-themed skinning over the native edit.php list table, unlike Comments/Plugins which are genuine replacements. Built the same way: new PostsData.php REST controller (list with status/search filters matching native tabs, trash, restore, permanent delete) and a Vue page matching the Comments layout. - SubApps.php registers it as aurora-admin-posts, parented under edit.php (same pattern as Plugins under plugins.php). - redirect_native_pages() redirects direct edit.php visits (typed URL, not just the sidebar link) to the Aurora page — gated to the default post type only, so Pages and other custom post types are untouched. - MenuSerializer rewrites the sidebar's Posts/All Posts links the same way Plugins/Comments already were. - Gated by Settings > Posts' "Modern posts table" toggle, re-added now that it has a real implementation (it was removed a few commits ago for describing a feature that didn't exist). - Fixed modern_plugins/modern_comments/modern_posts all defaulting to visually "on" in the Settings UI to match their actual PHP default. Verified live: trash/restore/status filters/search all work correctly, edit.php redirects to the Aurora page, edit.php?post_type=page (Pages) correctly does not. Co-Authored-By: Claude Sonnet 5 <[email protected]>
44 lines
2.0 KiB
JavaScript
44 lines
2.0 KiB
JavaScript
import { defineConfig } from 'vite';
|
|
import vue from '@vitejs/plugin-vue';
|
|
import { fileURLToPath, URL } from 'node:url';
|
|
|
|
// Deliberately simple: one entry in this first slice (dashboard). Add more
|
|
// entries here as additional pages get rebuilt — same flat pattern each
|
|
// time, no shared scoping/theme-remap layer to keep in sync across files.
|
|
export default defineConfig({
|
|
root: fileURLToPath(new URL('./src', import.meta.url)),
|
|
plugins: [vue()],
|
|
resolve: {
|
|
alias: {
|
|
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
|
},
|
|
},
|
|
build: {
|
|
outDir: fileURLToPath(new URL('./dist', import.meta.url)),
|
|
emptyOutDir: true,
|
|
sourcemap: true,
|
|
manifest: true,
|
|
rollupOptions: {
|
|
input: {
|
|
shell: fileURLToPath(new URL('./src/entries/shell.js', import.meta.url)),
|
|
dashboard: fileURLToPath(new URL('./src/entries/dashboard.js', import.meta.url)),
|
|
settings: fileURLToPath(new URL('./src/entries/settings.js', import.meta.url)),
|
|
'menu-creator': fileURLToPath(new URL('./src/entries/menu-creator.js', import.meta.url)),
|
|
'admin-notices': fileURLToPath(new URL('./src/entries/admin-notices.js', import.meta.url)),
|
|
'role-editor': fileURLToPath(new URL('./src/entries/role-editor.js', import.meta.url)),
|
|
'activity-log': fileURLToPath(new URL('./src/entries/activity-log.js', import.meta.url)),
|
|
'database-explorer': fileURLToPath(new URL('./src/entries/database-explorer.js', import.meta.url)),
|
|
plugins: fileURLToPath(new URL('./src/entries/plugins.js', import.meta.url)),
|
|
comments: fileURLToPath(new URL('./src/entries/comments.js', import.meta.url)),
|
|
posts: fileURLToPath(new URL('./src/entries/posts.js', import.meta.url)),
|
|
'locked-feature': fileURLToPath(new URL('./src/entries/locked-feature.js', import.meta.url)),
|
|
},
|
|
output: {
|
|
entryFileNames: '[name].[hash].js',
|
|
chunkFileNames: 'assets/[name].[hash].js',
|
|
assetFileNames: 'assets/[name].[hash][extname]',
|
|
},
|
|
},
|
|
},
|
|
});
|