summaryrefslogtreecommitdiff
path: root/packages/client/src
diff options
context:
space:
mode:
authorfutchitwo <74236683+futchitwo@users.noreply.github.com>2022-05-29 19:21:36 +0900
committerGitHub <noreply@github.com>2022-05-29 12:21:36 +0200
commitd2784030ec898e0b4e391f2eb840646f72cd7d6b (patch)
tree2d6dd8c205cef0bf6b6162a499031c38661680ef /packages/client/src
parentrefactor: improve code quality (#8751) (diff)
downloadsharkey-d2784030ec898e0b4e391f2eb840646f72cd7d6b.tar.gz
sharkey-d2784030ec898e0b4e391f2eb840646f72cd7d6b.tar.bz2
sharkey-d2784030ec898e0b4e391f2eb840646f72cd7d6b.zip
fix(client): fix popout url (#8494)
Diffstat (limited to 'packages/client/src')
-rw-r--r--packages/client/src/pages/theme-editor.vue2
-rw-r--r--packages/client/src/scripts/popout.ts5
2 files changed, 4 insertions, 3 deletions
diff --git a/packages/client/src/pages/theme-editor.vue b/packages/client/src/pages/theme-editor.vue
index 2ee530597c..b7b537cead 100644
--- a/packages/client/src/pages/theme-editor.vue
+++ b/packages/client/src/pages/theme-editor.vue
@@ -126,7 +126,7 @@ let changed = $ref(false);
useLeaveGuard($$(changed));
function showPreview() {
- os.pageWindow('preview');
+ os.pageWindow('/preview');
}
function setBgColor(color: typeof bgColors[number]) {
diff --git a/packages/client/src/scripts/popout.ts b/packages/client/src/scripts/popout.ts
index b8286a2a76..580031d0a3 100644
--- a/packages/client/src/scripts/popout.ts
+++ b/packages/client/src/scripts/popout.ts
@@ -1,8 +1,9 @@
import * as config from '@/config';
+import { appendQuery } from './url';
export function popout(path: string, w?: HTMLElement) {
- let url = path.startsWith('http://') || path.startsWith('https://') ? path : config.url + "/" + path;
- url += '?zen';
+ let url = path.startsWith('http://') || path.startsWith('https://') ? path : config.url + path;
+ url = appendQuery(url, 'zen');
if (w) {
const position = w.getBoundingClientRect();
const width = parseInt(getComputedStyle(w, '').width, 10);