From 31174d6b79441c87d307eb154585ce2ce64d063d Mon Sep 17 00:00:00 2001
From: atsuchan <83960488+atsu1125@users.noreply.github.com>
Date: Mon, 13 Nov 2023 13:31:18 +0900
Subject: [PATCH 1/2] Fix(frontend): role users/timeline visiable ui (#12305)
---
packages/frontend/src/pages/role.vue | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/packages/frontend/src/pages/role.vue b/packages/frontend/src/pages/role.vue
index b2a0a931f9..c968850444 100644
--- a/packages/frontend/src/pages/role.vue
+++ b/packages/frontend/src/pages/role.vue
@@ -18,11 +18,19 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ role.description }}
-
+
+
+
![]()
+
{{ i18n.ts.nothing }}
+
-
+
+
+
![]()
+
{{ i18n.ts.nothing }}
+
@@ -35,7 +43,7 @@ import { definePageMetadata } from '@/scripts/page-metadata.js';
import { i18n } from '@/i18n.js';
import MkTimeline from '@/components/MkTimeline.vue';
import { instanceName } from '@/config.js';
-import { serverErrorImageUrl } from '@/instance.js';
+import { serverErrorImageUrl, infoImageUrl } from '@/instance.js';
const props = withDefaults(defineProps<{
role: string;
@@ -47,6 +55,7 @@ const props = withDefaults(defineProps<{
let tab = $ref(props.initialTab);
let role = $ref();
let error = $ref();
+let visiable = $ref(false);
watch(() => props.role, () => {
os.api('roles/show', {
@@ -54,6 +63,7 @@ watch(() => props.role, () => {
}).then(res => {
role = res;
document.title = `${role?.name} | ${instanceName}`;
+ visiable = res.isExplorable && res.isPublic;
}).catch((err) => {
if (err.code === 'NO_SUCH_ROLE') {
error = i18n.ts.noRole;
From 1361bdfbf2f8ac7301b89b4eba45aa92b929a80f Mon Sep 17 00:00:00 2001
From: Nya Candy
Date: Mon, 13 Nov 2023 15:39:54 +0800
Subject: [PATCH 2/2] fix: test break caused by #12273 (#12322)
* fix
* fix: websocket stream origin
---
packages/frontend/src/config.ts | 4 ++--
packages/frontend/src/stream.ts | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/packages/frontend/src/config.ts b/packages/frontend/src/config.ts
index 9de29e80df..2968ab12e6 100644
--- a/packages/frontend/src/config.ts
+++ b/packages/frontend/src/config.ts
@@ -11,8 +11,8 @@ const siteName = document.querySelector('meta[property="og:site
export const host = address.host;
export const hostname = address.hostname;
export const url = address.origin;
-export const apiUrl = url + '/api';
-export const wsUrl = url.replace('http://', 'ws://').replace('https://', 'wss://') + '/streaming';
+export const apiUrl = location.origin + '/api';
+export const wsOrigin = location.origin;
export const lang = miLocalStorage.getItem('lang') ?? 'en-US';
export const langs = _LANGS_;
const preParseLocale = miLocalStorage.getItem('locale');
diff --git a/packages/frontend/src/stream.ts b/packages/frontend/src/stream.ts
index 27fce4d4b8..5f0826b4e3 100644
--- a/packages/frontend/src/stream.ts
+++ b/packages/frontend/src/stream.ts
@@ -6,14 +6,14 @@
import * as Misskey from 'misskey-js';
import { markRaw } from 'vue';
import { $i } from '@/account.js';
-import { url } from '@/config.js';
+import { wsOrigin } from '@/config.js';
let stream: Misskey.Stream | null = null;
export function useStream(): Misskey.Stream {
if (stream) return stream;
- stream = markRaw(new Misskey.Stream(url, $i ? {
+ stream = markRaw(new Misskey.Stream(wsOrigin, $i ? {
token: $i.token,
} : null));