document.title = "内容审核";

// var link = document.createElement('link');
// link.rel = 'shortcut icon';
// link.type = 'image/x-icon';
// link.href = '/favicon.ico';

// var existingLink = document.querySelector('link[rel="shortcut icon"]');
// if (existingLink) {
//   existingLink.parentNode.removeChild(existingLink);
// }

// document.head.appendChild(link);

var today = new Date();
var v = today.getFullYear().toString() + (today.getMonth() + 1).toString().padStart(2, '0') + today.getDate().toString().padStart(2, '0');

loadCss(Steedos.absoluteUrl('/content-review/topic.css?v='+v));
loadCss(Steedos.absoluteUrl('/content-review/amis.css?v='+v));
loadCss(Steedos.absoluteUrl('/content-review/liveblocks.css?v='+v));

window.drawerWidth = '80%';

if(false){
    let parentClassName = 'steedos-global-header-toolbar'
    Promise.all([
        waitForThing(window, parentClassName, function(){
            return document.querySelector(`.${parentClassName}`);
        }),
    ]).then(()=>{
        // 获取steedos-global-header-toolbar的div元素
        var toolbarDiv = document.querySelector(`.${parentClassName}`);
        // 创建一个新的div节点
        var newDiv = document.createElement('div');
        newDiv.className = 'header-toolbar-rooms-inbox';
        newDiv.id = 'header-toolbar-rooms-inbox';
    
        // 使用insertBefore方法将新节点插入到第一个位置
        toolbarDiv.insertBefore(newDiv, toolbarDiv.firstChild);
    
        const schema = {
        type: "service",
        body: {
            type: "rooms-provider",
            baseUrl: "",
            body: {
            type: "wrapper",
            className: "p-0",
            body: { type: "rooms-inbox-popover" },
            },
        },
        };
        Steedos.Page.render(document.getElementById('header-toolbar-rooms-inbox'), {
            schema: schema,
            render_engine: 'amis'
        }, {});
    })
}


