mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-11-04 09:35:24 +00:00
Compare commits
2
Commits
main
...
v26.11.1-beta.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f5895f15f2 | ||
|
|
4fb91850a0 |
No files matched your search
@@ -1,5 +1,11 @@
|
||||
# Changelog
|
||||
|
||||
## 26.11.1
|
||||
|
||||
### Fixed
|
||||
|
||||
- The first run plugin picker no longer sets the default layout and themes to Remove. They always stay on
|
||||
|
||||
## 26.11.0
|
||||
|
||||
### Fixed
|
||||
|
||||
@@ -200,8 +200,8 @@
|
||||
{
|
||||
"id": "reverse-proxy",
|
||||
"source": "tmxplug",
|
||||
"url": "https://github.com/Termix-SSH/Plugin-Reverse-Proxy/releases/download/v1.1.0/reverse-proxy-1.1.0.tmxplug",
|
||||
"sha256": "c8a9851da7ca6291c1f47cf6ab235da5057455a86b4ed0dc1c1a3026afb30aa7",
|
||||
"url": "https://github.com/Termix-SSH/Plugin-Reverse-Proxy/releases/download/v1.1.1/reverse-proxy-1.1.1.tmxplug",
|
||||
"sha256": "f5e0089ca5eae1254f21ce18b222e70eb2beeae3bd874c2abc4faa1a68d3e47a",
|
||||
"tier": "full"
|
||||
},
|
||||
{
|
||||
@@ -288,7 +288,9 @@
|
||||
"onboarding": {
|
||||
"recommended": false,
|
||||
"consent": false,
|
||||
"enabledByEnv": ["OIDC_CLIENT_ID"]
|
||||
"enabledByEnv": [
|
||||
"OIDC_CLIENT_ID"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -351,8 +353,8 @@
|
||||
{
|
||||
"id": "tunnels",
|
||||
"source": "tmxplug",
|
||||
"url": "https://github.com/Termix-SSH/Plugin-Tunnels/releases/download/v1.2.2/tunnels-1.2.2.tmxplug",
|
||||
"sha256": "92d89c5bf7fa43fff790cc5240ae75eaf05c3c9089c6a0dfb68bbc37c517bf04",
|
||||
"url": "https://github.com/Termix-SSH/Plugin-Tunnels/releases/download/v1.2.3/tunnels-1.2.3.tmxplug",
|
||||
"sha256": "5a23953ee19b2951bb895e033d2099b8f6d5abc0121253ef3da25328134984ad",
|
||||
"tier": "standard",
|
||||
"onboarding": {
|
||||
"recommended": true,
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
import { pluginLogger } from "../utils/logger.js";
|
||||
import { getPluginRuntime } from "./index.js";
|
||||
import { onboardingDefaults } from "./bundled-index.js";
|
||||
import { isDefaultLookPlugin, onboardingDefaults } from "./bundled-index.js";
|
||||
import {
|
||||
isLinkedDesktop,
|
||||
serialized,
|
||||
@@ -99,6 +99,11 @@ export async function offerPluginSetup(fresh: boolean): Promise<void> {
|
||||
await settings.set(PLUGIN_SETUP_OFFERED_KEY, "1");
|
||||
}
|
||||
|
||||
// The shipped default look always stays on, so the picker never offers it.
|
||||
function inPicker(plugin: { id: string; source: string }): boolean {
|
||||
return !(plugin.source === "bundled" && isDefaultLookPlugin(plugin.id));
|
||||
}
|
||||
|
||||
function choicePlugins(): ChoicePlugin[] {
|
||||
return getPluginRuntime()
|
||||
.loader.list()
|
||||
@@ -118,6 +123,7 @@ export async function describeOnboardingPlugins(): Promise<OnboardingPluginList>
|
||||
);
|
||||
const plugins = getPluginRuntime()
|
||||
.loader.list()
|
||||
.filter(inPicker)
|
||||
.map((plugin): OnboardingPluginInfo => {
|
||||
const defaults =
|
||||
plugin.source === "bundled"
|
||||
@@ -158,7 +164,12 @@ export function applyOnboardingChoices(
|
||||
): Promise<OnboardingApplyResult> {
|
||||
return serialized(async () => {
|
||||
const plugins = choicePlugins();
|
||||
const installed = new Set(plugins.map((plugin) => plugin.id));
|
||||
const installed = new Set(
|
||||
getPluginRuntime()
|
||||
.loader.list()
|
||||
.filter(inPicker)
|
||||
.map((plugin) => plugin.id),
|
||||
);
|
||||
const wanted: Record<string, PluginChoice> = {};
|
||||
for (const [id, choice] of Object.entries(choices)) {
|
||||
if (installed.has(id)) wanted[id] = choice;
|
||||
|
||||
@@ -197,6 +197,13 @@ describe("describeOnboardingPlugins", () => {
|
||||
});
|
||||
expect(byId.extra).toMatchObject({ recommended: true, consent: true });
|
||||
});
|
||||
|
||||
it("leaves out the default look", async () => {
|
||||
writeIndex({ extra: { defaultLook: true } });
|
||||
await chain();
|
||||
const list = await onboarding.describeOnboardingPlugins();
|
||||
expect(list.plugins.map((p) => p.id).sort()).toEqual(["addon", "base"]);
|
||||
});
|
||||
});
|
||||
|
||||
describe("applyOnboardingChoices", () => {
|
||||
@@ -263,6 +270,22 @@ describe("applyOnboardingChoices", () => {
|
||||
expect(db.settings.get(onboarding.PLUGIN_SETUP_PENDING_KEY)).toBe("1");
|
||||
});
|
||||
|
||||
it("never turns off or removes the default look", async () => {
|
||||
writeIndex({ extra: { defaultLook: true } });
|
||||
const loader = await chain();
|
||||
const result = await onboarding.applyOnboardingChoices({
|
||||
extra: "remove",
|
||||
base: "remove",
|
||||
addon: "remove",
|
||||
});
|
||||
expect(result.failed).toEqual([]);
|
||||
expect(result.removed).toEqual(["addon", "base"]);
|
||||
expect(loader.get("extra")?.state).toBe("active");
|
||||
|
||||
await onboarding.applyOnboardingChoices({ extra: "disabled" });
|
||||
expect(loader.get("extra")?.state).toBe("active");
|
||||
});
|
||||
|
||||
it("ignores ids that are not installed", async () => {
|
||||
await chain();
|
||||
const result = await onboarding.applyOnboardingChoices({
|
||||
|
||||
Reference in new issue
Block a user