style(frontend): apply ultracite 7.12 formatting and lint rules
This commit is contained in:
1 parent
fc4758aa0b
commit
c8e5cff871
109 files changed
+845
-817
No files matched your search
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user