mirror of
https://github.com/thelounge/thelounge.git
synced 2024-06-02 05:42:20 +02:00
sqlite logging
This commit is contained in:
parent
8772f286fe
commit
a804b7cb2a
|
@ -123,7 +123,7 @@ router.beforeEach((to, from, next) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Disallow navigating to invalid networks
|
// Disallow navigating to invalid networks
|
||||||
if (to.name === "NetworkEdit" && !store.getters.findNetwork(to.params.uuid)) {
|
if (to.name === "NetworkEdit" && !store.getters.findNetwork(String(to.params.uuid))) {
|
||||||
next(false);
|
next(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -156,7 +156,7 @@ router.afterEach((to) => {
|
||||||
const channel = store.state.activeChannel.channel;
|
const channel = store.state.activeChannel.channel;
|
||||||
|
|
||||||
if (to.name !== "RoutedChat") {
|
if (to.name !== "RoutedChat") {
|
||||||
store.commit("activeChannel", null);
|
store.commit("activeChannel", undefined);
|
||||||
}
|
}
|
||||||
|
|
||||||
// When switching out of a channel, mark everything as read
|
// When switching out of a channel, mark everything as read
|
||||||
|
|
|
@ -48,6 +48,9 @@ class SqliteMessageStorage implements ISqliteMessageStorage {
|
||||||
const logsPath = Config.getUserLogsPath();
|
const logsPath = Config.getUserLogsPath();
|
||||||
const sqlitePath = path.join(logsPath, `${this.client.name}.sqlite3`);
|
const sqlitePath = path.join(logsPath, `${this.client.name}.sqlite3`);
|
||||||
|
|
||||||
|
log.info("Logs path", logsPath);
|
||||||
|
log.info("Sqlite path", sqlitePath);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
fs.mkdirSync(logsPath, {recursive: true});
|
fs.mkdirSync(logsPath, {recursive: true});
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
|
|
Loading…
Reference in a new issue