mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-13 21:42:34 +00:00
frontend: Minor work to make it a little less terrible
This commit is contained in:
@@ -10,7 +10,15 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app" hx-boost="true">
|
||||
{% block header %}
|
||||
<header>
|
||||
<a href="/frontend/user">RustiCal</a>
|
||||
<form method="POST" action="/frontend/logout" class="logout_form">
|
||||
<button type="submit">Log out</button>
|
||||
</form>
|
||||
</header>
|
||||
{% endblock %}
|
||||
<div id="app">
|
||||
{% block content %}<p>Placeholder</p>{% endblock %}
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -10,5 +10,4 @@
|
||||
|
||||
<pre>{{ addressbook|json }}</pre>
|
||||
|
||||
<a href="/frontend/user/{{ addressbook.principal }}">Back</a>
|
||||
{% endblock %}
|
||||
|
||||
@@ -9,6 +9,4 @@
|
||||
{% if let Some(description) = calendar.description %}<p>{{ description }}</p>{% endif%}
|
||||
|
||||
<pre>{{ calendar|json }}</pre>
|
||||
|
||||
<a href="/frontend/user/{{ calendar.principal }}">Back</a>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,17 +1,22 @@
|
||||
{% extends "layouts/default.html" %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Login</h1>
|
||||
<form action="login" method="post">
|
||||
<label for="username">Username</label>
|
||||
<input type="text" name="username" placeholder="username">
|
||||
<label for="password">Password</label>
|
||||
<input type="password" name="password" placeholder="password">
|
||||
<button type="submit">Login</button>
|
||||
</form>
|
||||
|
||||
{% if let Some(OidcProviderData {name, redirect_url}) = oidc_data %}
|
||||
<a href="{{ redirect_url }}">Login with {{ name }}</a>
|
||||
{% endif %}
|
||||
<div class="login_window">
|
||||
<h1>Login</h1>
|
||||
<form action="login" method="post" id="form_login">
|
||||
<label for="username">Username</label>
|
||||
<input type="text" id="username" name="username" placeholder="username">
|
||||
<br>
|
||||
<label for="password">Password</label>
|
||||
<input type="password" id="password" name="password" placeholder="password">
|
||||
<br>
|
||||
<button type="submit">Login</button>
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
||||
{% if let Some(OidcProviderData {name, redirect_url}) = oidc_data %}
|
||||
<a href="{{ redirect_url }}">Login with {{ name }}</a>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
</div>
|
||||
|
||||
@@ -54,12 +54,22 @@ li.collection-list-item {
|
||||
}
|
||||
</style>
|
||||
<h1>Welcome {{ user.id }}!</h1>
|
||||
<form method="POST" action="/frontend/logout">
|
||||
<button type="submit">Log out</button>
|
||||
</form>
|
||||
|
||||
<h2>Profile</h2>
|
||||
|
||||
<form>
|
||||
<label for="user_displayname">Displayname</label>
|
||||
<input type="text" value="{{ user.displayname.clone().unwrap_or(String::new()) }}" id="user_displayname" />
|
||||
</form>
|
||||
|
||||
<h3>Groups</h3>
|
||||
|
||||
<ul>
|
||||
{% for group in user.memberships %}
|
||||
<li>{{ group }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
<h3>App tokens</h3>
|
||||
|
||||
<ul>
|
||||
|
||||
Reference in New Issue
Block a user