Compare commits
4 Commits
8243ce2253
...
f3c844929e
| Author | SHA1 | Date | |
|---|---|---|---|
|
f3c844929e
|
|||
|
c41f95497c
|
|||
|
26352ca54c
|
|||
|
ea0f5f9a83
|
@@ -15,7 +15,7 @@
|
||||
<main>
|
||||
<div class="button-container">
|
||||
<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>
|
||||
</div>
|
||||
<table class="center-table details-table">
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<header>
|
||||
<h1><a href="{{ url_for('index') }}">judas</a></h1>
|
||||
{% 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 %}
|
||||
<p><a class="button" href="{{ url_for('login') }}">Login</a></p>
|
||||
{% endif %}
|
||||
@@ -22,10 +22,12 @@
|
||||
<h2 id="typing-text" style="font-size: 3rem;">judas</h2>
|
||||
<p>a remote PC fleet management system</p>
|
||||
</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>
|
||||
{% if logged %}
|
||||
<p><a class="button" href="{{ url_for('panel') }}">Go to panel</a></p>
|
||||
{% else %}
|
||||
<p>Please <a href="{{ url_for('login')}}" class="link">log in</a> to manage your remote PCs.</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
</main>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
@@ -49,7 +49,7 @@ PC_DETAILS = {
|
||||
"id": "PC7",
|
||||
"status": "offline",
|
||||
"last_seen": "2023-10-01 11:00:00",
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -79,11 +79,8 @@ def load_user(user_id: str) -> User | None:
|
||||
@app.route("/")
|
||||
def index() -> flask.Response | str:
|
||||
"""Renders the index page with a link to the login page."""
|
||||
if flask_login.current_user.is_authenticated:
|
||||
return flask.redirect(flask.url_for("panel"))
|
||||
else:
|
||||
return flask.render_template(
|
||||
"index.html", logged=False, login_url=flask.url_for("login")
|
||||
"index.html", logged=flask_login.current_user.is_authenticated
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user