solid-panes 3.5.13 → 3.5.14-alpha
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/lib/dashboard/basicPreferences.js +193 -264
- package/lib/dashboard/basicPreferences.js.map +1 -1
- package/lib/dashboard/dashboardPane.js +57 -79
- package/lib/dashboard/dashboardPane.js.map +1 -1
- package/lib/dashboard/homepage.js +98 -100
- package/lib/dashboard/homepage.js.map +1 -1
- package/lib/home/homePane.js +112 -103
- package/lib/home/homePane.js.map +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +49 -89
- package/lib/index.js.map +1 -1
- package/lib/internal/internalPane.js +180 -200
- package/lib/internal/internalPane.js.map +1 -1
- package/lib/mainPage/footer.d.ts +3 -0
- package/lib/mainPage/footer.d.ts.map +1 -0
- package/lib/mainPage/footer.js +20 -0
- package/lib/mainPage/footer.js.map +1 -0
- package/lib/mainPage/header.d.ts +2 -0
- package/lib/mainPage/header.d.ts.map +1 -0
- package/lib/mainPage/header.js +142 -0
- package/lib/mainPage/header.js.map +1 -0
- package/lib/mainPage/index.d.ts +3 -0
- package/lib/mainPage/index.d.ts.map +1 -0
- package/lib/mainPage/index.js +63 -0
- package/lib/mainPage/index.js.map +1 -0
- package/lib/microblogPane/microblogPane.js +1 -1
- package/lib/outline/context.d.ts +2 -2
- package/lib/outline/context.d.ts.map +1 -1
- package/lib/outline/context.js +13 -17
- package/lib/outline/context.js.map +1 -1
- package/lib/outline/manager.js +13 -4
- package/lib/outline/manager.js.map +1 -1
- package/lib/outline/propertyViews.js +32 -46
- package/lib/outline/propertyViews.js.map +1 -1
- package/lib/outline/userInput.js +1 -1
- package/lib/outline/viewAsImage.js +22 -19
- package/lib/outline/viewAsImage.js.map +1 -1
- package/lib/outline/viewAsMbox.js +5 -15
- package/lib/outline/viewAsMbox.js.map +1 -1
- package/lib/pad/padPane.js +406 -451
- package/lib/pad/padPane.js.map +1 -1
- package/lib/profile/editProfile.view.js +101 -124
- package/lib/profile/editProfile.view.js.map +1 -1
- package/lib/profile/profile.dom.js +12 -17
- package/lib/profile/profile.dom.js.map +1 -1
- package/lib/registerPanes.js +1 -1
- package/lib/registerPanes.js.map +1 -1
- package/lib/sharing/sharingPane.js +33 -45
- package/lib/sharing/sharingPane.js.map +1 -1
- package/lib/tabbed/tabbedPane.js +87 -77
- package/lib/tabbed/tabbedPane.js.map +1 -1
- package/lib/trustedApplications/trustedApplications.dom.js +173 -182
- package/lib/trustedApplications/trustedApplications.dom.js.map +1 -1
- package/lib/trustedApplications/trustedApplications.test.js +1 -1
- package/lib/trustedApplications/trustedApplications.utils.js +30 -36
- package/lib/trustedApplications/trustedApplications.utils.js.map +1 -1
- package/lib/trustedApplications/trustedApplications.view.js +91 -99
- package/lib/trustedApplications/trustedApplications.view.js.map +1 -1
- package/lib/types.js +1 -4
- package/lib/types.js.map +1 -1
- package/lib/versionInfo.js +23 -28
- package/lib/versionInfo.js.map +1 -1
- package/package.json +4 -4
- package/src/index.ts +4 -3
- package/src/mainPage/footer.ts +19 -0
- package/src/mainPage/header.ts +75 -0
- package/src/mainPage/index.ts +20 -0
- package/src/outline/context.ts +2 -2
- package/src/outline/manager.js +1 -0
- package/src/versionInfo.ts +3 -3
|
@@ -1,106 +1,98 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
var _trustedApplications = require("./trustedApplications.dom");
|
|
11
|
-
|
|
12
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
13
|
-
|
|
14
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
15
|
-
|
|
16
|
-
var thisColor = '#418d99';
|
|
17
|
-
var trustedApplicationView = {
|
|
18
|
-
global: true,
|
|
19
|
-
icon: "".concat(_solidUi.icons.iconBase, "noun_15177.svg"),
|
|
20
|
-
name: 'trustedApplications',
|
|
21
|
-
label: function label() {
|
|
22
|
-
return null;
|
|
23
|
-
},
|
|
24
|
-
render: function render(subject, context) {
|
|
25
|
-
var dom = context.dom;
|
|
26
|
-
var div = dom.createElement('div');
|
|
27
|
-
div.classList.add('trusted-applications-pane');
|
|
28
|
-
div.setAttribute('style', 'border: 0.3em solid ' + thisColor + '; border-radius: 0.5em; padding: 0.7em; margin-top:0.7em;');
|
|
29
|
-
var table = div.appendChild(dom.createElement('table'));
|
|
30
|
-
var main = table.appendChild(dom.createElement('tr'));
|
|
31
|
-
var bottom = table.appendChild(dom.createElement('tr'));
|
|
32
|
-
var statusArea = bottom.appendChild(dom.createElement('div'));
|
|
33
|
-
statusArea.setAttribute('style', 'padding: 0.7em;');
|
|
34
|
-
|
|
35
|
-
_render(dom, main, statusArea)["catch"](function (err) {
|
|
36
|
-
return statusArea.appendChild(_solidUi.widgets.errorMessageBlock(dom, err));
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
37
9
|
});
|
|
38
|
-
|
|
39
|
-
return div;
|
|
40
|
-
}
|
|
41
10
|
};
|
|
42
|
-
|
|
43
|
-
function
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
authContext = _context.sent;
|
|
64
|
-
subject = authContext.me;
|
|
65
|
-
profile = subject.doc();
|
|
66
|
-
|
|
67
|
-
if (_solidUi.store.updater) {
|
|
68
|
-
_context.next = 7;
|
|
69
|
-
break;
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (_) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
70
32
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
var solid_ui_1 = require("solid-ui");
|
|
40
|
+
var trustedApplications_dom_1 = require("./trustedApplications.dom");
|
|
41
|
+
var thisColor = '#418d99';
|
|
42
|
+
var trustedApplicationView = {
|
|
43
|
+
global: true,
|
|
44
|
+
icon: "".concat(solid_ui_1.icons.iconBase, "noun_15177.svg"),
|
|
45
|
+
name: 'trustedApplications',
|
|
46
|
+
label: function () { return null; },
|
|
47
|
+
render: function (subject, context) {
|
|
48
|
+
var dom = context.dom;
|
|
49
|
+
var div = dom.createElement('div');
|
|
50
|
+
div.classList.add('trusted-applications-pane');
|
|
51
|
+
div.setAttribute('style', 'border: 0.3em solid ' +
|
|
52
|
+
thisColor +
|
|
53
|
+
'; border-radius: 0.5em; padding: 0.7em; margin-top:0.7em;');
|
|
54
|
+
var table = div.appendChild(dom.createElement('table'));
|
|
55
|
+
var main = table.appendChild(dom.createElement('tr'));
|
|
56
|
+
var bottom = table.appendChild(dom.createElement('tr'));
|
|
57
|
+
var statusArea = bottom.appendChild(dom.createElement('div'));
|
|
58
|
+
statusArea.setAttribute('style', 'padding: 0.7em;');
|
|
59
|
+
render(dom, main, statusArea).catch(function (err) { return statusArea.appendChild(solid_ui_1.widgets.errorMessageBlock(dom, err)); });
|
|
60
|
+
return div;
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
function render(dom, main, statusArea) {
|
|
64
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
65
|
+
var authContext, subject, profile, editable, applicationsTable;
|
|
66
|
+
return __generator(this, function (_a) {
|
|
67
|
+
switch (_a.label) {
|
|
68
|
+
case 0: return [4 /*yield*/, solid_ui_1.authn.logInLoadProfile({ dom: dom, div: main, statusArea: statusArea, me: null })];
|
|
69
|
+
case 1:
|
|
70
|
+
authContext = _a.sent();
|
|
71
|
+
subject = authContext.me;
|
|
72
|
+
profile = subject.doc();
|
|
73
|
+
if (!solid_ui_1.store.updater) {
|
|
74
|
+
throw new Error('Store has no updater');
|
|
75
|
+
}
|
|
76
|
+
editable = solid_ui_1.store.updater.editable(profile.uri, solid_ui_1.store);
|
|
77
|
+
main.appendChild((0, trustedApplications_dom_1.createText)('h3', 'Manage your trusted applications'));
|
|
78
|
+
if (!editable) {
|
|
79
|
+
main.appendChild(solid_ui_1.widgets.errorMessageBlock(dom, "Your profile ".concat(subject.doc().uri, " is not editable, so we cannot do much here.")));
|
|
80
|
+
return [2 /*return*/];
|
|
81
|
+
}
|
|
82
|
+
main.appendChild((0, trustedApplications_dom_1.createText)('p', 'Here you can manage the applications you trust.'));
|
|
83
|
+
applicationsTable = (0, trustedApplications_dom_1.createApplicationTable)(subject);
|
|
84
|
+
main.appendChild(applicationsTable);
|
|
85
|
+
main.appendChild((0, trustedApplications_dom_1.createText)('h4', 'Notes'));
|
|
86
|
+
main.appendChild((0, trustedApplications_dom_1.createContainer)('ol', [
|
|
87
|
+
main.appendChild((0, trustedApplications_dom_1.createText)('li', 'Trusted applications will get access to all resources that you have access to.')),
|
|
88
|
+
main.appendChild((0, trustedApplications_dom_1.createText)('li', 'You can limit which modes they have by default.')),
|
|
89
|
+
main.appendChild((0, trustedApplications_dom_1.createText)('li', 'They will not gain more access than you have.'))
|
|
90
|
+
]));
|
|
91
|
+
main.appendChild((0, trustedApplications_dom_1.createText)('p', 'Application URLs must be valid URL. Examples are http://localhost:3000, https://trusted.app, and https://sub.trusted.app.'));
|
|
92
|
+
return [2 /*return*/];
|
|
81
93
|
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
return _context.abrupt("return");
|
|
85
|
-
|
|
86
|
-
case 12:
|
|
87
|
-
main.appendChild((0, _trustedApplications.createText)('p', 'Here you can manage the applications you trust.'));
|
|
88
|
-
applicationsTable = (0, _trustedApplications.createApplicationTable)(subject);
|
|
89
|
-
main.appendChild(applicationsTable);
|
|
90
|
-
main.appendChild((0, _trustedApplications.createText)('h4', 'Notes'));
|
|
91
|
-
main.appendChild((0, _trustedApplications.createContainer)('ol', [main.appendChild((0, _trustedApplications.createText)('li', 'Trusted applications will get access to all resources that you have access to.')), main.appendChild((0, _trustedApplications.createText)('li', 'You can limit which modes they have by default.')), main.appendChild((0, _trustedApplications.createText)('li', 'They will not gain more access than you have.'))]));
|
|
92
|
-
main.appendChild((0, _trustedApplications.createText)('p', 'Application URLs must be valid URL. Examples are http://localhost:3000, https://trusted.app, and https://sub.trusted.app.'));
|
|
93
|
-
|
|
94
|
-
case 18:
|
|
95
|
-
case "end":
|
|
96
|
-
return _context.stop();
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}, _callee);
|
|
100
|
-
}));
|
|
101
|
-
return _render2.apply(this, arguments);
|
|
94
|
+
});
|
|
95
|
+
});
|
|
102
96
|
}
|
|
103
|
-
|
|
104
|
-
var _default = trustedApplicationView;
|
|
105
|
-
exports["default"] = _default;
|
|
97
|
+
exports.default = trustedApplicationView;
|
|
106
98
|
//# sourceMappingURL=trustedApplications.view.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/trustedApplications/trustedApplications.view.ts"],"names":[
|
|
1
|
+
{"version":3,"file":"trustedApplications.view.js","sourceRoot":"","sources":["../../src/trustedApplications/trustedApplications.view.ts"],"names":[],"mappings":"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"}
|
package/lib/types.js
CHANGED
package/lib/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|
package/lib/versionInfo.js
CHANGED
|
@@ -1,31 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
uv: '1.41.0',
|
|
26
|
-
v8: '8.4.371.23-node.67',
|
|
27
|
-
zlib: '1.2.11'
|
|
28
|
-
}
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = {
|
|
4
|
+
buildTime: '2022-01-18T23:23:17Z',
|
|
5
|
+
commit: '36b208831217a00e6be5f0fb39a379468f906c2b',
|
|
6
|
+
npmInfo: {
|
|
7
|
+
'solid-panes': '3.5.14',
|
|
8
|
+
npm: '6.14.13',
|
|
9
|
+
ares: '1.17.1',
|
|
10
|
+
brotli: '1.0.9',
|
|
11
|
+
cldr: '39.0',
|
|
12
|
+
icu: '69.1',
|
|
13
|
+
llhttp: '2.1.3',
|
|
14
|
+
modules: '83',
|
|
15
|
+
napi: '8',
|
|
16
|
+
nghttp2: '1.42.0',
|
|
17
|
+
node: '14.17.3',
|
|
18
|
+
openssl: '1.1.1k',
|
|
19
|
+
tz: '2021a',
|
|
20
|
+
unicode: '13.0',
|
|
21
|
+
uv: '1.41.0',
|
|
22
|
+
v8: '8.4.371.23-node.67',
|
|
23
|
+
zlib: '1.2.11'
|
|
24
|
+
}
|
|
29
25
|
};
|
|
30
|
-
exports["default"] = _default;
|
|
31
26
|
//# sourceMappingURL=versionInfo.js.map
|
package/lib/versionInfo.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"versionInfo.js","sourceRoot":"","sources":["../src/versionInfo.ts"],"names":[],"mappings":";;AAAA,kBAAe;IACb,SAAS,EAAE,sBAAsB;IACjC,MAAM,EAAE,0CAA0C;IAClD,OAAO,EACT;QACE,aAAa,EAAE,QAAQ;QACvB,GAAG,EAAE,SAAS;QACd,IAAI,EAAE,QAAQ;QACd,MAAM,EAAE,OAAO;QACf,IAAI,EAAE,MAAM;QACZ,GAAG,EAAE,MAAM;QACX,MAAM,EAAE,OAAO;QACf,OAAO,EAAE,IAAI;QACb,IAAI,EAAE,GAAG;QACT,OAAO,EAAE,QAAQ;QACjB,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,QAAQ;QACjB,EAAE,EAAE,OAAO;QACX,OAAO,EAAE,MAAM;QACf,EAAE,EAAE,QAAQ;QACZ,EAAE,EAAE,oBAAoB;QACxB,IAAI,EAAE,QAAQ;KACf;CACA,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "solid-panes",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.14-alpha",
|
|
4
4
|
"description": "Solid-compatible Panes: applets and views for the mashlib and databrowser",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -54,18 +54,18 @@
|
|
|
54
54
|
"contacts-pane": "^2.5.6",
|
|
55
55
|
"folder-pane": "^2.4.10",
|
|
56
56
|
"issue-pane": "^2.4.8",
|
|
57
|
-
"markdown-pane": "^0.2.1",
|
|
58
57
|
"marked": "^4.0.8",
|
|
59
58
|
"meeting-pane": "^2.3.7",
|
|
60
59
|
"mime-types": "^2.1.34",
|
|
61
|
-
"pane-registry": "^2.4.5",
|
|
60
|
+
"pane-registry": "^2.4.5-alpha",
|
|
62
61
|
"path-browserify": "^1.0.1",
|
|
63
62
|
"profile-pane": "^1.0.4",
|
|
64
63
|
"rdflib": "^2.2.15",
|
|
65
64
|
"react": "^17.0.2",
|
|
66
65
|
"react-dom": "^17.0.2",
|
|
66
|
+
"solid-logic": "^1.3.12",
|
|
67
67
|
"solid-namespace": "^0.5.2",
|
|
68
|
-
"solid-ui": "^2.4.14",
|
|
68
|
+
"solid-ui": "^2.4.14-alpha",
|
|
69
69
|
"source-pane": "^2.2.13"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
package/src/index.ts
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
// var UI = require('solid-ui') // Note we will add the panes register to this.
|
|
15
15
|
import versionInfo from './versionInfo'
|
|
16
16
|
import * as UI from 'solid-ui'
|
|
17
|
+
import { LiveStore } from 'solid-logic'
|
|
17
18
|
import OutlineManager from './outline/manager.js'
|
|
18
19
|
import registerPanes from './registerPanes.js'
|
|
19
20
|
import {
|
|
@@ -21,10 +22,10 @@ import {
|
|
|
21
22
|
paneForIcon,
|
|
22
23
|
paneForPredicate,
|
|
23
24
|
register,
|
|
24
|
-
byName
|
|
25
|
-
LiveStore
|
|
25
|
+
byName
|
|
26
26
|
} from 'pane-registry'
|
|
27
27
|
import { createContext } from './outline/context'
|
|
28
|
+
import initMainPage from './mainPage'
|
|
28
29
|
|
|
29
30
|
export function getOutliner (dom) {
|
|
30
31
|
if (!dom.outlineManager) {
|
|
@@ -61,4 +62,4 @@ export {
|
|
|
61
62
|
// where there are many occurrences of window and of window.document
|
|
62
63
|
// But each DOM should have just one outline manager.
|
|
63
64
|
|
|
64
|
-
export { OutlineManager, UI, versionInfo }
|
|
65
|
+
export { OutlineManager, UI, versionInfo, initMainPage }
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { IndexedFormula } from 'rdflib'
|
|
2
|
+
import { initFooter } from 'solid-ui'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* links in the footer
|
|
6
|
+
*/
|
|
7
|
+
const SOLID_PROJECT_URL = 'https://solidproject.org'
|
|
8
|
+
const SOLID_PROJECT_NAME = 'solidproject.org'
|
|
9
|
+
|
|
10
|
+
export function createFooter (store: IndexedFormula) {
|
|
11
|
+
initFooter(store, setFooterOptions())
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function setFooterOptions () {
|
|
15
|
+
return {
|
|
16
|
+
solidProjectUrl: SOLID_PROJECT_URL,
|
|
17
|
+
solidProjectName: SOLID_PROJECT_NAME
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { icons, authn, initHeader } from 'solid-ui'
|
|
2
|
+
/**
|
|
3
|
+
* menu icons
|
|
4
|
+
*/
|
|
5
|
+
const HELP_MENU_ICON = icons.iconBase + 'noun_help.svg'
|
|
6
|
+
const SOLID_ICON_URL = 'https://solidproject.org/assets/img/solid-emblem.svg'
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* menu elements
|
|
10
|
+
*/
|
|
11
|
+
const USER_GUIDE_MENU_ITEM = 'User guide'
|
|
12
|
+
const REPORT_A_PROBLEM_MENU_ITEM = 'Report a problem'
|
|
13
|
+
const SHOW_YOUR_PROFILE_MENU_ITEM = 'Show your profile'
|
|
14
|
+
const LOG_OUT_MENU_ITEM = 'Log out'
|
|
15
|
+
/**
|
|
16
|
+
* URLS
|
|
17
|
+
*/
|
|
18
|
+
const USER_GUIDE_MENU_URL = 'https://solid.github.io/userguide/'
|
|
19
|
+
const REPORT_A_PROBLEM_MENU_URL = 'https://github.com/solid/solidos/issues'
|
|
20
|
+
|
|
21
|
+
export async function createHeader (store, outliner) {
|
|
22
|
+
initHeader(store, await setUserMenu(outliner), setHeaderOptions())
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function setHeaderOptions () {
|
|
26
|
+
const helpMenuList = [
|
|
27
|
+
{ label: USER_GUIDE_MENU_ITEM, url: USER_GUIDE_MENU_URL, target: '_blank' },
|
|
28
|
+
{ label: REPORT_A_PROBLEM_MENU_ITEM, url: REPORT_A_PROBLEM_MENU_URL, target: '_blank' }
|
|
29
|
+
]
|
|
30
|
+
const headerOptions = { logo: SOLID_ICON_URL, helpIcon: HELP_MENU_ICON, helpMenuList: helpMenuList }
|
|
31
|
+
|
|
32
|
+
return headerOptions
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
async function setUserMenu (outliner: any) {
|
|
36
|
+
const showProfile = {
|
|
37
|
+
label: SHOW_YOUR_PROFILE_MENU_ITEM,
|
|
38
|
+
onclick: () => openUserProfile(outliner)
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const logOut = {
|
|
42
|
+
label: LOG_OUT_MENU_ITEM,
|
|
43
|
+
onclick: () => {
|
|
44
|
+
authn.authSession.logout()
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// the order of the menu is important here, show profile first and logout last
|
|
49
|
+
let userMenuList = [showProfile]
|
|
50
|
+
userMenuList = userMenuList.concat(await getMenuItems(outliner))
|
|
51
|
+
userMenuList.push(logOut)
|
|
52
|
+
|
|
53
|
+
return userMenuList
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function openUserProfile (outliner: any) {
|
|
57
|
+
outliner.GotoSubject(authn.currentUser(), true, undefined, true, undefined)
|
|
58
|
+
location.reload()
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
async function getMenuItems (outliner: any) {
|
|
62
|
+
const items = await outliner.getDashboardItems()
|
|
63
|
+
return items.map((element) => {
|
|
64
|
+
return {
|
|
65
|
+
label: element.label,
|
|
66
|
+
onclick: () => openDashboardPane(outliner, element.tabName || element.paneName)
|
|
67
|
+
}
|
|
68
|
+
})
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
async function openDashboardPane (outliner: any, pane: string): Promise<void> {
|
|
72
|
+
outliner.showDashboard({
|
|
73
|
+
pane
|
|
74
|
+
})
|
|
75
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/* Main Page
|
|
2
|
+
**
|
|
3
|
+
** This code is called in mashlib and renders the header and footer of the Databrowser.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { IndexedFormula, NamedNode } from 'rdflib'
|
|
7
|
+
import { getOutliner } from '../index'
|
|
8
|
+
import { createHeader } from './header'
|
|
9
|
+
import { createFooter } from './footer'
|
|
10
|
+
|
|
11
|
+
export default async function initMainPage (store: IndexedFormula, uri?: string|NamedNode|null) {
|
|
12
|
+
const outliner = getOutliner(document)
|
|
13
|
+
uri = uri || window.location.href
|
|
14
|
+
let subject = uri
|
|
15
|
+
if (typeof uri === 'string') subject = store.sym(uri)
|
|
16
|
+
outliner.GotoSubject(subject, true, undefined, true, undefined)
|
|
17
|
+
const header = createHeader(store, outliner)
|
|
18
|
+
const footer = createFooter(store)
|
|
19
|
+
return Promise.all([header, footer])
|
|
20
|
+
}
|
package/src/outline/context.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { DataBrowserContext,
|
|
1
|
+
import { DataBrowserContext, PaneRegistry } from 'pane-registry'
|
|
2
2
|
import { getOutliner } from '../index'
|
|
3
|
-
import { SolidLogic } from 'solid-logic'
|
|
3
|
+
import { SolidLogic, LiveStore } from 'solid-logic'
|
|
4
4
|
|
|
5
5
|
export function createContext (
|
|
6
6
|
dom: HTMLDocument,
|
package/src/outline/manager.js
CHANGED
|
@@ -392,6 +392,7 @@ export default function (context) {
|
|
|
392
392
|
|
|
393
393
|
async function getDashboardItems () {
|
|
394
394
|
const me = UI.authn.currentUser()
|
|
395
|
+
if (!me) return []
|
|
395
396
|
const div = dom.createElement('div')
|
|
396
397
|
const [books, pods] = await Promise.all([getAddressBooks(), getPods()])
|
|
397
398
|
return [
|
package/src/versionInfo.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export default {
|
|
2
|
-
buildTime: '
|
|
3
|
-
commit: '
|
|
2
|
+
buildTime: '2022-01-18T23:23:17Z',
|
|
3
|
+
commit: '36b208831217a00e6be5f0fb39a379468f906c2b',
|
|
4
4
|
npmInfo:
|
|
5
5
|
{
|
|
6
|
-
'solid-panes': '3.5.
|
|
6
|
+
'solid-panes': '3.5.14',
|
|
7
7
|
npm: '6.14.13',
|
|
8
8
|
ares: '1.17.1',
|
|
9
9
|
brotli: '1.0.9',
|