diff --git a/CHANGELOG.md b/CHANGELOG.md index 9107a83..208e2cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ Формат: `ГГГГ-ММ-ДД | версия | изменение | контракты | риск` +- 2026-07-08 | v0.5.114 (122) | Дизайн Файлов (чанк 2): локальные иконки типов файлов. 13 SVG из дизайна (PDF/Word/Spreadsheet/Presentation/Image/Audio/Video/Archive/Code/Text/Certificate/Eml/file) в assets/filetypes/, FileIcons переключён на них (file:///android_asset, coil-svg). Раньше иконки типов тянулись с сервера → офлайн ломался (аудит) + не гарантированно совпадали с дизайном. Папка пока с сервера (иконки папки в наборе нет — TODO из Figma). Дизайн-макеты (109 PNG) — на инфре B /home/foradmin/figma/, в git не бандлю (вес) | контракты не менялись | низкий: файловые иконки теперь офлайн и точно из дизайна + - 2026-07-08 | v0.5.114 (122) | Трек дизайна (старт): снятие дизайн-токенов из Figma роли design (файл ocVUCYCrfFUoqYYvlcLPBF, доступ по API-токену вне git). Цвета сверены — совпадают с F7Colors; типографика — Raleway 14/18/20/24; заведены F7Spacing (4dp-сетка) + F7Radius (аудит: не было spacing-токенов, ~1087 инлайновых .dp). docs/DESIGN-SOURCE.md — карта Figma + процесс попиксельной вёрстки. Источник — Figma, боевой forbion НЕ трогаю. Координация — mail/044 | дизайн-система (аддитивно, пока не используется) | нет: новые токены, поведение не меняется - 2026-07-07 | v0.5.114 (122) | Этап 1 (version catalog): заведён gradle/libs.versions.toml, 15 module build.gradle мигрированы на libs.* (скриптом). Устранён дрейф версий: coroutines 1.8.1/1.10.1→1.10.1, coil 2.6.0/2.7.0→2.7.0, lifecycle 2.8.1/2.8.7→2.8.7, activity-compose 1.9.0/1.10.1→1.10.1, core-ktx 1.13.1/1.15.0→1.15.0. Firebase в core/push переведён на bom (был explicit 24.0.1). Compose BOM в каталоге вместо дубля в каждом модуле. Проверено сборкой | контракты не менялись; версии унифицированы вверх (minor-бампы) | низкий: сборочная гигиена, унификация версий diff --git a/feature/files/src/main/assets/filetypes/archive.svg b/feature/files/src/main/assets/filetypes/archive.svg new file mode 100644 index 0000000..7def58b --- /dev/null +++ b/feature/files/src/main/assets/filetypes/archive.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/feature/files/src/main/assets/filetypes/audio.svg b/feature/files/src/main/assets/filetypes/audio.svg new file mode 100644 index 0000000..36dc462 --- /dev/null +++ b/feature/files/src/main/assets/filetypes/audio.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/feature/files/src/main/assets/filetypes/certificate.svg b/feature/files/src/main/assets/filetypes/certificate.svg new file mode 100644 index 0000000..55bb02b --- /dev/null +++ b/feature/files/src/main/assets/filetypes/certificate.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/feature/files/src/main/assets/filetypes/code.svg b/feature/files/src/main/assets/filetypes/code.svg new file mode 100644 index 0000000..3c7b627 --- /dev/null +++ b/feature/files/src/main/assets/filetypes/code.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/feature/files/src/main/assets/filetypes/eml.svg b/feature/files/src/main/assets/filetypes/eml.svg new file mode 100644 index 0000000..3cfeaec --- /dev/null +++ b/feature/files/src/main/assets/filetypes/eml.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/feature/files/src/main/assets/filetypes/file.svg b/feature/files/src/main/assets/filetypes/file.svg new file mode 100644 index 0000000..1eca373 --- /dev/null +++ b/feature/files/src/main/assets/filetypes/file.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/feature/files/src/main/assets/filetypes/image.svg b/feature/files/src/main/assets/filetypes/image.svg new file mode 100644 index 0000000..a40848c --- /dev/null +++ b/feature/files/src/main/assets/filetypes/image.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/feature/files/src/main/assets/filetypes/pdf.svg b/feature/files/src/main/assets/filetypes/pdf.svg new file mode 100644 index 0000000..a46f9a9 --- /dev/null +++ b/feature/files/src/main/assets/filetypes/pdf.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/feature/files/src/main/assets/filetypes/presentation.svg b/feature/files/src/main/assets/filetypes/presentation.svg new file mode 100644 index 0000000..5a52f52 --- /dev/null +++ b/feature/files/src/main/assets/filetypes/presentation.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/feature/files/src/main/assets/filetypes/spreadsheet.svg b/feature/files/src/main/assets/filetypes/spreadsheet.svg new file mode 100644 index 0000000..05562b3 --- /dev/null +++ b/feature/files/src/main/assets/filetypes/spreadsheet.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/feature/files/src/main/assets/filetypes/text.svg b/feature/files/src/main/assets/filetypes/text.svg new file mode 100644 index 0000000..e09264f --- /dev/null +++ b/feature/files/src/main/assets/filetypes/text.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/feature/files/src/main/assets/filetypes/video.svg b/feature/files/src/main/assets/filetypes/video.svg new file mode 100644 index 0000000..fd94385 --- /dev/null +++ b/feature/files/src/main/assets/filetypes/video.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/feature/files/src/main/assets/filetypes/word.svg b/feature/files/src/main/assets/filetypes/word.svg new file mode 100644 index 0000000..0681f5c --- /dev/null +++ b/feature/files/src/main/assets/filetypes/word.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/feature/files/src/main/java/ru/forbion/f7cloud/feature/files/FileIcons.kt b/feature/files/src/main/java/ru/forbion/f7cloud/feature/files/FileIcons.kt index 97cc7a3..c2285b8 100644 --- a/feature/files/src/main/java/ru/forbion/f7cloud/feature/files/FileIcons.kt +++ b/feature/files/src/main/java/ru/forbion/f7cloud/feature/files/FileIcons.kt @@ -1,26 +1,30 @@ package ru.forbion.f7cloud.feature.files object FileIcons { - /** Те же SVG, что отдаёт F7cloud в `iconUrl` виджетов (mimeTypeIcon). */ + /** + * Иконка типа файла. Типы файлов — ЛОКАЛЬНЫЕ SVG из дизайна (assets/filetypes/, грузятся + * coil-svg): офлайн + точные иконки макета (раньше тянулись с сервера — аудит: офлайн ломался). + * Папка — пока с сервера (иконки папки в наборе дизайна нет; TODO забрать из Figma). + */ fun iconUrl(serverUrl: String, name: String, isDirectory: Boolean): String { - val base = "${serverUrl.trimEnd('/')}/core/img/filetypes" - val icon = if (isDirectory) "folder" else iconFileName(name) - return "$base/$icon.svg" + if (isDirectory) return "${serverUrl.trimEnd('/')}/core/img/filetypes/folder.svg" + return "file:///android_asset/filetypes/${localIcon(name)}.svg" } - private fun iconFileName(name: String): String { - val ext = name.substringAfterLast('.', "").lowercase() - return when (ext) { - "doc", "docx", "dot", "dotx", "odt", "rtf" -> "x-office-document" - "xls", "xlsx", "xlsm", "xlt", "xltx", "ods", "csv" -> "x-office-spreadsheet" - "ppt", "pptx", "pot", "potx", "odp" -> "x-office-presentation" - "odg" -> "x-office-drawing" - "pdf" -> "application-pdf" + private fun localIcon(name: String): String { + return when (name.substringAfterLast('.', "").lowercase()) { + "doc", "docx", "dot", "dotx", "odt", "rtf" -> "word" + "xls", "xlsx", "xlsm", "xlt", "xltx", "ods", "csv" -> "spreadsheet" + "ppt", "pptx", "pot", "potx", "odp" -> "presentation" + "pdf" -> "pdf" "jpg", "jpeg", "png", "gif", "webp", "bmp", "svg", "heic" -> "image" "mp3", "wav", "ogg", "flac", "aac" -> "audio" "mp4", "mkv", "avi", "mov", "webm" -> "video" - "zip", "rar", "7z", "tar", "gz" -> "package-x-generic" - "txt", "md" -> "text" + "zip", "rar", "7z", "tar", "gz" -> "archive" + "txt", "md", "log", "rtf" -> "text" + "eml", "msg" -> "eml" + "crt", "cer", "pem", "key", "p12" -> "certificate" + "kt", "java", "js", "ts", "py", "c", "cpp", "h", "json", "xml", "html", "css", "sh", "go", "rs" -> "code" else -> "file" } }