2018-05-12 23:55:02 -04:00
|
|
|
import { Component } from "@angular/core";
|
|
|
|
import { FE_StickerPack } from "../../../shared/models/integration";
|
|
|
|
import { MediaService } from "../../../shared/services/media.service";
|
2021-08-16 18:00:59 -04:00
|
|
|
import { NgbActiveModal } from "@ng-bootstrap/ng-bootstrap";
|
2018-05-12 23:55:02 -04:00
|
|
|
|
2021-08-16 18:00:59 -04:00
|
|
|
export class StickerPackPreviewMoadlInstance {
|
2018-05-12 23:55:02 -04:00
|
|
|
public pack: FE_StickerPack;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
templateUrl: "./preview.component.html",
|
|
|
|
styleUrls: ["./preview.component.scss"],
|
|
|
|
})
|
2021-08-16 18:00:59 -04:00
|
|
|
export class AdminStickerPackPreviewComponent {
|
2018-05-12 23:55:02 -04:00
|
|
|
|
2021-08-16 18:00:59 -04:00
|
|
|
pack: FE_StickerPack;
|
|
|
|
|
|
|
|
constructor(public modal: NgbActiveModal, private media: MediaService) {
|
2018-05-12 23:55:02 -04:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
public getThumbnailUrl(mxc: string, width: number, height: number, method: "crop" | "scale" = "scale"): string {
|
|
|
|
return this.media.getThumbnailUrl(mxc, width, height, method, true);
|
|
|
|
}
|
|
|
|
}
|