mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-30 07:05:24 +00:00
feat: rebuild desktop sync as linked server accounts, fix packaged plugin bundles and UI scaling
This commit is contained in:
1 parent
7c02daccf4
commit
6cd9a2846d
242 files changed
+39127
-8558
No files matched your search
@@ -74,6 +74,8 @@ export async function activate(ctx: PluginContext) {
|
||||
type: "snippets",
|
||||
table: snippetsTable,
|
||||
order: 60,
|
||||
// Host quick actions and keybindings in core point at snippets by this.
|
||||
answersTo: ["commandSnippet"],
|
||||
});
|
||||
|
||||
// The user row survives a password-reset data wipe, so it never triggers
|
||||
@@ -152,9 +154,6 @@ export async function activate(ctx: PluginContext) {
|
||||
if (!userId) throw new Error("snippets.access.remove needs an actor");
|
||||
await requirePermission("delete");
|
||||
const existing = await repo.deleteSnippet(userId, id);
|
||||
if (existing?.syncId) {
|
||||
await ctx.sync.recordTombstone(userId, "snippets", existing.syncId);
|
||||
}
|
||||
return !!existing;
|
||||
},
|
||||
};
|
||||
|
||||
@@ -319,12 +319,7 @@ export function registerSnippetRoutes(
|
||||
|
||||
try {
|
||||
const folderName = decodeURIComponent(name);
|
||||
const deleted = await repo.deleteFolder(userId, folderName);
|
||||
await ctx.sync.recordTombstone(
|
||||
userId,
|
||||
"snippetFolders",
|
||||
deleted?.syncId,
|
||||
);
|
||||
await repo.deleteFolder(userId, folderName);
|
||||
res.json({ success: true });
|
||||
} catch (err) {
|
||||
logError(
|
||||
@@ -921,7 +916,6 @@ export function registerSnippetRoutes(
|
||||
const existing = await repo.deleteSnippet(userId, parseInt(id, 10));
|
||||
if (!existing)
|
||||
return res.status(404).json({ error: "Snippet not found" });
|
||||
await ctx.sync.recordTombstone(userId, "snippets", existing.syncId);
|
||||
res.json({ success: true });
|
||||
} catch (err) {
|
||||
logError(ctx, "Failed to delete snippet", err, "snippet_delete_failed");
|
||||
|
||||
Reference in new issue
Block a user