icex-dsh-fixer 0.2.6 → 0.2.7
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 +5 -14
- package/index.js +10 -8
- package/package.json +1 -1
package/client.js
CHANGED
|
@@ -849,6 +849,10 @@ window.__ModuleLoader__.load({
|
|
|
849
849
|
'.icex-tip-head { margin-bottom: 2px; font-size: 11px; line-height: 16px; color: var(--dsw-alias-label-tertiary); }',
|
|
850
850
|
'.icex-tip-text { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; word-break: break-word; font-size: 12px; line-height: 18px; }',
|
|
851
851
|
'html[data-icex-fixer-hide-native-rail][data-icex-fixer-rail-mounted] [data-conversation-content] nav[aria-label] { display: none !important; }',
|
|
852
|
+
'.icex-menu-item { display: flex; align-items: center; gap: 8px; width: 100%; margin: 0; padding: 6px 8px; border: 0; border-radius: var(--dsw-radius-md); background: transparent; color: var(--dsw-alias-label-primary); font: inherit; font-size: 13px; line-height: 18px; text-align: left; cursor: default; }',
|
|
853
|
+
'.icex-menu-item:hover, .icex-menu-item:focus-visible { background: var(--dsw-alias-bg-layer-1); outline: none; box-shadow: inset 0 0 0 1px var(--dsw-alias-border-l1); }',
|
|
854
|
+
'.icex-menu-item:disabled { opacity: 0.6; }',
|
|
855
|
+
'.icex-menu-danger { color: var(--dsw-alias-state-error-primary, #d5484b); }',
|
|
852
856
|
'@media (prefers-reduced-motion: reduce) { .icex-rail-dot { transition: none; } .icex-rail-btn[data-busy] .icex-rail-dot { animation: none; } }',
|
|
853
857
|
]
|
|
854
858
|
|
|
@@ -914,20 +918,7 @@ window.__ModuleLoader__.load({
|
|
|
914
918
|
type: 'button',
|
|
915
919
|
role: 'menuitem',
|
|
916
920
|
disabled: busy,
|
|
917
|
-
className: 'icex-menu-danger',
|
|
918
|
-
style: {
|
|
919
|
-
display: 'block',
|
|
920
|
-
width: '100%',
|
|
921
|
-
padding: '6px 10px',
|
|
922
|
-
border: 0,
|
|
923
|
-
borderRadius: 'var(--dsw-radius-sm, 6px)',
|
|
924
|
-
background: 'transparent',
|
|
925
|
-
color: 'var(--dsw-alias-state-error-primary)',
|
|
926
|
-
textAlign: 'left',
|
|
927
|
-
font: 'inherit',
|
|
928
|
-
cursor: busy ? 'default' : 'pointer',
|
|
929
|
-
opacity: busy ? 0.6 : 1,
|
|
930
|
-
},
|
|
921
|
+
className: 'icex-menu-item icex-menu-danger',
|
|
931
922
|
onClick: remove,
|
|
932
923
|
}, busy ? t('menu.deleting') : t('menu.deleteSession'))
|
|
933
924
|
}
|
package/index.js
CHANGED
|
@@ -118,12 +118,14 @@ async function handleDeleteSession(request) {
|
|
|
118
118
|
|
|
119
119
|
/** Claim the session-delete route when this host carries a browser connection. */
|
|
120
120
|
function registerSessionDeleteRoute(ctx) {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
121
|
+
ctx.inject(['connection'], (scope) => {
|
|
122
|
+
const connection = scope.connection
|
|
123
|
+
if (connection === undefined || connection.fetch === undefined || typeof connection.fetch.register !== 'function') return
|
|
124
|
+
scope.effect(() => connection.fetch.register({
|
|
125
|
+
path: '/api/icex-fixer/delete-session',
|
|
126
|
+
methods: ['POST'],
|
|
127
|
+
requestBody: 'buffered',
|
|
128
|
+
fetch: (request) => handleDeleteSession(request),
|
|
129
|
+
}), 'icex-dsh-fixer: session delete route')
|
|
130
|
+
})
|
|
129
131
|
}
|
package/package.json
CHANGED