Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
coddmeistr committed Feb 12, 2025
2 parents 84d5318 + a37f054 commit 0a0481b
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 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
4 changes: 2 additions & 2 deletions admin-ui/src/components/instance/controls.vue
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,8 @@ export default {
},
resources:
this.type === "opensrs"
? { ...this.copyTemplate.billingPlan.resources }
: [...this.copyTemplate.billingPlan.resources],
? { ...(this.copyTemplate.billingPlan.resources || []) }
: [...(this.copyTemplate.billingPlan.resources || [])],
title,
};
Expand Down

0 comments on commit 0a0481b

Please sign in to comment.