codex-overleaf-link 1.9.6 → 1.9.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -248,39 +248,9 @@
248
248
 
249
249
  function scheduleConsentUpdateUi() {
250
250
  const start = () => {
251
- if (typeof document.createElement !== 'function') return;
252
- injectConsentUpdateStyles();
253
- const section = ensureUpdateSection();
254
- let actionInFlight = false;
255
- let currentView = null;
256
-
257
- section.addEventListener('click', async event => {
258
- const action = event.target?.closest?.('[data-update-action]')?.dataset?.updateAction;
259
- if (!action || actionInFlight) return;
260
- actionInFlight = true;
261
- renderUpdateSection(section, currentView, { busyAction: action });
262
- try {
263
- currentView = await sendConsentAction(action);
264
- } catch (error) {
265
- currentView = failedUpdateView(currentView, error);
266
- } finally {
267
- actionInFlight = false;
268
- renderUpdateSection(section, currentView);
269
- }
270
- });
271
-
272
- chrome.runtime.onMessage.addListener(message => {
273
- if (message?.type !== 'codex-overleaf/consent-update-state') return;
274
- currentView = message.view;
275
- if (!actionInFlight) renderUpdateSection(section, currentView);
276
- });
277
-
278
- sendConsentAction('get')
279
- .then(view => {
280
- currentView = view;
281
- renderUpdateSection(section, view);
282
- })
283
- .catch(error => renderUpdateSection(section, failedUpdateView(null, error)));
251
+ if (typeof document.querySelector !== 'function') return;
252
+ document.querySelector('.updates')?.remove();
253
+ document.body?.classList?.remove('consent-update-focus');
284
254
  };
285
255
 
286
256
  if (document.readyState === 'loading') {
@@ -303,8 +273,27 @@
303
273
  return section;
304
274
  }
305
275
 
306
- async function sendConsentAction(action) {
307
- const type = {
276
+ function openUpdateCenter(action = '') {
277
+ const url = new URL(chrome.runtime.getURL('bootstrap/update.html'));
278
+ if (action) url.searchParams.set('action', action);
279
+ const opened = window.open(
280
+ url.href,
281
+ 'codex-overleaf-update-center',
282
+ 'popup,width=420,height=540,resizable=yes,scrollbars=yes'
283
+ );
284
+ if (opened) {
285
+ opened.focus();
286
+ return;
287
+ }
288
+ window.location.assign(url.href);
289
+ }
290
+
291
+ async function sendConsentAction(action) {
292
+ if (action === 'install' || action === 'retry' || action === 'center') {
293
+ openUpdateCenter(action === 'center' ? '' : action);
294
+ action = 'get';
295
+ }
296
+ const type = {
308
297
  get: 'codex-overleaf/consent-update-get-state',
309
298
  check: 'codex-overleaf/consent-update-check',
310
299
  install: 'codex-overleaf/consent-update-install',
@@ -12,7 +12,7 @@
12
12
  const MIN_NATIVE_VERSION = '1.0.0';
13
13
  const MIN_COMPATIBLE_NATIVE_VERSION = '1.0.0';
14
14
  const MIN_COMPATIBLE_EXTENSION_VERSION = '1.0.0';
15
- const BUILD_TARGET_VERSION = '1.9.6';
15
+ const BUILD_TARGET_VERSION = '1.9.8';
16
16
  const DEFAULT_CHROME_EXTENSION_ID = 'illdpneeeopfffmiepaejglgmhpmdhdc';
17
17
  const REQUIRED_CAPABILITIES = Object.freeze([
18
18
  'bridgePing',
@@ -284,6 +284,9 @@
284
284
  eventsTruncatedNote: 'Earlier steps of this run were trimmed.',
285
285
  newSessionTooltip: 'Start a fresh conversation — the current session\u2019s context will not carry over',
286
286
  storageTitle: 'History & storage',
287
+ softwareUpdatesTitle: 'Software updates',
288
+ softwareUpdatesHelp: 'Automatically checks signed stable releases for the Extension and Native Host.',
289
+ checkForUpdates: 'Check for updates',
287
290
  storageUsageLoading: 'Calculating usage\u2026',
288
291
  storageClearAll: 'Clear all history\u2026',
289
292
  storageClearAllHelp: 'Removes every stored session, run and audit record for all projects. Project settings and rules are kept.',
@@ -756,6 +759,9 @@
756
759
  eventsTruncatedNote: '本轮更早的步骤已精简。',
757
760
  newSessionTooltip: '开启全新对话——当前会话的上下文不会带入',
758
761
  storageTitle: '历史与存储',
762
+ softwareUpdatesTitle: '软件更新',
763
+ softwareUpdatesHelp: '自动检查 Extension 与 Native Host 的签名稳定版本。',
764
+ checkForUpdates: '检查更新',
759
765
  storageUsageLoading: '正在计算占用…',
760
766
  storageClearAll: '清空全部历史…',
761
767
  storageClearAllHelp: '删除所有项目已存储的全部会话、运行与审计记录。项目设置与规则会保留。',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codex-overleaf-link",
3
- "version": "1.9.6",
3
+ "version": "1.9.8",
4
4
  "description": "Cross-platform Chrome bridge that connects Codex to the active Overleaf project.",
5
5
  "license": "MIT",
6
6
  "type": "commonjs",