dsh-im-ops/plugin-src/client/channels/wecom/styles.js
2026-08-16 23:27:11 +08:00

19 lines
819 B
JavaScript

export const WECOM_STYLE_ID = 'xmanrui-dsh-im-wecom-settings';
const CSS = String.raw`
.dwecom-page { --ddt-accent: #3370ff; --ddt-accent-deep: #245bdb; --ddt-accent-wash: #eef4ff; }
.dwecom-avatar, .dwecom-brand { color: #3370ff; background: #fff; border: 1px solid var(--dsw-alias-border-l2, #e5e6eb); }
.dwecom-avatar svg, .dwecom-brand svg { display: block; }
`;
export function installWecomStyles() {
if (typeof document === 'undefined') return () => {};
const existing = document.querySelector(`style[data-plugin-css="${WECOM_STYLE_ID}"]`);
if (existing) return () => {};
const style = document.createElement('style');
style.dataset.plugin = '@xmanrui/dsh-im';
style.dataset.pluginCss = WECOM_STYLE_ID;
style.textContent = CSS;
document.head.appendChild(style);
return () => style.remove();
}