Settings/keymap backup path next to files + update notification messages (#24517)

Before:


![image](https://github.com/user-attachments/assets/5b7d8677-b0db-4a66-ac30-e4751ba4182d)

After:


![image](https://github.com/user-attachments/assets/94743bc2-2902-43a3-8d6e-e0e0e6e469ec)

Release Notes:

- N/A
This commit is contained in:
Michael Sloan 2025-02-09 16:51:37 -07:00 committed by GitHub
parent cf74d653bd
commit 1a133ab9d8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 116 additions and 62 deletions

View file

@ -145,12 +145,24 @@ pub fn settings_file() -> &'static PathBuf {
SETTINGS_FILE.get_or_init(|| config_dir().join("settings.json"))
}
/// Returns the path to the `settings_backup.json` file.
pub fn settings_backup_file() -> &'static PathBuf {
static SETTINGS_FILE: OnceLock<PathBuf> = OnceLock::new();
SETTINGS_FILE.get_or_init(|| config_dir().join("settings_backup.json"))
}
/// Returns the path to the `keymap.json` file.
pub fn keymap_file() -> &'static PathBuf {
static KEYMAP_FILE: OnceLock<PathBuf> = OnceLock::new();
KEYMAP_FILE.get_or_init(|| config_dir().join("keymap.json"))
}
/// Returns the path to the `keymap_backup.json` file.
pub fn keymap_backup_file() -> &'static PathBuf {
static KEYMAP_FILE: OnceLock<PathBuf> = OnceLock::new();
KEYMAP_FILE.get_or_init(|| config_dir().join("keymap_backup.json"))
}
/// Returns the path to the `tasks.json` file.
pub fn tasks_file() -> &'static PathBuf {
static TASKS_FILE: OnceLock<PathBuf> = OnceLock::new();