diff --git a/backend/src/config/late/info.config.service.ts b/backend/src/config/late/info.config.service.ts index cd6017f..fea9b2c 100644 --- a/backend/src/config/late/info.config.service.ts +++ b/backend/src/config/late/info.config.service.ts @@ -18,6 +18,8 @@ export class InfoConfigService { return undefined; } + if (hostname === '') return undefined; + return hostname; } } diff --git a/frontend/src/app/components/masonry/masonry.component.ts b/frontend/src/app/components/masonry/masonry.component.ts index de18552..57ea401 100644 --- a/frontend/src/app/components/masonry/masonry.component.ts +++ b/frontend/src/app/components/masonry/masonry.component.ts @@ -8,7 +8,7 @@ import { Input, OnDestroy, QueryList, - ViewChildren, + ViewChildren } from '@angular/core'; import { AutoUnsubscribe } from 'ngx-auto-unsubscribe-decorator'; import { combineLatest, Subscription } from 'rxjs'; @@ -30,7 +30,7 @@ export class MasonryComponent implements AfterViewInit, OnDestroy { this.changeDetector.markForCheck(); } public _column_count = 1; - @Input('update-speed') update_speed: number = 200; + @Input('update-speed') update_speed: number = 500; @ContentChildren(MasonryItemDirective) private content: QueryList; diff --git a/frontend/src/app/routes/view/view.component.ts b/frontend/src/app/routes/view/view.component.ts index 62416b6..ff4c413 100644 --- a/frontend/src/app/routes/view/view.component.ts +++ b/frontend/src/app/routes/view/view.component.ts @@ -94,6 +94,7 @@ export class ViewComponent implements OnInit, OnDestroy { const links = this.imageService.CreateImageLinksFromID( this.id, format === 'original' ? null : format, + this.image?.file_name ); this.imageLinksCache[format] = links; diff --git a/frontend/src/app/services/api/image.service.ts b/frontend/src/app/services/api/image.service.ts index 85bcfb0..4fe16ab 100644 --- a/frontend/src/app/services/api/image.service.ts +++ b/frontend/src/app/services/api/image.service.ts @@ -136,11 +136,11 @@ export class ImageService { } // Use for user facing urls - public CreateImageLinks(imageURL: string): ImageLinks { + public CreateImageLinks(imageURL: string, name?: string): ImageLinks { return { source: imageURL, markdown: `![image](${imageURL})`, - html: `image`, + html: `${name ?? 'image'}`, rst: `.. image:: ${imageURL}`, bbcode: `[img]${imageURL}[/img]`, }; @@ -184,7 +184,8 @@ export class ImageService { public CreateImageLinksFromID( imageID: string, mime: string | null, + name?: string, ): ImageLinks { - return this.CreateImageLinks(this.GetImageURL(imageID, mime, true)); + return this.CreateImageLinks(this.GetImageURL(imageID, mime, true), name); } }