Skip to content

Commit d76fea7

Browse files
committed
add webId to redirect, add bootloader in dashboard
1 parent a0753be commit d76fea7

File tree

2 files changed

+112
-2
lines changed

2 files changed

+112
-2
lines changed

frontend/bootloader.html

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
<!DOCTYPE HTML>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<!-- Component CSS -->
6+
<style>
7+
8+
</style>
9+
<!-- /Component CSS -->
10+
<!-- Page CSS -->
11+
<style>
12+
13+
</style>
14+
<!-- /Page CSS -->
15+
<!-- Head HTML -->
16+
17+
<!-- /Head HTML -->
18+
<script>
19+
var simplyDataApi = {};
20+
var simplyApp = {};
21+
window.addEventListener("simply-content-loaded", function() {
22+
simply.bind = false;
23+
/* Raw API */
24+
var simplyRawApi = {
25+
26+
};
27+
/* End of Raw API */
28+
/* Data API */
29+
simplyDataApi = {
30+
31+
};
32+
/* End of Data API */
33+
simplyApp = simply.app({
34+
/* Actions */
35+
actions: {
36+
37+
},
38+
/* /Actions */
39+
/* Commands */
40+
commands: {
41+
42+
},
43+
/* /Commands */
44+
/* Keyboard shortcuts */
45+
keyboard: {
46+
47+
},
48+
/* /Keyboard shortcuts */
49+
/* Routes */
50+
routes: {
51+
// page/home
52+
"/" : function(params) {
53+
document.location.href="https://solid-launcher.dev.muze.nl/";
54+
}
55+
}
56+
/* /Routes */
57+
});
58+
});
59+
function clone(ob) {
60+
return JSON.parse(JSON.stringify(ob));
61+
}
62+
function updateDataSource(name) {
63+
document.querySelectorAll('[data-simply-data="'+name+'"]').forEach(function(list) {
64+
editor.list.applyDataSource(list, name);
65+
list.dataBindingPaused = 0;
66+
});
67+
}
68+
</script>
69+
</head>
70+
<body>
71+
<!-- Body HTML -->
72+
73+
<!-- /Body HTML -->
74+
<!-- Component HTML templates -->
75+
76+
<!-- /Component HTML templates -->
77+
<div class="main" data-simply-field="page" data-simply-content="template">
78+
<!-- Page HTML templates -->
79+
80+
<!-- /Page HTML templates -->
81+
</div>
82+
<script src="js/simply.everything.js"></script>
83+
<script src="js/simply-edit.js" data-simply-storage="none" data-api-key="muze"></script>
84+
<script>
85+
/* Transformers */
86+
editor.transformers = {
87+
88+
};
89+
/* /Transformers */
90+
</script>
91+
<script>
92+
/* Sorters */
93+
editor.sorters = {
94+
95+
};
96+
/* /Sorters */
97+
</script>
98+
<script>
99+
window.addEventListener("simply-content-loaded", function() {
100+
/* Data sources */
101+
102+
/* /Data sources */
103+
});
104+
</script>
105+
<!-- Foot HTML -->
106+
107+
<!-- /Foot HTML -->
108+
</body>
109+
</html>

lib/Routes/Account.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public static function requireLoggedInUser() {
2727

2828
public static function respondToDashboard() {
2929
$user = User::getUser(Session::getLoggedInUser());
30-
echo "Logged in as " . $user['webId'];
30+
include_once(FRONTENDDIR . "bootloader.html");
3131
}
3232

3333
public static function respondToLogout() {
@@ -170,8 +170,9 @@ public static function respondToLogin() {
170170
}
171171
if (User::checkPassword($_POST['username'], $_POST['password'])) {
172172
Session::start($_POST['username']);
173+
$user = User::getUser($_POST['username']);
173174
if (!isset($_POST['redirect_uri']) || $_POST['redirect_uri'] === '') {
174-
header("Location: /dashboard/");
175+
header("Location: /dashboard/#webId=" . urlencode($user['webId']));
175176
exit();
176177
}
177178
header("Location: " . urldecode($_POST['redirect_uri'])); // FIXME: Do we need to harden this?

0 commit comments

Comments
 (0)