mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-18 00:33:59 +00:00
feat: notification preview on theme editor
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
import {
|
||||
AchievementCustomNotificationPosition,
|
||||
AchievementNotificationInfo,
|
||||
} from "@types";
|
||||
|
||||
export enum Downloader {
|
||||
RealDebrid,
|
||||
Torrent,
|
||||
|
||||
@@ -16,6 +16,7 @@ import {
|
||||
import { charMap } from "./char-map";
|
||||
import { Downloader } from "./constants";
|
||||
import { format } from "date-fns";
|
||||
import { AchievementNotificationInfo } from "@types";
|
||||
|
||||
export * from "./constants";
|
||||
|
||||
@@ -175,3 +176,24 @@ export const formatDate = (
|
||||
if (isNaN(new Date(date).getDate())) return "N/A";
|
||||
return format(date, language == "en" ? "MM-dd-yyyy" : "dd/MM/yyyy");
|
||||
};
|
||||
|
||||
export const generateAchievementCustomNotificationTest = (
|
||||
t: any,
|
||||
language?: string
|
||||
): AchievementNotificationInfo => {
|
||||
return {
|
||||
title: t("test_achievement_notification_title", {
|
||||
ns: "notifications",
|
||||
lng: language ?? "en",
|
||||
}),
|
||||
description: t("test_achievement_notification_description", {
|
||||
ns: "notifications",
|
||||
lng: language ?? "en",
|
||||
}),
|
||||
iconUrl: "https://cdn.losbroxas.org/favicon.svg",
|
||||
points: 100,
|
||||
isHidden: false,
|
||||
isRare: false,
|
||||
isPlatinum: false,
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user