shell: the Store view and install screen as framework React components, strings in the framework catalogs

Moved from wayBetter for X so every wayBetter app gets the Store UI; the app passes its native
bridge, theme adapter, translator and (optionally) its own controls and button classes.

- storeModel.ts: wire types of the native store commands (InstallPreview, StoreCatalogView,
  LinkEvent, StoreItem with `apps`), permission badges in the site's words, categories, item state
  (install/installed/update/changed locally/built in), search, free theme ids, versions, previews.
- installController.ts: the install screen's state machine (links incl. those queued before the
  shell listened, dropped files, store items, cancel, confirm), generic over the app's theme format
  (`ThemeAdapter`: parse, ids, facts, save) and its bridge (`StoreBackend`: invoke/listen).
- InstallDialog.tsx (`InstallHost`): the screen (Install enabled after 1 s, Enter never installs,
  tabs hidden via setOverlay) and the window-wide drop target. StoreView.tsx: search, kinds,
  categories, cards, permission badges, install/update/remove; default controls or the app's.
- store.css: both, themed with framework `--wb-*` tokens (documented; dark defaults).
- storeMessages.ts + every framework catalog: 120 `wb.store.*`, `wb.install.*`, `wb.permission.*`
  messages moved from the app catalogs with all existing translations; the six that named X take
  `{site}`; generic words the components need copied with their translations.
- npm package: exports for the new modules and store.css, optional react/react-dom peers; @types
  for the typecheck. Tests: models, controller flows with a fake bridge, every looked-up key exists.
This commit is contained in:
CRTkafa 2026-09-29 11:08:04 +07:00
parent bb9deebb67
commit dc449de9c2
63 changed files with 7345 additions and 53 deletions

View file

@ -23,6 +23,126 @@
"wb.update.installingLabel": "กำลังอัปเดต…",
"wb.update.installingTitle": "กำลังติดตั้ง {product} {version}",
"wb.update.problemLabel": "ปัญหาการอัปเดต",
"wb.update.problemTitle": "การอัปเดตครั้งล่าสุดเริ่มต้นไม่ถูกต้อง ดาวน์โหลดเวอร์ชันปัจจุบัน"
"wb.update.problemTitle": "การอัปเดตครั้งล่าสุดเริ่มต้นไม่ถูกต้อง ดาวน์โหลดเวอร์ชันปัจจุบัน",
"wb.permission.storage.label": "ที่เก็บข้อมูล",
"wb.permission.storage.detail": "เก็บการตั้งค่าของตัวเองไว้ในแอปนี้ (api.storage)",
"wb.permission.ui.label": "กล่องโต้ตอบ",
"wb.permission.ui.detail": "แสดงกล่องโต้ตอบ พรอมต์ และการแจ้งเตือน (api.ui, api.toast)",
"wb.permission.clipboard.label": "คลิปบอร์ด",
"wb.permission.clipboard.detail": "คัดลอกข้อความไปยังคลิปบอร์ดของคุณ (api.copyText)",
"wb.permission.account.label": "บัญชีของคุณ",
"wb.permission.account.detail": "อ่านว่าลงชื่อเข้าใช้บัญชี {site} ใดอยู่: แฮนเดิล ชื่อ รูปโปรไฟล์ (api.account)",
"wb.permission.commands.label": "คำสั่ง",
"wb.permission.commands.detail": "เพิ่มคำสั่งลงในพาเลตคำสั่ง (Ctrl+K) ที่ทำงานในหน้านี้ (api.commands)",
"wb.permission.users.label": "รายละเอียดบัญชี",
"wb.permission.users.detail": "อ่านสิ่งที่การตอบกลับของ {site} เองระบุเกี่ยวกับบัญชี: ยืนยันแล้ว ติดตามคุณ (api.users)",
"wb.permission.network.label": "อินเทอร์เน็ต",
"wb.permission.network.detail": "แจ้งว่าเชื่อมต่อกับเซิร์ฟเวอร์บนอินเทอร์เน็ต",
"wb.permission.networkNone.label": "ไม่ใช้เครือข่าย",
"wb.permission.networkNone.detail": "แจ้งว่าไม่เชื่อมต่อกับเซิร์ฟเวอร์ใดเลย การตรวจสอบตอนติดตั้งไม่พบการเรียกเครือข่ายในโค้ด",
"wb.permission.legacy.label": "แบบเดิม · เข้าถึงหน้าเต็ม",
"wb.permission.legacy.detail": "ไม่มีบรรทัด @permissions: จึงได้ API ปลั๊กอินทั้งหมด เหมือนปลั๊กอินก่อนมีสิทธิ์",
"wb.permission.none.label": "ไม่มีสิทธิ์พิเศษ",
"wb.permission.none.detail": "เฉพาะตัวช่วยหน้าเว็บพื้นฐาน (CSS, DOM, เส้นทาง, คีย์, ธีม)",
"wb.permission.unknown": "สิทธิ์ที่ไม่รู้จัก",
"wb.store.category.reading": "การอ่าน",
"wb.store.category.writing": "การเขียน",
"wb.store.category.filters": "ตัวกรอง",
"wb.store.category.focus": "โฟกัส",
"wb.store.category.tools": "เครื่องมือ",
"wb.store.category.dark": "มืด",
"wb.store.category.light": "สว่าง",
"wb.store.builtIn": "ในตัว",
"wb.store.use": "ใช้",
"wb.store.install": "ติดตั้ง",
"wb.store.updateTo": "อัปเดตเป็น {version}",
"wb.store.modifiedTitle": "ไฟล์ที่ติดตั้งต่างจากในร้านค้า (ถูกแก้ไข หรือมาจากที่อื่น) ร้านค้าจะไม่ยุ่งกับไฟล์นี้",
"wb.store.modified": "เปลี่ยนแปลงในเครื่อง",
"wb.store.replace": "แทนที่",
"wb.store.installed": "ติดตั้งแล้ว",
"wb.store.installedVersion": "ติดตั้งแล้ว · v{version}",
"wb.store.offline": "สำเนาออฟไลน์จาก {when}: {error}",
"wb.store.unreachableShort": "เข้าถึงร้านค้าไม่ได้",
"wb.store.verified": "ตรวจสอบแคตตาล็อกที่ลงนามแล้ว · อัปเดต {when}",
"wb.store.intro": "ธีมและปลั๊กอินจากร้านค้า wayBetter แคตตาล็อกลงนามไว้ wayBetter ตรวจลายเซ็นและ SHA-256 ของทุกการดาวน์โหลดก่อนแสดงหน้าจอติดตั้ง ปลั๊กอินแสดงสิทธิ์ที่ขอ",
"wb.store.search": "ค้นหาร้านค้า",
"wb.store.searchPlaceholder": "ค้นหาธีมและปลั๊กอิน",
"wb.store.kind": "ประเภท",
"wb.store.themes": "ธีม",
"wb.store.checking": "กำลังตรวจสอบ…",
"wb.store.refresh": "รีเฟรช",
"wb.store.categories": "หมวดหมู่",
"wb.store.everything": "ทั้งหมด",
"wb.store.updates": "มี{count, plural, other {อัปเดต #}}รายการ",
"wb.store.unreachable": "เข้าถึงร้านค้าไม่ได้",
"wb.store.tryAgain": "ลองอีกครั้ง",
"wb.store.noCatalog": "ยังไม่มีแคตตาล็อก",
"wb.store.nothingChanged": "ไม่มีการติดตั้งหรือเปลี่ยนแปลงใด ๆ",
"wb.store.noMatch": "ไม่มีรายการที่ตรงกัน",
"wb.store.noMatchHint": "ลองคำหรือหมวดหมู่อื่น",
"wb.store.plugin": "ปลั๊กอิน",
"wb.store.by": "โดย {author}",
"wb.store.permissions": "สิทธิ์",
"wb.store.themeNow": "ตอนนี้ {name} เป็นธีมของคุณแล้ว",
"wb.store.foot": "มีไฟล์ธีมหรือปลั๊กอินอยู่แล้วใช่ไหม วางลงในหน้าต่าง wayBetter หรือเปิดลิงก์ waybetter://install จาก waybetter.fyi คุณจะเห็นหน้าจอติดตั้งนี้ก่อนเสมอ",
"wb.install.lines": "{count, plural, other {# บรรทัด}}",
"wb.install.moreLines": "แสดงอีก {count, plural, other {# บรรทัด}}",
"wb.install.reinstall": "ติดตั้งใหม่",
"wb.install.update": "อัปเดต",
"wb.install.eyebrow.install": "{kind, select, plugin {ติดตั้งปลั๊กอิน} theme {ติดตั้งธีม} other {ติดตั้ง}}",
"wb.install.eyebrow.update": "{kind, select, plugin {อัปเดตปลั๊กอิน} theme {อัปเดตธีม} other {อัปเดต}}",
"wb.install.eyebrow.reinstall": "{kind, select, plugin {ติดตั้งปลั๊กอินใหม่} theme {ติดตั้งธีมใหม่} other {ติดตั้งใหม่}}",
"wb.install.noAuthor": "ไม่ระบุผู้สร้างหรือเวอร์ชัน",
"wb.install.verified": "ยืนยันแล้ว",
"wb.install.installedNow": "ติดตั้งเมื่อกี้",
"wb.install.identical": "v{version} (เหมือนกัน)",
"wb.install.on": "เมื่อ",
"wb.install.replaces": "แทนที่",
"wb.install.replacesValue": "สำเนาธีมนี้ของคุณ",
"wb.install.copyHash": "คัดลอก SHA-256",
"wb.install.permissions": "สิทธิ์ที่ระบุ",
"wb.install.pageAccess": "ปลั๊กอินทำงานภายใน {site} ด้วยสิทธิ์เข้าถึงเท่ากับหน้าเว็บ: อ่านสิ่งที่ {site} แสดงให้คุณและดำเนินการในนั้นได้ สิทธิ์จำกัดเฉพาะสิ่งที่ API ของ wayBetter ให้ปลั๊กอิน ไม่ใช่หน้าเว็บ ติดตั้งเฉพาะโค้ดที่คุณเชื่อถือ",
"wb.install.theCode": "โค้ด",
"wb.install.themeCss": "CSS ของธีม (ทำงานใน {site} เหมือน CSS กำหนดเองของคุณ)",
"wb.install.code": "โค้ดที่จะติดตั้ง",
"wb.install.staysOn": "ยังคงเปิดอยู่",
"wb.install.turnOn": "เปิดใช้ตอนนี้",
"wb.install.useNow": "ใช้ตอนนี้",
"wb.install.installing": "กำลังติดตั้ง…",
"wb.install.done": "ติดตั้ง {name} แล้ว",
"wb.install.done.pluginOn": "ตอนนี้ทำงานอยู่ในแท็บ {site} ของคุณ ปิดได้ทุกเมื่อในปลั๊กอิน",
"wb.install.done.pluginOff": "ปิดอยู่ เปิดในปลั๊กอินเมื่อต้องการ",
"wb.install.done.themeOn": "ตอนนี้เป็นธีมของคุณแล้ว สลับกลับได้ทุกเมื่อในรูปลักษณ์",
"wb.install.done.themeOff": "อยู่ในธีมของคุณในรูปลักษณ์",
"wb.install.done.fonts": "ระบุฟอนต์ Google ({fonts}) รูปลักษณ์ดาวน์โหลดให้คุณได้ จนกว่าจะดาวน์โหลดจะใช้ฟอนต์สำรอง",
"wb.install.openPlugins": "เปิดปลั๊กอิน",
"wb.install.openAppearance": "เปิดรูปลักษณ์",
"wb.install.doneButton": "เสร็จสิ้น",
"wb.install.drop": "วางเพื่อติดตั้ง",
"wb.install.dropHint": "ธีม (.json) หรือปลั๊กอิน (.plugin.js) คุณจะเห็นว่าคืออะไรก่อนติดตั้งอะไรก็ตาม",
"wb.install.err.theme": "ติดตั้งธีมนี้ไม่ได้",
"wb.install.stage.link": "{kind, select, plugin {ติดตั้งปลั๊กอินจาก {host}} theme {ติดตั้งธีมจาก {host}} other {ติดตั้งจาก {host}}}",
"wb.install.stage.linkDetail": "กำลังดาวน์โหลดและตรวจสอบ…",
"wb.install.err.kind": "“{file}” ไม่ใช่ธีมหรือปลั๊กอิน",
"wb.install.err.kindHint": "wayBetter ติดตั้งธีม (.json) และปลั๊กอิน (.plugin.js) หากต้องการแนบไฟล์กับโพสต์ ให้วางลงในช่องเขียนของ {site} แทน",
"wb.install.err.large": "“{file}” ใหญ่เกินไป",
"wb.install.err.largeHint": "{kind, select, theme {ธีมจำกัดที่ 2 MB} other {ปลั๊กอินจำกัดที่ 2 MB}}",
"wb.install.stage.named": "ติดตั้ง {name}",
"wb.install.stage.fileDetail": "กำลังตรวจสอบไฟล์…",
"wb.install.stage.storeDetail": "กำลังดาวน์โหลดจากร้านค้า wayBetter และตรวจสอบลายเซ็น…",
"wb.install.err.link": "ใช้ลิงก์ติดตั้งนี้ไม่ได้",
"wb.install.err.notInstalled": "{kind, select, theme {ไม่ได้ติดตั้งธีม} other {ไม่ได้ติดตั้งปลั๊กอิน}}",
"wb.install.untitled": "ไม่มีชื่อ",
"wb.install.file": "ไฟล์",
"wb.install.size": "ขนาด",
"wb.install.themeFile": "ไฟล์ธีม",
"wb.store.all": "ทั้งหมด",
"wb.store.pluginsTab": "ปลั๊กอิน",
"wb.store.theme": "ธีม",
"wb.store.remove": "นำออก",
"wb.store.keep": "เก็บไว้",
"wb.store.removed": "นำ {name} ออกแล้ว",
"wb.install.cancel": "ยกเลิก",
"wb.install.close": "ปิด"
}
}