mirror of https://github.com/msgbyte/tailchat
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
971 B
TypeScript
45 lines
971 B
TypeScript
import {
|
|
regCustomPanel,
|
|
regChatInputButton,
|
|
postMessageEvent,
|
|
} from '@capital/common';
|
|
import { Icon } from '@capital/component';
|
|
import React from 'react';
|
|
import { DeviceInfoPanel } from './DeviceInfoPanel';
|
|
import { Translate } from './translate';
|
|
import { forwardSharedEvent } from './utils';
|
|
import { checkUpdate } from './checkUpdate';
|
|
|
|
const PLUGIN_NAME = 'Electron Support';
|
|
|
|
console.log(`Plugin ${PLUGIN_NAME} is loaded`);
|
|
|
|
regCustomPanel({
|
|
position: 'setting',
|
|
icon: '',
|
|
name: 'com.msgbyte.env.electron/deviceInfoPanel',
|
|
label: Translate.deviceInfo,
|
|
render: DeviceInfoPanel,
|
|
});
|
|
|
|
regChatInputButton({
|
|
render: () => {
|
|
return (
|
|
<Icon
|
|
className="text-2xl cursor-pointer"
|
|
icon="mdi:content-cut"
|
|
rotate={3}
|
|
onClick={() => {
|
|
postMessageEvent('callScreenshotsTool');
|
|
}}
|
|
/>
|
|
);
|
|
},
|
|
});
|
|
|
|
forwardSharedEvent('receiveUnmutedMessage');
|
|
|
|
setTimeout(() => {
|
|
checkUpdate();
|
|
}, 1000);
|