This commit is contained in:
Reto Brunner 2024-02-24 13:28:55 +01:00
parent d0b71aba32
commit d716402da2
3 changed files with 18 additions and 16 deletions

10
client/js/types.d.ts vendored
View file

@ -1,10 +1,10 @@
import {defineComponent} from "vue";
import Network from "../../server/models/network";
import SharedMessage from "../../shared/types/msg";
import SharedChan from "../../shared/types/chan";
import SharedUser from "../../shared/models/user";
import {Mention} from "../../server/client";
import {SharedMessage} from "../../shared/types/msg";
import {SharedChan} from "../../shared/types/chan";
import {SharedUser} from "../../shared/models/user";
import {SharedMention} from "../../shared/models/mention";
import {ClientConfiguration} from "../../server/server";
import {LinkPreview} from "../../server/plugins/irc-events/link";
@ -58,7 +58,7 @@ type NetChan = {
};
type ClientConfiguration = ClientConfiguration;
type ClientMention = Mention & {
type ClientMention = SharedMention & {
localetime: string;
channel: NetChan | null;
};

View file

@ -10,7 +10,8 @@ import Chan, {ChanConfig} from "./models/chan";
import Msg from "./models/msg";
import Config from "./config";
import {condensedTypes} from "../shared/irc";
import {MessageType, UserInMessage} from "../shared/types/msg";
import {MessageType} from "../shared/types/msg";
import {SharedMention} from "../shared/types/mention";
import inputs from "./plugins/inputs";
import PublicClient from "./plugins/packages/publicClient";
@ -85,15 +86,6 @@ export type UserConfig = {
networks?: NetworkConfig[];
};
export type Mention = {
chanId: number;
msgId: number;
type: MessageType;
time: Date;
text: string;
from: UserInMessage;
};
class Client {
awayMessage!: string;
lastActiveChannel!: number;
@ -106,7 +98,7 @@ class Client {
idChan!: number;
name!: string;
networks!: Network[];
mentions!: Mention[];
mentions!: SharedMention[];
manager!: ClientManager;
messageStorage!: MessageStorage[];
highlightRegex!: RegExp | null;

10
shared/types/mention.ts Normal file
View file

@ -0,0 +1,10 @@
import {MessageType, UserInMessage} from "./msg";
export type SharedMention = {
chanId: number;
msgId: number;
type: MessageType;
time: Date;
text: string;
from: UserInMessage;
};