dsh-ustc-quota 1.1.32 → 1.1.33
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 +33 -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.33';
|
|
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`;
|
|
@@ -1141,6 +1141,38 @@ window.__ModuleLoader__.load({
|
|
|
1141
1141
|
const DOCK_TRANSCRIPT_FLOOR = 360;
|
|
1142
1142
|
|
|
1143
1143
|
|
|
1144
|
+
// Reserved right strip: applied from the measure loop so a DSH re-render of the
|
|
1145
|
+
// column cannot drop it, and restored whenever the dock leaves the right seat.
|
|
1146
|
+
let reservedColumn = null;
|
|
1147
|
+
let reservedSaved = null;
|
|
1148
|
+
let reservedSavedPriority = '';
|
|
1149
|
+
|
|
1150
|
+
function applyReservedPadding(reserve) {
|
|
1151
|
+
const holder = document.querySelector('[data-slot="main.conversation"]');
|
|
1152
|
+
const column = holder ? (holder.firstElementChild || holder) : null;
|
|
1153
|
+
if (!column) return false;
|
|
1154
|
+
if (reservedColumn !== column) {
|
|
1155
|
+
releaseReservedPadding();
|
|
1156
|
+
reservedColumn = column;
|
|
1157
|
+
reservedSaved = column.style.getPropertyValue('padding-right');
|
|
1158
|
+
reservedSavedPriority = column.style.getPropertyPriority('padding-right');
|
|
1159
|
+
}
|
|
1160
|
+
const wanted = reserve + 'px';
|
|
1161
|
+
if (column.style.getPropertyValue('padding-right') !== wanted) {
|
|
1162
|
+
column.style.setProperty('padding-right', wanted, 'important');
|
|
1163
|
+
}
|
|
1164
|
+
return true;
|
|
1165
|
+
}
|
|
1166
|
+
|
|
1167
|
+
function releaseReservedPadding() {
|
|
1168
|
+
if (!reservedColumn) return;
|
|
1169
|
+
if (reservedSaved) reservedColumn.style.setProperty('padding-right', reservedSaved, reservedSavedPriority);
|
|
1170
|
+
else reservedColumn.style.removeProperty('padding-right');
|
|
1171
|
+
reservedColumn = null;
|
|
1172
|
+
reservedSaved = null;
|
|
1173
|
+
reservedSavedPriority = '';
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1144
1176
|
function measureRightDock() {
|
|
1145
1177
|
const holder = document.querySelector('[data-slot="main.conversation"]');
|
|
1146
1178
|
const column = holder ? (holder.firstElementChild || holder) : null;
|
package/index.js
CHANGED
|
@@ -22,7 +22,7 @@ const ROUTE_PATH = '/plugins/dsh-ustc-quota/snapshot';
|
|
|
22
22
|
const UPDATE_PATH = '/plugins/dsh-ustc-quota/update';
|
|
23
23
|
const UPDATE_APPLY_PATH = '/plugins/dsh-ustc-quota/update/apply';
|
|
24
24
|
const UPDATE_TOKEN_TTL_MS = 30 * 60 * 1000;
|
|
25
|
-
const PLUGIN_VERSION = '1.1.
|
|
25
|
+
const PLUGIN_VERSION = '1.1.33';
|
|
26
26
|
const KEY_INFO_PATH = 'key/info';
|
|
27
27
|
const USER_INFO_PATH = 'user/info';
|
|
28
28
|
const DISCOVERY_TTL_MS = 30000;
|
package/package.json
CHANGED