();
9 |
--------------------------------------------------------------------------------
/client/shared/model/__all__.ts:
--------------------------------------------------------------------------------
1 | export * as common from './common';
2 | export * as config from './config';
3 | export * as converse from './converse';
4 | export * as friend from './friend';
5 | export * as group from './group';
6 | export * as message from './message';
7 | export * as plugin from './plugin';
8 | export * as user from './user';
9 | export * as inbox from './inbox';
10 |
--------------------------------------------------------------------------------
/client/shared/types.ts:
--------------------------------------------------------------------------------
1 | export type PromiseType> = P extends Promise
2 | ? T
3 | : never;
4 |
5 | export type FunctionReturningPromise = (...args: any[]) => Promise;
6 |
--------------------------------------------------------------------------------
/client/shared/utils/environment.ts:
--------------------------------------------------------------------------------
1 | export const isBrowser = typeof window !== 'undefined';
2 |
3 | export const isNavigator = typeof navigator !== 'undefined';
4 |
5 | export const isDevelopment = process.env.NODE_ENV === 'development';
6 |
7 | export const isProduction = process.env.NODE_ENV === 'production';
8 |
9 | export const version = process.env.VERSION || '0.0.0';
10 |
--------------------------------------------------------------------------------
/client/shared/utils/is-promise.ts:
--------------------------------------------------------------------------------
1 | export function isPromise(obj: any): obj is Promise {
2 | return (
3 | !!obj &&
4 | (typeof obj === 'object' || typeof obj === 'function') &&
5 | typeof obj.then === 'function'
6 | );
7 | }
8 |
--------------------------------------------------------------------------------
/client/shared/utils/json-helper.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * 判断是否是一个合法的json字符串
3 | * @param jsonStr json字符串
4 | */
5 | export function isValidJson(jsonStr: string): boolean {
6 | if (typeof jsonStr !== 'string') {
7 | return false;
8 | }
9 |
10 | try {
11 | JSON.parse(jsonStr);
12 | return true;
13 | } catch (e) {
14 | return false;
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/client/shared/utils/panel-helper.ts:
--------------------------------------------------------------------------------
1 | import { GroupPanel, GroupPanelType } from '../model/group';
2 |
3 | /**
4 | * 判断面板是否为会话面板
5 | *
6 | * 会话面板的属性是带有已读未读属性的(如默认的文本面板)
7 | */
8 | export function isConversePanel(panel: GroupPanel) {
9 | // 目前只有文本面板
10 |
11 | if (panel.type === GroupPanelType.TEXT) {
12 | return true;
13 | }
14 |
15 | return false;
16 | }
17 |
--------------------------------------------------------------------------------
/client/shared/utils/utils.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * JavaScript 中的 sleep 函数
3 | * 参考 https://github.com/sqren/await-sleep/blob/master/index.js
4 | * @param milliseconds 阻塞毫秒
5 | */
6 | export function sleep(milliseconds: number): Promise {
7 | return new Promise((resolve) => {
8 | setTimeout(resolve, milliseconds);
9 | });
10 | }
11 |
--------------------------------------------------------------------------------
/client/web/.npmrc:
--------------------------------------------------------------------------------
1 | registry = https://registry.npmmirror.com
2 |
--------------------------------------------------------------------------------
/client/web/assets/_redirects:
--------------------------------------------------------------------------------
1 | /* /index.html 200
2 |
--------------------------------------------------------------------------------
/client/web/assets/audio/telephone.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/msgbyte/tailchat/5a21d630e508c12f2474af28854b54fe06d5ac49/client/web/assets/audio/telephone.mp3
--------------------------------------------------------------------------------
/client/web/assets/images/avatar/github-color.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/msgbyte/tailchat/5a21d630e508c12f2474af28854b54fe06d5ac49/client/web/assets/images/avatar/github-color.webp
--------------------------------------------------------------------------------
/client/web/assets/images/avatar/robot.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/msgbyte/tailchat/5a21d630e508c12f2474af28854b54fe06d5ac49/client/web/assets/images/avatar/robot.webp
--------------------------------------------------------------------------------
/client/web/assets/images/bg.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/msgbyte/tailchat/5a21d630e508c12f2474af28854b54fe06d5ac49/client/web/assets/images/bg.webp
--------------------------------------------------------------------------------
/client/web/assets/images/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/msgbyte/tailchat/5a21d630e508c12f2474af28854b54fe06d5ac49/client/web/assets/images/favicon.ico
--------------------------------------------------------------------------------
/client/web/assets/images/logo/logo@192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/msgbyte/tailchat/5a21d630e508c12f2474af28854b54fe06d5ac49/client/web/assets/images/logo/logo@192.png
--------------------------------------------------------------------------------
/client/web/assets/images/logo/logo@32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/msgbyte/tailchat/5a21d630e508c12f2474af28854b54fe06d5ac49/client/web/assets/images/logo/logo@32.png
--------------------------------------------------------------------------------
/client/web/assets/images/logo/logo@512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/msgbyte/tailchat/5a21d630e508c12f2474af28854b54fe06d5ac49/client/web/assets/images/logo/logo@512.png
--------------------------------------------------------------------------------
/client/web/assets/robots.txt:
--------------------------------------------------------------------------------
1 | User-agent: *
2 | Disallow: /invite/
3 |
--------------------------------------------------------------------------------
/client/web/e2e/cypress/.gitignore:
--------------------------------------------------------------------------------
1 | # 临时忽略, 这些是自动生成的代码
2 | cypress/integration
3 | cypress/fixtures
4 |
5 | # 未启用的代码
6 | cypress/screenshots
7 | cypress/snapshots
8 |
9 | # video
10 | cypress/videos
11 |
--------------------------------------------------------------------------------
/client/web/e2e/cypress/cypress.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": {
3 | "testFiles": "**/*.test.{js,ts,jsx,tsx}",
4 | "componentFolder": "./cypress/components/"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/client/web/e2e/playwright/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 | test-results/
3 | playwright-report/
4 | auth.json
5 |
--------------------------------------------------------------------------------
/client/web/e2e/playwright/.npmrc:
--------------------------------------------------------------------------------
1 | # https://npmmirror.com/
2 | registry = https://registry.npmmirror.com
3 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.ai-assistant/assets/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/msgbyte/tailchat/5a21d630e508c12f2474af28854b54fe06d5ac49/client/web/plugins/com.msgbyte.ai-assistant/assets/icon.png
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.ai-assistant/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "esModuleInterop": true,
4 | "jsx": "react",
5 | "importsNotUsedAsValues": "error"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.ai-assistant/types/tailchat.d.ts:
--------------------------------------------------------------------------------
1 | declare module '@capital/common';
2 | declare module '@capital/component';
3 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.bbcode/src/bbcode/type.ts:
--------------------------------------------------------------------------------
1 | export type AstNode = AstNodeObj | AstNodeStr;
2 |
3 | export type AstNodeObj = {
4 | tag: string;
5 | attrs: Record;
6 | content: AstNode[];
7 | };
8 |
9 | export type AstNodeStr = string;
10 |
11 | export interface TagProps {
12 | node: AstNodeObj;
13 | }
14 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.bbcode/src/bbcode/utils.tsx:
--------------------------------------------------------------------------------
1 | import type { AstNodeObj } from './type';
2 |
3 | /**
4 | * 获取 url 节点的url地址
5 | * @param urlTag url节点
6 | */
7 | export function getUrlTagRealUrl(urlTag: AstNodeObj): string {
8 | return urlTag.attrs.url ?? urlTag.content.join('');
9 | }
10 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.bbcode/src/render.ts:
--------------------------------------------------------------------------------
1 | import { BBCode } from './bbcode';
2 | import './tags/__all__';
3 |
4 | export default BBCode;
5 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.bbcode/src/tags/BoldTag.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import type { TagProps } from '../bbcode/type';
3 |
4 | export const BoldTag: React.FC = React.memo((props) => {
5 | const { node } = props;
6 | const text = node.content.join('');
7 |
8 | return {text};
9 | });
10 | BoldTag.displayName = 'BoldTag';
11 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.bbcode/src/tags/DeleteTag.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import type { TagProps } from '../bbcode/type';
3 |
4 | export const DeleteTag: React.FC = React.memo((props) => {
5 | const { node } = props;
6 | const text = node.content.join('');
7 |
8 | return {text};
9 | });
10 | DeleteTag.displayName = 'DeleteTag';
11 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.bbcode/src/tags/ItalicTag.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import type { TagProps } from '../bbcode/type';
3 |
4 | export const ItalicTag: React.FC = React.memo((props) => {
5 | const { node } = props;
6 | const text = node.content.join('');
7 |
8 | return {text};
9 | });
10 | ItalicTag.displayName = 'ItalicTag';
11 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.bbcode/src/tags/styles.less:
--------------------------------------------------------------------------------
1 | .plugin-bbcode-mention-tag {
2 | background-color: rgba(88, 101, 242, 0.3);
3 | border-radius: 2px;
4 | padding: 0 4px;
5 |
6 | &:hover {
7 | background-color: rgb(88, 101, 242);
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.bbcode/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "esModuleInterop": true,
4 | "allowSyntheticDefaultImports": true,
5 | "jsx": "react",
6 | "paths": {
7 | "@capital/*": ["../../src/plugin/*"],
8 | }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.bbcode/types/index.d.ts:
--------------------------------------------------------------------------------
1 | declare module '@bbob/parser';
2 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.biggerfont/src/const.ts:
--------------------------------------------------------------------------------
1 | export const PLUGIN_ID = 'com.msgbyte.biggerfont';
2 |
3 | export const PLUGIN_CONFIG = `${PLUGIN_ID}.config`;
4 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.biggerfont/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "esModuleInterop": true,
4 | "jsx": "react",
5 | "importsNotUsedAsValues": "error"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.biggerfont/types/tailchat.d.ts:
--------------------------------------------------------------------------------
1 | declare module '@capital/common';
2 | declare module '@capital/component';
3 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.draw/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "label": "Drawing plugin",
3 | "label.zh-CN": "绘图插件",
4 | "name": "com.msgbyte.draw",
5 | "url": "/plugins/com.msgbyte.draw/index.js",
6 | "version": "0.0.0",
7 | "author": "msgbyte",
8 | "description": "Allows sending custom drawings",
9 | "description.zh-CN": "允许发送自定义绘图",
10 | "requireRestart": false
11 | }
12 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.draw/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@plugins/com.msgbyte.draw",
3 | "main": "src/index.tsx",
4 | "version": "0.0.0",
5 | "private": true,
6 | "dependencies": {
7 | "react-canvas-draw": "^1.2.1"
8 | },
9 | "devDependencies": {
10 | "@types/react-canvas-draw": "^1.1.1",
11 | "react": "18.2.0"
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.draw/src/translate.ts:
--------------------------------------------------------------------------------
1 | import { localTrans } from '@capital/common';
2 |
3 | export const Translate = {
4 | draw: localTrans({ 'zh-CN': '绘图', 'en-US': 'Draw' }),
5 | send: localTrans({ 'zh-CN': '发送', 'en-US': 'Send' }),
6 | };
7 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.draw/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "esModuleInterop": true,
4 | "jsx": "react",
5 | "paths": {
6 | "@capital/*": ["../../src/plugin/*"],
7 | }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.env.electron/src/overwrite.css:
--------------------------------------------------------------------------------
1 | .ant-dropdown-menu {
2 | box-shadow: none; /* avoid group detail dropdown's shadow will make dom invisiable */
3 | }
4 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.env.electron/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "esModuleInterop": true,
4 | "jsx": "react",
5 | "importsNotUsedAsValues": "error",
6 | "paths": {
7 | "@capital/*": ["../../src/plugin/*"],
8 | }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.env.rn/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "esModuleInterop": true,
4 | "jsx": "react",
5 | "importsNotUsedAsValues": "error"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.env.rn/types/tailchat.d.ts:
--------------------------------------------------------------------------------
1 | declare module '@capital/common';
2 | declare module '@capital/component';
3 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.filepizza/assets/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/msgbyte/tailchat/5a21d630e508c12f2474af28854b54fe06d5ac49/client/web/plugins/com.msgbyte.filepizza/assets/icon.png
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.filepizza/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "esModuleInterop": true,
4 | "jsx": "react",
5 | "importsNotUsedAsValues": "error"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.filesend/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "esModuleInterop": true,
4 | "jsx": "react",
5 | "importsNotUsedAsValues": "error"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.filesfm/assets/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/msgbyte/tailchat/5a21d630e508c12f2474af28854b54fe06d5ac49/client/web/plugins/com.msgbyte.filesfm/assets/icon.png
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.filesfm/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "esModuleInterop": true,
4 | "jsx": "react",
5 | "importsNotUsedAsValues": "error"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.genshin/assets/icon.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/msgbyte/tailchat/5a21d630e508c12f2474af28854b54fe06d5ac49/client/web/plugins/com.msgbyte.genshin/assets/icon.jpg
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.genshin/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@plugins/com.msgbyte.genshin",
3 | "main": "src/index.tsx",
4 | "version": "0.0.0",
5 | "private": true,
6 | "dependencies": {
7 | "genshin-gacha-kit": "^1.1.0",
8 | "html-react-parser": "^1.4.5"
9 | },
10 | "devDependencies": {
11 | "react": "18.2.0"
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.genshin/src/translate.ts:
--------------------------------------------------------------------------------
1 | import { localTrans } from '@capital/common';
2 |
3 | export const Translate = {
4 | genshin: localTrans({ 'zh-CN': '原神', 'en-US': 'Genshin' }),
5 | gacha: localTrans({ 'zh-CN': '抽卡', 'en-US': 'Gacha' }),
6 | };
7 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.genshin/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "esModuleInterop": true,
4 | "jsx": "react",
5 | "paths": {
6 | "@capital/*": ["../../src/plugin/*"],
7 | }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.integration/src/types.ts:
--------------------------------------------------------------------------------
1 | export type OpenAppCapability = 'bot' | 'webpage' | 'oauth';
2 |
3 | export interface OpenAppInfo {
4 | _id: string;
5 | owner: string;
6 | appId: string;
7 | appName: string;
8 | appDesc: string;
9 | appIcon: string;
10 | capability: OpenAppCapability[];
11 | }
12 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.integration/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "esModuleInterop": true,
4 | "jsx": "react",
5 | "importsNotUsedAsValues": "error",
6 | "paths": {
7 | "@capital/*": ["../../src/plugin/*"],
8 | }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.intro/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@plugins/com.msgbyte.intro",
3 | "main": "src/index.ts",
4 | "version": "0.0.0",
5 | "private": true,
6 | "dependencies": {
7 | "shepherd.js": "^11.1.1"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.intro/src/index.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * 异步加载
3 | */
4 | import('./tour');
5 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.intro/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "esModuleInterop": true,
4 | "jsx": "react",
5 | "paths": {
6 | "@capital/*": ["../../src/plugin/*"],
7 | }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.mdpanel/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "esModuleInterop": true,
4 | "jsx": "react",
5 | "importsNotUsedAsValues": "error"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.mdpanel/types/tailchat.d.ts:
--------------------------------------------------------------------------------
1 | declare module '@capital/common';
2 | declare module '@capital/component';
3 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.miaolang/README.md:
--------------------------------------------------------------------------------
1 | ## 喵语翻译
2 |
3 | 允许用户将自然语言转换为加密后的喵语
4 |
5 | 在任意聊天款的右侧添加喵语翻译
6 |
7 | 
8 |
9 | 在此输入的任意内容都会被转换为加密后的喵语言,只有安装了相同插件的用户才能翻译
10 |
11 | 
12 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.miaolang/docs/output.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/msgbyte/tailchat/5a21d630e508c12f2474af28854b54fe06d5ac49/client/web/plugins/com.msgbyte.miaolang/docs/output.png
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.miaolang/docs/send.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/msgbyte/tailchat/5a21d630e508c12f2474af28854b54fe06d5ac49/client/web/plugins/com.msgbyte.miaolang/docs/send.png
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.miaolang/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@plugins/com.msgbyte.miaolang",
3 | "main": "src/index.ts",
4 | "version": "0.0.0",
5 | "private": true,
6 | "dependencies": {
7 | "miao-lang": "^1.0.5"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.miaolang/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "esModuleInterop": true,
4 | "jsx": "react",
5 | "paths": {
6 | "@capital/*": ["../../src/plugin/*"],
7 | }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.music/assets/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/msgbyte/tailchat/5a21d630e508c12f2474af28854b54fe06d5ac49/client/web/plugins/com.msgbyte.music/assets/icon.png
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.music/src/translate.ts:
--------------------------------------------------------------------------------
1 | import { localTrans } from '@capital/common';
2 |
3 | export const Translate = {
4 | musicpanel: localTrans({
5 | 'zh-CN': '在线听音乐',
6 | 'en-US': 'YesPlayMusic',
7 | }),
8 | };
9 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.music/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "esModuleInterop": true,
4 | "jsx": "react",
5 | "importsNotUsedAsValues": "error"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.notify/assets/sounds_bing.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/msgbyte/tailchat/5a21d630e508c12f2474af28854b54fe06d5ac49/client/web/plugins/com.msgbyte.notify/assets/sounds_bing.mp3
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.notify/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@plugins/com.msgbyte.notify",
3 | "main": "src/index.tsx",
4 | "version": "0.0.0",
5 | "private": true,
6 | "dependencies": {
7 | "lodash": "^4.17.21",
8 | "tinycon": "^0.6.8"
9 | },
10 | "devDependencies": {
11 | "@types/tinycon": "^0.6.3"
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.notify/src/const.ts:
--------------------------------------------------------------------------------
1 | export const PLUGIN_NAME = 'com.msgbyte.notify';
2 |
3 | export const PLUGIN_SYSTEM_SETTINGS_DISABLED_SOUND = `${PLUGIN_NAME}.disabledSound`;
4 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.notify/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "esModuleInterop": true,
4 | "jsx": "react",
5 | "paths": {
6 | "@capital/*": ["../../src/plugin/*"],
7 | }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.offline-icons/src/translate.ts:
--------------------------------------------------------------------------------
1 | import { localTrans } from '@capital/common';
2 |
3 | export const Translate = {
4 | name: localTrans({
5 | 'zh-CN': 'Offline Icons',
6 | 'en-US': 'Offline Icons',
7 | }),
8 | };
9 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.offline-icons/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "esModuleInterop": true,
4 | "jsx": "react",
5 | "resolveJsonModule": true,
6 | "importsNotUsedAsValues": "error"
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.offline-icons/types/tailchat.d.ts:
--------------------------------------------------------------------------------
1 | declare module '@capital/common';
2 | declare module '@capital/component';
3 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.openapi/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@plugins/com.msgbyte.openapi",
3 | "main": "src/index.ts",
4 | "version": "0.0.0",
5 | "private": true,
6 | "dependencies": {}
7 | }
8 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.openapi/src/MainPanel/AppInfo/Profile.less:
--------------------------------------------------------------------------------
1 | .plugin-openapi-app-info_profile {
2 | h2 {
3 | margin-bottom: 10px;
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.openapi/src/MainPanel/AppInfo/Webpage.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | const Webpage: React.FC = React.memo(() => {
4 | return 开发中
;
5 | });
6 | Webpage.displayName = 'Webpage';
7 |
8 | export default Webpage;
9 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.openapi/src/MainPanel/AppInfo/index.less:
--------------------------------------------------------------------------------
1 | .plugin-openapi-app-info {
2 | display: flex;
3 | height: 100%;
4 |
5 | .plugin-openapi-app-info_body {
6 | padding: 0 10px;
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.openapi/src/MainPanel/index.less:
--------------------------------------------------------------------------------
1 | .plugin-openapi-main-panel {
2 | height: 100%;
3 | }
4 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.openapi/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "esModuleInterop": true,
4 | "jsx": "react",
5 | "paths": {
6 | "@capital/*": ["../../src/plugin/*"],
7 | }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.posthog/assets/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/msgbyte/tailchat/5a21d630e508c12f2474af28854b54fe06d5ac49/client/web/plugins/com.msgbyte.posthog/assets/icon.png
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.posthog/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "esModuleInterop": true,
4 | "jsx": "react",
5 | "importsNotUsedAsValues": "error"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.posthog/types/tailchat.d.ts:
--------------------------------------------------------------------------------
1 | declare module '@capital/common';
2 | declare module '@capital/component';
3 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.sentry/assets/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/msgbyte/tailchat/5a21d630e508c12f2474af28854b54fe06d5ac49/client/web/plugins/com.msgbyte.sentry/assets/icon.png
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.sentry/src/index.tsx:
--------------------------------------------------------------------------------
1 | import('./lazy');
2 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.sentry/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "esModuleInterop": true,
4 | "jsx": "react",
5 | "importsNotUsedAsValues": "error"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.snapdrop/README.md:
--------------------------------------------------------------------------------
1 | ## com.msgbyte.snapdrop
2 |
3 | 为 `Tailchat` 增加 局域网文件互传的功能
4 |
5 | Powered by [snapdrop](https://github.com/RobinLinus/snapdrop.git)
6 |
7 | ### 使用方式
8 |
9 | 仅需要在同一网络下两个设备均打开 [我 -> 隔空投送] 面板,单击或长按即可发送
10 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.snapdrop/assets/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/msgbyte/tailchat/5a21d630e508c12f2474af28854b54fe06d5ac49/client/web/plugins/com.msgbyte.snapdrop/assets/icon.png
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.snapdrop/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@plugins/com.msgbyte.snapdrop",
3 | "main": "src/index.tsx",
4 | "version": "0.0.0",
5 | "private": true,
6 | "dependencies": {
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.snapdrop/src/translate.ts:
--------------------------------------------------------------------------------
1 | import { localTrans } from '@capital/common';
2 |
3 | export const Translate = {
4 | panelName: localTrans({ 'zh-CN': '隔空投送', 'en-US': 'Snapdrop' }),
5 | };
6 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.snapdrop/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "esModuleInterop": true,
4 | "jsx": "react",
5 | "paths": {
6 | "@capital/*": ["../../src/plugin/*"],
7 | }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.theme.genshin/README.md:
--------------------------------------------------------------------------------
1 | ## 原神主题
2 |
3 | 包含主题如下:
4 | - 原神-胡桃
5 | - 原神-琴
6 | - 原神-安柏
7 | - 原神-莫娜
8 | - 原神-罗莎莉亚
9 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.theme.genshin/assets/icon.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/msgbyte/tailchat/5a21d630e508c12f2474af28854b54fe06d5ac49/client/web/plugins/com.msgbyte.theme.genshin/assets/icon.jpg
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.theme.genshin/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@plugins/com.msgbyte.theme.genshin",
3 | "main": "src/index.ts",
4 | "version": "0.0.0",
5 | "private": true,
6 | "dependencies": {}
7 | }
8 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.theme.genshin/src/amber/avatar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/msgbyte/tailchat/5a21d630e508c12f2474af28854b54fe06d5ac49/client/web/plugins/com.msgbyte.theme.genshin/src/amber/avatar.png
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.theme.genshin/src/amber/bg.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/msgbyte/tailchat/5a21d630e508c12f2474af28854b54fe06d5ac49/client/web/plugins/com.msgbyte.theme.genshin/src/amber/bg.jpeg
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.theme.genshin/src/hutao/avatar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/msgbyte/tailchat/5a21d630e508c12f2474af28854b54fe06d5ac49/client/web/plugins/com.msgbyte.theme.genshin/src/hutao/avatar.png
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.theme.genshin/src/hutao/bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/msgbyte/tailchat/5a21d630e508c12f2474af28854b54fe06d5ac49/client/web/plugins/com.msgbyte.theme.genshin/src/hutao/bg.jpg
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.theme.genshin/src/jean/avatar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/msgbyte/tailchat/5a21d630e508c12f2474af28854b54fe06d5ac49/client/web/plugins/com.msgbyte.theme.genshin/src/jean/avatar.png
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.theme.genshin/src/jean/bg.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/msgbyte/tailchat/5a21d630e508c12f2474af28854b54fe06d5ac49/client/web/plugins/com.msgbyte.theme.genshin/src/jean/bg.jpeg
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.theme.genshin/src/mona/avatar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/msgbyte/tailchat/5a21d630e508c12f2474af28854b54fe06d5ac49/client/web/plugins/com.msgbyte.theme.genshin/src/mona/avatar.png
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.theme.genshin/src/mona/bg.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/msgbyte/tailchat/5a21d630e508c12f2474af28854b54fe06d5ac49/client/web/plugins/com.msgbyte.theme.genshin/src/mona/bg.jpeg
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.theme.genshin/src/rosaria/avatar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/msgbyte/tailchat/5a21d630e508c12f2474af28854b54fe06d5ac49/client/web/plugins/com.msgbyte.theme.genshin/src/rosaria/avatar.png
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.theme.genshin/src/rosaria/bg.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/msgbyte/tailchat/5a21d630e508c12f2474af28854b54fe06d5ac49/client/web/plugins/com.msgbyte.theme.genshin/src/rosaria/bg.jpeg
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.theme.genshin/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "esModuleInterop": true,
4 | "jsx": "react",
5 | "paths": {
6 | "@capital/*": ["../../src/plugin/*"],
7 | }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.theme.genshin/types/index.d.ts:
--------------------------------------------------------------------------------
1 | declare module '*.less';
2 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.theme.miku/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@plugins/com.msgbyte.theme.miku",
3 | "main": "src/index.ts",
4 | "version": "0.0.0",
5 | "private": true,
6 | "dependencies": {}
7 | }
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.theme.miku/src/bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/msgbyte/tailchat/5a21d630e508c12f2474af28854b54fe06d5ac49/client/web/plugins/com.msgbyte.theme.miku/src/bg.jpg
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.theme.miku/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "esModuleInterop": true,
4 | "jsx": "react",
5 | "paths": {
6 | "@capital/*": ["../../src/plugin/*"],
7 | }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.theme.miku/types/index.d.ts:
--------------------------------------------------------------------------------
1 | declare module '*.less';
2 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.toolwa/assets/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/msgbyte/tailchat/5a21d630e508c12f2474af28854b54fe06d5ac49/client/web/plugins/com.msgbyte.toolwa/assets/icon.png
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.toolwa/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@plugins/com.msgbyte.toolwa",
3 | "main": "src/index.tsx",
4 | "version": "0.0.0",
5 | "private": true,
6 | "dependencies": {
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.toolwa/src/translate.ts:
--------------------------------------------------------------------------------
1 | import { localTrans } from '@capital/common';
2 |
3 | export const Translate = {
4 | panelName: localTrans({ 'zh-CN': '工具哇!', 'en-US': 'Toolwa!' }),
5 | };
6 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.toolwa/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "esModuleInterop": true,
4 | "jsx": "react",
5 | "paths": {
6 | "@capital/*": ["../../src/plugin/*"],
7 | }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.user.location/src/index.tsx:
--------------------------------------------------------------------------------
1 | import { regUserExtraInfo, localTrans } from '@capital/common';
2 |
3 | regUserExtraInfo({
4 | name: 'location',
5 | label: localTrans({ 'zh-CN': '所在城市', 'en-US': 'City' }),
6 | });
7 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.user.location/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "esModuleInterop": true,
4 | "jsx": "react",
5 | "importsNotUsedAsValues": "error"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.user.location/types/tailchat.d.ts:
--------------------------------------------------------------------------------
1 | declare module '@capital/common';
2 | declare module '@capital/component';
3 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.webview/README.md:
--------------------------------------------------------------------------------
1 | ## com.msgbyte.webview
2 |
3 | 为 `Tailchat` 增加 `Webview` 能力
4 |
5 | ### Usage
6 |
7 | 在 群组设置 -> 创建面板 可以添加网页面板。
8 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.webview/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@plugins/com.msgbyte.webview",
3 | "main": "src/index.tsx",
4 | "version": "0.0.0",
5 | "private": true,
6 | "dependencies": {
7 | "url-regex": "^5.0.0",
8 | "xss": "^1.0.14"
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.webview/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "esModuleInterop": true,
4 | "jsx": "react",
5 | "paths": {
6 | "@capital/*": ["../../src/plugin/*"],
7 | }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.wenshushu/assets/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/msgbyte/tailchat/5a21d630e508c12f2474af28854b54fe06d5ac49/client/web/plugins/com.msgbyte.wenshushu/assets/icon.png
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.wenshushu/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "esModuleInterop": true,
4 | "jsx": "react",
5 | "importsNotUsedAsValues": "error"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.widget.sakana/assets/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/msgbyte/tailchat/5a21d630e508c12f2474af28854b54fe06d5ac49/client/web/plugins/com.msgbyte.widget.sakana/assets/icon.png
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.widget.sakana/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "label": "sakana-widget",
3 | "name": "com.msgbyte.widget.sakana",
4 | "url": "/plugins/com.msgbyte.widget.sakana/index.js",
5 | "icon": "/plugins/com.msgbyte.widget.sakana/assets/icon.png",
6 | "version": "0.0.0",
7 | "author": "moonrailgun",
8 | "description": "Add sakana widget in tailchat"
9 | }
10 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.widget.sakana/src/index.tsx:
--------------------------------------------------------------------------------
1 | const PLUGIN_ID = 'com.msgbyte.sakana-widget';
2 | const PLUGIN_NAME = 'sakana-widget';
3 |
4 | console.log(`Plugin ${PLUGIN_NAME}(${PLUGIN_ID}) is loaded`);
5 |
6 | import('./main');
7 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.widget.sakana/src/translate.ts:
--------------------------------------------------------------------------------
1 | import { localTrans } from '@capital/common';
2 |
3 | export const Translate = {
4 | name: localTrans({
5 | 'zh-CN': 'sakana-widget',
6 | 'en-US': 'sakana-widget',
7 | }),
8 | };
9 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.widget.sakana/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "esModuleInterop": true,
4 | "jsx": "react",
5 | "importsNotUsedAsValues": "error"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.widget.sakana/types/tailchat.d.ts:
--------------------------------------------------------------------------------
1 | declare module '@capital/common';
2 | declare module '@capital/component';
3 |
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.wormhole/assets/icon.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/msgbyte/tailchat/5a21d630e508c12f2474af28854b54fe06d5ac49/client/web/plugins/com.msgbyte.wormhole/assets/icon.webp
--------------------------------------------------------------------------------
/client/web/plugins/com.msgbyte.wormhole/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "esModuleInterop": true,
4 | "jsx": "react",
5 | "importsNotUsedAsValues": "error"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/client/web/postcss.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | plugins: [
3 | 'tailwindcss',
4 | 'autoprefixer',
5 | ]
6 | }
7 |
--------------------------------------------------------------------------------
/client/web/scripts/test-export.ts:
--------------------------------------------------------------------------------
1 | export { localTrans } from '../src/plugin/common/index';
2 |
--------------------------------------------------------------------------------
/client/web/src/components/ChatBox/ChatInputBox/BaseChatInputButton.less:
--------------------------------------------------------------------------------
1 | .chat-message-input_action-popover {
2 | > .ant-popover-content > .ant-popover-inner > .ant-popover-inner-content {
3 | padding: 0;
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/client/web/src/components/ChatBox/ChatInputBox/Emotion.less:
--------------------------------------------------------------------------------
1 | .chat-message-input_action-popover.emotion-popover {
2 | > .ant-popover-content > .ant-popover-inner {
3 | background-color: transparent;
4 | border-radius: 10px;
5 |
6 | .ant-popover-inner-content {
7 | padding: 0;
8 | }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/client/web/src/components/ChatBox/ChatMessageList/const.ts:
--------------------------------------------------------------------------------
1 | export const messageReverseItemId = {
2 | OLDER_MESSAGES_LOADER: 'OLDER_MESSAGES_LOADER',
3 | TEXT_CHANNEL_INTRO: 'TEXT_CHANNEL_INTRO',
4 | };
5 |
--------------------------------------------------------------------------------
/client/web/src/components/ChatBox/ChatMessageList/types.ts:
--------------------------------------------------------------------------------
1 | import type { ChatMessage } from 'tailchat-shared';
2 |
3 | export interface MessageListProps {
4 | messages: ChatMessage[];
5 | title?: React.ReactNode;
6 | isLoadingMore: boolean;
7 | hasMoreMessage: boolean;
8 | onLoadMore: () => Promise;
9 | }
10 |
--------------------------------------------------------------------------------
/client/web/src/components/DelayTip.tsx:
--------------------------------------------------------------------------------
1 | export { DelayTip } from 'tailchat-design';
2 |
--------------------------------------------------------------------------------
/client/web/src/components/DynamicVirtualizedList/README.md:
--------------------------------------------------------------------------------
1 | Fork from https://github.com/mattermost/dynamic-virtualized-list
2 |
--------------------------------------------------------------------------------
/client/web/src/components/Emoji/Picker.less:
--------------------------------------------------------------------------------
1 | .emoji-picker {
2 | .emoji-mart {
3 | display: block;
4 |
5 | .emoji-mart-anchors {
6 | justify-content: flex-start;
7 | @apply space-x-1;
8 |
9 | .emoji-mart-anchor {
10 | flex: initial;
11 | }
12 | }
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/client/web/src/components/Emoji/const.ts:
--------------------------------------------------------------------------------
1 | import data from '@emoji-mart/data/sets/5/twitter.json';
2 |
3 | export const emojiData = data;
4 |
--------------------------------------------------------------------------------
/client/web/src/components/Emoji/twitter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/msgbyte/tailchat/5a21d630e508c12f2474af28854b54fe06d5ac49/client/web/src/components/Emoji/twitter.png
--------------------------------------------------------------------------------
/client/web/src/components/Emoji/types.ts:
--------------------------------------------------------------------------------
1 | export interface EmojiData {
2 | id: string;
3 | name: string;
4 | native: string;
5 | unified: string;
6 | keywords: string[];
7 | shortcodes: string;
8 | }
9 |
--------------------------------------------------------------------------------
/client/web/src/components/ErrorView.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Problem } from './Problem';
3 |
4 | /**
5 | * 用于接口错误显示的组件
6 | */
7 | export const ErrorView: React.FC<{
8 | error: Error;
9 | }> = React.memo(({ error }) => {
10 | return ;
11 | });
12 | ErrorView.displayName = 'ErrorView';
13 |
--------------------------------------------------------------------------------
/client/web/src/components/Highlight.tsx:
--------------------------------------------------------------------------------
1 | export { Highlight } from 'tailchat-design';
2 |
--------------------------------------------------------------------------------
/client/web/src/components/Image.tsx:
--------------------------------------------------------------------------------
1 | export { Image } from 'tailchat-design';
2 |
--------------------------------------------------------------------------------
/client/web/src/components/KeepAliveOverlay/README.md:
--------------------------------------------------------------------------------
1 | 组件状态缓存, 使用覆盖层的方式来保持存活(类似小程序叠加原生程序的感觉)
2 |
3 | 支持`iframe`的渲染缓存.
4 |
--------------------------------------------------------------------------------
/client/web/src/components/KeepAliveOverlay/index.ts:
--------------------------------------------------------------------------------
1 | export { KeepAliveOverlayHost } from './KeepAliveOverlayHost';
2 | export { withKeepAliveOverlay } from './withKeepAliveOverlay';
3 |
--------------------------------------------------------------------------------
/client/web/src/components/Markdown/index.tsx:
--------------------------------------------------------------------------------
1 | import { Loadable } from '../Loadable';
2 |
3 | export { Markdown } from './render';
4 |
5 | export const MarkdownEditor = Loadable(() =>
6 | import('./editor').then((module) => module.MarkdownEditor)
7 | );
8 |
--------------------------------------------------------------------------------
/client/web/src/components/Slides.less:
--------------------------------------------------------------------------------
1 | .slides {
2 | .slick-list {
3 | transition: height .2s ease-in-out;
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/client/web/src/components/Spinner.tsx:
--------------------------------------------------------------------------------
1 | import { Icon } from 'tailchat-design';
2 | import React from 'react';
3 |
4 | export const Spinner: React.FC = React.memo(() => {
5 | return ;
6 | });
7 | Spinner.displayName = 'Spinner';
8 |
--------------------------------------------------------------------------------
/client/web/src/components/__mocks__/UserName.tsx:
--------------------------------------------------------------------------------
1 | export function UserName(props: any) {
2 | return `[UserName ${JSON.stringify(props)}]`;
3 | }
4 |
--------------------------------------------------------------------------------
/client/web/src/components/__tests__/IconBtn.spec.tsx:
--------------------------------------------------------------------------------
1 | import { render } from '@testing-library/react';
2 | import React from 'react';
3 | import { IconBtn } from '../IconBtn';
4 |
5 | describe('IconBtn', () => {
6 | test('render', () => {
7 | const wrapper = render();
8 | expect(wrapper.container).toMatchSnapshot();
9 | });
10 | });
11 |
--------------------------------------------------------------------------------
/client/web/src/components/__tests__/IsDeveloping.spec.tsx:
--------------------------------------------------------------------------------
1 | import { render } from '@testing-library/react';
2 | import React from 'react';
3 | import { IsDeveloping } from '../IsDeveloping';
4 |
5 | describe('IsDeveloping', () => {
6 | test('render', () => {
7 | const wrapper = render();
8 | expect(wrapper.container).toMatchSnapshot();
9 | });
10 | });
11 |
--------------------------------------------------------------------------------
/client/web/src/components/__tests__/Spinner.spec.tsx:
--------------------------------------------------------------------------------
1 | import { render } from '@testing-library/react';
2 | import React from 'react';
3 | import { Spinner } from '../Spinner';
4 |
5 | describe('Spinner', () => {
6 | test('render', () => {
7 | const wrapper = render();
8 | expect(wrapper.container).toMatchSnapshot();
9 | });
10 | });
11 |
--------------------------------------------------------------------------------
/client/web/src/components/__tests__/__snapshots__/Highlight.spec.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`Highlight render 1`] = `
4 |
5 |
8 | Any Text
9 |
10 |
11 | `;
12 |
--------------------------------------------------------------------------------
/client/web/src/components/__tests__/__snapshots__/Spinner.spec.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`Spinner render 1`] = `
4 |
5 | [iconify icon="mdi:loading"]
6 |
7 | `;
8 |
--------------------------------------------------------------------------------
/client/web/src/components/modals/CreateGroupInvite/CreateInviteCode.module.less:
--------------------------------------------------------------------------------
1 | .createInviteBtn {
2 | display: flex;
3 | :global {
4 | .ant-btn:not(.ant-dropdown-trigger) {
5 | flex: 1;
6 | }
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/client/web/src/components/modals/GroupPanel/types.ts:
--------------------------------------------------------------------------------
1 | import type { GroupPanelType } from 'tailchat-shared';
2 |
3 | export interface GroupPanelValues {
4 | name: string;
5 | type: string | GroupPanelType.TEXT | GroupPanelType.GROUP;
6 | [key: string]: unknown;
7 | }
8 |
--------------------------------------------------------------------------------
/client/web/src/context/GroupIdContext.tsx:
--------------------------------------------------------------------------------
1 | import React, { useContext } from 'react';
2 |
3 | const GroupIdContext = React.createContext('');
4 | GroupIdContext.displayName = 'GroupIdContext';
5 |
6 | export const GroupIdContextProvider = GroupIdContext.Provider;
7 |
8 | export function useGroupIdContext(): string {
9 | return useContext(GroupIdContext);
10 | }
11 |
--------------------------------------------------------------------------------
/client/web/src/dev.ts:
--------------------------------------------------------------------------------
1 | import { isDevelopment, request, version } from 'tailchat-shared';
2 | import { measure } from './utils/measure-helper';
3 |
4 | if (isDevelopment === true) {
5 | (window as any).DEBUG = {
6 | request,
7 | version,
8 | measure,
9 | };
10 | }
11 |
--------------------------------------------------------------------------------
/client/web/src/hooks/useIsMobile.ts:
--------------------------------------------------------------------------------
1 | import { useWindowSize } from './useWindowSize';
2 |
3 | /**
4 | * 判定是否为移动版网页
5 | */
6 | export function useIsMobile(): boolean {
7 | const { width } = useWindowSize();
8 |
9 | return width < 768;
10 | }
11 |
--------------------------------------------------------------------------------
/client/web/src/hooks/useLocalStorage.ts:
--------------------------------------------------------------------------------
1 | import { createUseStorageState } from 'tailchat-shared';
2 |
3 | export const useLocalStorageState = createUseStorageState(() => localStorage);
4 |
--------------------------------------------------------------------------------
/client/web/src/hooks/useSessionStorageState.ts:
--------------------------------------------------------------------------------
1 | import { createUseStorageState } from 'tailchat-shared';
2 |
3 | export const useSessionStorageState = createUseStorageState(
4 | () => sessionStorage
5 | );
6 |
--------------------------------------------------------------------------------
/client/web/src/plugin/common/context.ts:
--------------------------------------------------------------------------------
1 | export { useGroupIdContext } from '../../context/GroupIdContext';
2 | export { useGroupPanelContext } from '../../context/GroupPanelContext';
3 | export { useSocketContext } from '../../context/SocketContext';
4 |
--------------------------------------------------------------------------------
/client/web/src/routes/Entry/index.module.less:
--------------------------------------------------------------------------------
1 | .entryLeft {
2 | box-shadow: 2px 0px 10px 0px rgba(0, 0, 0, 0.8);
3 | }
4 |
--------------------------------------------------------------------------------
/client/web/src/routes/Main/Content/Personal/Plugins/index.tsx:
--------------------------------------------------------------------------------
1 | import { PluginStore } from '@/plugin/PluginStore';
2 | import React from 'react';
3 |
4 | export const PluginsPanel: React.FC = React.memo(() => {
5 | return ;
6 | });
7 | PluginsPanel.displayName = 'PluginsPanel';
8 |
--------------------------------------------------------------------------------
/client/web/src/routes/Panel/README.md:
--------------------------------------------------------------------------------
1 | 该文件是用于独立窗口打开面板的功能
2 |
--------------------------------------------------------------------------------
/client/web/src/styles/antd/index.less:
--------------------------------------------------------------------------------
1 | @import "./overwrite.less";
2 | @import "./theme.less";
3 | @import "./dark.less";
4 |
--------------------------------------------------------------------------------
/client/web/src/styles/index.ts:
--------------------------------------------------------------------------------
1 | import 'antd/dist/antd.css';
2 | import './antd/index.less';
3 | import './tailwind.less';
4 | import './global.less';
5 |
--------------------------------------------------------------------------------
/client/web/src/utils/device-helper.ts:
--------------------------------------------------------------------------------
1 | export function isMobile(): boolean {
2 | return window.document.body.clientWidth < 768;
3 | }
4 |
--------------------------------------------------------------------------------
/client/web/src/utils/location-helper.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * 获取当前页面的search参数
3 | */
4 | export function getSearchParam(param: string): string | null {
5 | return new URLSearchParams(window.location.search).get(param);
6 | }
7 |
--------------------------------------------------------------------------------
/client/web/test/fileTransformer.js:
--------------------------------------------------------------------------------
1 | const path = require('path');
2 |
3 | module.exports = {
4 | process(src, filename, config, options) {
5 | const code =
6 | 'module.exports = ' + JSON.stringify(path.basename(filename)) + ';';
7 |
8 | // return { code };
9 | return code;
10 | },
11 | };
12 |
--------------------------------------------------------------------------------
/client/web/tsconfig.node.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "module": "CommonJS",
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/client/web/tsconfig.test.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "allowJs": true,
5 | "paths": {
6 | "@/*": ["./src/*"],
7 | "@test/*": ["./test/*"],
8 | "@assets/*": ["./assets/*"],
9 | "tailchat-design": ["../packages/design/components"],
10 | "@capital/*": ["./src/plugin/*"]
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/client/web/types/index.d.ts:
--------------------------------------------------------------------------------
1 | declare module '*.jpg';
2 | declare module '*.svg';
3 | declare module '*.png';
4 | declare module '*.module.less';
5 | declare module '@bbob/parser'; // Work around for com.msgbyte.bbcode. ts-jest looks like cannot load plugins-self typedefinition
6 |
--------------------------------------------------------------------------------
/docker/simple/README.md:
--------------------------------------------------------------------------------
1 | Only have one tailchat instance version.
2 |
3 | Not include **openapi** and **admin**
4 |
--------------------------------------------------------------------------------
/docker/simple/k8s/images/traefik-svc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/msgbyte/tailchat/5a21d630e508c12f2474af28854b54fe06d5ac49/docker/simple/k8s/images/traefik-svc.png
--------------------------------------------------------------------------------
/docker/simple/k8s/namespace.yml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Namespace
3 | metadata:
4 | name: tailchat
5 |
--------------------------------------------------------------------------------
/docker/swag.env.example:
--------------------------------------------------------------------------------
1 | URL=
2 |
3 | TZ=Asia/Shanghai
4 |
--------------------------------------------------------------------------------
/packages/types/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from './model/inbox';
2 | export * from './model/user';
3 | export * from './model/message';
4 | export * from './model/group';
5 |
--------------------------------------------------------------------------------
/packages/types/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "compilerOptions": {
4 | "declaration": true,
5 | "target": "ES5",
6 | "lib": ["ES2015"],
7 | "module": "CommonJS"
8 | },
9 | "include": ["src"]
10 | }
11 |
--------------------------------------------------------------------------------
/pnpm-workspace.yaml:
--------------------------------------------------------------------------------
1 | packages:
2 | - 'apps/*'
3 | - 'packages/*'
4 | - 'client/web'
5 | - 'client/shared'
6 | - 'client/web/plugins/**'
7 | - 'client/packages/**'
8 | - 'server'
9 | - 'server/admin'
10 | - 'server/packages/**'
11 | - 'server/plugins/**'
12 | - 'server/test/demo/**'
13 | - 'website'
14 |
--------------------------------------------------------------------------------
/server/.dockerignore:
--------------------------------------------------------------------------------
1 | .env
2 | node_modules
3 | logs
4 | dist
5 |
--------------------------------------------------------------------------------
/server/.npmrc:
--------------------------------------------------------------------------------
1 | # https://npmmirror.com/
2 | registry = https://registry.npmmirror.com
3 | ignore-workspace-root-check = true
4 | strict-peer-dependencies = false # 因为一些旧依赖(特别是mongoose相关) 比较糟糕,因此关掉
5 | # For docker: https://pnpm.io/npmrc#unsafe-perm
6 | unsafe-perm = true
7 |
--------------------------------------------------------------------------------
/server/admin/nodemon.json:
--------------------------------------------------------------------------------
1 | {
2 | "verbose": true,
3 | "watch": ["./src/server"],
4 | "ext": "ts",
5 | "delay": 1000,
6 | "exec": "ts-node ./src/server/index.ts"
7 | }
8 |
--------------------------------------------------------------------------------
/server/admin/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/msgbyte/tailchat/5a21d630e508c12f2474af28854b54fe06d5ac49/server/admin/public/favicon.ico
--------------------------------------------------------------------------------
/server/admin/src/client/components/MarkdownEditor/index.tsx:
--------------------------------------------------------------------------------
1 | import loadable from '@loadable/component';
2 |
3 | export const MarkdownEditor = loadable(() =>
4 | import('./editor').then((module) => module.MarkdownEditor)
5 | );
6 |
--------------------------------------------------------------------------------
/server/admin/src/client/components/MarkdownEditor/plugins.ts:
--------------------------------------------------------------------------------
1 | import gfm from '@bytemd/plugin-gfm';
2 |
3 | export const plugins = [
4 | gfm(),
5 | // Add more plugins here
6 | ];
7 |
--------------------------------------------------------------------------------
/server/admin/src/client/components/MarkdownEditor/style.less:
--------------------------------------------------------------------------------
1 | .bytemd .bytemd-toolbar-right [bytemd-tippy-path='5'] {
2 | // Hidden github icon
3 | display: none;
4 | }
5 |
6 | .bytemd-fullscreen.bytemd {
7 | z-index: 99;
8 | }
9 |
--------------------------------------------------------------------------------
/server/admin/src/client/global.css:
--------------------------------------------------------------------------------
1 | .arco-table-th {
2 | white-space: nowrap;
3 | }
4 | .arco-table-td {
5 | /* white-space: nowrap; */
6 | overflow: hidden;
7 | }
8 |
--------------------------------------------------------------------------------
/server/admin/src/client/main.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom/client';
3 | import App from './App';
4 | import './global.css';
5 |
6 | ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
7 |
8 | );
9 |
--------------------------------------------------------------------------------
/server/admin/src/client/vite-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/server/admin/src/server/middleware/express-mongoose-ra-json-server/README.md:
--------------------------------------------------------------------------------
1 | fork from https://github.com/NathanAdhitya/express-mongoose-ra-json-server
2 |
3 | modify:
4 | - count logic in get `/`
5 |
--------------------------------------------------------------------------------
/server/admin/src/server/middleware/express-mongoose-ra-json-server/utils/baseModel.interface.ts:
--------------------------------------------------------------------------------
1 | import type { Model, Document } from 'mongoose';
2 |
3 | export interface ADPBaseSchema {
4 | _id: string;
5 | }
6 |
7 | export type ADPBaseModel = Model;
8 |
--------------------------------------------------------------------------------
/server/devops/README.md:
--------------------------------------------------------------------------------
1 | # 可选启用
2 |
3 | WIP
4 |
5 | 该文件夹用于运维
6 |
7 | ## 用法 Usage
8 |
9 | ```bash
10 | cd ./devops
11 | docker compose -f ../docker-compose.yml -f docker-compose.devops.yml up -d
12 | ```
13 |
--------------------------------------------------------------------------------
/server/devops/config/grafana-dashboards.yml:
--------------------------------------------------------------------------------
1 | - name: 'default'
2 | org_id: 1
3 | folder: ''
4 | type: 'file'
5 | options:
6 | folder: '/var/lib/grafana/dashboards'
7 |
--------------------------------------------------------------------------------
/server/lib/crypto/__tests__/__snapshots__/des.spec.ts.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`des encrypt D 1`] = `"ihmnn4VBPYE="`;
4 |
5 | exports[`des encrypt bar 1`] = `"p/PIC32MPm4="`;
6 |
7 | exports[`des encrypt foo 1`] = `"NP3+ABhEiY4="`;
8 |
9 | exports[`des encrypt 你 1`] = `"O5kF0LXzjpE="`;
10 |
--------------------------------------------------------------------------------
/server/models/README.md:
--------------------------------------------------------------------------------
1 | Reference: https://typegoose.github.io/typegoose/docs/guides/quick-start-guide
2 |
--------------------------------------------------------------------------------
/server/packages/openapi-generator/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "compilerOptions": {
4 | "declaration": true,
5 | "outDir": "./dist",
6 | "paths": {}
7 | },
8 | "include": ["./src/**/*"],
9 | "exclude": ["./node_modules/**/*", "./dist/**/*"]
10 | }
11 |
--------------------------------------------------------------------------------
/server/packages/sdk/.gitignore:
--------------------------------------------------------------------------------
1 | dist
2 |
--------------------------------------------------------------------------------
/server/packages/sdk/src/const.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * 系统用户id
3 | */
4 | export const SYSTEM_USERID = '000000000000000000000000';
5 |
6 | /**
7 | * 配置项
8 | */
9 | export const CONFIG_GATEWAY_AFTER_HOOK = '$gatewayAfterHooks';
10 |
--------------------------------------------------------------------------------
/server/packages/sdk/src/db/index.ts:
--------------------------------------------------------------------------------
1 | export * from './typegoose';
2 | export * from './mongoose';
3 |
--------------------------------------------------------------------------------
/server/packages/sdk/src/db/mongoose.ts:
--------------------------------------------------------------------------------
1 | export { Types, isValidObjectId } from 'mongoose';
2 |
--------------------------------------------------------------------------------
/server/packages/sdk/src/openapi/index.ts:
--------------------------------------------------------------------------------
1 | export { OAuthClient } from './oauth';
2 |
--------------------------------------------------------------------------------
/server/packages/sdk/src/runner/cli.ts:
--------------------------------------------------------------------------------
1 | import { Runner } from 'moleculer';
2 |
3 | const runner = new Runner();
4 | runner.start(process.argv);
5 |
--------------------------------------------------------------------------------
/server/packages/sdk/src/services/broker.ts:
--------------------------------------------------------------------------------
1 | import Moleculer from 'moleculer';
2 |
3 | /**
4 | * 用于不暴露moleculer让外部手动启动一个broker
5 | *
6 | * 如tailchat-cli
7 | */
8 | export class TcBroker extends Moleculer.ServiceBroker {}
9 |
--------------------------------------------------------------------------------
/server/packages/sdk/src/services/lib/moleculer-db-adapter-mongoose/README.md:
--------------------------------------------------------------------------------
1 | fork from `moleculer-db-adapter-mongoose`
2 |
--------------------------------------------------------------------------------
/server/packages/sdk/src/services/lib/moleculer-web/README.md:
--------------------------------------------------------------------------------
1 | Fork from https://github.com/moleculerjs/moleculer-web
2 |
3 | Hash: f375dbb4f8bff8aa16e95024e5c65463b626fa45
4 |
--------------------------------------------------------------------------------
/server/packages/sdk/src/structs/user.ts:
--------------------------------------------------------------------------------
1 | import type { UserBaseInfo, UserInfoWithToken, UserType } from 'tailchat-types';
2 | import { userType } from 'tailchat-types';
3 |
4 | export {
5 | userType,
6 | UserType,
7 | UserBaseInfo as UserStruct,
8 | UserInfoWithToken as UserStructWithToken,
9 | };
10 |
--------------------------------------------------------------------------------
/server/packages/swagger-jsdoc-generator/src/utils.ts:
--------------------------------------------------------------------------------
1 | import { MethodDeclaration, ParameterDeclaration, SyntaxKind } from 'ts-morph';
2 |
3 | /**
4 | * 获取函数参数列表
5 | */
6 | export function getMethodParameters(
7 | methodDeclaration: MethodDeclaration
8 | ): ParameterDeclaration[] {
9 | return methodDeclaration.getChildrenOfKind(SyntaxKind.Parameter);
10 | }
11 |
--------------------------------------------------------------------------------
/server/packages/swagger-jsdoc-generator/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "compilerOptions": {
4 | "declaration": true,
5 | "rootDir": "./src",
6 | "outDir": "./dist",
7 | "typeRoots": ["./node_modules/@types"],
8 | },
9 | "include": ["./src/**/*"],
10 | "exclude": ["./node_modules/**/*", "./dist/**/*"]
11 | }
12 |
--------------------------------------------------------------------------------
/server/plugins/com.msgbyte.agora/services/utils/README.md:
--------------------------------------------------------------------------------
1 | Copy from https://github.com/AgoraIO/Tools/tree/master/DynamicKey/AgoraDynamicKey/nodejs
2 |
--------------------------------------------------------------------------------
/server/plugins/com.msgbyte.agora/web/plugins/com.msgbyte.agora/assets/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/msgbyte/tailchat/5a21d630e508c12f2474af28854b54fe06d5ac49/server/plugins/com.msgbyte.agora/web/plugins/com.msgbyte.agora/assets/icon.png
--------------------------------------------------------------------------------
/server/plugins/com.msgbyte.agora/web/plugins/com.msgbyte.agora/src/request.ts:
--------------------------------------------------------------------------------
1 | import { createPluginRequest } from '@capital/common';
2 |
3 | export const request = createPluginRequest('com.msgbyte.agora');
4 |
--------------------------------------------------------------------------------
/server/plugins/com.msgbyte.agora/web/plugins/com.msgbyte.agora/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "esModuleInterop": true,
4 | "jsx": "react",
5 | "importsNotUsedAsValues": "error"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/server/plugins/com.msgbyte.discover/web/plugins/com.msgbyte.discover/src/request.ts:
--------------------------------------------------------------------------------
1 | import { createPluginRequest } from '@capital/common';
2 |
3 | export const request = createPluginRequest('com.msgbyte.discover');
4 |
--------------------------------------------------------------------------------
/server/plugins/com.msgbyte.discover/web/plugins/com.msgbyte.discover/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "esModuleInterop": true,
4 | "jsx": "react",
5 | "importsNotUsedAsValues": "error"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/server/plugins/com.msgbyte.discover/web/plugins/com.msgbyte.discover/types/tailchat.d.ts:
--------------------------------------------------------------------------------
1 | declare module '@capital/common';
2 | declare module '@capital/component';
3 |
--------------------------------------------------------------------------------
/server/plugins/com.msgbyte.github/.ministarrc.js:
--------------------------------------------------------------------------------
1 | const path = require('path');
2 |
3 | module.exports = {
4 | externalDeps: ['react', 'react-router'],
5 | pluginRoot: path.resolve(__dirname, './web'),
6 | outDir: path.resolve(__dirname, '../../public'),
7 | };
8 |
--------------------------------------------------------------------------------
/server/plugins/com.msgbyte.github/web/plugins/com.msgbyte.github/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@plugins/com.msgbyte.github",
3 | "main": "src/index.tsx",
4 | "version": "0.0.0",
5 | "private": true,
6 | "dependencies": {}
7 | }
8 |
--------------------------------------------------------------------------------
/server/plugins/com.msgbyte.github/web/plugins/com.msgbyte.github/src/request.ts:
--------------------------------------------------------------------------------
1 | import { createPluginRequest } from '@capital/common';
2 |
3 | export const request = createPluginRequest('com.msgbyte.github');
4 |
--------------------------------------------------------------------------------
/server/plugins/com.msgbyte.github/web/plugins/com.msgbyte.github/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "esModuleInterop": true,
4 | "jsx": "react",
5 | "importsNotUsedAsValues": "error"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/server/plugins/com.msgbyte.iam/strategies/index.ts:
--------------------------------------------------------------------------------
1 | import { GithubStrategy } from './github';
2 |
3 | export const strategies = [GithubStrategy];
4 |
--------------------------------------------------------------------------------
/server/plugins/com.msgbyte.iam/web/plugins/com.msgbyte.iam/src/index.tsx:
--------------------------------------------------------------------------------
1 | import { regLoginAction } from '@capital/common';
2 | import { IAMAction } from './IAMAction';
3 |
4 | console.log('Plugin Identity and Access Management is loaded');
5 |
6 | regLoginAction({
7 | name: 'plugin:com.msgbyte.iam/loginAction',
8 | component: IAMAction,
9 | });
10 |
--------------------------------------------------------------------------------
/server/plugins/com.msgbyte.iam/web/plugins/com.msgbyte.iam/src/request.ts:
--------------------------------------------------------------------------------
1 | import { createPluginRequest } from '@capital/common';
2 |
3 | export const request = createPluginRequest('com.msgbyte.iam');
4 |
--------------------------------------------------------------------------------
/server/plugins/com.msgbyte.iam/web/plugins/com.msgbyte.iam/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "esModuleInterop": true,
4 | "jsx": "react",
5 | "importsNotUsedAsValues": "error"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/server/plugins/com.msgbyte.iam/web/plugins/com.msgbyte.iam/types/tailchat.d.ts:
--------------------------------------------------------------------------------
1 | declare module '@capital/common';
2 | declare module '@capital/component';
3 |
--------------------------------------------------------------------------------
/server/plugins/com.msgbyte.linkmeta/.ministarrc.js:
--------------------------------------------------------------------------------
1 | const path = require('path');
2 |
3 | module.exports = {
4 | externalDeps: ['react'],
5 | pluginRoot: path.resolve(__dirname, './web'),
6 | outDir: path.resolve(__dirname, '../../public'),
7 | };
8 |
--------------------------------------------------------------------------------
/server/plugins/com.msgbyte.linkmeta/web/plugins/com.msgbyte.linkmeta/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@plugins/com.msgbyte.linkmeta",
3 | "main": "src/index.tsx",
4 | "version": "0.0.0",
5 | "private": true,
6 | "dependencies": {
7 | "lodash-es": "^4.17.21",
8 | "url-regex": "^5.0.0"
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/server/plugins/com.msgbyte.linkmeta/web/plugins/com.msgbyte.linkmeta/src/request.ts:
--------------------------------------------------------------------------------
1 | import { createPluginRequest } from '@capital/common';
2 |
3 | export const request = createPluginRequest('com.msgbyte.linkmeta');
4 |
--------------------------------------------------------------------------------
/server/plugins/com.msgbyte.linkmeta/web/plugins/com.msgbyte.linkmeta/src/translate.ts:
--------------------------------------------------------------------------------
1 | import { localTrans } from '@capital/common';
2 |
3 | export const Translate = {
4 | linkmetaService: localTrans({
5 | 'zh-CN': 'Url元数据服务',
6 | 'en-US': 'Link Meta Service',
7 | }),
8 | };
9 |
--------------------------------------------------------------------------------
/server/plugins/com.msgbyte.linkmeta/web/plugins/com.msgbyte.linkmeta/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "esModuleInterop": true,
4 | "jsx": "react",
5 | "importsNotUsedAsValues": "error"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/server/plugins/com.msgbyte.linkmeta/web/plugins/com.msgbyte.linkmeta/types/tailchat.d.ts:
--------------------------------------------------------------------------------
1 | declare module '@capital/common';
2 | declare module '@capital/component';
3 |
--------------------------------------------------------------------------------
/server/plugins/com.msgbyte.livekit/web/plugins/com.msgbyte.livekit/assets/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/msgbyte/tailchat/5a21d630e508c12f2474af28854b54fe06d5ac49/server/plugins/com.msgbyte.livekit/web/plugins/com.msgbyte.livekit/assets/icon.png
--------------------------------------------------------------------------------
/server/plugins/com.msgbyte.livekit/web/plugins/com.msgbyte.livekit/src/consts.ts:
--------------------------------------------------------------------------------
1 | export const PLUGIN_ID = 'com.msgbyte.livekit';
2 |
--------------------------------------------------------------------------------
/server/plugins/com.msgbyte.livekit/web/plugins/com.msgbyte.livekit/src/navbar/useIconIsShow.ts:
--------------------------------------------------------------------------------
1 | import { useLivekitState } from '../store/useLivekitState';
2 |
3 | export function useIconIsShow() {
4 | return useLivekitState().isActive;
5 | }
6 |
7 | export function usePersionPanelIsShow() {
8 | return useLivekitState().isActive;
9 | }
10 |
--------------------------------------------------------------------------------
/server/plugins/com.msgbyte.livekit/web/plugins/com.msgbyte.livekit/src/request.ts:
--------------------------------------------------------------------------------
1 | import { createPluginRequest } from '@capital/common';
2 |
3 | export const request = createPluginRequest('com.msgbyte.livekit');
4 |
--------------------------------------------------------------------------------
/server/plugins/com.msgbyte.livekit/web/plugins/com.msgbyte.livekit/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "esModuleInterop": true,
4 | "jsx": "react",
5 | "importsNotUsedAsValues": "error"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/server/plugins/com.msgbyte.livekit/webhook/README.md:
--------------------------------------------------------------------------------
1 | ## Receive webhook from livekit and send to `livekit.service.js`;
2 |
--------------------------------------------------------------------------------
/server/plugins/com.msgbyte.meeting/.ministarrc.js:
--------------------------------------------------------------------------------
1 | const path = require('path');
2 | const nodePolyfills = require('rollup-plugin-polyfill-node')
3 |
4 | module.exports = {
5 | externalDeps: ['react', 'react-router'],
6 | pluginRoot: path.resolve(__dirname, './web'),
7 | outDir: path.resolve(__dirname, '../../public'),
8 | rollupPlugins: [nodePolyfills()]
9 | };
10 |
--------------------------------------------------------------------------------
/server/plugins/com.msgbyte.meeting/deprecated.md:
--------------------------------------------------------------------------------
1 | Please use `com.msgbyte.livekit` to replace
2 |
--------------------------------------------------------------------------------
/server/plugins/com.msgbyte.meeting/web/plugins/com.msgbyte.meeting/src/request.ts:
--------------------------------------------------------------------------------
1 | import { createPluginRequest } from '@capital/common';
2 |
3 | export const request = createPluginRequest('com.msgbyte.meeting');
4 |
--------------------------------------------------------------------------------
/server/plugins/com.msgbyte.meeting/web/plugins/com.msgbyte.meeting/src/translate.ts:
--------------------------------------------------------------------------------
1 | import { localTrans } from '@capital/common';
2 |
3 | export const Translate = {
4 | meeting: localTrans({ 'zh-CN': '视频会议', 'en-US': 'Meeting' }),
5 | meetingService: localTrans({
6 | 'zh-CN': '视频会议服务',
7 | 'en-US': 'Meeting Service',
8 | }),
9 | };
10 |
--------------------------------------------------------------------------------
/server/plugins/com.msgbyte.meeting/web/plugins/com.msgbyte.meeting/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "esModuleInterop": true,
4 | "jsx": "react",
5 | "importsNotUsedAsValues": "error"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/server/plugins/com.msgbyte.simplenotify/.ministarrc.js:
--------------------------------------------------------------------------------
1 | const path = require('path');
2 |
3 | module.exports = {
4 | externalDeps: ['react'],
5 | pluginRoot: path.resolve(__dirname, './web'),
6 | outDir: path.resolve(__dirname, '../../public'),
7 | };
8 |
--------------------------------------------------------------------------------
/server/plugins/com.msgbyte.simplenotify/web/plugins/com.msgbyte.simplenotify/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@plugins/com.msgbyte.simplenotify",
3 | "main": "src/index.tsx",
4 | "version": "0.0.0",
5 | "private": true,
6 | "devDependencies": {
7 | "@types/react": "18.0.20",
8 | "react": "18.2.0"
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/server/plugins/com.msgbyte.simplenotify/web/plugins/com.msgbyte.simplenotify/src/request.ts:
--------------------------------------------------------------------------------
1 | import { createPluginRequest } from '@capital/common';
2 |
3 | export const request = createPluginRequest('com.msgbyte.simplenotify');
4 |
--------------------------------------------------------------------------------
/server/plugins/com.msgbyte.simplenotify/web/plugins/com.msgbyte.simplenotify/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "esModuleInterop": true,
4 | "jsx": "react",
5 | "importsNotUsedAsValues": "error"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/server/plugins/com.msgbyte.tasks/.ministarrc.js:
--------------------------------------------------------------------------------
1 | const path = require('path');
2 |
3 | module.exports = {
4 | externalDeps: ['react'],
5 | pluginRoot: path.resolve(__dirname, './web'),
6 | outDir: path.resolve(__dirname, '../../public'),
7 | };
8 |
--------------------------------------------------------------------------------
/server/plugins/com.msgbyte.tasks/web/plugins/com.msgbyte.tasks/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@plugins/com.msgbyte.tasks",
3 | "main": "src/index.tsx",
4 | "version": "0.0.0",
5 | "private": true,
6 | "dependencies": {}
7 | }
8 |
--------------------------------------------------------------------------------
/server/plugins/com.msgbyte.tasks/web/plugins/com.msgbyte.tasks/src/TasksPanel/type.ts:
--------------------------------------------------------------------------------
1 | export interface TaskItemType {
2 | _id: string;
3 | creator: string;
4 | assignee?: string[];
5 | title: string;
6 | description?: string;
7 | done: boolean;
8 | expiredAt?: string;
9 | }
10 |
--------------------------------------------------------------------------------
/server/plugins/com.msgbyte.tasks/web/plugins/com.msgbyte.tasks/src/request.ts:
--------------------------------------------------------------------------------
1 | import { createPluginRequest } from '@capital/common';
2 |
3 | export const request = createPluginRequest('com.msgbyte.tasks');
4 |
--------------------------------------------------------------------------------
/server/plugins/com.msgbyte.tasks/web/plugins/com.msgbyte.tasks/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "esModuleInterop": true,
4 | "jsx": "react",
5 | "importsNotUsedAsValues": "error"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/server/plugins/com.msgbyte.tasks/web/plugins/com.msgbyte.tasks/types/tailchat.d.ts:
--------------------------------------------------------------------------------
1 | declare module '@capital/common';
2 | declare module '@capital/component';
3 |
--------------------------------------------------------------------------------
/server/plugins/com.msgbyte.topic/.ministarrc.js:
--------------------------------------------------------------------------------
1 | const path = require('path');
2 |
3 | module.exports = {
4 | externalDeps: [
5 | 'react',
6 | 'styled-components',
7 | 'zustand',
8 | 'zustand/middleware/immer',
9 | ],
10 | pluginRoot: path.resolve(__dirname, './web'),
11 | outDir: path.resolve(__dirname, '../../public'),
12 | };
13 |
--------------------------------------------------------------------------------
/server/plugins/com.msgbyte.topic/web/plugins/com.msgbyte.topic/src/request.ts:
--------------------------------------------------------------------------------
1 | import { createPluginRequest } from '@capital/common';
2 |
3 | export const request = createPluginRequest('com.msgbyte.topic');
4 |
--------------------------------------------------------------------------------
/server/plugins/com.msgbyte.topic/web/plugins/com.msgbyte.topic/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "esModuleInterop": true,
4 | "jsx": "react",
5 | "importsNotUsedAsValues": "error"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/server/plugins/com.msgbyte.welcome/web/plugins/com.msgbyte.welcome/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "esModuleInterop": true,
4 | "jsx": "react",
5 | "importsNotUsedAsValues": "error"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/server/plugins/com.msgbyte.wxpusher/web/plugins/com.msgbyte.wxpusher/assets/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/msgbyte/tailchat/5a21d630e508c12f2474af28854b54fe06d5ac49/server/plugins/com.msgbyte.wxpusher/web/plugins/com.msgbyte.wxpusher/assets/icon.png
--------------------------------------------------------------------------------
/server/plugins/com.msgbyte.wxpusher/web/plugins/com.msgbyte.wxpusher/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "esModuleInterop": true,
4 | "jsx": "react",
5 | "importsNotUsedAsValues": "error"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/server/public/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/msgbyte/tailchat/5a21d630e508c12f2474af28854b54fe06d5ac49/server/public/.gitkeep
--------------------------------------------------------------------------------
/server/runner.ts:
--------------------------------------------------------------------------------
1 | import path from 'path';
2 | import { startDevRunner } from 'tailchat-server-sdk/dist/runner';
3 |
4 | startDevRunner({
5 | config: path.resolve(__dirname, './moleculer.config.ts'),
6 | });
7 |
--------------------------------------------------------------------------------
/server/scripts/k8s/README.md:
--------------------------------------------------------------------------------
1 | WIP Warning!
2 |
3 | 正在施工中!
4 |
--------------------------------------------------------------------------------
/server/scripts/k8s/kompose/data-persistentvolumeclaim.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: PersistentVolumeClaim
3 | metadata:
4 | labels:
5 | io.kompose.service: data
6 | name: data
7 | spec:
8 | accessModes:
9 | - ReadWriteOnce
10 | resources:
11 | requests:
12 | storage: 100Mi
13 | status: {}
14 |
--------------------------------------------------------------------------------
/server/scripts/k8s/kompose/default-networkpolicy.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: networking.k8s.io/v1
2 | kind: NetworkPolicy
3 | metadata:
4 | name: default
5 | spec:
6 | ingress:
7 | - from:
8 | - podSelector:
9 | matchLabels:
10 | io.kompose.network/default: "true"
11 | podSelector:
12 | matchLabels:
13 | io.kompose.network/default: "true"
14 |
--------------------------------------------------------------------------------
/server/scripts/k8s/kompose/storage-persistentvolumeclaim.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: PersistentVolumeClaim
3 | metadata:
4 | labels:
5 | io.kompose.service: storage
6 | name: storage
7 | spec:
8 | accessModes:
9 | - ReadWriteOnce
10 | resources:
11 | requests:
12 | storage: 100Mi
13 | status: {}
14 |
--------------------------------------------------------------------------------
/server/scripts/k8s/kompose/traefik-claim0-persistentvolumeclaim.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: PersistentVolumeClaim
3 | metadata:
4 | labels:
5 | io.kompose.service: traefik-claim0
6 | name: traefik-claim0
7 | spec:
8 | accessModes:
9 | - ReadOnlyMany
10 | resources:
11 | requests:
12 | storage: 100Mi
13 | status: {}
14 |
--------------------------------------------------------------------------------
/server/services/README.md:
--------------------------------------------------------------------------------
1 | ## 简述
2 |
3 | 每个`.service.ts`文件都是一个微服务
4 |
5 | 应当确保尽量不要出现一个单独的微服务承载太重的业务,而应当考虑多拆分到不同的微任务中。
6 |
--------------------------------------------------------------------------------
/server/services/openapi/oidc/account.ts:
--------------------------------------------------------------------------------
1 | import { User } from './model';
2 |
3 | export async function claimUserInfo(userId: string) {
4 | const baseUserInfo = await User.getUserBaseInfo(userId);
5 |
6 | return {
7 | ...baseUserInfo,
8 | sub: userId,
9 | };
10 | }
11 |
--------------------------------------------------------------------------------
/server/services/openapi/oidc/model.ts:
--------------------------------------------------------------------------------
1 | import { mongoose } from '@typegoose/typegoose';
2 | import { config } from 'tailchat-server-sdk';
3 | import OpenApp from '../../../models/openapi/app';
4 | import User from '../../../models/user/user';
5 |
6 | mongoose.connect(config.mongoUrl);
7 |
8 | export { OpenApp, User };
9 |
--------------------------------------------------------------------------------
/server/services/openapi/oidc/views/_footer.ejs:
--------------------------------------------------------------------------------
1 |
2 |