mirror of
https://github.com/Relintai/pandemonium_demo_projects.git
synced 2024-12-21 13:56:50 +01:00
79 lines
2.8 KiB
Plaintext
79 lines
2.8 KiB
Plaintext
[gd_scene load_steps=11 format=2]
|
|
|
|
[ext_resource path="res://WebServerSimple.gd" type="Script" id=1]
|
|
[ext_resource path="res://WebRoot.gd" type="Script" id=2]
|
|
[ext_resource path="res://HTTPSessionManagerDB.gd" type="Script" id=3]
|
|
[ext_resource path="res://Main.gd" type="Script" id=4]
|
|
[ext_resource path="res://Login.gd" type="Script" id=5]
|
|
[ext_resource path="res://Register.gd" type="Script" id=6]
|
|
[ext_resource path="res://Settings.gd" type="Script" id=7]
|
|
|
|
[sub_resource type="SessionSetupWebServerMiddleware" id=3]
|
|
|
|
[sub_resource type="UserSessionSetupWebServerMiddleware" id=4]
|
|
|
|
[sub_resource type="CSRFTokenWebServerMiddleware" id=5]
|
|
ignored_urls = PoolStringArray( "/user/login", "/user/register" )
|
|
|
|
[node name="Main" type="Node"]
|
|
script = ExtResource( 4 )
|
|
|
|
[node name="UserManagerDB" type="UserManagerDB" parent="."]
|
|
|
|
[node name="WebServerSimple" type="WebServerSimple" parent="."]
|
|
script = ExtResource( 1 )
|
|
|
|
[node name="WebRoot" type="WebRoot" parent="WebServerSimple"]
|
|
www_root_path = "res://www/"
|
|
middlewares = [ SubResource( 3 ), SubResource( 4 ), SubResource( 5 ) ]
|
|
script = ExtResource( 2 )
|
|
|
|
[node name="StaticWebPage" type="StaticWebPage" parent="WebServerSimple/WebRoot"]
|
|
uri_segment = "/"
|
|
data = "<div class=\"row\">
|
|
<div class=\"col-2\"></div>
|
|
<div class=\"col-8\">
|
|
You can go and log in on the users page here: <a href=\"/user/login\">Login</a><br>
|
|
<br>
|
|
Note that in this demo sessions and users are saved in an SQLite database here: \"user://database.sqlite\"<br>
|
|
<br>
|
|
There are no users by default.<br>
|
|
<br>
|
|
</div>
|
|
<div class=\"col-2\"></div>
|
|
</div>"
|
|
|
|
[node name="UserWebPage" type="UserWebPage" parent="WebServerSimple/WebRoot"]
|
|
uri_segment = "user"
|
|
logged_out_render_type = 1
|
|
logged_out_redirect_url = "/user/login"
|
|
|
|
[node name="Login" type="UserLoginWebPage" parent="WebServerSimple/WebRoot/UserWebPage"]
|
|
uri_segment = "login"
|
|
logged_in_render_type = 1
|
|
logged_in_redirect_url = "/"
|
|
script = ExtResource( 5 )
|
|
|
|
[node name="Register" type="UserRegisterWebPage" parent="WebServerSimple/WebRoot/UserWebPage"]
|
|
uri_segment = "register"
|
|
logged_in_render_type = 1
|
|
logged_in_redirect_url = "/"
|
|
redirect_on_success_url = "/user/login"
|
|
script = ExtResource( 6 )
|
|
|
|
[node name="Logout" type="UserLogoutWebPage" parent="WebServerSimple/WebRoot/UserWebPage"]
|
|
uri_segment = "logout"
|
|
logged_out_render_type = 1
|
|
logged_out_redirect_url = "/"
|
|
|
|
[node name="Settings" type="UserSettingsWebPage" parent="WebServerSimple/WebRoot/UserWebPage"]
|
|
uri_segment = "settings"
|
|
logged_out_render_type = 1
|
|
logged_out_redirect_url = "/user/login"
|
|
script = ExtResource( 7 )
|
|
|
|
[node name="HTTPSessionManagerDB" type="HTTPSessionManagerDB" parent="WebServerSimple"]
|
|
script = ExtResource( 3 )
|
|
|
|
[connection signal="user_registered" from="WebServerSimple/WebRoot/UserWebPage/Register" to="WebServerSimple/WebRoot/UserWebPage/Register" method="_on_Register_user_registered"]
|