fix some bugs
This commit is contained in:
parent
f69e455996
commit
d65ac16943
|
@ -18,6 +18,8 @@ export class InfoConfigService {
|
|||
return undefined;
|
||||
}
|
||||
|
||||
if (hostname === '') return undefined;
|
||||
|
||||
return hostname;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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<MasonryItemDirective>;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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: `<img src="${imageURL}" alt="image">`,
|
||||
html: `<img src="${imageURL}" alt="${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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue