kopia lustrzana https://codeberg.org/nmkj/audon
fix preview avatar issue
rodzic
693ea59845
commit
3d24066d2d
|
@ -29,7 +29,7 @@
|
||||||
{% end %}
|
{% end %}
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app" data-version='0.2.0'></div>
|
<div id="app" data-version='0.2.1'></div>
|
||||||
<script type="module" src="/src/main.js"></script>
|
<script type="module" src="/src/main.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "audon-fe",
|
"name": "audon-fe",
|
||||||
"version": "0.2.0",
|
"version": "0.2.1",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "cp -v index.dev.html index.html && vite",
|
"dev": "cp -v index.dev.html index.html && vite",
|
||||||
|
|
Plik binarny nie jest wyświetlany.
Po Szerokość: | Wysokość: | Rozmiar: 45 KiB |
Plik binarny nie jest wyświetlany.
Przed Szerokość: | Wysokość: | Rozmiar: 19 KiB Po Szerokość: | Wysokość: | Rozmiar: 24 KiB |
|
@ -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, true);
|
this.fetchMastoData(key, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
@ -612,7 +612,7 @@ export default {
|
||||||
}
|
}
|
||||||
return metadata;
|
return metadata;
|
||||||
},
|
},
|
||||||
async fetchMastoData(identity, { remote_id, remote_url }, preview) {
|
async fetchMastoData(identity, { remote_id, remote_url }) {
|
||||||
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,12 +621,8 @@ export default {
|
||||||
disableVersionCheck: true,
|
disableVersionCheck: true,
|
||||||
});
|
});
|
||||||
const info = await mastoClient.v1.accounts.fetch(remote_id);
|
const info = await mastoClient.v1.accounts.fetch(remote_id);
|
||||||
if (preview) {
|
const resp = await axios.get(`/app/user/${identity}`);
|
||||||
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}`;
|
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
|
||||||
|
|
|
@ -53,3 +53,5 @@ services:
|
||||||
- db
|
- db
|
||||||
- redis
|
- redis
|
||||||
- livekit
|
- livekit
|
||||||
|
volumes:
|
||||||
|
- ./public/storage:/audon/public/storage
|
||||||
|
|
|
@ -164,12 +164,12 @@ func main() {
|
||||||
e.GET("/app/verify", verifyHandler)
|
e.GET("/app/verify", verifyHandler)
|
||||||
e.POST("/app/logout", logoutHandler)
|
e.POST("/app/logout", logoutHandler)
|
||||||
e.GET("/app/preview/:id", previewRoomHandler)
|
e.GET("/app/preview/:id", previewRoomHandler)
|
||||||
|
e.GET("/app/user/:id", getUserHandler)
|
||||||
|
|
||||||
e.POST("/app/webhook", livekitWebhookHandler)
|
e.POST("/app/webhook", livekitWebhookHandler)
|
||||||
|
|
||||||
api := e.Group("/api", authMiddleware)
|
api := e.Group("/api", authMiddleware)
|
||||||
api.GET("/token", getOAuthTokenHandler)
|
api.GET("/token", getOAuthTokenHandler)
|
||||||
api.GET("/user/:id", getUserHandler)
|
|
||||||
api.POST("/room", createRoomHandler)
|
api.POST("/room", createRoomHandler)
|
||||||
api.DELETE("/room", leaveRoomHandler)
|
api.DELETE("/room", leaveRoomHandler)
|
||||||
api.POST("/room/:id", joinRoomHandler)
|
api.POST("/room/:id", joinRoomHandler)
|
||||||
|
|
Ładowanie…
Reference in New Issue