[F] Fix profile path

pull/22/head
Azalea 2024-03-06 00:20:04 -05:00
parent 1169ac44b4
commit 0da50bc693
2 changed files with 2 additions and 3 deletions

View File

@ -1,7 +1,6 @@
export const AQUA_HOST = 'https://aquadx.net/aqua'
export const DATA_HOST = 'https://aquadx.net'
export const IMG_HOST = 'https://aquadx.net/user-uploads'
// This will be displayed for users to connect from the client
export const AQUA_CONNECTION = 'aquadx.hydev.org'

View File

@ -15,7 +15,7 @@ import moment from 'moment/moment'
import CalHeatmap from 'cal-heatmap'
// @ts-expect-error Cal-heatmap does not have proper types
import CalTooltip from 'cal-heatmap/plugins/Tooltip'
import { DEFAULT_PFP, IMG_HOST } from "./config";
import { AQUA_HOST, DEFAULT_PFP, IMG_HOST } from "./config";
import type { UserMe } from "./generalTypes";
export function title(t: string) {
@ -155,6 +155,6 @@ export function tooltip(element: HTMLElement, params: { text: string } | string)
}
export function pfp(node: HTMLImageElement, me: UserMe) {
node.src = me.profilePicture ? `${IMG_HOST}/${me.profilePicture}` : DEFAULT_PFP
node.src = me.profilePicture ? `${AQUA_HOST}/uploads/net/portrait/${me.profilePicture}` : DEFAULT_PFP
node.onerror = e => pfpNotFound(e as Event)
}