Compare commits

..

1 Commits

Author SHA1 Message Date
Christopher James Halse Rogers adb5dac1d2 snap: Fix build process for Tier 2 platforms
Unfortunately this only actually *fixes* the build for arm64;
it seems that we hit various bugs in Rust on ppc64 and armhf.
2020-01-24 09:03:02 +02:00
36 changed files with 11919 additions and 15692 deletions
-1
View File
@@ -226,7 +226,6 @@ jobs:
steps:
- restore_env:
cache: none
- run: cargo build
- run: crowdin upload -b master
workflows:
-1
View File
@@ -18,4 +18,3 @@ tags.*
search_index
.buildconfig
__pycache__
/.vscode/
Generated
+1204 -1170
View File
File diff suppressed because it is too large Load Diff
+88 -22
View File
@@ -190,28 +190,7 @@ p.error {
background: $gray;
text-overflow: ellipsis;
footer.authors {
div {
float: left;
margin-right: 0.25em;
}
.likes { color: $red; }
.reshares { color: $primary; }
span.likes, span.resahres {
font-family: "Route159",serif;
font-size: 1em;
}
svg.feather {
width: 0.85em;
height: 0.85em;
}
}
text-overflow: ellipsis;
> * {
margin: 20px;
@@ -490,6 +469,93 @@ figure {
/// Small screens
@media screen and (max-width: 600px) {
@keyframes menuOpening {
from {
transform: scaleX(0);
transform-origin: left;
opacity: 0;
}
to {
transform: scaleX(1);
transform-origin: left;
opacity: 1;
}
}
body > header {
flex-direction: column;
nav#menu {
display: inline-flex;
z-index: 21;
}
#content {
display: none;
appearance: none;
text-align: center;
z-index: 20;
}
}
body > header:focus-within #content, #content.show {
position: fixed;
display: flex;
flex-direction: column;
justify-content: flex-start;
top: 0;
left: 0;
width: 100%;
height: 100%;
box-sizing: border-box;
animation: 0.2s menuOpening;
&::before {
content: "";
position: absolute;
transform: skewX(-10deg);
top: 0;
left: -20%;
width: 100%;
height: 100%;
z-index: -10;
background: $primary;
}
> nav {
flex-direction: column;
align-items: flex-start;
a {
display: flex;
flex-direction: row;
align-items: center;
margin: 0;
padding: 1rem 1.5rem;
color: $background;
font-size: 1.4em;
font-weight: 300;
&.title { font-size: 1.8em; }
> *:first-child { width: 3rem; }
> img:first-child { height: 3rem; }
> *:last-child { margin-left: 1rem; }
> nav hr {
display: block;
margin: 0;
width: 100%;
border: solid $background 0.1rem;
}
.mobile-label { display: initial; }
}
}
}
main .article-meta {
> *, .comments {
margin: 0 5%;
-90
View File
@@ -101,96 +101,6 @@ body > header {
}
}
/// Small screens
@media screen and (max-width: 600px) {
@keyframes menuOpening {
from {
transform: scaleX(0);
transform-origin: left;
opacity: 0;
}
to {
transform: scaleX(1);
transform-origin: left;
opacity: 1;
}
}
body > header {
flex-direction: column;
nav#menu {
display: inline-flex;
z-index: 21;
}
#content {
display: none;
appearance: none;
text-align: center;
z-index: 20;
}
}
body > header:focus-within #content, #content.show {
position: fixed;
display: flex;
flex-direction: column;
justify-content: flex-start;
top: 0;
left: 0;
width: 100%;
height: 100%;
box-sizing: border-box;
animation: 0.2s menuOpening;
&::before {
content: "";
position: absolute;
transform: skewX(-10deg);
top: 0;
left: -20%;
width: 100%;
height: 100%;
z-index: -10;
background: $primary;
}
> nav {
flex-direction: column;
align-items: flex-start;
a {
display: flex;
flex-direction: row;
align-items: center;
margin: 0;
padding: 1rem 1.5rem;
color: $background;
font-size: 1.4em;
font-weight: 300;
&.title { font-size: 1.8em; }
> *:first-child { width: 3rem; }
> img:first-child { height: 3rem; }
> *:last-child { margin-left: 1rem; }
> nav hr {
display: block;
margin: 0;
width: 100%;
border: solid $background 0.1rem;
}
.mobile-label { display: initial; }
}
}
}
}
/* Only enable label animations on large screens */
@media screen and (min-width: 600px) {
header nav a {
-1
View File
@@ -54,7 +54,6 @@ pub enum Role {
}
#[derive(Queryable, Identifiable, Clone, Debug, AsChangeset)]
#[changeset_options(treat_none_as_null = "true")]
pub struct User {
pub id: i32,
pub username: String,
+481 -630
View File
File diff suppressed because it is too large Load Diff
+475 -645
View File
File diff suppressed because it is too large Load Diff
+466 -600
View File
File diff suppressed because it is too large Load Diff
+477 -688
View File
File diff suppressed because it is too large Load Diff
+470 -682
View File
File diff suppressed because it is too large Load Diff
+421 -549
View File
File diff suppressed because it is too large Load Diff
+433 -562
View File
File diff suppressed because it is too large Load Diff
+481 -641
View File
File diff suppressed because it is too large Load Diff
+471 -693
View File
File diff suppressed because it is too large Load Diff
+480 -684
View File
File diff suppressed because it is too large Load Diff
+469 -610
View File
File diff suppressed because it is too large Load Diff
+434 -565
View File
File diff suppressed because it is too large Load Diff
+470 -684
View File
File diff suppressed because it is too large Load Diff
+453 -659
View File
File diff suppressed because it is too large Load Diff
+542 -658
View File
File diff suppressed because it is too large Load Diff
+477 -691
View File
File diff suppressed because it is too large Load Diff
+395 -464
View File
File diff suppressed because it is too large Load Diff
+480 -686
View File
File diff suppressed because it is too large Load Diff
+441 -574
View File
File diff suppressed because it is too large Load Diff
+457 -594
View File
File diff suppressed because it is too large Load Diff
+477 -693
View File
File diff suppressed because it is too large Load Diff
+424 -553
View File
File diff suppressed because it is too large Load Diff
+430 -561
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -24,9 +24,9 @@ if [ $ARCH == "aarch64" -o $ARCH == "armv71" ] ; then
apt-get install -y --no-install-recommends build-essential subversion ninja-build cmake
mkdir -p /scratch/src
cd /scratch/src
svn co http://llvm.org/svn/llvm-project/llvm/tags/RELEASE_900/final/ llvm
svn co http://llvm.org/svn/llvm-project/llvm/tags/RELEASE_800/final/ llvm
cd /scratch/src/llvm/tools
svn co http://llvm.org/svn/llvm-project/lld/tags/RELEASE_900/final/ lld
svn co http://llvm.org/svn/llvm-project/lld/tags/RELEASE_800/final/ lld
mkdir -p /scratch/build/arm
cd /scratch/build/arm
if [ "$ARCH" == "aarch64" ] ; then
+5 -6
View File
@@ -31,21 +31,20 @@ parts:
- pkg-config
- libsqlite3-dev
- gettext
- libclang-8-dev
- on arm64,armhf,ppc64el,s390x:
- lld-8
- libclang-9-dev
- lld-9
override-build: |
snapcraftctl set-version $(git describe --tags)
export PATH=$PATH:$HOME/.cargo/bin
rustup install stable
rustup install --force --profile=minimal stable
cargo +stable install --force cargo-web
# Only Tier 1 Rust platforms get rust-lld
# On the others (arm64, armhf, powerpc64, s390x) fall back to using
# the system LLD we've installed earlier.
case ${SNAPCRAFT_ARCH_TRIPLET} in \
aarch64-linux-gnu|arm-linux-gnueabihf|powerpc64-linux-gnu|s390x-linux-gnu) \
RUSTFLAGS="-C linker=lld-8" cargo web deploy -p plume-front --release \
aarch64-linux-gnu|arm-linux-gnueabihf|powerpc64le-linux-gnu|s390x-linux-gnu) \
RUSTFLAGS="-C linker=lld-9" cargo web deploy -p plume-front --release \
;; \
*) \
cargo web deploy -p plume-front --release \
+3 -3
View File
@@ -3,7 +3,7 @@ use lettre::Transport;
use rocket::http::ext::IntoOwned;
use rocket::{
http::{uri::Uri, Cookie, Cookies, SameSite},
request::LenientForm,
request::{Form, LenientForm},
response::{Flash, Redirect},
State,
};
@@ -159,7 +159,7 @@ pub struct ResetForm {
#[post("/password-reset", data = "<form>")]
pub fn password_reset_request(
mail: State<'_, Arc<Mutex<Mailer>>>,
form: LenientForm<ResetForm>,
form: Form<ResetForm>,
rockets: PlumeRocket,
) -> Ructe {
if User::find_by_email(&*rockets.conn, &form.email).is_ok() {
@@ -216,7 +216,7 @@ fn passwords_match(form: &NewPasswordForm) -> Result<(), ValidationError> {
#[post("/password-reset/<token>", data = "<form>")]
pub fn password_reset(
token: String,
form: LenientForm<NewPasswordForm>,
form: Form<NewPasswordForm>,
rockets: PlumeRocket,
) -> Result<Flash<Redirect>, Ructe> {
form.validate()
+1 -4
View File
@@ -399,10 +399,7 @@ pub fn update(
)
.0,
);
user.preferred_theme = form
.theme
.clone()
.and_then(|t| if &t == "" { None } else { Some(t) });
user.preferred_theme = form.theme.clone();
user.hide_custom_css = form.hide_custom_css;
let _: User = user.save_changes(&*conn).map_err(Error::from)?;
+2 -2
View File
@@ -32,9 +32,9 @@
<form method="post" action="@uri!(instance::delete_email_blocklist)">
<header>
@if emails.is_empty() {
<p class="center" >@i18n!(ctx.1, "There are no blocked emails on your instance")</p>
} else {
<input type="submit" class="destructive" value='@i18n!(ctx.1, "Delete selected emails")'>
} else {
<p class="center" >@i18n!(ctx.1, "There are no blocked emails on your instance")</p>
}
</header>
<div class="list">
+10 -23
View File
@@ -17,30 +17,17 @@
<p class="p-summary" dir="auto">@article.subtitle</p>
</main>
<footer class="authors">
<div>
@Html(i18n!(ctx.1, "By {0}"; format!(
"<a class=\"p-author h-card\" href=\"{}\">{}</a>",
uri!(user::details: name = &article.get_authors(ctx.0).unwrap_or_default()[0].fqn),
escape(&article.get_authors(ctx.0).unwrap_or_default()[0].name())
)))
@if article.published {
<span class="dt-published" datetime="@article.creation_date.format("%F %T")">@article.creation_date.format("%B %e, %Y")</span>
}
<a href="@uri!(blogs::details: name = &article.get_blog(ctx.0).unwrap().fqn, page = _)">@article.get_blog(ctx.0).unwrap().title</a>
</div>
@Html(i18n!(ctx.1, "By {0}"; format!(
"<a class=\"p-author h-card\" href=\"{}\">{}</a>",
uri!(user::details: name = &article.get_authors(ctx.0).unwrap_or_default()[0].fqn),
escape(&article.get_authors(ctx.0).unwrap_or_default()[0].name())
)))
@if article.published {
<span class="dt-published" datetime="@article.creation_date.format("%F %T")">@article.creation_date.format("%B %e, %Y")</span>
}
<a href="@uri!(blogs::details: name = &article.get_blog(ctx.0).unwrap().fqn, page = _)">@article.get_blog(ctx.0).unwrap().title</a>
@if !article.published {
<div>⋅ @i18n!(ctx.1, "Draft")</div>
} else {
<div>
<span class="likes" aria-label="@i18n!(ctx.1, "One like", "{0} likes"; article.count_likes(ctx.0).unwrap_or_default())" title="@i18n!(ctx.1, "One like", "{0} likes"; article.count_likes(ctx.0).unwrap_or_default())">
@icon!("heart") @article.count_likes(ctx.0).unwrap_or_default()
</span>
<span class="reshares" aria-label="@i18n!(ctx.1, "One like", "{0} boost"; article.count_reshares(ctx.0).unwrap_or_default())" title="@i18n!(ctx.1, "One boost", "{0} boosts"; article.count_reshares(ctx.0).unwrap_or_default())">
@icon!("repeat") @article.count_reshares(ctx.0).unwrap_or_default()
</span>
</div>
⋅ @i18n!(ctx.1, "Draft")
}
</footer>
</div>
-1
View File
@@ -25,7 +25,6 @@
.default(login_form.password)
.error(&login_errs)
.set_prop("minlength", 1)
.input_type("password")
.html(ctx.1))
<input type="submit" value="@i18n!(ctx.1, "Log in")" />
</form>