feat(ux): load media library experience
This commit is contained in:
+19
-1
@@ -258,6 +258,23 @@
|
||||
}
|
||||
}
|
||||
|
||||
function loadMediaLibraryAssets() {
|
||||
if (!document.querySelector('link[data-ux-media-library]')) {
|
||||
const style = document.createElement('link');
|
||||
style.rel = 'stylesheet';
|
||||
style.href = '/media-library-ux.css?v=1.44.0';
|
||||
style.setAttribute('data-ux-media-library', 'style');
|
||||
document.head.append(style);
|
||||
}
|
||||
if (!document.querySelector('script[data-ux-media-library]')) {
|
||||
const script = document.createElement('script');
|
||||
script.src = '/media-library-ux.js?v=1.44.0';
|
||||
script.async = false;
|
||||
script.setAttribute('data-ux-media-library', 'script');
|
||||
document.body.append(script);
|
||||
}
|
||||
}
|
||||
|
||||
function bindUxActions() {
|
||||
document.addEventListener('click', event => {
|
||||
const target = event.target.closest?.('[data-ux-target]');
|
||||
@@ -289,6 +306,7 @@
|
||||
loadGeneratorWorkflowAssets();
|
||||
loadArticleOverviewAssets();
|
||||
loadPublishCenterAssets();
|
||||
loadMediaLibraryAssets();
|
||||
document.body.classList.add('ux-shell-ready');
|
||||
}
|
||||
|
||||
@@ -297,4 +315,4 @@
|
||||
} else {
|
||||
initializeUxFoundation();
|
||||
}
|
||||
})();
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user