meeting-pane 2.3.6-beta → 2.3.6-beta.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.
- package/package.json +1 -1
- package/src/index.js +20 -23
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const MeetingPane = require('./meetingPane.js')
|
|
2
2
|
const $rdf = require('rdflib')
|
|
3
3
|
const UI = require('solid-ui')
|
|
4
|
-
const SolidAuth = require('solid-auth-client')
|
|
4
|
+
// const SolidAuth = require('solid-auth-client')
|
|
5
5
|
|
|
6
6
|
async function appendMeetingPane (dom, uri) {
|
|
7
7
|
const subject = $rdf.sym(uri)
|
|
@@ -26,32 +26,29 @@ document.addEventListener('DOMContentLoaded', function () {
|
|
|
26
26
|
// Set up the view for the subject indicated in the fragment of the window's URL
|
|
27
27
|
const uri = decodeURIComponent(window.location.hash.substr(1))
|
|
28
28
|
if (uri.length === 0) {
|
|
29
|
-
window.location = '?#' + encodeURIComponent('https://michielbdejong.inrupt.net/meetings/Data%20browser%2016%20Dec%202019/index.ttl#this')
|
|
29
|
+
// window.location = '?#' + encodeURIComponent('https://michielbdejong.inrupt.net/meetings/Data%20browser%2016%20Dec%202019/index.ttl#this')
|
|
30
|
+
window.location = '?#' + encodeURIComponent('https://timbl.com/timbl/Public/Test/Meeting/Brainstorming/index.ttl#this')
|
|
30
31
|
}
|
|
31
32
|
appendMeetingPane(document, uri)
|
|
32
33
|
})
|
|
33
34
|
|
|
34
|
-
window.onload = () => {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
console.log('The user is not logged in')
|
|
39
|
-
document.getElementById('loginBanner').innerHTML = '<button onclick="popupLogin()">Log in</button>'
|
|
40
|
-
} else {
|
|
41
|
-
console.log(`Logged in as ${session.webId}`)
|
|
35
|
+
// window.onload = () => {
|
|
36
|
+
console.log('document ready')
|
|
37
|
+
const loginBanner = document.getElementById('loginBanner')
|
|
38
|
+
loginBanner.appendChild(UI.authn.loginStatusBox(document, null, {}))
|
|
42
39
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
const popupUri = 'https://solid.community/common/popup.html'
|
|
54
|
-
if (!session) {
|
|
55
|
-
session = await SolidAuth.popupLogin({ popupUri })
|
|
40
|
+
async function finishLogin () {
|
|
41
|
+
await UI.authn.authSession.handleIncomingRedirect()
|
|
42
|
+
const session = UI.authn.authSession
|
|
43
|
+
if (session.info.isLoggedIn) {
|
|
44
|
+
console.log(`Logged in as ${session.webId}`)
|
|
45
|
+
|
|
46
|
+
document.getElementById('loginBanner').innerHTML = `Logged in as ${UI.authn.currentUser().uri}`
|
|
47
|
+
} else {
|
|
48
|
+
console.log('The user is not logged in')
|
|
49
|
+
// document.getElementById('loginBanner').innerHTML = '<button onclick="popupLogin()">Log in</button>'
|
|
56
50
|
}
|
|
57
51
|
}
|
|
52
|
+
|
|
53
|
+
finishLogin()
|
|
54
|
+
// }
|