mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-05-22 07:11:35 +00:00
0.24.0.dev-rc4
This commit is contained in:
@@ -1492,14 +1492,13 @@ export class ConfigSync extends LiveSyncCommands implements IObsidianModule {
|
||||
return true;
|
||||
}
|
||||
async _askHiddenFileConfiguration(opt: { enableFetch?: boolean, enableOverwrite?: boolean }) {
|
||||
const message = `Would you like to enable \`Customization sync\`?
|
||||
This feature allows you to sync your customisations -- such as configurations, themes, snippets, and plugins -- across your devices in a fully controlled manner, unlike the fully automatic behaviour of hidden file synchronisation.
|
||||
const message = `Would you like to enable **Customization sync**?
|
||||
|
||||
You may use this feature alongside hidden file synchronisation. When both features are enabled, items configured as \`Automatic\` in this feature will be managed by hidden file synchronisation.
|
||||
|
||||
Do not worry, you will be prompted to enable or keep disabled hidden file synchronisation after this dialogue.
|
||||
|
||||
Of course, you can enable or disable this feature at any time.
|
||||
> [!DETAILS]-
|
||||
> This feature allows you to sync your customisations -- such as configurations, themes, snippets, and plugins -- across your devices in a fully controlled manner, unlike the fully automatic behaviour of hidden file synchronisation.
|
||||
>
|
||||
> You may use this feature alongside hidden file synchronisation. When both features are enabled, items configured as \`Automatic\` in this feature will be managed by **hidden file synchronisation**.
|
||||
> Do not worry, you will be prompted to enable or keep disabled **hidden file synchronisation** after this dialogue.
|
||||
`
|
||||
const CHOICE_CUSTOMIZE = "Yes, Enable it";
|
||||
const CHOICE_DISABLE = "No, Disable it";
|
||||
@@ -1576,6 +1575,7 @@ Of course, you can enable or disable this feature at any time.
|
||||
this.plugin.deviceAndVaultName = name;
|
||||
}
|
||||
this.plugin.settings.usePluginSync = true;
|
||||
this.plugin.settings.useAdvancedMode = true;
|
||||
await this.plugin.saveSettings();
|
||||
await this.scanAllConfigFiles(true);
|
||||
}
|
||||
|
||||
@@ -748,18 +748,19 @@ export class HiddenFileSync extends LiveSyncCommands implements IObsidianModule
|
||||
return true;
|
||||
}
|
||||
async _askHiddenFileConfiguration(opt: { enableFetch?: boolean, enableOverwrite?: boolean }) {
|
||||
const messageFetch = `${opt.enableFetch ? `- Fetch: Use the files stored from other devices. Choose this option if you have already configured hidden file synchronization on those devices and wish to accept their files.\n` : ""}`;
|
||||
const messageOverwrite = `${opt.enableOverwrite ? ` - Overwrite: Use the files from this device. Select this option if you want to overwrite the files stored on other devices.\n` : ""}`;
|
||||
const messageMerge = `- Merge: Merge the files from this device with those on other devices. Choose this option if you wish to combine files from multiple sources.
|
||||
However, please be reminded that merging may cause conflicts if the files are not identical. Additionally, this process may occur within the same folder, potentially breaking your plug-in or theme settings that comprise multiple files.\n`;
|
||||
const message = `Would you like to enable \`Hidden File Synchronization\`?
|
||||
|
||||
This feature allows you to synchronize all hidden files without any user interaction.
|
||||
To enable this feature, you should choose one of the following options:
|
||||
const messageFetch = `${opt.enableFetch ? `> - Fetch: Use the files stored from other devices. Choose this option if you have already configured hidden file synchronization on those devices and wish to accept their files.\n` : ""}`;
|
||||
const messageOverwrite = `${opt.enableOverwrite ? `> - Overwrite: Use the files from this device. Select this option if you want to overwrite the files stored on other devices.\n` : ""}`;
|
||||
const messageMerge = `> - Merge: Merge the files from this device with those on other devices. Choose this option if you wish to combine files from multiple sources.
|
||||
> However, please be reminded that merging may cause conflicts if the files are not identical. Additionally, this process may occur within the same folder, potentially breaking your plug-in or theme settings that comprise multiple files.\n`;
|
||||
const message = `Would you like to enable **Hidden File Synchronization**?
|
||||
|
||||
> [!DETAILS]-
|
||||
> This feature allows you to synchronize all hidden files without any user interaction.
|
||||
> To enable this feature, you should choose one of the following options:
|
||||
${messageFetch}${messageOverwrite}${messageMerge}
|
||||
|
||||
Note: Please keep in mind that enabling this feature alongside customisation sync may override certain behaviors.`
|
||||
> [!IMPORTANT]
|
||||
> Please keep in mind that enabling this feature alongside customisation sync may override certain behaviors.`
|
||||
const CHOICE_FETCH = "Fetch";
|
||||
const CHOICE_OVERWRITE = "Overwrite";
|
||||
const CHOICE_MERGE = "Merge";
|
||||
@@ -817,6 +818,7 @@ Note: Please keep in mind that enabling this feature alongside customisation syn
|
||||
} else if (mode == "MERGE") {
|
||||
await this.syncInternalFilesAndDatabase("safe", true);
|
||||
}
|
||||
this.plugin.settings.useAdvancedMode = true;
|
||||
this.plugin.settings.syncInternalFiles = true;
|
||||
await this.plugin.saveSettings();
|
||||
Logger(`Done! Restarting the app is strongly recommended!`, LOG_LEVEL_NOTICE);
|
||||
|
||||
Reference in New Issue
Block a user