kopia lustrzana https://codeberg.org/nmkj/audon
fix preview mode
rodzic
29dc87b382
commit
693ea59845
|
@ -21,8 +21,6 @@ RUN apt-get update && \
|
||||||
apt-get -y --no-install-recommends install libmagick++-dev libwebp-dev && \
|
apt-get -y --no-install-recommends install libmagick++-dev libwebp-dev && \
|
||||||
go build -v -o audon-bin .
|
go build -v -o audon-bin .
|
||||||
|
|
||||||
RUN
|
|
||||||
|
|
||||||
FROM ubuntu:jammy
|
FROM ubuntu:jammy
|
||||||
|
|
||||||
WORKDIR /audon
|
WORKDIR /audon
|
||||||
|
@ -35,7 +33,7 @@ COPY public /audon/public
|
||||||
RUN echo "Etc/UTC" > /etc/localtime && \
|
RUN echo "Etc/UTC" > /etc/localtime && \
|
||||||
apt-get update && apt-get upgrade -y && \
|
apt-get update && apt-get upgrade -y && \
|
||||||
apt-get -y --no-install-recommends install \
|
apt-get -y --no-install-recommends install \
|
||||||
imagemagick libwebp \
|
imagemagick webp \
|
||||||
tini \
|
tini \
|
||||||
tzdata \
|
tzdata \
|
||||||
ca-certificates
|
ca-certificates
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "audon-fe",
|
"name": "audon-fe",
|
||||||
"version": "0.1.2",
|
"version": "0.2.0",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "audon-fe",
|
"name": "audon-fe",
|
||||||
"version": "0.1.2",
|
"version": "0.2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@intlify/unplugin-vue-i18n": "^0.8.1",
|
"@intlify/unplugin-vue-i18n": "^0.8.1",
|
||||||
"@picmo/popup-picker": "^5.7.2",
|
"@picmo/popup-picker": "^5.7.2",
|
||||||
|
|
|
@ -60,7 +60,7 @@ export const useMastodonStore = defineStore("mastodon", {
|
||||||
avatar: new File([avatarBlob], token.data.audon.avatar),
|
avatar: new File([avatarBlob], token.data.audon.avatar),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, 2 * 1000);
|
}, 1500);
|
||||||
sessionStorage.setItem("avatar_timeout", t.toString());
|
sessionStorage.setItem("avatar_timeout", t.toString());
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -172,7 +172,7 @@ export default {
|
||||||
this.mutedSpeakerIDs = new Set(Object.keys(this.participants));
|
this.mutedSpeakerIDs = new Set(Object.keys(this.participants));
|
||||||
for (const [key, value] of Object.entries(this.participants)) {
|
for (const [key, value] of Object.entries(this.participants)) {
|
||||||
if (value !== null) {
|
if (value !== null) {
|
||||||
this.fetchMastoData(key, value);
|
this.fetchMastoData(key, value, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
@ -486,7 +486,7 @@ export default {
|
||||||
onResize() {
|
onResize() {
|
||||||
const mainArea = document.getElementById("mainArea");
|
const mainArea = document.getElementById("mainArea");
|
||||||
const height = mainArea.clientHeight;
|
const height = mainArea.clientHeight;
|
||||||
this.mainHeight = height > 700 ? 700 : window.innerHeight - 110;
|
this.mainHeight = height > 720 ? 700 : window.innerHeight - 120;
|
||||||
},
|
},
|
||||||
isHost(identity) {
|
isHost(identity) {
|
||||||
return identity === this.roomInfo.host?.audon_id;
|
return identity === this.roomInfo.host?.audon_id;
|
||||||
|
@ -612,7 +612,7 @@ export default {
|
||||||
}
|
}
|
||||||
return metadata;
|
return metadata;
|
||||||
},
|
},
|
||||||
async fetchMastoData(identity, { remote_id, remote_url }) {
|
async fetchMastoData(identity, { remote_id, remote_url }, preview) {
|
||||||
if (this.cachedMastoData[identity] !== undefined) return;
|
if (this.cachedMastoData[identity] !== undefined) return;
|
||||||
try {
|
try {
|
||||||
const url = new URL(remote_url);
|
const url = new URL(remote_url);
|
||||||
|
@ -621,8 +621,12 @@ export default {
|
||||||
disableVersionCheck: true,
|
disableVersionCheck: true,
|
||||||
});
|
});
|
||||||
const info = await mastoClient.v1.accounts.fetch(remote_id);
|
const info = await mastoClient.v1.accounts.fetch(remote_id);
|
||||||
const resp = await axios.get(`/api/user/${identity}`);
|
if (preview) {
|
||||||
info.avatar = `/storage/${resp.data.audon_id}/avatar/${resp.data.avatar}`;
|
info.avatar = `/storage/${this.participants[identity].audon_id}/avatar/${this.participants[identity].avatar}`;
|
||||||
|
} else {
|
||||||
|
const resp = await axios.get(`/api/user/${identity}`);
|
||||||
|
info.avatar = `/storage/${resp.data.audon_id}/avatar/${resp.data.avatar}`;
|
||||||
|
}
|
||||||
this.cachedMastoData[identity] = info;
|
this.cachedMastoData[identity] = info;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// FIXME: display error snackbar
|
// FIXME: display error snackbar
|
||||||
|
|
Ładowanie…
Reference in New Issue