Skip to content
Snippets Groups Projects
Commit f09010d1 authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

Slightly tweaked minor UI and ranking factors

parent 310008e2
Branches
No related tags found
No related merge requests found
...@@ -67,11 +67,11 @@ class Database ...@@ -67,11 +67,11 @@ class Database
private function apply_config(\PDOStatement $stmt) private function apply_config(\PDOStatement $stmt)
{ {
$stmt->bindValue(':config_normalization', 0, PDO::PARAM_INT); $stmt->bindValue(':config_normalization', 32, PDO::PARAM_INT);
$stmt->bindValue(':weight_content', 1, PDO::PARAM_INT); $stmt->bindValue(':weight_content', 14, PDO::PARAM_INT);
$stmt->bindValue(':weight_type', 1, PDO::PARAM_INT); $stmt->bindValue(':weight_type', 16, PDO::PARAM_INT);
$stmt->bindValue(':weight_time', 12, PDO::PARAM_INT); $stmt->bindValue(':weight_time', 1, PDO::PARAM_INT);
} }
public function find(string $query, string $since = null, string $before = null, string $buffer = null, string $network = null, string $sender = null, int $limitPerBuffer = 4): array public function find(string $query, string $since = null, string $before = null, string $buffer = null, string $network = null, string $sender = null, int $limitPerBuffer = 4): array
......
...@@ -75,7 +75,7 @@ class PostgresSmartBackend implements Backend ...@@ -75,7 +75,7 @@ class PostgresSmartBackend implements Backend
WHEN TYPE IN (32, 64, 128, 256, 512, 32768, 65536) THEN 0.5 WHEN TYPE IN (32, 64, 128, 256, 512, 32768, 65536) THEN 0.5
WHEN TYPE IN (8, 16, 8192, 131072) THEN 0.25 WHEN TYPE IN (8, 16, 8192, 131072) THEN 0.25
ELSE 0.1 END) ^ :weight_type) * ELSE 0.1 END) ^ :weight_type) *
((EXTRACT(EPOCH FROM TIME) / EXTRACT(EPOCH FROM CURRENT_TIMESTAMP)) ^ :weight_time) ((1 / (EXTRACT(EPOCH FROM CURRENT_TIMESTAMP) - EXTRACT(EPOCH FROM TIME))) ^ :weight_time)
) AS rank_value ) AS rank_value
FROM FROM
backlog backlog
...@@ -149,7 +149,7 @@ class PostgresSmartBackend implements Backend ...@@ -149,7 +149,7 @@ class PostgresSmartBackend implements Backend
WHEN TYPE IN (32, 64, 128, 256, 512, 32768, 65536) THEN 0.5 WHEN TYPE IN (32, 64, 128, 256, 512, 32768, 65536) THEN 0.5
WHEN TYPE IN (8, 16, 8192, 131072) THEN 0.25 WHEN TYPE IN (8, 16, 8192, 131072) THEN 0.25
ELSE 0.1 END) ^ :weight_type) * ELSE 0.1 END) ^ :weight_type) *
((EXTRACT(EPOCH FROM TIME) / EXTRACT(EPOCH FROM CURRENT_TIMESTAMP)) ^ :weight_time) ((1 / (EXTRACT(EPOCH FROM CURRENT_TIMESTAMP) - EXTRACT(EPOCH FROM TIME))) ^ :weight_time)
) AS rank_value ) AS rank_value
FROM FROM
backlog backlog
......
...@@ -74,15 +74,12 @@ ...@@ -74,15 +74,12 @@
color: #444444 color: #444444
text-transform: uppercase text-transform: uppercase
border: none border: none
transition: all 0.4s
position: relative position: relative
font-weight: normal font-weight: normal
display: inline-block
margin-bottom: 0 margin-bottom: 0
text-align: center text-align: center
vertical-align: middle vertical-align: middle
touch-action: manipulation touch-action: manipulation
cursor: pointer
background: transparent none background: transparent none
white-space: nowrap white-space: nowrap
padding: 6px 16px padding: 6px 16px
...@@ -93,6 +90,10 @@ ...@@ -93,6 +90,10 @@
box-sizing: border-box box-sizing: border-box
font-family: "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif font-family: "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif
will-change: background will-change: background
opacity: 0
pointer-events: none
cursor: none
transition: opacity 0.4s 0.2s, background 0.4s
&:hover &:hover
background-color: rgba(0, 0, 0, 0.06) background-color: rgba(0, 0, 0, 0.06)
...@@ -117,11 +118,6 @@ ...@@ -117,11 +118,6 @@
opacity: .2 opacity: .2
transition: 0s transition: 0s
.open
display: initial
.close
display: none
&:not(.focus) .secondary &:not(.focus) .secondary
display: none display: none
...@@ -156,10 +152,10 @@ ...@@ -156,10 +152,10 @@
margin-right: -16px margin-right: -16px
button button
.open opacity: 1
display: none display: inline-block
.close cursor: pointer
display: initial pointer-events: initial
.container .container
font-size: 13px font-size: 13px
......
...@@ -457,15 +457,12 @@ body { ...@@ -457,15 +457,12 @@ body {
color: #444444; color: #444444;
text-transform: uppercase; text-transform: uppercase;
border: none; border: none;
transition: all 0.4s;
position: relative; position: relative;
font-weight: normal; font-weight: normal;
display: inline-block;
margin-bottom: 0; margin-bottom: 0;
text-align: center; text-align: center;
vertical-align: middle; vertical-align: middle;
touch-action: manipulation; touch-action: manipulation;
cursor: pointer;
background: transparent none; background: transparent none;
white-space: nowrap; white-space: nowrap;
padding: 6px 16px; padding: 6px 16px;
...@@ -475,7 +472,12 @@ body { ...@@ -475,7 +472,12 @@ body {
text-decoration: none; text-decoration: none;
box-sizing: border-box; box-sizing: border-box;
font-family: "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif; font-family: "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif;
will-change: background; } will-change: background;
opacity: 0;
pointer-events: none;
cursor: none;
transition: opacity 0.4s 0.2s, background 0.4s;
}
.results .buffer .title button:hover { .results .buffer .title button:hover {
background-color: rgba(0, 0, 0, 0.06); } background-color: rgba(0, 0, 0, 0.06); }
.results .buffer .title button:after { .results .buffer .title button:after {
...@@ -495,10 +497,6 @@ body { ...@@ -495,10 +497,6 @@ body {
background-size: 0 0; background-size: 0 0;
opacity: 0.2; opacity: 0.2;
transition: 0s; } transition: 0s; }
.results .buffer .title button .open {
display: initial; }
.results .buffer .title button .close {
display: none; }
.results .buffer:not(.focus) .secondary { .results .buffer:not(.focus) .secondary {
display: none; } display: none; }
.results .buffer:before { .results .buffer:before {
...@@ -526,10 +524,13 @@ body { ...@@ -526,10 +524,13 @@ body {
.results .buffer.focus .title:after { .results .buffer.focus .title:after {
margin-left: -16px; margin-left: -16px;
margin-right: -16px; } } margin-right: -16px; } }
.results .buffer.focus .title button .open {
display: none; } .results .buffer.focus .title button {
.results .buffer.focus .title button .close { opacity: 1;
display: initial; } display: inline-block;
cursor: pointer;
pointer-events: initial;
}
.results .buffer .container { .results .buffer .container {
font-size: 13px; } font-size: 13px; }
.results .buffer .container > .inline-button { .results .buffer .container > .inline-button {
......
This diff is collapsed.
...@@ -30,27 +30,23 @@ class Buffer extends Component { ...@@ -30,27 +30,23 @@ class Buffer extends Component {
$$g.addEventListener('click', () => this.focus()); $$g.addEventListener('click', () => this.focus());
$$b.appendChild($$g); $$b.appendChild($$g);
var $$h = document.createElement('span'); var $$h = document.createElement('span');
$$h.setAttribute('class', 'open'); $$h.setAttribute('class', 'close');
$$g.appendChild($$h); $$g.appendChild($$h);
$$h.appendChildren(translation.buffer.open); $$h.appendChildren(translation.buffer.close);
var $$j = document.createElement('span'); var $$j = document.createElement('div');
$$j.setAttribute('class', 'close'); $$j.setAttribute('class', 'container');
$$g.appendChild($$j); $$a.appendChild($$j);
$$j.appendChildren(translation.buffer.close); $$j.appendChildren(this.insertContainerFirst = function () {
var $$l = document.createElement('div'); var $$l = document.createElement('div');
$$l.setAttribute('class', 'container'); $$l.setAttribute('class', 'primary');
$$a.appendChild($$l); return $$l;
$$l.appendChildren(this.insertContainerFirst = function () { }.call(this));
$$j.appendChildren(this.insertContainer = function () {
var $$n = document.createElement('div'); var $$n = document.createElement('div');
$$n.setAttribute('class', 'primary'); $$n.setAttribute('class', 'secondary');
return $$n; return $$n;
}.call(this)); }.call(this));
$$l.appendChildren(this.insertContainer = function () { $$j.appendChildren((this.loadMoreBtn = new LoadMore(translation.results.show_more)).elem);
var $$p = document.createElement('div');
$$p.setAttribute('class', 'secondary');
return $$p;
}.call(this));
$$l.appendChildren((this.loadMoreBtn = new LoadMore(translation.results.show_more)).elem);
return $$a; return $$a;
}.call(this); }.call(this);
this.loadMoreBtn.addEventListener('click', () => this.loadMore()); this.loadMoreBtn.addEventListener('click', () => this.loadMore());
......
...@@ -25,7 +25,6 @@ class Buffer extends Component { ...@@ -25,7 +25,6 @@ class Buffer extends Component {
<div className="title"> <div className="title">
<h2>{this.network}{this.name}</h2> <h2>{this.network}{this.name}</h2>
<button onClick={() => this.focus()}> <button onClick={() => this.focus()}>
<span className="open">{translation.buffer.open}</span>
<span className="close">{translation.buffer.close}</span> <span className="close">{translation.buffer.close}</span>
</button> </button>
</div> </div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment