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