Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 109 additions & 0 deletions frontend/bootloader.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="utf-8">
<!-- Component CSS -->
<style>

</style>
<!-- /Component CSS -->
<!-- Page CSS -->
<style>

</style>
<!-- /Page CSS -->
<!-- Head HTML -->

<!-- /Head HTML -->
<script>
var simplyDataApi = {};
var simplyApp = {};
window.addEventListener("simply-content-loaded", function() {
simply.bind = false;
/* Raw API */
var simplyRawApi = {

};
/* End of Raw API */
/* Data API */
simplyDataApi = {

};
/* End of Data API */
simplyApp = simply.app({
/* Actions */
actions: {

},
/* /Actions */
/* Commands */
commands: {

},
/* /Commands */
/* Keyboard shortcuts */
keyboard: {

},
/* /Keyboard shortcuts */
/* Routes */
routes: {
// page/home
"/" : function(params) {
document.location.href="https://solid-launcher.dev.muze.nl/";
}
}
/* /Routes */
});
});
function clone(ob) {
return JSON.parse(JSON.stringify(ob));
}
function updateDataSource(name) {
document.querySelectorAll('[data-simply-data="'+name+'"]').forEach(function(list) {
editor.list.applyDataSource(list, name);
list.dataBindingPaused = 0;
});
}
</script>
</head>
<body>
<!-- Body HTML -->

<!-- /Body HTML -->
<!-- Component HTML templates -->

<!-- /Component HTML templates -->
<div class="main" data-simply-field="page" data-simply-content="template">
<!-- Page HTML templates -->

<!-- /Page HTML templates -->
</div>
<script src="https://unpkg.com/simplyview@2.1.1/dist/simply.everything.js"></script>
<script src="https://canary.simplyedit.io/1/simply-edit.js" data-simply-storage="none" data-api-key="simply-edit-0011"></script>
<script>
/* Transformers */
editor.transformers = {

};
/* /Transformers */
</script>
<script>
/* Sorters */
editor.sorters = {

};
/* /Sorters */
</script>
<script>
window.addEventListener("simply-content-loaded", function() {
/* Data sources */

/* /Data sources */
});
</script>
<!-- Foot HTML -->

<!-- /Foot HTML -->
</body>
</html>
5 changes: 3 additions & 2 deletions lib/Routes/Account.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static function requireLoggedInUser() {

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

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