Skip to content

Commit

Permalink
more cleanup and formatting / css, etc
Browse files Browse the repository at this point in the history
  • Loading branch information
caronc committed Mar 14, 2024
1 parent af9ca98 commit 2a8c3b0
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 30 deletions.
10 changes: 8 additions & 2 deletions apprise_api/api/templates/config.html
Original file line number Diff line number Diff line change
Expand Up @@ -214,10 +214,16 @@ <h4>{% trans "Persistent Store Endpoints" %}</h4>
let jsonResponse = await fetch('{% url "json_urls" key %}/?privacy=1', {
method: 'GET',
})
if(jsonResponse.status != 200) {
if(jsonResponse.status == 204) {
// Take an early exit
document.querySelector('#url-list-progress').style.display = 'none';
document.querySelector('#url-list').textContent = '{% trans "An error occurred retrieving the list of loaded Apprise URL(s)" %}'
document.querySelector('#url-list').textContent = '{% trans "There are no URLs defined. Click on the ⚙️ Configuration tab and define some." %}'
return;

} else if(jsonResponse.status != 200) {
// Take an early exit
document.querySelector('#url-list-progress').style.display = 'none';
document.querySelector('#url-list').textContent = '{% trans "💣 An error occurred retrieving the list of loaded Apprise URL(s)" %}'
return;
}

Expand Down
6 changes: 3 additions & 3 deletions apprise_api/api/templates/details.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ <h5>{{ entry.service_name }}</h5>
<hr/>

<ul class="detail-buttons">
<li><strong>{% blocktrans %}Category{% endblocktrans %}:</strong> {{entry.category}}</li>
<li><strong>{% blocktrans %}Category{% endblocktrans %}:</strong> <code>{{entry.category}}</code></li>
{% if entry.protocols %}
<li><strong>{% blocktrans %}Insecure Schema(s){% endblocktrans %}:</strong> {{ entry.protocols|join:", " }}</li>
<li><strong>{% blocktrans %}Insecure Schema(s){% endblocktrans %}:</strong> <code>{{ entry.protocols|join:", " }}</code></li>
{% endif %}
{% if entry.secure_protocols %}
<li><strong>{% blocktrans %}Secure Schema(s){% endblocktrans %}:</strong> {{ entry.secure_protocols|join:", " }}</li>
<li><strong>{% blocktrans %}Secure Schema(s){% endblocktrans %}:</strong> <code>{{ entry.secure_protocols|join:", " }}</code></li>
{% endif %}
<li><pre><code class="bash">
# {% blocktrans %}Apprise URL Formatting{% endblocktrans %}</br>
Expand Down
50 changes: 26 additions & 24 deletions apprise_api/static/css/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,14 @@ input {
display: block;
}

.tabs .tab.disabled a,.tabs .tab.disabled a:hover{font-weight: inherit}

code {
background-color: #eee;
font-family: monospace;
white-space: normal;
padding: 0.2rem;
}

table code {
background-color: inherit;
}

h1, h2, h3, h4, h5 {
margin-top: 0;
}
Expand All @@ -46,6 +43,10 @@ td, th {
margin-bottom: 0;
}

ul.detail-buttons strong {
font-weight: 800;
}

h4 em {
font-size: 2.0rem;
display: inline-block;
Expand Down Expand Up @@ -114,15 +115,32 @@ textarea {
display: inline-flex;
vertical-align: middle;
}
#url-list code {
display: block;
background-color: inherit;

#url-list .card-panel {
padding: 0.5rem;
margin: 0.1rem 0;
border-radius: 12px;
width: 50%;
min-width: 35rem;
float: left;
}

#url-list .chip {
margin: 0.3rem;
background-color: inherit;
border: 1px solid #e4e4e4;
}

#url-list code {
overflow-x: hidden;
overflow-y: hidden;
white-space: wrap;
text-wrap: wrap;
overflow-wrap: break-word;
border-radius: 5px;
display: block;
}

/* Notification Details */
ul.logs {
font-family: monospace, monospace;
Expand Down Expand Up @@ -182,20 +200,4 @@ h6 {

code.config-id {
font-size: 0.7em;
background: none;
}

#url-list .card-panel {
padding: 0.5rem;
margin: 0.1rem 0;
border-radius: 12px;
}
#url-list .chip {
margin: 0.3rem;
}
#url-list code {
overflow-x: hidden;
overflow-y: hidden;
white-space: wrap;
border-radius: 5px;
}
2 changes: 1 addition & 1 deletion apprise_api/static/css/theme-dark.min.css

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions apprise_api/static/css/theme-light.min.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.tabs .tab a {background-color: #f3f3f3;}
.tabs.tabs-transparent .tab a,.tabs.tabs-transparent .tab.disabled a,.tabs.tabs-transparent .tab.disabled a:hover, .tab.disabled i.material-icons{color:#a7a7a7}
.tabs .tab.disabled a,.tabs .tab.disabled a:hover{background-color: #f3f3f3; color:#a7a7a7}

0 comments on commit 2a8c3b0

Please sign in to comment.