@jbrowse/plugin-menus 3.0.5 → 3.2.0
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.
|
@@ -32,15 +32,16 @@ const SessionManager = (0, mobx_react_1.observer)(function ({ session, }) {
|
|
|
32
32
|
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("div", { className: classes.mb, children: [(0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { control: (0, jsx_runtime_1.jsx)(material_1.Checkbox, { checked: showOnlyFavs, onChange: () => {
|
|
33
33
|
setShowOnlyFavs(val => !val);
|
|
34
34
|
} }), label: "Show only favorites?" }), (0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", onClick: () => {
|
|
35
|
-
var _a;
|
|
36
35
|
let i = 0;
|
|
37
|
-
(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
36
|
+
if (session.savedSessionMetadata) {
|
|
37
|
+
for (const elt of session.savedSessionMetadata) {
|
|
38
|
+
if ((0, date_fns_1.differenceInDays)(+Date.now(), elt.createdAt) > 1 &&
|
|
39
|
+
!elt.favorite) {
|
|
40
|
+
session.deleteSavedSession(elt.id);
|
|
41
|
+
i++;
|
|
42
|
+
}
|
|
42
43
|
}
|
|
43
|
-
}
|
|
44
|
+
}
|
|
44
45
|
session.notify(`${i} sessions deleted`, 'info');
|
|
45
46
|
}, children: "Delete non-fav sessions older than 7 days?" })] }), rows ? ((0, jsx_runtime_1.jsx)("div", { style: { display: 'flex', flexDirection: 'column' }, children: (0, jsx_runtime_1.jsx)(x_data_grid_1.DataGrid, { disableRowSelectionOnClick: true, columnHeaderHeight: 35, rowHeight: 25, hideFooter: rows.length < 100, slotProps: {
|
|
46
47
|
toolbar: {
|
|
@@ -27,15 +27,16 @@ const SessionManager = observer(function ({ session, }) {
|
|
|
27
27
|
return (_jsxs("div", { children: [_jsxs("div", { className: classes.mb, children: [_jsx(FormControlLabel, { control: _jsx(Checkbox, { checked: showOnlyFavs, onChange: () => {
|
|
28
28
|
setShowOnlyFavs(val => !val);
|
|
29
29
|
} }), label: "Show only favorites?" }), _jsx(Button, { variant: "contained", onClick: () => {
|
|
30
|
-
var _a;
|
|
31
30
|
let i = 0;
|
|
32
|
-
(
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
31
|
+
if (session.savedSessionMetadata) {
|
|
32
|
+
for (const elt of session.savedSessionMetadata) {
|
|
33
|
+
if (differenceInDays(+Date.now(), elt.createdAt) > 1 &&
|
|
34
|
+
!elt.favorite) {
|
|
35
|
+
session.deleteSavedSession(elt.id);
|
|
36
|
+
i++;
|
|
37
|
+
}
|
|
37
38
|
}
|
|
38
|
-
}
|
|
39
|
+
}
|
|
39
40
|
session.notify(`${i} sessions deleted`, 'info');
|
|
40
41
|
}, children: "Delete non-fav sessions older than 7 days?" })] }), rows ? (_jsx("div", { style: { display: 'flex', flexDirection: 'column' }, children: _jsx(DataGrid, { disableRowSelectionOnClick: true, columnHeaderHeight: 35, rowHeight: 25, hideFooter: rows.length < 100, slotProps: {
|
|
41
42
|
toolbar: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/plugin-menus",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "JBrowse 2 basic menus",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"clean": "rimraf dist esm *.tsbuildinfo"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@jbrowse/core": "^3.0
|
|
39
|
+
"@jbrowse/core": "^3.2.0",
|
|
40
40
|
"@mui/icons-material": "^6.0.0",
|
|
41
41
|
"@mui/material": "^6.0.0",
|
|
42
42
|
"date-fns": "^4.1.0",
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"publishConfig": {
|
|
58
58
|
"access": "public"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "c750e3f56706a490c19ba75abd807fec5e38aebf"
|
|
61
61
|
}
|