mirror of
https://github.com/thelounge/thelounge
synced 2025-02-16 13:18:24 +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 {defineComponent} from "vue";
|
||||||
|
|
||||||
import Network from "../../server/models/network";
|
import Network from "../../server/models/network";
|
||||||
import SharedMessage from "../../shared/types/msg";
|
import {SharedMessage} from "../../shared/types/msg";
|
||||||
import SharedChan from "../../shared/types/chan";
|
import {SharedChan} from "../../shared/types/chan";
|
||||||
import SharedUser from "../../shared/models/user";
|
import {SharedUser} from "../../shared/models/user";
|
||||||
import {Mention} from "../../server/client";
|
import {SharedMention} from "../../shared/models/mention";
|
||||||
import {ClientConfiguration} from "../../server/server";
|
import {ClientConfiguration} from "../../server/server";
|
||||||
import {LinkPreview} from "../../server/plugins/irc-events/link";
|
import {LinkPreview} from "../../server/plugins/irc-events/link";
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ type NetChan = {
|
||||||
};
|
};
|
||||||
|
|
||||||
type ClientConfiguration = ClientConfiguration;
|
type ClientConfiguration = ClientConfiguration;
|
||||||
type ClientMention = Mention & {
|
type ClientMention = SharedMention & {
|
||||||
localetime: string;
|
localetime: string;
|
||||||
channel: NetChan | null;
|
channel: NetChan | null;
|
||||||
};
|
};
|
||||||
|
|
|
@ -10,7 +10,8 @@ import Chan, {ChanConfig} from "./models/chan";
|
||||||
import Msg from "./models/msg";
|
import Msg from "./models/msg";
|
||||||
import Config from "./config";
|
import Config from "./config";
|
||||||
import {condensedTypes} from "../shared/irc";
|
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 inputs from "./plugins/inputs";
|
||||||
import PublicClient from "./plugins/packages/publicClient";
|
import PublicClient from "./plugins/packages/publicClient";
|
||||||
|
@ -85,15 +86,6 @@ export type UserConfig = {
|
||||||
networks?: NetworkConfig[];
|
networks?: NetworkConfig[];
|
||||||
};
|
};
|
||||||
|
|
||||||
export type Mention = {
|
|
||||||
chanId: number;
|
|
||||||
msgId: number;
|
|
||||||
type: MessageType;
|
|
||||||
time: Date;
|
|
||||||
text: string;
|
|
||||||
from: UserInMessage;
|
|
||||||
};
|
|
||||||
|
|
||||||
class Client {
|
class Client {
|
||||||
awayMessage!: string;
|
awayMessage!: string;
|
||||||
lastActiveChannel!: number;
|
lastActiveChannel!: number;
|
||||||
|
@ -106,7 +98,7 @@ class Client {
|
||||||
idChan!: number;
|
idChan!: number;
|
||||||
name!: string;
|
name!: string;
|
||||||
networks!: Network[];
|
networks!: Network[];
|
||||||
mentions!: Mention[];
|
mentions!: SharedMention[];
|
||||||
manager!: ClientManager;
|
manager!: ClientManager;
|
||||||
messageStorage!: MessageStorage[];
|
messageStorage!: MessageStorage[];
|
||||||
highlightRegex!: RegExp | null;
|
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…
Add table
Reference in a new issue