mirror of
https://github.com/thelounge/thelounge
synced 2024-11-10 14:44:13 +00:00
mention
This commit is contained in:
parent
d0b71aba32
commit
d716402da2
3 changed files with 18 additions and 16 deletions
10
client/js/types.d.ts
vendored
10
client/js/types.d.ts
vendored
|
@ -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;
|
||||
};
|
||||
|
|
|
@ -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
10
shared/types/mention.ts
Normal 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;
|
||||
};
|
Loading…
Reference in a new issue