settings: Video generation's how-to leads to the Providers page

With no model that makes videos, Settings › Models › Images' Video
generation says to right-click a model in its provider's Model settings
and mark it a video model, on another page, with no way there (the
scattered settings audit after netube99 on X). The line now ends in a
Providers › link that opens that page. It is drawn in videogen.js, so
the core script doesn't grow.

Run (mote, through mote-run, Chromium and WebKit): video-gen-pick
(every language it covers, 1100 and 400), signin-link-only and
i18n-keys, 78 of 78; TestCoreScriptBudget and the I18n Go tests.
Broken by hand: no onclick, video-gen-pick red in Chromium.
Not tried: the real app's window; the whole GUI suite runs after the
last of these changes.
This commit is contained in:
yetone
2026-11-10 00:01:15 +08:00
parent 8607a7a029
commit cedacf1aea
2 changed files with 21 additions and 7 deletions
+11 -2
View File
@@ -1,7 +1,8 @@
// Settings › Models › Images' Video generation: the model a video request
// that names none is made with, generate_video's — the one magpie picks or
// one named. A custom provider's model makes videos once marked so in its
// Model settings (#1399), which the row says while no model makes any.
// Model settings (#1399), which the row says while no model makes any,
// with a way to the Providers page.
// Image generation's Off turns it off too. app.js imports this when
// Settings draws Image generation, so it weighs nothing on the core.
@@ -16,7 +17,15 @@ window.videoGenFill = function (r, s, keep) {
r.hidden = false;
const who = el("div", "who");
who.append(el("div", "name", t("Video generation")), el("div", "sub wraps", t("The model Magpie Image makes videos with")));
if (!models.length && !v) who.append(el("div", "sub wraps video-gen-how", t("To make videos with a provider's model, right-click it in the provider's Model settings and choose Makes › Video model")));
if (!models.length && !v) {
// the way there: the Providers page, where a provider's models are
const how = el("div", "sub wraps video-gen-how", t("To make videos with a provider's model, right-click it in the provider's Model settings and choose Makes › Video model"));
const go = el("button", "text video-gen-go", t("Providers") + " ›");
go.type = "button";
go.onclick = () => show("providers");
how.append(" ", go);
who.append(how);
}
if (gone) who.append(el("div", "sub err video-gen-missing", s.videoGenAuto
? t("{model}, picked here, no longer makes videos: its provider was removed or turned off, or the model isn't marked a video model any more. {auto}, the automatic choice, makes videos in its place. Pick another model here.", { model: v, auto: named(s.videoGenAuto) })
: t("{model}, picked here, no longer makes videos: its provider was removed or turned off, or the model isn't marked a video model any more. No other model makes videos. Pick another model here.", { model: v })));
+10 -5
View File
@@ -68,11 +68,11 @@ function server(lang, cur, posted) {
}
const want = {
en: { name: "Video generation", auto: "Automatic", how: /^To make videos with a provider's model, right-click it/, none: "no model that makes videos", missing: "missing", gone: /^studio\/kling-v3, picked here, no longer makes videos/ },
zh: { name: "视频生成", auto: "自动", how: /类型:视频模型/, none: "没有能生成视频的模型", missing: "已失效", gone: /studio\/kling-v3[^]*Grok Imagine Video · Grok/ },
"zh-TW": { name: "影片生成", auto: "自動", how: /類型:影片模型/, none: "沒有能生成影片的模型", missing: "已失效", gone: /studio\/kling-v3[^]*Grok Imagine Video · Grok/ },
ja: { name: "動画生成", auto: "自動", how: /種類:動画モデル/, none: "動画を生成できるモデルがありません", missing: "見つかりません", gone: /studio\/kling-v3[^]*Grok Imagine Video · Grok/ },
de: { name: "Videoerzeugung", auto: "Automatisch", how: /Videomodell/, none: "kein Modell zur Videoerzeugung", missing: "fehlt", gone: /studio\/kling-v3[^]*Grok Imagine Video · Grok/ },
en: { providers: "Providers", name: "Video generation", auto: "Automatic", how: /^To make videos with a provider's model, right-click it/, none: "no model that makes videos", missing: "missing", gone: /^studio\/kling-v3, picked here, no longer makes videos/ },
zh: { providers: "供应商", name: "视频生成", auto: "自动", how: /类型:视频模型/, none: "没有能生成视频的模型", missing: "已失效", gone: /studio\/kling-v3[^]*Grok Imagine Video · Grok/ },
"zh-TW": { providers: "供應商", name: "影片生成", auto: "自動", how: /類型:影片模型/, none: "沒有能生成影片的模型", missing: "已失效", gone: /studio\/kling-v3[^]*Grok Imagine Video · Grok/ },
ja: { providers: "プロバイダ", name: "動画生成", auto: "自動", how: /種類:動画モデル/, none: "動画を生成できるモデルがありません", missing: "見つかりません", gone: /studio\/kling-v3[^]*Grok Imagine Video · Grok/ },
de: { providers: "Anbieter", name: "Videoerzeugung", auto: "Automatisch", how: /Videomodell/, none: "kein Modell zur Videoerzeugung", missing: "fehlt", gone: /studio\/kling-v3[^]*Grok Imagine Video · Grok/ },
};
for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium", "webkit"])) {
@@ -166,6 +166,11 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
assert.equal(await fits(page), 0);
shots.push([`${lang}-${width}-none`, await page.screenshot({ fullPage: true })]);
assert.deepEqual(posted, []);
// and the way there is a click away
const go = how.locator("button.video-gen-go");
assert.equal((await go.textContent()).trim(), `${w.providers} ›`);
await go.click();
await page.locator("#view-providers").waitFor({ state: "visible" });
assert.deepEqual(page.errors, []);
await page.context().close();
});