From b17e571bc291a1f989004bf9adf36e2d1b0c60db Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Wed, 11 Oct 2017 19:11:15 +0200 Subject: Add padding to Android icon, change Apple and MS icons (#5321) --- public/android-chrome-192x192.png | Bin 10152 -> 10339 bytes public/apple-touch-icon.png | Bin 6977 -> 6129 bytes public/mstile-150x150.png | Bin 5796 -> 5621 bytes 3 files changed, 0 insertions(+), 0 deletions(-) diff --git a/public/android-chrome-192x192.png b/public/android-chrome-192x192.png index 2d2d25e37..923d0d7de 100644 Binary files a/public/android-chrome-192x192.png and b/public/android-chrome-192x192.png differ diff --git a/public/apple-touch-icon.png b/public/apple-touch-icon.png index 829263f83..70ec8dbf9 100644 Binary files a/public/apple-touch-icon.png and b/public/apple-touch-icon.png differ diff --git a/public/mstile-150x150.png b/public/mstile-150x150.png index e8e289eaa..b6cd056c0 100644 Binary files a/public/mstile-150x150.png and b/public/mstile-150x150.png differ -- cgit From 6a50329a9c8204803ba3a85b0acb41836a5e355e Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Wed, 11 Oct 2017 10:20:55 -0700 Subject: Only preload JS in /web pages (#5325) --- app/views/home/index.html.haml | 6 ++++++ app/views/layouts/application.html.haml | 8 -------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/app/views/home/index.html.haml b/app/views/home/index.html.haml index 6c93281db..659295ebf 100644 --- a/app/views/home/index.html.haml +++ b/app/views/home/index.html.haml @@ -1,4 +1,10 @@ - content_for :header_tags do + %link{ href: asset_pack_path('features/getting_started.js'), crossorigin: 'anonymous', rel: 'preload', as: 'script' }/ + %link{ href: asset_pack_path('features/compose.js'), crossorigin: 'anonymous', rel: 'preload', as: 'script' }/ + %link{ href: asset_pack_path('features/home_timeline.js'), crossorigin: 'anonymous', rel: 'preload', as: 'script' }/ + %link{ href: asset_pack_path('features/notifications.js'), crossorigin: 'anonymous', rel: 'preload', as: 'script' }/ + %link{ href: asset_pack_path('features/community_timeline.js'), crossorigin: 'anonymous', rel: 'preload', as: 'script' }/ + %link{ href: asset_pack_path('features/public_timeline.js'), crossorigin: 'anonymous', rel: 'preload', as: 'script' }/ %meta{name: 'applicationServerKey', content: Rails.configuration.x.vapid_public_key} %script#initial-state{ type: 'application/json' }!= json_escape(@initial_state_json) diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 8c6fc27df..ee995c987 100755 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -21,14 +21,6 @@ = stylesheet_pack_tag 'common', media: 'all' = stylesheet_pack_tag current_theme, media: 'all' = javascript_pack_tag 'common', integrity: true, crossorigin: 'anonymous' - - %link{ href: asset_pack_path('features/getting_started.js'), crossorigin: 'anonymous', rel: 'preload', as: 'script' }/ - %link{ href: asset_pack_path('features/compose.js'), crossorigin: 'anonymous', rel: 'preload', as: 'script' }/ - %link{ href: asset_pack_path('features/home_timeline.js'), crossorigin: 'anonymous', rel: 'preload', as: 'script' }/ - %link{ href: asset_pack_path('features/notifications.js'), crossorigin: 'anonymous', rel: 'preload', as: 'script' }/ - %link{ href: asset_pack_path('features/community_timeline.js'), crossorigin: 'anonymous', rel: 'preload', as: 'script' }/ - %link{ href: asset_pack_path('features/public_timeline.js'), crossorigin: 'anonymous', rel: 'preload', as: 'script' }/ - = javascript_pack_tag "locale_#{I18n.locale}", integrity: true, crossorigin: 'anonymous' = csrf_meta_tags -- cgit From 1823cf435a30af3d54e8b2a072df6f8d6fa59c6d Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Wed, 11 Oct 2017 19:21:44 +0200 Subject: In thread view, only scroll first update, scroll to replied-to post (#5322) --- app/javascript/mastodon/features/status/index.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/app/javascript/mastodon/features/status/index.js b/app/javascript/mastodon/features/status/index.js index eed8ea260..7ad3a7644 100644 --- a/app/javascript/mastodon/features/status/index.js +++ b/app/javascript/mastodon/features/status/index.js @@ -78,6 +78,7 @@ export default class Status extends ImmutablePureComponent { componentWillReceiveProps (nextProps) { if (nextProps.params.statusId !== this.props.params.statusId && nextProps.params.statusId) { + this._scrolledIntoView = false; this.props.dispatch(fetchStatus(nextProps.params.statusId)); } } @@ -240,11 +241,17 @@ export default class Status extends ImmutablePureComponent { } componentDidUpdate () { + if (this._scrolledIntoView) { + return; + } + const { status, ancestorsIds } = this.props; if (status && ancestorsIds && ancestorsIds.size > 0) { - const element = this.node.querySelectorAll('.focusable')[ancestorsIds.size]; - element.scrollIntoView(); + const element = this.node.querySelectorAll('.focusable')[ancestorsIds.size - 1]; + + element.scrollIntoView(true); + this._scrolledIntoView = true; } } -- cgit From 27101f1bebf8beb96a027dba6852529e3f1b66ab Mon Sep 17 00:00:00 2001 From: takayamaki Date: Thu, 12 Oct 2017 02:22:21 +0900 Subject: fix presented og:url is incorrect (#5320) --- app/views/shared/_og.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/shared/_og.html.haml b/app/views/shared/_og.html.haml index dbd476915..a6d805bea 100644 --- a/app/views/shared/_og.html.haml +++ b/app/views/shared/_og.html.haml @@ -1,6 +1,6 @@ - thumbnail = @instance_presenter.thumbnail = opengraph 'og:site_name', t('about.hosted_on', domain: site_hostname) -= opengraph 'og:url', about_url += opengraph 'og:url', url_for(only_path: false) = opengraph 'og:type', 'website' = opengraph 'og:title', @instance_presenter.site_title = opengraph 'og:description', strip_tags(@instance_presenter.site_description.presence || t('about.about_mastodon_html')) -- cgit From 07ea625cb228b36b8d87de32141024ec98d875da Mon Sep 17 00:00:00 2001 From: Lynx Kotoura Date: Thu, 12 Oct 2017 04:18:46 +0900 Subject: Fix styles of error pages (#5335) Signed-off-by: Lynx Kotoura Signed-off-by: Lynx Kotoura --- app/javascript/styles/basics.scss | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/app/javascript/styles/basics.scss b/app/javascript/styles/basics.scss index b829191ad..43c32c8bc 100644 --- a/app/javascript/styles/basics.scss +++ b/app/javascript/styles/basics.scss @@ -29,8 +29,7 @@ body { font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", mastodon-font-sans-serif, sans-serif; } - &.app-body, - &.error { + &.app-body { position: fixed; width: 100%; height: 100%; @@ -70,25 +69,34 @@ body { } &.error { + position: absolute; text-align: center; color: $ui-primary-color; - padding: 20px; + background: $ui-base-color; + width: 100%; + height: 100%; + padding: 0; display: flex; justify-content: center; align-items: center; - .dialog img { - display: block; - max-width: 470px; - width: 100%; - height: auto; - margin-top: -120px; - } + .dialog { + vertical-align: middle; + margin: 20px; + + img { + display: block; + max-width: 470px; + width: 100%; + height: auto; + margin-top: -120px; + } - .dialog h1 { - font-size: 20px; - line-height: 28px; - font-weight: 400; + h1 { + font-size: 20px; + line-height: 28px; + font-weight: 400; + } } } } -- cgit From e5d8166a12bc5db2f15afa8f2573be6892481e01 Mon Sep 17 00:00:00 2001 From: aschmitz Date: Wed, 11 Oct 2017 14:20:39 -0500 Subject: Fix #5329 (#5332) This fixes #5329, which occurred when using MigrationHelpers on a table that Postgres estimated to be non-empty when it was actually empty. --- lib/mastodon/migration_helpers.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/mastodon/migration_helpers.rb b/lib/mastodon/migration_helpers.rb index ed716501e..80a8f440c 100644 --- a/lib/mastodon/migration_helpers.rb +++ b/lib/mastodon/migration_helpers.rb @@ -335,7 +335,10 @@ module Mastodon start_arel = table.project(table[:id]).order(table[:id].asc).take(1) start_arel = yield table, start_arel if block_given? - start_id = exec_query(start_arel.to_sql).to_hash.first['id'].to_i + first_row = exec_query(start_arel.to_sql).to_hash.first + # In case there are no rows but we didn't catch it in the estimated size: + return unless first_row + start_id = first_row['id'].to_i say "Migrating #{table_name}.#{column} (~#{total.to_i} rows)" -- cgit From 0352c40e9950c83a5416ed505d43fe41e417254c Mon Sep 17 00:00:00 2001 From: Alda Marteau-Hardi Date: Wed, 11 Oct 2017 21:20:56 +0200 Subject: Use gender neutral language as in the rest of the french translation (#5331) --- app/javascript/mastodon/locales/fr.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/javascript/mastodon/locales/fr.json b/app/javascript/mastodon/locales/fr.json index 350d92c44..48f174c4c 100644 --- a/app/javascript/mastodon/locales/fr.json +++ b/app/javascript/mastodon/locales/fr.json @@ -168,8 +168,8 @@ "search_popout.search_format": "Recherche avancée", "search_popout.tips.hashtag": "hashtag", "search_popout.tips.status": "statuts", - "search_popout.tips.text": "Un texte simple renvoie les noms affichés, les noms d'utilisateur et les hashtags correspondants", - "search_popout.tips.user": "utilisateur", + "search_popout.tips.text": "Un texte simple renvoie les noms affichés, les noms d'utilisateur⋅ice et les hashtags correspondants", + "search_popout.tips.user": "utilisateur⋅ice", "search_results.total": "{count, number} {count, plural, one {résultat} other {résultats}}", "standalone.public_title": "Jeter un coup d’œil…", "status.cannot_reblog": "Cette publication ne peut être boostée", -- cgit From fbc6375fde90cddac47ee28982f49d471ce6e18f Mon Sep 17 00:00:00 2001 From: Alda Marteau-Hardi Date: Wed, 11 Oct 2017 21:21:13 +0200 Subject: Add myself as codeowner of the translation files. (#5333) --- CODEOWNERS | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CODEOWNERS b/CODEOWNERS index 42fc73ded..b7291a40b 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -8,8 +8,17 @@ # /config/locales/*.fr.yml @żelipapą # /config/locales/fr.yml @żelipapą +# Polish /app/javascript/mastodon/locales/pl.json @m4sk1n /app/views/user_mailer/*.pl.html.erb @m4sk1n /app/views/user_mailer/*.pl.text.erb @m4sk1n /config/locales/*.pl.yml @m4sk1n /config/locales/pl.yml @m4sk1n + +# French +/app/javascript/mastodon/locales/fr.json @aldarone +/app/javascript/mastodon/locales/whitelist_fr.json @aldarone +/app/views/user_mailer/*.fr.html.erb @aldarone +/app/views/user_mailer/*.fr.text.erb @aldarone +/config/locales/*.fr.yml @aldarone +/config/locales/fr.yml @aldarone -- cgit From 6bc07d3de37f8bcfdd3324eb5aca05bee0e8d19c Mon Sep 17 00:00:00 2001 From: Jeroen Date: Wed, 11 Oct 2017 21:21:22 +0200 Subject: Updating Dutch strings for 2.0 (#5334) --- app/javascript/mastodon/locales/nl.json | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/app/javascript/mastodon/locales/nl.json b/app/javascript/mastodon/locales/nl.json index bad2d78c5..a3e237f6b 100644 --- a/app/javascript/mastodon/locales/nl.json +++ b/app/javascript/mastodon/locales/nl.json @@ -66,17 +66,17 @@ "embed.instructions": "Embed deze toot op jouw website, door de onderstaande code te kopiëren.", "embed.preview": "Zo komt het eruit te zien:", "emoji_button.activity": "Activiteiten", - "emoji_button.custom": "Custom", + "emoji_button.custom": "Lokale emoji’s", "emoji_button.flags": "Vlaggen", "emoji_button.food": "Eten en drinken", "emoji_button.label": "Emoji toevoegen", "emoji_button.nature": "Natuur", - "emoji_button.not_found": "No emojos!! (╯°□°)╯︵ ┻━┻", + "emoji_button.not_found": "Geen emoji’s!! (╯°□°)╯︵ ┻━┻", "emoji_button.objects": "Voorwerpen", "emoji_button.people": "Mensen", - "emoji_button.recent": "Frequently used", + "emoji_button.recent": "Vaak gebruikt", "emoji_button.search": "Zoeken...", - "emoji_button.search_results": "Search results", + "emoji_button.search_results": "Zoekresultaten", "emoji_button.symbols": "Symbolen", "emoji_button.travel": "Reizen en plekken", "empty_column.community": "De lokale tijdlijn is nog leeg. Toot iets in het openbaar om de bal aan het rollen te krijgen!", @@ -165,11 +165,11 @@ "report.submit": "Verzenden", "report.target": "Rapporteren van", "search.placeholder": "Zoeken", - "search_popout.search_format": "Advanced search format", + "search_popout.search_format": "Geavanceerd zoeken", "search_popout.tips.hashtag": "hashtag", - "search_popout.tips.status": "status", - "search_popout.tips.text": "Simple text returns matching display names, usernames and hashtags", - "search_popout.tips.user": "user", + "search_popout.tips.status": "toot", + "search_popout.tips.text": "Gebruik gewone tekst om te zoeken op weergavenamen, gebruikersnamen en hashtags.", + "search_popout.tips.user": "gebruiker", "search_results.total": "{count, number} {count, plural, one {resultaat} other {resultaten}}", "standalone.public_title": "Een kijkje binnenin...", "status.cannot_reblog": "Deze toot kan niet geboost worden", @@ -201,11 +201,11 @@ "tabs_bar.notifications": "Meldingen", "upload_area.title": "Hierin slepen om te uploaden", "upload_button.label": "Media toevoegen", - "upload_form.description": "Describe for the visually impaired", + "upload_form.description": "Omschrijf dit voor mensen met een visuele beperking", "upload_form.undo": "Ongedaan maken", "upload_progress.label": "Uploaden...", - "video.close": "Close video", - "video.exit_fullscreen": "Exit full screen", + "video.close": "Video sluiten", + "video.exit_fullscreen": "Volledig scherm sluiten", "video.expand": "Video groter maken", "video.fullscreen": "Volledig scherm", "video.hide": "Video verbergen", -- cgit