Add video sorting, reference thumbnails, theme/i18n, menu, DnD/paste, presets
Feature work on top of the initial organizer: - Videos: .mp4/.mov/.avi/.mkv/.webm/.m4v sorted into output/Movie/YYYY/MM - Profiles: reference-image thumbnail cards via a secure photoai-media:// protocol (serves only registered reference images); per-thumbnail delete; add via click, drag & drop, or paste (Ctrl+V) using webUtils.getPathForFile + a byte-based addReferenceData path for clipboard images - Presets: local person library (max 5) saved to userData; one-click apply into active profiles; reusing stored descriptors (no recompute) - Theme: dark/light with dark default (Tailwind class strategy) - i18n: ko/en table-based localization; first-run onboarding to pick language + theme; English-neutral "Unsorted" folder (was [미정]) - App menu: File/Edit/View/Window/Help, localized; Help opens a detailed, theme-aware user guide window - UI: History block scrolls internally (no whole-window scroll); threshold/concurrency tooltips; generic example name - Settings persisted to userData/settings.json; menu + renderer kept in sync - Docs: NextGen Photo AI feasibility review + Phase 0/1 roadmap All typecheck/tests (12) /build green; boot smoke verified. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -10,9 +10,14 @@ describe('buildTargetPath', () => {
|
||||
expect(p.replace(/\\/g, '/')).toBe('/out/seunghyun/2024/03/photo.jpg')
|
||||
})
|
||||
|
||||
it('미검출(who=null) 시 [미정] 폴더로 보낸다', () => {
|
||||
it('미검출(who=null) 시 Unsorted 폴더로 보낸다', () => {
|
||||
const p = buildTargetPath('/out', null, date, '/src/photo.png')
|
||||
expect(p.replace(/\\/g, '/')).toBe('/out/[미정]/2024/03/photo.png')
|
||||
expect(p.replace(/\\/g, '/')).toBe('/out/Unsorted/2024/03/photo.png')
|
||||
})
|
||||
|
||||
it('영상은 Movie/YYYY/MM 폴더로 보낸다', () => {
|
||||
const p = buildTargetPath('/out', 'Movie', date, '/src/clip.mp4')
|
||||
expect(p.replace(/\\/g, '/')).toBe('/out/Movie/2024/03/clip.mp4')
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
import { describe, it, expect } from 'vitest'
|
||||
import { mediaKind } from '../src/main/scanner'
|
||||
|
||||
describe('mediaKind', () => {
|
||||
it('이미지 확장자를 image로 분류한다', () => {
|
||||
expect(mediaKind('a.jpg')).toBe('image')
|
||||
expect(mediaKind('a.JPEG')).toBe('image')
|
||||
expect(mediaKind('a.png')).toBe('image')
|
||||
expect(mediaKind('a.webp')).toBe('image')
|
||||
})
|
||||
|
||||
it('영상 확장자를 video로 분류한다', () => {
|
||||
expect(mediaKind('a.mp4')).toBe('video')
|
||||
expect(mediaKind('a.MOV')).toBe('video')
|
||||
expect(mediaKind('a.mkv')).toBe('video')
|
||||
expect(mediaKind('a.m4v')).toBe('video')
|
||||
})
|
||||
|
||||
it('지원하지 않는 확장자는 null', () => {
|
||||
expect(mediaKind('a.txt')).toBeNull()
|
||||
expect(mediaKind('a.heic')).toBeNull()
|
||||
expect(mediaKind('noext')).toBeNull()
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user