Updated Shortener Admin Page

This commit is contained in:
itzMiney committed 2026-02-15 10:08:22 +01:00
1 parent 6fec6ce1c7
commit f948e2b082
4 files changed
+58 -4

No files matched your search

+15
View File
@@ -26,6 +26,8 @@ export class ShortenerComponent implements OnInit, OnDestroy {
short_name: string | null = null;
deleteId: number | null = null;
copiedShort: string | null = null;
constructor(
private shortenerService: ShortenerService,
private authService: AuthService,
@@ -117,4 +119,17 @@ export class ShortenerComponent implements OnInit, OnDestroy {
);
});
}
copyShortUrl(shortCode: string): void {
const shortUrl = `https://itz.sh/${shortCode}`;
navigator.clipboard.writeText(shortUrl).then(() => {
this.copiedShort = shortCode;
setTimeout(() => {
if (this.copiedShort === shortCode) this.copiedShort = null;
}, 2000);
}).catch(() => {
});
}
}