dsh-ustc-quota 1.1.28 → 1.1.29
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.
- package/client.js +11 -1
- package/index.js +1 -1
- package/package.json +1 -1
package/client.js
CHANGED
|
@@ -11,7 +11,7 @@ window.__ModuleLoader__.load({
|
|
|
11
11
|
const UPDATE_ENDPOINT = 'plugins/dsh-ustc-quota/update';
|
|
12
12
|
const UPDATE_APPLY_ENDPOINT = 'plugins/dsh-ustc-quota/update/apply';
|
|
13
13
|
const WINDOW_IDS = ['3h', '12h', '24h'];
|
|
14
|
-
const CLIENT_VERSION = '1.1.
|
|
14
|
+
const CLIENT_VERSION = '1.1.29';
|
|
15
15
|
const UPDATE_INTERVAL_MS = 24 * 60 * 60 * 1000;
|
|
16
16
|
const CLIENT_VERSION_KEY = `${NS}:client-version`;
|
|
17
17
|
const CLIENT_RELOAD_KEY = `${NS}:client-reload`;
|
|
@@ -1231,6 +1231,16 @@ window.__ModuleLoader__.load({
|
|
|
1231
1231
|
return { count, left: min === null ? null : Math.round(min) };
|
|
1232
1232
|
})(),
|
|
1233
1233
|
dock: { width, reserve, top: contentTop, railInset },
|
|
1234
|
+
position: (() => { try { return window.localStorage.getItem(POSITION_KEY); } catch { return null; } })(),
|
|
1235
|
+
dockRect: (() => {
|
|
1236
|
+
const el = document.querySelector('[data-ustc-quota-dock]');
|
|
1237
|
+
if (!el) return null;
|
|
1238
|
+
const r = el.getBoundingClientRect();
|
|
1239
|
+
return { x: Math.round(r.left), w: Math.round(r.width), display: getComputedStyle(el).display };
|
|
1240
|
+
})(),
|
|
1241
|
+
railButtons: [...document.querySelectorAll('button[aria-label]')]
|
|
1242
|
+
.filter((b) => /右侧边栏/.test(b.getAttribute('aria-label') || ''))
|
|
1243
|
+
.map((b) => ({ label: b.getAttribute('aria-label'), r: rectOf(b) })),
|
|
1234
1244
|
viewport: window.innerWidth,
|
|
1235
1245
|
});
|
|
1236
1246
|
return {
|
package/index.js
CHANGED
|
@@ -25,7 +25,7 @@ const ROUTE_PATH = '/plugins/dsh-ustc-quota/snapshot';
|
|
|
25
25
|
const UPDATE_PATH = '/plugins/dsh-ustc-quota/update';
|
|
26
26
|
const UPDATE_APPLY_PATH = '/plugins/dsh-ustc-quota/update/apply';
|
|
27
27
|
const UPDATE_TOKEN_TTL_MS = 30 * 60 * 1000;
|
|
28
|
-
const PLUGIN_VERSION = '1.1.
|
|
28
|
+
const PLUGIN_VERSION = '1.1.29';
|
|
29
29
|
const KEY_INFO_PATH = 'key/info';
|
|
30
30
|
const USER_INFO_PATH = 'user/info';
|
|
31
31
|
const DISCOVERY_TTL_MS = 30000;
|
package/package.json
CHANGED