gui: the check-in time reads as the one time for every vendor
settings.checkinAt is one time that every daily check-in waits for. Its row is drawn under each vendor's check-in, in WorkBuddy's, Trae's, MiniMax's, Qoder's and each plugin's editor, and its picks said Off and On. Under one vendor that read as turning that vendor's check-in off, while it set every vendor's time. The row is now "Check-in time for every vendor", with "Day start" and "Set time". The backend keeps one time, so the row stays one shared setting rather than one per vendor. Same settings, same saves. Translated in zh, zh-TW, ja and de. Run (mote, at this tree): - checkin-at.test.cjs (Chromium and WebKit, 1100 and 420, en zh zh-TW ja de) and i18n-keys.test.cjs: 44 pass. - go test ./internal/gui -run 'TestCoreScriptBudget|TestI18n|TestCSS': ok. Broken by hand: checkin-at against the old checkinnow.js, 20 of 40 red (the name and the Off/On picks), every engine, width and language. Not tried: the real app window.
This commit is contained in:
@@ -111,14 +111,15 @@ function checkinNowLine(r, who) {
|
||||
}
|
||||
|
||||
// ciAtFill draws the check-in's time of day into row (checkinAt; times_ang
|
||||
// on X): Off asks as each vendor's day starts, On at 09:00 or the time typed.
|
||||
// on X), one for every vendor's: Day start asks as each vendor's day starts,
|
||||
// Set time at 09:00 or the time typed. Not On/Off: the check-in is its own.
|
||||
window.ciAtFill = function (row, s) {
|
||||
const at = s.checkinAt || "";
|
||||
const save = (v) => savePrefs({ ...prefsKeep(s), checkinAt: v });
|
||||
const who = el("div", "who");
|
||||
const sub = el("div", "sub", at ? t("From {at} each day, for every vendor's check-in", { at }) : t("As soon as each vendor's day starts"));
|
||||
sub.title = t("A computer asleep then checks in when it wakes.");
|
||||
who.append(el("div", "name", t("Check-in time")), sub);
|
||||
who.append(el("div", "name", t("Check-in time for every vendor")), sub);
|
||||
const box = el("div", "warm-at" + (at ? " times" : ""));
|
||||
if (at) {
|
||||
const i = input(at, "09:00", "time");
|
||||
@@ -132,7 +133,7 @@ window.ciAtFill = function (row, s) {
|
||||
list.append(one);
|
||||
box.append(list);
|
||||
}
|
||||
box.append(segs([["off", t("Off")], ["on", t("On")]], at ? "on" : "off", (v) => save(v === "on" ? at || "09:00" : "")));
|
||||
box.append(segs([["off", t("Day start")], ["on", t("Set time")]], at ? "on" : "off", (v) => save(v === "on" ? at || "09:00" : "")));
|
||||
row.hidden = false;
|
||||
row.append(who, box);
|
||||
};
|
||||
|
||||
@@ -63,7 +63,9 @@ const I18N = {
|
||||
"Codex CLI": "Codex 命令行",
|
||||
"Codex Desktop": "Codex 桌面版",
|
||||
"Which Codex requests to your ChatGPT accounts say they come from: the CLI or the desktop app": "发往 ChatGPT 账号的请求自称是哪个 Codex:命令行或桌面版应用",
|
||||
"Check-in time": "签到时间",
|
||||
"Check-in time for every vendor": "所有服务商的签到时间",
|
||||
"Day start": "新一天开始",
|
||||
"Set time": "指定时间",
|
||||
"From {at} each day, for every vendor's check-in": "每天 {at} 起签到,所有服务商的签到都按这个时间",
|
||||
"As soon as each vendor's day starts": "每个服务商的新一天一开始就签到",
|
||||
"A computer asleep then checks in when it wakes.": "到点时电脑在睡眠的话,醒来后再签到。",
|
||||
@@ -5540,7 +5542,9 @@ const I18N = {
|
||||
"Codex CLI": "Codex 命令列",
|
||||
"Codex Desktop": "Codex 桌面版",
|
||||
"Which Codex requests to your ChatGPT accounts say they come from: the CLI or the desktop app": "送往 ChatGPT 帳號的請求自稱是哪個 Codex:命令列或桌面版應用程式",
|
||||
"Check-in time": "簽到時間",
|
||||
"Check-in time for every vendor": "所有服務商的簽到時間",
|
||||
"Day start": "新一天開始",
|
||||
"Set time": "指定時間",
|
||||
"From {at} each day, for every vendor's check-in": "每天 {at} 起簽到,所有服務商的簽到都按這個時間",
|
||||
"As soon as each vendor's day starts": "每個服務商的新一天一開始就簽到",
|
||||
"A computer asleep then checks in when it wakes.": "到點時電腦在睡眠的話,醒來後再簽到。",
|
||||
@@ -11001,7 +11005,9 @@ const I18N = {
|
||||
"Codex CLI": "Codex CLI",
|
||||
"Codex Desktop": "Codex Desktop",
|
||||
"Which Codex requests to your ChatGPT accounts say they come from: the CLI or the desktop app": "ChatGPT アカウントへのリクエストが名乗る Codex:CLI またはデスクトップアプリ",
|
||||
"Check-in time": "チェックインの時刻",
|
||||
"Check-in time for every vendor": "すべてのサービスのチェックイン時刻",
|
||||
"Day start": "日付が変わったら",
|
||||
"Set time": "時刻を指定",
|
||||
"From {at} each day, for every vendor's check-in": "毎日 {at} からチェックイン(すべてのサービスのチェックインに共通)",
|
||||
"As soon as each vendor's day starts": "各サービスの日付が変わったらすぐにチェックイン",
|
||||
"A computer asleep then checks in when it wakes.": "その時刻にスリープ中なら、復帰後にチェックインします。",
|
||||
@@ -16464,7 +16470,9 @@ const I18N = {
|
||||
"Codex CLI": "Codex CLI",
|
||||
"Codex Desktop": "Codex Desktop",
|
||||
"Which Codex requests to your ChatGPT accounts say they come from: the CLI or the desktop app": "Als welches Codex sich Anfragen an ChatGPT-Konten ausgeben: CLI oder Desktop-App",
|
||||
"Check-in time": "Check-in-Zeit",
|
||||
"Check-in time for every vendor": "Check-in-Zeit für alle Anbieter",
|
||||
"Day start": "Tagesbeginn",
|
||||
"Set time": "Feste Zeit",
|
||||
"From {at} each day, for every vendor's check-in": "Täglich ab {at}, für den Check-in jedes Anbieters",
|
||||
"As soon as each vendor's day starts": "Sobald der Tag des jeweiligen Anbieters beginnt",
|
||||
"A computer asleep then checks in when it wakes.": "Schläft der Computer dann, wird beim Aufwachen eingecheckt.",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Run with Node's test runner and Playwright on the module path; see README.md.
|
||||
// times_ang on X: "magpie 可以调整自动签到的时间吗". Under a daily check-in
|
||||
// that is on, a Check-in time row: Off (as each vendor's day starts) or
|
||||
// On at 09:00, a time typed then saved as settings.checkinAt through
|
||||
// that is on, the one Check-in time for every vendor: Day start (as each
|
||||
// vendor's day starts) or Set time at 09:00, a time typed then saved as settings.checkinAt through
|
||||
// POST /api/settings, and Off again saves ""; a plugin's check-in group
|
||||
// has the same row, a check-in turned off none. An account not checked in
|
||||
// yet says the time on its Usage card. Chromium and WebKit, the window at
|
||||
@@ -52,11 +52,11 @@ function serve(lang, saved, at) {
|
||||
}
|
||||
|
||||
const words = {
|
||||
en: { name: "Check-in time", off: "As soon as each vendor's day starts", on: "From 21:30 each day, for every vendor's check-in", card: "Not checked in yet today · checks in from 21:30" },
|
||||
zh: { name: "签到时间", off: "每个服务商的新一天一开始就签到", on: "每天 21:30 起签到,所有服务商的签到都按这个时间", card: "今日尚未签到 · 21:30 起签到" },
|
||||
"zh-TW": { name: "簽到時間", off: "每個服務商的新一天一開始就簽到", on: "每天 21:30 起簽到,所有服務商的簽到都按這個時間", card: "今日尚未簽到 · 21:30 起簽到" },
|
||||
ja: { name: "チェックインの時刻", off: "各サービスの日付が変わったらすぐにチェックイン", on: "毎日 21:30 からチェックイン(すべてのサービスのチェックインに共通)", card: "今日はまだチェックインしていません · 21:30 からチェックイン" },
|
||||
de: { name: "Check-in-Zeit", off: "Sobald der Tag des jeweiligen Anbieters beginnt", on: "Täglich ab 21:30, für den Check-in jedes Anbieters", card: "Heute noch nicht eingecheckt · Check-in ab 21:30" },
|
||||
en: { name: "Check-in time for every vendor", segs: ["Day start", "Set time"], off: "As soon as each vendor's day starts", on: "From 21:30 each day, for every vendor's check-in", card: "Not checked in yet today · checks in from 21:30" },
|
||||
zh: { name: "所有服务商的签到时间", segs: ["新一天开始", "指定时间"], off: "每个服务商的新一天一开始就签到", on: "每天 21:30 起签到,所有服务商的签到都按这个时间", card: "今日尚未签到 · 21:30 起签到" },
|
||||
"zh-TW": { name: "所有服務商的簽到時間", segs: ["新一天開始", "指定時間"], off: "每個服務商的新一天一開始就簽到", on: "每天 21:30 起簽到,所有服務商的簽到都按這個時間", card: "今日尚未簽到 · 21:30 起簽到" },
|
||||
ja: { name: "すべてのサービスのチェックイン時刻", segs: ["日付が変わったら", "時刻を指定"], off: "各サービスの日付が変わったらすぐにチェックイン", on: "毎日 21:30 からチェックイン(すべてのサービスのチェックインに共通)", card: "今日はまだチェックインしていません · 21:30 からチェックイン" },
|
||||
de: { name: "Check-in-Zeit für alle Anbieter", segs: ["Tagesbeginn", "Feste Zeit"], off: "Sobald der Tag des jeweiligen Anbieters beginnt", on: "Täglich ab 21:30, für den Check-in jedes Anbieters", card: "Heute noch nicht eingecheckt · Check-in ab 21:30" },
|
||||
};
|
||||
|
||||
function launch(engine) {
|
||||
@@ -84,6 +84,8 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
|
||||
assert.equal((await row.locator(".name").innerText()).trim(), w.name);
|
||||
assert.equal((await row.locator(".sub").innerText()).trim(), w.off);
|
||||
assert.equal(await row.locator("input.at").count(), 0, "no time while Off");
|
||||
// one time for every vendor, not an On/Off of this vendor's check-in
|
||||
assert.deepEqual((await row.locator(".segs .opt").allInnerTexts()).map((x) => x.trim()), w.segs);
|
||||
assert.equal(await page.locator("#traeList .ci-at-row").count(), 0, "a check-in turned off has none");
|
||||
assert.equal(await page.locator('.ci-plugin[data-provider="autoclaw"] .ci-at-row').count(), 1, "a plugin's check-in has one");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user