Compare commits
4 Commits
8243ce2253
...
f3c844929e
| Author | SHA1 | Date | |
|---|---|---|---|
|
f3c844929e
|
|||
|
c41f95497c
|
|||
|
26352ca54c
|
|||
|
ea0f5f9a83
|
@@ -15,7 +15,7 @@
|
|||||||
<main>
|
<main>
|
||||||
<div class="button-container">
|
<div class="button-container">
|
||||||
<p><a href="{{ url_for('panel') }}" class="link">Back to Panel</a></p>
|
<p><a href="{{ url_for('panel') }}" class="link">Back to Panel</a></p>
|
||||||
<h2>Details for PC ID: {{ pc.id }}</h2>
|
<h2>{{ pc.id }}</h2>
|
||||||
<p><a href="{{ url_for('stream', pc_id=pc.id) }}" class="link">View Stream</a></p>
|
<p><a href="{{ url_for('stream', pc_id=pc.id) }}" class="link">View Stream</a></p>
|
||||||
</div>
|
</div>
|
||||||
<table class="center-table details-table">
|
<table class="center-table details-table">
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<header>
|
<header>
|
||||||
<h1><a href="{{ url_for('index') }}">judas</a></h1>
|
<h1><a href="{{ url_for('index') }}">judas</a></h1>
|
||||||
{% if logged %}
|
{% if logged %}
|
||||||
<p>Welcome, {{ username }}! <a href="{{ url_for('logout') }}">Logout</a></p>
|
<p><a class="button" href="{{ url_for('logout') }}">Logout</a></p>
|
||||||
{% else %}
|
{% else %}
|
||||||
<p><a class="button" href="{{ url_for('login') }}">Login</a></p>
|
<p><a class="button" href="{{ url_for('login') }}">Login</a></p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@@ -22,10 +22,12 @@
|
|||||||
<h2 id="typing-text" style="font-size: 3rem;">judas</h2>
|
<h2 id="typing-text" style="font-size: 3rem;">judas</h2>
|
||||||
<p>a remote PC fleet management system</p>
|
<p>a remote PC fleet management system</p>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<p style="color: #bf616a;"><strong>Notice:</strong> Please use this system responsibly and in accordance with all applicable laws and organizational policies.</p>
|
||||||
<p style="color: #bf616a;"><strong>Notice:</strong> Please use this system responsibly and in accordance with all applicable laws and organizational policies.</p>
|
{% if logged %}
|
||||||
<p>Please <a href="{{ url_for('login')}}" class="link">log in</a> to manage your remote PCs.</p>
|
<p><a class="button" href="{{ url_for('panel') }}">Go to panel</a></p>
|
||||||
</div>
|
{% else %}
|
||||||
|
<p>Please <a href="{{ url_for('login')}}" class="link">log in</a> to manage your remote PCs.</p>
|
||||||
|
{% endif %}
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ PC_DETAILS = {
|
|||||||
"id": "PC7",
|
"id": "PC7",
|
||||||
"status": "offline",
|
"status": "offline",
|
||||||
"last_seen": "2023-10-01 11:00:00",
|
"last_seen": "2023-10-01 11:00:00",
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -79,12 +79,9 @@ def load_user(user_id: str) -> User | None:
|
|||||||
@app.route("/")
|
@app.route("/")
|
||||||
def index() -> flask.Response | str:
|
def index() -> flask.Response | str:
|
||||||
"""Renders the index page with a link to the login page."""
|
"""Renders the index page with a link to the login page."""
|
||||||
if flask_login.current_user.is_authenticated:
|
return flask.render_template(
|
||||||
return flask.redirect(flask.url_for("panel"))
|
"index.html", logged=flask_login.current_user.is_authenticated
|
||||||
else:
|
)
|
||||||
return flask.render_template(
|
|
||||||
"index.html", logged=False, login_url=flask.url_for("login")
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
@app.route("/login", methods=["GET", "POST"])
|
@app.route("/login", methods=["GET", "POST"])
|
||||||
|
|||||||
Reference in New Issue
Block a user