diff --git a/Dockerfile b/Dockerfile index 9fd9e07..9377f1f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,8 +21,6 @@ RUN apt-get update && \ apt-get -y --no-install-recommends install libmagick++-dev libwebp-dev && \ go build -v -o audon-bin . -RUN - FROM ubuntu:jammy WORKDIR /audon @@ -35,7 +33,7 @@ COPY public /audon/public RUN echo "Etc/UTC" > /etc/localtime && \ apt-get update && apt-get upgrade -y && \ apt-get -y --no-install-recommends install \ - imagemagick libwebp \ + imagemagick webp \ tini \ tzdata \ ca-certificates diff --git a/audon-fe/package-lock.json b/audon-fe/package-lock.json index 827a6c2..6aca956 100644 --- a/audon-fe/package-lock.json +++ b/audon-fe/package-lock.json @@ -1,12 +1,12 @@ { "name": "audon-fe", - "version": "0.1.2", + "version": "0.2.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "audon-fe", - "version": "0.1.2", + "version": "0.2.0", "dependencies": { "@intlify/unplugin-vue-i18n": "^0.8.1", "@picmo/popup-picker": "^5.7.2", diff --git a/audon-fe/src/stores/mastodon.js b/audon-fe/src/stores/mastodon.js index d8353b2..6576386 100644 --- a/audon-fe/src/stores/mastodon.js +++ b/audon-fe/src/stores/mastodon.js @@ -60,7 +60,7 @@ export const useMastodonStore = defineStore("mastodon", { avatar: new File([avatarBlob], token.data.audon.avatar), }); } - }, 2 * 1000); + }, 1500); sessionStorage.setItem("avatar_timeout", t.toString()); }, }, diff --git a/audon-fe/src/views/RoomView.vue b/audon-fe/src/views/RoomView.vue index ee83b1b..ed69f60 100644 --- a/audon-fe/src/views/RoomView.vue +++ b/audon-fe/src/views/RoomView.vue @@ -172,7 +172,7 @@ export default { this.mutedSpeakerIDs = new Set(Object.keys(this.participants)); for (const [key, value] of Object.entries(this.participants)) { if (value !== null) { - this.fetchMastoData(key, value); + this.fetchMastoData(key, value, true); } } } catch (error) { @@ -486,7 +486,7 @@ export default { onResize() { const mainArea = document.getElementById("mainArea"); const height = mainArea.clientHeight; - this.mainHeight = height > 700 ? 700 : window.innerHeight - 110; + this.mainHeight = height > 720 ? 700 : window.innerHeight - 120; }, isHost(identity) { return identity === this.roomInfo.host?.audon_id; @@ -612,7 +612,7 @@ export default { } return metadata; }, - async fetchMastoData(identity, { remote_id, remote_url }) { + async fetchMastoData(identity, { remote_id, remote_url }, preview) { if (this.cachedMastoData[identity] !== undefined) return; try { const url = new URL(remote_url); @@ -621,8 +621,12 @@ export default { disableVersionCheck: true, }); const info = await mastoClient.v1.accounts.fetch(remote_id); - const resp = await axios.get(`/api/user/${identity}`); - info.avatar = `/storage/${resp.data.audon_id}/avatar/${resp.data.avatar}`; + if (preview) { + 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; } catch (error) { // FIXME: display error snackbar