mirror of
https://github.com/Relintai/pandemonium_demo_projects.git
synced 2024-12-21 13:56:50 +01:00
101 lines
3.4 KiB
Plaintext
101 lines
3.4 KiB
Plaintext
[gd_scene load_steps=12 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]
|
|
[ext_resource path="res://templates/LoginPage.tres" type="HTMLTemplate" id=8]
|
|
|
|
[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 )
|
|
login_template = ExtResource( 8 )
|
|
|
|
[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 )
|
|
|
|
[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/"
|
|
|
|
[connection signal="user_registered" from="WebServerSimple/WebRoot/UserWebPage/Register" to="WebServerSimple/WebRoot/UserWebPage/Register" method="_on_Register_user_registered"]
|