From b059fb48fc17e5cea45e8348a4d016014791faf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20=C4=BDach?= Date: Sun, 10 Jan 2021 18:32:21 +0100 Subject: [PATCH 1/7] Update _header.scss The menu does not open on iOS Safari because of how it can't handle translateZ, and needs an -webkit specific prefix for the @keyframes property for the animation to work. This PR fixes the issue. --- assets/themes/default/_header.scss | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/assets/themes/default/_header.scss b/assets/themes/default/_header.scss index 9f28b90b..befa2bc4 100644 --- a/assets/themes/default/_header.scss +++ b/assets/themes/default/_header.scss @@ -19,7 +19,7 @@ body > header { a { transform: skewX(15deg); - display: flex; + display: flex; flex-direction: column; align-items: center; justify-content: center; @@ -204,8 +204,10 @@ body > header { display: block; position: absolute; left: 50%; - transform: translate(-50%, 0); - transform: translateZ(0); + transform: translate(-50%, 0); + transform: translateZ(0); + -webkit-transform: none !important; + opacity: 0; font-size: 0.9em; white-space: nowrap; @@ -217,7 +219,8 @@ body > header { i { margin-bottom: 0.75em; } .mobile-label { opacity: 1; - transform: translate(-50%, 80%); + transform: translate(-50%, 80%); + -webkit-transform: translate(-50%) 80%); } } } @@ -237,6 +240,18 @@ body > header { opacity: 1; } } + @-webkit-keyframes menuOpening { + from { + -webkit-transform: scaleX(0); + transform-origin: 'left'; + opacity: 0; + } + to { + -webkit-transform: scaleX(1); + transform-origin: 'left'; + opacity: 1; + } +} body > header { flex-direction: column; From b52d8e4e2695dea81d96d052b75d90f7a7850437 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20=C4=BDach?= Date: Sun, 10 Jan 2021 21:23:11 +0100 Subject: [PATCH 2/7] Fix menu animation not working on mobile iOS (also Midori) --- assets/themes/default/_header.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/themes/default/_header.scss b/assets/themes/default/_header.scss index befa2bc4..9e7b045b 100644 --- a/assets/themes/default/_header.scss +++ b/assets/themes/default/_header.scss @@ -220,7 +220,7 @@ body > header { .mobile-label { opacity: 1; transform: translate(-50%, 80%); - -webkit-transform: translate(-50%) 80%); + -webkit-transform: translate(-50%, 80%); } } } From 27a33c833d0ecacfa7844e298f14b9209a41f144 Mon Sep 17 00:00:00 2001 From: Kitaiti Makoto Date: Mon, 11 Jan 2021 08:38:41 +0900 Subject: [PATCH 3/7] Run cargo fmt --- plume-common/src/activity_pub/mod.rs | 2 +- plume-models/src/migrations.rs | 2 +- src/inbox.rs | 2 +- src/main.rs | 2 +- src/routes/errors.rs | 2 +- src/routes/session.rs | 2 +- src/routes/user.rs | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/plume-common/src/activity_pub/mod.rs b/plume-common/src/activity_pub/mod.rs index 423cc4ff..67c7375f 100644 --- a/plume-common/src/activity_pub/mod.rs +++ b/plume-common/src/activity_pub/mod.rs @@ -1,6 +1,5 @@ use activitypub::{Activity, Link, Object}; use array_tool::vec::Uniq; -use tracing::{debug, warn}; use reqwest::r#async::ClientBuilder; use rocket::{ http::Status, @@ -10,6 +9,7 @@ use rocket::{ }; use serde_json; use tokio::prelude::*; +use tracing::{debug, warn}; use self::sign::Signable; diff --git a/plume-models/src/migrations.rs b/plume-models/src/migrations.rs index f7fd05dc..301ddbfe 100644 --- a/plume-models/src/migrations.rs +++ b/plume-models/src/migrations.rs @@ -1,8 +1,8 @@ use crate::{Connection, Error, Result}; use diesel::connection::{Connection as Conn, SimpleConnection}; -use tracing::info; use migrations_internals::{setup_database, MigrationConnection}; use std::path::Path; +use tracing::info; #[allow(dead_code)] //variants might not be constructed if not required by current migrations enum Action { diff --git a/src/inbox.rs b/src/inbox.rs index ecb6e0e6..059bf632 100644 --- a/src/inbox.rs +++ b/src/inbox.rs @@ -1,4 +1,3 @@ -use tracing::warn; use plume_common::activity_pub::{ inbox::FromId, request::Digest, @@ -11,6 +10,7 @@ use rocket::{data::*, http::Status, response::status, Outcome::*, Request}; use rocket_contrib::json::*; use serde::Deserialize; use std::io::Read; +use tracing::warn; pub fn handle_incoming( rockets: PlumeRocket, diff --git a/src/main.rs b/src/main.rs index 23e24799..9483e6f8 100755 --- a/src/main.rs +++ b/src/main.rs @@ -13,7 +13,6 @@ extern crate validator_derive; use chrono::Utc; use clap::App; use diesel::r2d2::ConnectionManager; -use tracing::warn; use plume_models::{ db_conn::{DbPool, PragmaForeignKey}, instance::Instance, @@ -28,6 +27,7 @@ use std::path::Path; use std::process::exit; use std::sync::{Arc, Mutex}; use std::time::Duration; +use tracing::warn; init_i18n!( "plume", af, ar, bg, ca, cs, cy, da, de, el, en, eo, es, fa, fi, fr, gl, he, hi, hr, hu, it, diff --git a/src/routes/errors.rs b/src/routes/errors.rs index 8549da80..7632f347 100644 --- a/src/routes/errors.rs +++ b/src/routes/errors.rs @@ -1,10 +1,10 @@ use crate::template_utils::{IntoContext, Ructe}; -use tracing::warn; use plume_models::{Error, PlumeRocket}; use rocket::{ response::{self, Responder}, Request, }; +use tracing::warn; #[derive(Debug)] pub struct ErrorPage(Error); diff --git a/src/routes/session.rs b/src/routes/session.rs index 4d1dfe73..86955f9a 100644 --- a/src/routes/session.rs +++ b/src/routes/session.rs @@ -1,6 +1,5 @@ use crate::routes::RespondOrRedirect; use lettre::Transport; -use tracing::warn; use rocket::http::ext::IntoOwned; use rocket::{ http::{uri::Uri, Cookie, Cookies, SameSite}, @@ -14,6 +13,7 @@ use std::{ sync::{Arc, Mutex}, time::Instant, }; +use tracing::warn; use validator::{Validate, ValidationError, ValidationErrors}; use crate::mail::{build_mail, Mailer}; diff --git a/src/routes/user.rs b/src/routes/user.rs index 5164442e..90baaf94 100644 --- a/src/routes/user.rs +++ b/src/routes/user.rs @@ -3,7 +3,6 @@ use activitypub::{ collection::{OrderedCollection, OrderedCollectionPage}, }; use diesel::SaveChangesDsl; -use tracing::{info, warn}; use rocket::{ http::{ContentType, Cookies}, request::LenientForm, @@ -12,6 +11,7 @@ use rocket::{ use rocket_i18n::I18n; use serde_json; use std::{borrow::Cow, collections::HashMap}; +use tracing::{info, warn}; use validator::{Validate, ValidationError, ValidationErrors}; use crate::inbox; From ba4476bf5a234878e1d08ac8bdd81a3caa99cd00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20=C4=BDach?= Date: Mon, 11 Jan 2021 01:34:09 +0100 Subject: [PATCH 4/7] Update _header.scss --- assets/themes/default/_header.scss | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/assets/themes/default/_header.scss b/assets/themes/default/_header.scss index 9e7b045b..11c5b0ef 100644 --- a/assets/themes/default/_header.scss +++ b/assets/themes/default/_header.scss @@ -204,9 +204,9 @@ body > header { display: block; position: absolute; left: 50%; - transform: translate(-50%, 0); - transform: translateZ(0); - -webkit-transform: none !important; + transform: translate(-50%, 0); + transform: translateZ(0); + -webkit-transform: none !important; opacity: 0; font-size: 0.9em; @@ -219,8 +219,8 @@ body > header { i { margin-bottom: 0.75em; } .mobile-label { opacity: 1; - transform: translate(-50%, 80%); - -webkit-transform: translate(-50%, 80%); + transform: translate(-50%, 80%); + -webkit-transform: translate(-50%, 80%); } } } From 84621d1d27f1a66973614c0aaf2fc9ad0f2d2c52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20=C4=BDach?= Date: Mon, 11 Jan 2021 01:40:17 +0100 Subject: [PATCH 5/7] Update _header.scss --- assets/themes/default/_header.scss | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/assets/themes/default/_header.scss b/assets/themes/default/_header.scss index 11c5b0ef..1bf0f8f2 100644 --- a/assets/themes/default/_header.scss +++ b/assets/themes/default/_header.scss @@ -19,7 +19,7 @@ body > header { a { transform: skewX(15deg); - display: flex; + display: flex; flex-direction: column; align-items: center; justify-content: center; @@ -204,10 +204,9 @@ body > header { display: block; position: absolute; left: 50%; - transform: translate(-50%, 0); - transform: translateZ(0); - -webkit-transform: none !important; - + transform: translate(-50%, 0); + transform: translateZ(0); + -webkit-transform: none !important; opacity: 0; font-size: 0.9em; white-space: nowrap; @@ -219,8 +218,8 @@ body > header { i { margin-bottom: 0.75em; } .mobile-label { opacity: 1; - transform: translate(-50%, 80%); - -webkit-transform: translate(-50%, 80%); + transform: translate(-50%, 80%); + -webkit-transform: translate(-50%, 80%); } } } @@ -240,7 +239,7 @@ body > header { opacity: 1; } } - @-webkit-keyframes menuOpening { + @-webkit-keyframes menuOpening { from { -webkit-transform: scaleX(0); transform-origin: 'left'; From 1e1fd49c8c01bffb462215ea06d4b9d7fbab79de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20=C4=BDach?= Date: Mon, 11 Jan 2021 17:48:39 +0100 Subject: [PATCH 6/7] Update _header.scss --- assets/themes/default/_header.scss | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/assets/themes/default/_header.scss b/assets/themes/default/_header.scss index 1bf0f8f2..4181d4cf 100644 --- a/assets/themes/default/_header.scss +++ b/assets/themes/default/_header.scss @@ -114,6 +114,17 @@ body > header { transform-origin: left; opacity: 1; } + @-webkit-keyframes menuOpening { + from { + -webkit-transform: scaleX(0); + transform-origin: left; + opacity: 0; + } + to { + -webkit-transform: scaleX(1); + transform-origin: left; + opacity: 1; + } } body > header { @@ -242,12 +253,12 @@ body > header { @-webkit-keyframes menuOpening { from { -webkit-transform: scaleX(0); - transform-origin: 'left'; + transform-origin: left; opacity: 0; } to { -webkit-transform: scaleX(1); - transform-origin: 'left'; + transform-origin: left; opacity: 1; } } From 21069ea18ed3e72db61021181d015100726ea749 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20=C4=BDach?= Date: Mon, 11 Jan 2021 18:04:21 +0100 Subject: [PATCH 7/7] Fix code formatting --- assets/themes/default/_header.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/assets/themes/default/_header.scss b/assets/themes/default/_header.scss index 4181d4cf..bb75513c 100644 --- a/assets/themes/default/_header.scss +++ b/assets/themes/default/_header.scss @@ -114,6 +114,7 @@ body > header { transform-origin: left; opacity: 1; } + } @-webkit-keyframes menuOpening { from { -webkit-transform: scaleX(0);