Tento commit je obsažen v:
sneedmaster 2024-01-08 18:45:11 +01:00
rodič 11bba18d93
revize 2432fcba66
7 změnil soubory, kde provedl 30 přidání a 43 odebrání

Zobrazit soubor

@ -355,7 +355,15 @@ impl Post {
.execute(ctx.db()) .execute(ctx.db())
.await?; .await?;
if self.thread.is_none() { if let Some(thread) = self.thread {
query(&format!(
"UPDATE posts_{} SET replies = replies - 1 WHERE id = $1",
self.board
))
.bind(thread)
.execute(ctx.db())
.await?;
} else {
ctx.cache().decr("total_threads", 1).await?; ctx.cache().decr("total_threads", 1).await?;
ctx.cache() ctx.cache()
.decr(format!("board_threads:{}", self.board), 1) .decr(format!("board_threads:{}", self.board), 1)

Zobrazit soubor

@ -84,7 +84,7 @@ pub fn czech_plural(plurals: &str, count: impl Display) -> askama::Result<String
if count == 1 { if count == 1 {
Ok(one.into()) Ok(one.into())
} else if count < 5 { } else if count < 5 && count != 0 {
Ok(few.into()) Ok(few.into())
} else { } else {
Ok(other.into()) Ok(other.into())

Zobrazit soubor

@ -152,27 +152,6 @@ summary {
border-bottom: 1px solid var(--hl-box-border); border-bottom: 1px solid var(--hl-box-border);
} }
.infobox {
margin: 8px 0;
border: 1px solid var(--table-border);
}
.infobox-head {
background-color: var(--table-head);
font-weight: bold;
padding: 4px;
border-bottom: 1px solid var(--table-border);
}
.infobox-content {
background-color: var(--table-primary);
padding: 4px;
}
.infobox-content .post-files {
margin: 0;
}
.button { .button {
cursor: pointer; cursor: pointer;
border-radius: 0; border-radius: 0;
@ -451,7 +430,7 @@ summary {
margin-bottom: 8px; margin-bottom: 8px;
} }
.infobox-list { .board-list {
list-style-type: none; list-style-type: none;
margin: 0; margin: 0;
padding: 0; padding: 0;

Zobrazit soubor

@ -4,15 +4,17 @@
{% block content %} {% block content %}
<div class="container"> <div class="container">
<div class="infobox"> <table class="data-table">
<div class="infobox-head">Výsledek</div> <tr><th>Výsledek</th></tr>
<div class="infobox-content"> <tr>
<td>
{% if !response.is_empty() %} {% if !response.is_empty() %}
{{ response|linebreaksbr|safe }} {{ response|linebreaksbr|safe }}
{% else %} {% else %}
Nic se nezměnilo. Nic se nezměnilo.
{% endif %} {% endif %}
</div> </td>
</div> </tr>
</table>
</div> </div>
{% endblock %} {% endblock %}

Zobrazit soubor

@ -5,9 +5,10 @@
{% block content %} {% block content %}
<div class="container"> <div class="container">
<h1 class="title">Jsi trans, btw.</h1> <h1 class="title">Jsi trans, btw.</h1>
<div class="infobox"> <table class="data-table">
<div class="infobox-head">Máš ban!</div> <tr><th>Máš ban!</th></tr>
<div class="infobox-content"> <tr>
<td>
<b> <b>
Byl jsi zabanován&#32; Byl jsi zabanován&#32;
@ -59,7 +60,8 @@
</form> </form>
{% endif %} {% endif %}
{% endif %} {% endif %}
</div> </td>
</tr>
</div> </div>
</div> </div>
{% endblock %} {% endblock %}

Zobrazit soubor

@ -12,16 +12,12 @@
<div class="container"> <div class="container">
<h1 class="title">Je konec...</h1> <h1 class="title">Je konec...</h1>
<div class="infobox center"> <table class="data-table center">
<div class="infobox-head"> <tr><th>Chyba {{ error_code }}</th></tr>
Chyba {{ error_code }}
</div>
{% if !error_message.is_empty() %} {% if !error_message.is_empty() %}
<div class="infobox-content"> <tr><td>{{ error_message }}</td></tr>
{{ error_message }}
</div>
{% endif %} {% endif %}
</div> </table>
</div> </div>
</div> </div>
</body> </body>

Zobrazit soubor

@ -40,7 +40,7 @@
</tr> </tr>
<tr> <tr>
<td> <td>
<ul class="infobox-list"> <ul class="board-list">
{% for board in boards %} {% for board in boards %}
<li><a href="/boards/{{ board.id }}">/{{ board.id }}/ - {{ board.name }}</a></li> <li><a href="/boards/{{ board.id }}">/{{ board.id }}/ - {{ board.name }}</a></li>
{% endfor %} {% endfor %}