style(frontend): apply ultracite 7.12 formatting and lint rules

This commit is contained in:
hh committed 2026-09-19 00:21:07 +02:00
1 parent fc4758aa0b
commit c8e5cff871
109 files changed
+845 -817

No files matched your search

+2 -2
View File
@@ -8,10 +8,10 @@ const day = new Intl.DateTimeFormat(undefined, {
});
const full = new Intl.DateTimeFormat(undefined, {
day: "numeric",
month: "short",
year: "numeric",
hour: "2-digit",
minute: "2-digit",
month: "short",
year: "numeric",
});
export function formatTime(iso: string): string {
+2 -2
View File
@@ -36,9 +36,9 @@ function buildNodes(
next += 1;
}
nodes.push({
kind: "entity",
entity,
children: buildNodes(text, nested, entity.offset, entityEnd),
entity,
kind: "entity",
});
cursor = entityEnd;
i = next;
+11 -11
View File
@@ -1,20 +1,20 @@
const MEDIA_KIND_LABELS: Record<string, string> = {
photo: "Фото",
video: "Видео",
animation: "GIF",
gif: "GIF",
voice: "Голосовое",
audio: "Аудио",
video_note: "Кружок",
sticker: "Стикер",
document: "Файл",
contact: "Контакт",
location: "Геопозиция",
venue: "Геопозиция",
poll: "Опрос",
dice: "Кубик",
document: "Файл",
game: "Игра",
gif: "GIF",
location: "Геопозиция",
photo: "Фото",
poll: "Опрос",
sticker: "Стикер",
story: "Сторис",
venue: "Геопозиция",
video: "Видео",
video_note: "Кружок",
voice: "Голосовое",
};
export function mediaKindLabel(kind: string | null): string | null {
@@ -35,7 +35,7 @@ export function formatBytes(bytes: number | null): string {
let unit = 0;
while (value >= BYTE_STEP && unit < BYTE_UNITS.length - 1) {
value /= BYTE_STEP;
unit++;
unit += 1;
}
const rounded =
value >= 10 || unit === 0 ? Math.round(value) : value.toFixed(1);
+1 -1
View File
@@ -38,7 +38,7 @@ export function initials(name: string): string {
if (words.length === 0) {
return "?";
}
const first = words[0][0];
const first = words[0].charAt(0);
if (words.length === 1) {
return first.toUpperCase();
}