mirror of
https://github.com/thelounge/thelounge
synced 2024-11-10 14:44:13 +00:00
further chan fixes
This commit is contained in:
parent
3217536245
commit
e57e547b74
9 changed files with 25 additions and 13 deletions
4
client/js/types.d.ts
vendored
4
client/js/types.d.ts
vendored
|
@ -2,10 +2,10 @@ import {defineComponent} from "vue";
|
|||
|
||||
import {SharedChan} from "../../shared/types/chan";
|
||||
import {SharedNetwork} from "../../shared/types/network";
|
||||
import {SharedUser} from "../../shared/models/user";
|
||||
import {SharedUser} from "../../shared/types/user";
|
||||
import {SharedMention} from "../../shared/models/mention";
|
||||
import {SharedConfiguration, LockedSharedConfiguration} from "../../shared/types/config";
|
||||
import {LinkPreview} from "../../server/plugins/irc-events/link";
|
||||
import {LinkPreview} from "../../shared/types/msg";
|
||||
|
||||
interface LoungeWindow extends Window {
|
||||
g_TheLoungeRemoveLoading?: () => void;
|
||||
|
|
|
@ -133,6 +133,7 @@ const input: PluginInputHandler = function (network, chan, cmd, args) {
|
|||
client.emit("join", {
|
||||
network: network.uuid,
|
||||
chan: newChan.getFilteredClone(true),
|
||||
shouldOpen: false,
|
||||
index: network.addChannel(newChan),
|
||||
});
|
||||
} else {
|
||||
|
|
|
@ -19,6 +19,7 @@ export default <IrcEventHandler>function (irc, network) {
|
|||
client.emit("join", {
|
||||
network: network.uuid,
|
||||
chan: chan.getFilteredClone(true),
|
||||
shouldOpen: false,
|
||||
index: network.addChannel(chan),
|
||||
});
|
||||
client.save();
|
||||
|
|
|
@ -51,6 +51,7 @@ export default <IrcEventHandler>function (irc, network) {
|
|||
client.emit("join", {
|
||||
network: network.uuid,
|
||||
chan: chan.getFilteredClone(true),
|
||||
shouldOpen: false,
|
||||
index: network.addChannel(chan),
|
||||
});
|
||||
} else {
|
||||
|
|
|
@ -107,6 +107,7 @@ export default <IrcEventHandler>function (irc, network) {
|
|||
client.emit("join", {
|
||||
network: network.uuid,
|
||||
chan: chan.getFilteredClone(true),
|
||||
shouldOpen: false,
|
||||
index: network.addChannel(chan),
|
||||
});
|
||||
client.save();
|
||||
|
|
|
@ -69,6 +69,7 @@ export default <IrcEventHandler>function (irc, network) {
|
|||
client.emit("join", {
|
||||
network: network.uuid,
|
||||
chan: chan.getFilteredClone(true),
|
||||
shouldOpen: false,
|
||||
index: network.addChannel(chan),
|
||||
});
|
||||
} else {
|
||||
|
|
|
@ -29,9 +29,9 @@ export default <IrcEventHandler>function (irc, network) {
|
|||
});
|
||||
|
||||
client.emit("join", {
|
||||
shouldOpen: true,
|
||||
network: network.uuid,
|
||||
chan: chan.getFilteredClone(true),
|
||||
shouldOpen: true,
|
||||
index: network.addChannel(chan),
|
||||
});
|
||||
chan.loadMessages(client, network);
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import {SharedMsg} from "./msg";
|
||||
import {SharedUser} from "./user";
|
||||
import {SharedNetworkChan} from "./network";
|
||||
|
||||
export enum ChanType {
|
||||
CHANNEL = "channel",
|
||||
|
@ -41,3 +42,10 @@ export type SharedChan = {
|
|||
closed?: boolean;
|
||||
num_users?: number;
|
||||
};
|
||||
|
||||
export type InitClientChan = {
|
||||
network: string;
|
||||
chan: SharedNetworkChan;
|
||||
shouldOpen: boolean;
|
||||
index: number;
|
||||
};
|
||||
|
|
19
shared/types/socket-events.d.ts
vendored
19
shared/types/socket-events.d.ts
vendored
|
@ -1,11 +1,10 @@
|
|||
import {ClientNetwork, InitClientChan} from "../../client/js/types";
|
||||
import {SharedMention} from "../../shared/types/mention";
|
||||
import {ChanState} from "../../shared/types/chan";
|
||||
import {SharedMsg, ClientMessage} from "../../shared/types/msg";
|
||||
import {SharedUser} from "../../shared/types/user";
|
||||
import {SharedChangelogData} from "../../shared/types/changelog";
|
||||
import {LinkPreview} from "../plugins/irc-events/link";
|
||||
import {SharedConfiguration, LockedSharedConfiguration} from "../../shared/types/config";
|
||||
import {SharedMention} from "./mention";
|
||||
import {ChanState, InitClientChan} from "./chan";
|
||||
import {SharedNetwork} from "./network";
|
||||
import {SharedMsg, ClientMessage, LinkPreview} from "./msg";
|
||||
import {SharedUser} from "./user";
|
||||
import {SharedChangelogData} from "./changelog";
|
||||
import {SharedConfiguration, LockedSharedConfiguration} from "./config";
|
||||
|
||||
type Session = {
|
||||
current: boolean;
|
||||
|
@ -50,7 +49,7 @@ interface ServerToClientEvents {
|
|||
|
||||
names: (data: {id: number; users: SharedUser[]}) => void;
|
||||
|
||||
network: (data: {networks: ClientNetwork[]}) => void;
|
||||
network: (data: {networks: SharedNetwork[]}) => void;
|
||||
"network:options": (data: {network: string; serverOptions: {[key: string]: any}}) => void;
|
||||
"network:status": (data: {network: string; connected: boolean; secure: boolean}) => void;
|
||||
"network:info": (data: {uuid: string}) => void;
|
||||
|
@ -102,7 +101,7 @@ interface ServerToClientEvents {
|
|||
token,
|
||||
}: {
|
||||
active: number;
|
||||
networks: ClientNetwork[];
|
||||
networks: SharedNetwork[];
|
||||
token: string;
|
||||
}) => void;
|
||||
|
||||
|
|
Loading…
Reference in a new issue