Fix msg wrap and default most fields to hidden

This commit is contained in:
Mark Veidemanis 2022-08-11 07:22:22 +01:00
parent d1076ca2b5
commit c06c0cbe18
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
3 changed files with 33 additions and 18 deletions

View File

@ -25,7 +25,29 @@ $(document).ready(function(){
var get_column_shifter_storage = function(){ var get_column_shifter_storage = function(){
var storage = localStorage.getItem(COLUMN_SHIFTER_STORAGE_ACCESOR); var storage = localStorage.getItem(COLUMN_SHIFTER_STORAGE_ACCESOR);
if (storage === null) { if (storage === null) {
storage = {}; storage = {
"drilldown-table": {
"date": "off",
"time": "off",
"id": "off",
"num": "off",
"channel_nsfw": "off",
"channel_category": "off",
"channel_category_id": "off",
"channel_category_nsfw": "off",
"channel_id": "off",
"guild_member_count": "off",
"bot": "off",
"msg_id": "off",
"net_id": "off",
"user_id": "off",
"num_users": "off",
"num_chans": "off",
"exemption": "off",
"version_sentiment": "off",
"num": "off",
},
};
} else { } else {
storage = JSON.parse(storage); storage = JSON.parse(storage);
} }

View File

@ -61,11 +61,11 @@
<style> <style>
.icon { border-bottom: 0px !important;} .icon { border-bottom: 0px !important;}
.wrap { .wrap {
white-space: pre-wrap; /* CSS3 */ white-space: pre-wrap;
white-space: -moz-pre-wrap; /* Firefox */ white-space: -moz-pre-wrap;
white-space: -pre-wrap; /* Opera <7 */ white-space: -pre-wrap;
white-space: -o-pre-wrap; /* Opera 7 */ white-space: -o-pre-wrap;
word-wrap: break-word; /* IE */ word-wrap: break-word;
} }
.nowrap-parent { .nowrap-parent {
white-space: nowrap; white-space: nowrap;

View File

@ -60,12 +60,9 @@
{% block table.thead.row %} {% block table.thead.row %}
<tr> <tr>
{% for column in table.columns %} {% for column in table.columns %}
{% if column.name in show and not column.name in hide %} {% if column.name in show %}
{% block table.thead.th %} {% block table.thead.th %}
<th class="orderable {{ column.name }}" <th class="orderable {{ column.name }}">
{% if column.name in invisible %}
style="display:none;"
{% endif %}>
<div class="nowrap-parent"> <div class="nowrap-parent">
{% if column.orderable %} {% if column.orderable %}
<div class="nowrap-child"> <div class="nowrap-child">
@ -114,13 +111,9 @@
{% block table.tbody.row %} {% block table.tbody.row %}
<tr class="{% if row.cells.exemption == True %}has-background-grey-lighter{% elif row.cells.type == 'join' %}has-background-success-light{% elif row.cells.type == 'quit' %}has-background-danger-light{% elif row.cells.type == 'kick' %}has-background-danger-light{% elif row.cells.type == 'part' %}has-background-warning-light{% elif row.cells.type == 'mode' %}has-background-info-light{% endif %}"> <tr class="{% if row.cells.exemption == True %}has-background-grey-lighter{% elif row.cells.type == 'join' %}has-background-success-light{% elif row.cells.type == 'quit' %}has-background-danger-light{% elif row.cells.type == 'kick' %}has-background-danger-light{% elif row.cells.type == 'part' %}has-background-warning-light{% elif row.cells.type == 'mode' %}has-background-info-light{% endif %}">
{% for column, cell in row.items %} {% for column, cell in row.items %}
{% if column.name in show and not column.name in hide %} {% if column.name in show %}
{% block table.tbody.td %} {% block table.tbody.td %}
{% if column.name in invisible %} {% if cell == '—' %}
<td class="{{ column.name }}" style="display:none;">
{{ cell }}
</td>
{% elif cell == '—' %}
<td class="{{ column.name }}"> <td class="{{ column.name }}">
<span class="icon"> <span class="icon">
<i class="fa-solid fa-file-slash"></i> <i class="fa-solid fa-file-slash"></i>
@ -188,7 +181,7 @@
</a> </a>
</td> </td>
{% elif column.name == 'msg' %} {% elif column.name == 'msg' %}
<td class="{{ column.name }}" style="max-width: 10em" class="wrap">{{ row.cells.msg }}</td> <td class="{{ column.name }} wrap" style="max-width: 10em">{{ row.cells.msg }}</td>
{% elif column.name == 'host' %} {% elif column.name == 'host' %}
<td class="{{ column.name }}"> <td class="{{ column.name }}">
<a class="has-text-link is-underlined" <a class="has-text-link is-underlined"