mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-28 06:05:24 +00:00
fix: finish 2.9.0 plugin moves and get every check green
This commit is contained in:
1 parent
8c1e02af89
commit
6489b62ece
335 files changed
+29878
-17749
No files matched your search
@@ -61,7 +61,8 @@
|
||||
"key": "profileId",
|
||||
"type": "number",
|
||||
"labelKey": "settings.host.profileId.label",
|
||||
"hidden": true
|
||||
"hidden": true,
|
||||
"ownerOnly": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"scripts": {
|
||||
"build": "termix-plugin build",
|
||||
"test": "termix-plugin test",
|
||||
"typecheck": "tsc -p tsconfig.json",
|
||||
"typecheck": "tsc -b ../../tsconfig.plugins.json ../../tsconfig.plugins.frontend.json",
|
||||
"validate": "termix-plugin validate"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -28,6 +28,19 @@ export async function activate(ctx: PluginContext) {
|
||||
order: 20,
|
||||
});
|
||||
|
||||
// A host's profileId is a local row id; remote sync carries the profile's
|
||||
// syncId instead, which is the same on both sides.
|
||||
ctx.registry.provide("vault.hostSettingsSync", {
|
||||
exportValue: async (key: string, value: unknown) =>
|
||||
key === "profileId" && typeof value === "number"
|
||||
? ((await profiles.findById(value))?.syncId ?? null)
|
||||
: value,
|
||||
importValue: async (key: string, value: unknown) =>
|
||||
key === "profileId" && typeof value === "string"
|
||||
? ((await profiles.findBySyncId(value))?.id ?? null)
|
||||
: value,
|
||||
});
|
||||
|
||||
registerRoutes(
|
||||
ctx,
|
||||
ctx.http.router<Router>({ public: PUBLIC_PATHS }),
|
||||
|
||||
@@ -84,6 +84,7 @@ export function createProfileStore(
|
||||
|
||||
return {
|
||||
findById,
|
||||
findBySyncId,
|
||||
|
||||
/** The user's own profiles plus every shared one. */
|
||||
async listVisible(userId: string): Promise<ProfileRow[]> {
|
||||
|
||||
Reference in new issue
Block a user