mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-04-02 23:25:18 +00:00
Improved - New Translation: `es` (Spanish) by @zeedif (Thank you so much)! - Now all of messages can be selectable and copyable, also on the iPhone, iPad, and Android devices. Now we can copy or share the messages easily. New Feature - Peer-to-Peer Synchronisation has been implemented! Fixed - No longer memory or resource leaks when the plug-in is disabled. - Now deleted chunks are correctly detected on conflict resolution, and we are guided to resurrect them. - Hanging issue during the initial synchronisation has been fixed. - Some unnecessary logs have been removed. - Now all modal dialogues are correctly closed when the plug-in is disabled. Refactor - Several interfaces have been moved to the separated library. - Translations have been moved to each language file, and during the build, they are merged into one file. - Non-mobile friendly code has been removed and replaced with the safer code. - Started writing Platform impedance-matching-layer. - Svelte has been updated to v5. - Some function have got more robust type definitions. - Terser optimisation has slightly improved. - During the build, analysis meta-file of the bundled codes will be generated.
38 lines
1.1 KiB
TypeScript
38 lines
1.1 KiB
TypeScript
import { mount, unmount } from "svelte";
|
|
import { App, Modal } from "../../deps.ts";
|
|
import ObsidianLiveSyncPlugin from "../../main.ts";
|
|
import PluginPane from "./PluginPane.svelte";
|
|
export class PluginDialogModal extends Modal {
|
|
plugin: ObsidianLiveSyncPlugin;
|
|
component: ReturnType<typeof mount> | undefined;
|
|
isOpened() {
|
|
return this.component != undefined;
|
|
}
|
|
|
|
constructor(app: App, plugin: ObsidianLiveSyncPlugin) {
|
|
super(app);
|
|
this.plugin = plugin;
|
|
}
|
|
|
|
onOpen() {
|
|
const { contentEl } = this;
|
|
this.contentEl.style.overflow = "auto";
|
|
this.contentEl.style.display = "flex";
|
|
this.contentEl.style.flexDirection = "column";
|
|
this.titleEl.setText("Customization Sync (Beta3)");
|
|
if (!this.component) {
|
|
this.component = mount(PluginPane, {
|
|
target: contentEl,
|
|
props: { plugin: this.plugin },
|
|
});
|
|
}
|
|
}
|
|
|
|
onClose() {
|
|
if (this.component) {
|
|
void unmount(this.component);
|
|
this.component = undefined;
|
|
}
|
|
}
|
|
}
|