small update to home
Some checks failed
Lint / pnpm_install (pull_request) Successful in 43s
API report (misskey.js) / report (pull_request) Successful in 45s
Test (misskey.js) / test (22.x) (pull_request) Successful in 57s
Test (frontend) / vitest (22.x) (pull_request) Successful in 1m23s
Test (production install and build) / production (22.x) (pull_request) Successful in 1m6s
Lint / lint (backend) (pull_request) Successful in 1m3s
Test (backend) / validate-api-json (22.x) (pull_request) Successful in 1m30s
Lint / lint (misskey-js) (pull_request) Successful in 33s
Lint / lint (sw) (pull_request) Successful in 29s
Test (backend) / unit (22.x) (pull_request) Successful in 2m34s
Lint / typecheck (misskey-js) (pull_request) Successful in 30s
Lint / typecheck (backend) (pull_request) Successful in 1m21s
Test (backend) / e2e (22.x) (pull_request) Failing after 6m29s
Lint / lint (frontend) (pull_request) Successful in 7m31s
Some checks failed
Lint / pnpm_install (pull_request) Successful in 43s
API report (misskey.js) / report (pull_request) Successful in 45s
Test (misskey.js) / test (22.x) (pull_request) Successful in 57s
Test (frontend) / vitest (22.x) (pull_request) Successful in 1m23s
Test (production install and build) / production (22.x) (pull_request) Successful in 1m6s
Lint / lint (backend) (pull_request) Successful in 1m3s
Test (backend) / validate-api-json (22.x) (pull_request) Successful in 1m30s
Lint / lint (misskey-js) (pull_request) Successful in 33s
Lint / lint (sw) (pull_request) Successful in 29s
Test (backend) / unit (22.x) (pull_request) Successful in 2m34s
Lint / typecheck (misskey-js) (pull_request) Successful in 30s
Lint / typecheck (backend) (pull_request) Successful in 1m21s
Test (backend) / e2e (22.x) (pull_request) Failing after 6m29s
Lint / lint (frontend) (pull_request) Successful in 7m31s
This commit is contained in:
parent
0c7922edbc
commit
0a0edca5c6
1 changed files with 24 additions and 19 deletions
|
@ -198,6 +198,9 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<MkLazy>
|
<MkLazy>
|
||||||
<XActivity :key="user.id" :user="user"/>
|
<XActivity :key="user.id" :user="user"/>
|
||||||
</MkLazy>
|
</MkLazy>
|
||||||
|
<MkLazy v-if="user.listenbrainz && listenbrainzdata">
|
||||||
|
<XListenBrainz :key="user.id" :user="user" :collapsed="true"/>
|
||||||
|
</MkLazy>
|
||||||
</template>
|
</template>
|
||||||
<div v-if="!disableNotes">
|
<div v-if="!disableNotes">
|
||||||
<MkLazy>
|
<MkLazy>
|
||||||
|
@ -210,11 +213,11 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<XFiles :key="user.id" :user="user"/>
|
<XFiles :key="user.id" :user="user"/>
|
||||||
<XActivity :key="user.id" :user="user"/>
|
<XActivity :key="user.id" :user="user"/>
|
||||||
<XListenBrainz
|
<XListenBrainz
|
||||||
v-if="user.listenbrainz && listenbrainzdata"
|
v-if="user.listenbrainz && listenbrainzdata"
|
||||||
:key="user.id"
|
:key="user.id"
|
||||||
:user="user"
|
:user="user"
|
||||||
style="margin-top: var(--margin)"
|
style="margin-top: var(--margin)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</MkSpacer>
|
</MkSpacer>
|
||||||
|
@ -290,22 +293,24 @@ const moderationNote = ref(props.user.moderationNote);
|
||||||
const editModerationNote = ref(false);
|
const editModerationNote = ref(false);
|
||||||
const movedFromLog = ref<null | {movedFromId:string;}[]>(null);
|
const movedFromLog = ref<null | {movedFromId:string;}[]>(null);
|
||||||
|
|
||||||
let listenbrainzdata = false;
|
let 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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(moderationNote, async () => {
|
watch(moderationNote, async () => {
|
||||||
|
|
Loading…
Reference in a new issue