Skip to content

Commit

Permalink
Merge pull request #2000 from slntopp/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
SazukinPavel authored Feb 12, 2025
2 parents d480a25 + a37f054 commit 195f5c1
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions admin-ui/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,8 @@

<v-list-item
v-bind="listItemBind"
:to="{ name: 'Chats' }"
@click="chatClick"
@click.ctrl.prevent="openChatsInNewWindow"
@click.exact="chatClick"
>
<v-list-item-icon>
<v-icon
Expand Down Expand Up @@ -457,6 +457,7 @@ import instancesTableModal from "@/components/instances_table_modal.vue";
import Themes from "@/components/header/themes.vue";
import userMenu from "@/components/header/userMenu.vue";
import notifications from "@/components/header/notifications.vue";
import { Buffer } from "buffer";
export default {
name: "App",
Expand Down Expand Up @@ -544,6 +545,25 @@ export default {
},
chatClick() {
this.$store.commit("app/setChatClicks", 1);
this.$router.push({ name: "Chats" });
},
openChatsInNewWindow() {
const { title } = this.$store.getters["auth/userdata"];
const { token } = this.$store.state.auth;
const fullParams = JSON.stringify({
title,
token,
api: location.host,
theme: this.theme,
fullscreen: this.$route.query["fullscreen"] === "true",
});
return window.open(
`/cc.ui/?a=${Buffer.from(
unescape(encodeURIComponent(fullParams))
).toString("base64")}`,
"_blanc"
);
},
toggleFullscreen() {
this.$router.push({
Expand Down

0 comments on commit 195f5c1

Please sign in to comment.