mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-11-22 05:55:12 +00:00
merge: avoid await
at top-level in setup - fixes frontend tests (!534)
View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/534 Approved-by: Marie <marie@kaifa.ch> Approved-by: Amelia Yukii <amelia.yukii@shourai.de>
This commit is contained in:
commit
9520a14cb9
2 changed files with 17 additions and 15 deletions
|
@ -22,7 +22,7 @@
|
||||||
style-src 'self' 'unsafe-inline';
|
style-src 'self' 'unsafe-inline';
|
||||||
img-src 'self' data: blob: www.google.com xn--931a.moe launcher.moe localhost:3000 localhost:5173 127.0.0.1:5173 127.0.0.1:3000 activitypub.software secure.gravatar.com avatars.githubusercontent.com;
|
img-src 'self' data: blob: www.google.com xn--931a.moe launcher.moe localhost:3000 localhost:5173 127.0.0.1:5173 127.0.0.1:3000 activitypub.software secure.gravatar.com avatars.githubusercontent.com;
|
||||||
media-src 'self' localhost:3000 localhost:5173 127.0.0.1:5173 127.0.0.1:3000;
|
media-src 'self' localhost:3000 localhost:5173 127.0.0.1:5173 127.0.0.1:3000;
|
||||||
connect-src 'self' localhost:3000 localhost:5173 127.0.0.1:5173 127.0.0.1:3000 https://newassets.hcaptcha.com;
|
connect-src 'self' localhost:3000 localhost:5173 127.0.0.1:5173 127.0.0.1:3000 https://newassets.hcaptcha.com https://api.listenbrainz.org;
|
||||||
frame-src *;"
|
frame-src *;"
|
||||||
/>
|
/>
|
||||||
<meta property="og:site_name" content="[DEV BUILD] Misskey" />
|
<meta property="og:site_name" content="[DEV BUILD] Misskey" />
|
||||||
|
|
|
@ -236,22 +236,24 @@ const moderationNote = ref(props.user.moderationNote);
|
||||||
const editModerationNote = ref(false);
|
const editModerationNote = ref(false);
|
||||||
const noteview = ref<string | null>(null);
|
const noteview = ref<string | null>(null);
|
||||||
|
|
||||||
let listenbrainzdata = false;
|
const listenbrainzdata = ref(false);
|
||||||
if (props.user.listenbrainz) {
|
if (props.user.listenbrainz) {
|
||||||
try {
|
(async function() {
|
||||||
const response = await fetch(`https://api.listenbrainz.org/1/user/${props.user.listenbrainz}/playing-now`, {
|
try {
|
||||||
method: 'GET',
|
const response = await fetch(`https://api.listenbrainz.org/1/user/${props.user.listenbrainz}/playing-now`, {
|
||||||
headers: {
|
method: 'GET',
|
||||||
'Content-Type': 'application/json'
|
headers: {
|
||||||
},
|
'Content-Type': 'application/json'
|
||||||
});
|
},
|
||||||
const data = await response.json();
|
});
|
||||||
if (data.payload.listens && data.payload.listens.length !== 0) {
|
const data = await response.json();
|
||||||
listenbrainzdata = true;
|
if (data.payload.listens && data.payload.listens.length !== 0) {
|
||||||
|
listenbrainzdata.value = true;
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
listenbrainzdata.value = false;
|
||||||
}
|
}
|
||||||
} catch (err) {
|
})()
|
||||||
listenbrainzdata = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const background = computed(() => {
|
const background = computed(() => {
|
||||||
|
|
Loading…
Reference in a new issue