Merge branch 'develop' into staging-new

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev 2025-02-15 17:39:14 +07:00
commit cbd6a27423
No known key found for this signature in database
GPG Key ID: BD80F68D68D8F7F2
4 changed files with 43 additions and 44 deletions

View File

@ -1,52 +1,30 @@
{ {
"ACCOUNTS_URL": "https://account.hc.engineering/", "ACCOUNTS_URL": "https://account.hc.engineering/",
"AI_URL": "https://ai.hc.engineering", "AI_URL": "https://ai.hc.engineering",
"ANALYTICS_COLLECTOR_URL": "https://collector.hc.engineering", "ANALYTICS_COLLECTOR_URL": "https://collector.hc.engineering",
"BRANDING_URL": "https://front.hc.engineering/stage-branding_v2.json", "BRANDING_URL": "https://front.hc.engineering/stage-branding_v2.json",
"CALENDAR_URL": "https://calendar.hc.engineering/", "CALENDAR_URL": "https://calendar.hc.engineering/",
"COLLABORATOR_URL": "wss://collaborator.hc.engineering", "COLLABORATOR_URL": "wss://collaborator.hc.engineering",
"DESKTOP_UPDATES_CHANNEL": "front", "DESKTOP_UPDATES_CHANNEL": "front",
"FILES_URL": "https://dl.hc.engineering/blob/:workspace/:blobId/:filename", "FILES_URL": "https://dl.hc.engineering/blob/:workspace/:blobId/:filename",
"GITHUB_APP": "huly-github-staging", "GITHUB_APP": "huly-github-staging",
"GITHUB_CLIENTID": "Iv1.cd9d3f7987474b5e",
"GITHUB_CLIENTID": "Iv1.cd9d3f7987474b5e" ,
"GITHUB_URL": "https://github.hc.engineering", "GITHUB_URL": "https://github.hc.engineering",
"GMAIL_URL": "https://gmail.hc.engineering/",
"GMAIL_URL": "https://gmail.hc.engineering/" ,
"INTERCOM_API_URL": "", "INTERCOM_API_URL": "",
"INTERCOM_APP_ID": "", "INTERCOM_APP_ID": "",
"LOVE_ENDPOINT": "https://love.hc.engineering/", "LOVE_ENDPOINT": "https://love.hc.engineering/",
"MODEL_VERSION": "", "MODEL_VERSION": "",
"PREVIEW_CONFIG": "image|https://dl.hc.engineering/image/fit=scale-down,width=:width,height=:height,dpr=:dpr/:workspace/:blobId;video|https://dl.hc.engineering/video/:workspace/:blobId/meta", "PREVIEW_CONFIG": "image|https://dl.hc.engineering/image/fit=scale-down,width=:width,height=:height,dpr=:dpr/:workspace/:blobId;video|https://dl.hc.engineering/video/:workspace/:blobId/meta",
"PRINT_URL": "https://print.hc.engineering", "PRINT_URL": "https://print.hc.engineering",
"REKONI_URL": "https://rekoni.hc.engineering", "REKONI_URL": "https://rekoni.hc.engineering",
"SIGN_URL": "https://sign.hc.engineering", "SIGN_URL": "https://sign.hc.engineering",
"STATS_URL": "https://stats.hc.engineering", "STATS_URL": "https://stats.hc.engineering",
"TELEGRAM_BOT_URL": "https://telegram-bot.hc.engineering", "TELEGRAM_BOT_URL": "https://telegram-bot.hc.engineering",
"TELEGRAM_URL": "https://telegram.hc.engineering", "TELEGRAM_URL": "https://telegram.hc.engineering",
"UPLOAD_CONFIG": "", "UPLOAD_CONFIG": "",
"UPLOAD_URL": "https://dl.hc.engineering/upload/form-data/:workspace", "UPLOAD_URL": "https://dl.hc.engineering/upload/form-data/:workspace",
"TRANSACTOR_OVERRIDE": "ws://localhost:3335" "TRANSACTOR_OVERRIDE": "wss://transactor00.hc.engineering"
} }

View File

@ -23,17 +23,22 @@
export let width: number export let width: number
export let height: number export let height: number
export let responsive: boolean = false export let responsive: boolean = false
let blobSrc: { src: string, srcset: string } | undefined
$: void getBlobRef(blob, alt, width, height).then((val) => {
blobSrc = val
})
</script> </script>
{#await getBlobRef(blob, alt, width, height) then blobSrc} <Image
<Image src={blobSrc?.src}
src={blobSrc.src} srcset={blobSrc?.srcset}
srcset={blobSrc.srcset} {alt}
{alt} width={responsive ? '100%' : width}
width={responsive ? '100%' : width} height={responsive ? '100%' : height}
height={responsive ? '100%' : height} {fit}
{fit} on:load
on:load on:error
on:error on:loadstart
/> />
{/await}

View File

@ -15,7 +15,7 @@
<script lang="ts"> <script lang="ts">
import { createEventDispatcher } from 'svelte' import { createEventDispatcher } from 'svelte'
export let src: string export let src: string | undefined
export let srcset: string | undefined = undefined export let srcset: string | undefined = undefined
export let alt: string = '' export let alt: string = ''
export let width: number | string export let width: number | string
@ -26,15 +26,20 @@
let retry: number = 0 let retry: number = 0
$: if (src !== undefined) {
retry = 0
}
function handleLoad (): void { function handleLoad (): void {
retry = 0 retry = 0
dispatch('load') dispatch('load')
} }
function handleLoadStart (): void {
dispatch('loadstart')
}
$: if (src !== undefined) {
retry = 0
handleLoadStart()
}
function handleError (event: any): void { function handleError (event: any): void {
if (retry > 3) { if (retry > 3) {
event.target.src = undefined event.target.src = undefined
@ -47,7 +52,17 @@
} }
</script> </script>
<img {src} {srcset} {alt} {width} {height} style:object-fit={fit} on:error={handleError} on:load={handleLoad} /> <img
{src}
{srcset}
{alt}
{width}
{height}
style:object-fit={fit}
on:error={handleError}
on:loadstart={handleLoadStart}
on:load={handleLoad}
/>
<style lang="scss"> <style lang="scss">
img { img {

View File

@ -100,7 +100,7 @@
let loading = false let loading = false
let error = false let error = false
$: if (value !== undefined) { function handleLoadStart (): void {
loading = true loading = true
} }
@ -135,6 +135,7 @@
height={dimensions.height} height={dimensions.height}
on:load={handleLoad} on:load={handleLoad}
on:error={handleError} on:error={handleError}
on:loadstart={handleLoadStart}
/> />
</div> </div>