Skip to content

Commit f48ac8b

Browse files
committed
Fix layout
1 parent 1a663f8 commit f48ac8b

File tree

7 files changed

+15
-20
lines changed

7 files changed

+15
-20
lines changed

Cargo.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ keywords = ["url", "link", "webpage", "actix", "web"]
88
license = "MIT OR Apache-2.0"
99
readme = "README.md"
1010
repository = "https://github.com/enaut/pslink/"
11-
version = "0.4.6"
11+
version = "0.4.7"
1212

1313
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1414

app/src/pages/list_links.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -837,15 +837,15 @@ fn view_link<F: Fn(&str) -> String>(
837837
Clicks::Extended(statistics) =>
838838
if let Some(nodes) = l.cache.stats.clone() {
839839
td![
840+
nodes,
840841
span!(
841842
C!("stats_total"),
842843
t("total_clicks"),
843844
match &l.data.clicks {
844845
Clicks::Count(c) => c.number,
845846
Clicks::Extended(e) => e.total.number,
846847
}
847-
),
848-
nodes
848+
)
849849
]
850850
} else {
851851
td!(statistics.total.number)
@@ -881,7 +881,7 @@ fn view_link<F: Fn(&str) -> String>(
881881

882882
/// Render stats is best performed in the update rather than in the view cycle to avoid needless recalculations. Since the database only sends a list of weeks that contain clicks this function has to add the weeks that do not contain clicks. This is more easily said than done since the first and last week index are not constant, the ordering has to be right, and not every year has 52 weeks. But we ignore the last issue.
883883
fn render_stats(q: Statistics, maximum: &WeekCount) -> Node<Msg> {
884-
let factor = 40.0 / f64::max(f64::from(maximum.total.number), 1.0);
884+
let factor = 30.0 / f64::max(f64::from(maximum.total.number), 1.0);
885885
let mut full: Vec<WeekCount> = Vec::new();
886886
let mut week = chrono::Utc::now() - chrono::Duration::weeks(52);
887887

@@ -922,7 +922,7 @@ fn render_stats(q: Statistics, maximum: &WeekCount) -> Node<Msg> {
922922
#[allow(clippy::cast_possible_truncation)]
923923
let normalized: Vec<i64> = full
924924
.iter()
925-
.map(|v| (40.0 - f64::from(v.total.number) * factor).round() as i64)
925+
.map(|v| (30.0 - f64::from(v.total.number) * factor).round() as i64)
926926
.collect();
927927
let mut points = Vec::new();
928928
points.push(format!("M 0 {}", &normalized[0]));

locales/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ keywords = ["url", "link", "webpage", "actix", "web"]
88
license = "MIT OR Apache-2.0"
99
readme = "README.md"
1010
repository = "https://github.com/enaut/pslink/"
11-
version = "0.4.6"
11+
version = "0.4.7"
1212

1313
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1414

pslink/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ license = "MIT OR Apache-2.0"
99
name = "pslink"
1010
readme = "README.md"
1111
repository = "https://github.com/enaut/pslink/"
12-
version = "0.4.6"
12+
version = "0.4.7"
1313

1414
[build-dependencies]
1515
actix-web-static-files = { git = "https://github.com/enaut/actix-web-static-files.git", branch="master" }

pslink/static/admin.css

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
body {
1+
qbody {
22
margin: 0;
33
padding: 0;
44
}
@@ -64,22 +64,17 @@ td {
6464
text-align: center;
6565
border: 1px solid #ccc;
6666
padding: 10px;
67-
position: relative;
6867
}
6968

7069
svg.statistics_graph {
7170
width: 120px;
72-
height: 50px;
71+
height: 30px;
7372
}
7473

7574
.stats_total {
7675
display: block;
77-
position: absolute;
7876
font-size: 0.7em;
79-
background-color: rgba(255, 255, 255, 0.75);
80-
padding: 3px;
81-
border-radius: 14px;
82-
bottom: 0;
77+
margin-top: -4px;
8378
}
8479

8580
td.table_qr svg {

shared/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ license = "MIT OR Apache-2.0"
88
name = "pslink-shared"
99
readme = "../pslink/README.md"
1010
repository = "https://github.com/enaut/pslink/"
11-
version = "0.4.6"
11+
version = "0.4.7"
1212

1313
[dependencies]
1414
serde = {version="1.0", features = ["derive"]}

0 commit comments

Comments
 (0)