mirror of
https://github.com/hansjone/dsh-im-ops.git
synced 2026-10-09 03:03:24 +08:00
Add QQ bot channel
This commit is contained in:
parent
a422084eb5
commit
601271a7f8
33 changed files with 4971 additions and 642 deletions
19
plugin-src/client/channels/qq/styles.js
Normal file
19
plugin-src/client/channels/qq/styles.js
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
export const QQ_STYLE_ID = 'xmanrui-dsh-im-qq-settings';
|
||||
|
||||
const CSS = String.raw`
|
||||
.dqq-page { --ddt-accent: #1677ff; --ddt-accent-deep: #0958d9; --ddt-accent-wash: #eaf3ff; }
|
||||
.dqq-avatar, .dqq-brand { color: #fff; background: #1677ff; }
|
||||
.dqq-avatar svg, .dqq-brand svg { display: block; }
|
||||
`;
|
||||
|
||||
export function installQqStyles() {
|
||||
if (typeof document === 'undefined') return () => {};
|
||||
const existing = document.querySelector(`style[data-plugin-css="${QQ_STYLE_ID}"]`);
|
||||
if (existing) return () => {};
|
||||
const style = document.createElement('style');
|
||||
style.dataset.plugin = '@xmanrui/dsh-im';
|
||||
style.dataset.pluginCss = QQ_STYLE_ID;
|
||||
style.textContent = CSS;
|
||||
document.head.appendChild(style);
|
||||
return () => style.remove();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue