feat(backup): timestamp the exported config filename#30
Conversation
Config export always suggested the same "LockIME Backup.lockime" name, so successive exports were indistinguishable in Finder. The suggested name now carries a local-time stamp (e.g. LockIME Backup 2026-06-22 23-15-28.lockime), which is also sortable by name. The stamp is built from calendar components in a fixed, locale- independent layout rather than a DateFormatter string, so it never leaks the system locale into a name the app's language override is meant to govern. Feed NSSavePanel the extension-less stem and let allowedContentTypes append the single .lockime: embedding the extension makes the panel append a second one (.lockime.lockime), especially once the stem contains dots. Time fields use "-" (not ":" or ".") so the stem stays filename-legal and free of anything the panel could mistake for an existing extension. Signed-off-by: Kevin Cui <bh@bugs.cc>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
Summary by CodeRabbit
Walkthrough
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches✨ Simplify code
Comment |
Config export always suggested the same "LockIME Backup.lockime" name, so successive exports were indistinguishable in Finder. The suggested name now carries a local-time stamp (e.g. LockIME Backup 2026-06-22 23-15-28.lockime), which is also sortable by name.
The stamp is built from calendar components in a fixed, locale- independent layout rather than a DateFormatter string, so it never leaks the system locale into a name the app's language override is meant to govern.
Feed NSSavePanel the extension-less stem and let allowedContentTypes append the single .lockime: embedding the extension makes the panel append a second one (.lockime.lockime), especially once the stem contains dots. Time fields use "-" (not ":" or ".") so the stem stays filename-legal and free of anything the panel could mistake for an existing extension.