mirror of
https://github.com/Relintai/pandemonium_demo_projects.git
synced 2024-12-21 13:56:50 +01:00
95 lines
3.0 KiB
Plaintext
95 lines
3.0 KiB
Plaintext
[gd_scene load_steps=8 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]
|
|
|
|
[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 )
|
|
menu_str = "<br>
|
|
<a href=\"/\">index</a><br>
|
|
<a href=\"/user/login\">login</a><br>
|
|
<a href=\"/user/register\">register</a><br>
|
|
<a href=\"/user/settings\">settings</a><br>
|
|
<a href=\"/user/logout\">logout</a><br>
|
|
<br>
|
|
|
|
"
|
|
|
|
[node name="StaticWebPage" type="StaticWebPage" parent="WebServerSimple/WebRoot"]
|
|
uri_segment = "/"
|
|
data = "
|
|
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>
|
|
"
|
|
|
|
[node name="UserWebPage" type="UserWebPage" parent="WebServerSimple/WebRoot"]
|
|
uri_segment = "user"
|
|
logged_out_render_type = 1
|
|
logged_out_redirect_url = "/user/login"
|
|
|
|
[node name="UserLoginWebPage" type="UserLoginWebPage" parent="WebServerSimple/WebRoot/UserWebPage"]
|
|
uri_segment = "login"
|
|
logged_in_render_type = 1
|
|
logged_in_redirect_url = "/"
|
|
|
|
[node name="UserRegisterWebPage" type="UserRegisterWebPage" parent="WebServerSimple/WebRoot/UserWebPage"]
|
|
uri_segment = "register"
|
|
logged_in_render_type = 1
|
|
logged_in_redirect_url = "/"
|
|
|
|
[node name="UserLogoutWebPage" type="UserLogoutWebPage" parent="WebServerSimple/WebRoot/UserWebPage"]
|
|
uri_segment = "logout"
|
|
logged_out_render_type = 1
|
|
logged_out_redirect_url = "/"
|
|
|
|
[node name="UserSettingsWebPage" type="UserSettingsWebPage" parent="WebServerSimple/WebRoot/UserWebPage"]
|
|
uri_segment = "settings"
|
|
logged_out_render_type = 1
|
|
logged_out_redirect_url = "/user/login"
|
|
|
|
[node name="HTTPSessionManagerDB" type="HTTPSessionManagerDB" parent="WebServerSimple"]
|
|
script = ExtResource( 3 )
|
|
|
|
[node name="PanelContainer" type="PanelContainer" parent="."]
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
|
|
[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer"]
|
|
margin_left = 7.0
|
|
margin_top = 7.0
|
|
margin_right = 1017.0
|
|
margin_bottom = 593.0
|
|
alignment = 1
|
|
|
|
[node name="LinkButton" type="LinkButton" parent="PanelContainer/VBoxContainer"]
|
|
margin_left = 391.0
|
|
margin_top = 286.0
|
|
margin_right = 619.0
|
|
margin_bottom = 300.0
|
|
size_flags_horizontal = 4
|
|
text = "Click to open http://127.0.0.1:8080/"
|
|
uri = "http://127.0.0.1:8080/"
|