From 382572c2132b797719555e7591853c045a1ff216 Mon Sep 17 00:00:00 2001 From: Charlotte Fields Date: Mon, 19 Jun 2017 11:10:10 +1000 Subject: adding cybre changes --- app/javascript/packs/custom.js | 1 + app/javascript/styles/custom.scss | 140 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 141 insertions(+) create mode 100644 app/javascript/packs/custom.js create mode 100644 app/javascript/styles/custom.scss (limited to 'app') diff --git a/app/javascript/packs/custom.js b/app/javascript/packs/custom.js new file mode 100644 index 000000000..4db2964f6 --- /dev/null +++ b/app/javascript/packs/custom.js @@ -0,0 +1 @@ +require('../styles/custom.scss'); diff --git a/app/javascript/styles/custom.scss b/app/javascript/styles/custom.scss new file mode 100644 index 000000000..8c6c12316 --- /dev/null +++ b/app/javascript/styles/custom.scss @@ -0,0 +1,140 @@ +$ui-base-color: #181818; // darkest +$ui-secondary-color: #dae8da; // lightest +$ui-primary-color: #dae8da; // lighter +$ui-highlight-color: #1ea21e; // vibrant + +@import 'application'; + +body { + background: $ui-base-color url('../images/background-cybre.png'); +} + +@media screen and (min-width: 1300px) { + .column { + flex-grow: 1 !important; + max-width: 400px; + } + + .drawer { + width: 17%; + max-width: 400px; + } +} + +.muted { + .status__content p, .status__content a { + color: lighten($ui-base-color, 35%); + } + + .status__display-name strong { + color: lighten($ui-base-color, 35%); + } +} + +.status time:after, +.detailed-status__datetime span:after { + font: normal normal normal 14px/1 FontAwesome; + content: "\00a0\00a0\f08e"; +} + +.compose-form__buttons button.active:last-child { + color:$ui-secondary-color; + background-color: $ui-highlight-color; + border-radius:3px; +} + +.about-body .mascot { + display:none; +} + +.screenshot-with-signup { + min-height:300px; +} + +.screenshot-with-signup .closed-registrations-message, +.screenshot-with-signup form { + background-color: rgba(0,0,0,0.7); + margin:auto; +} + +.screenshot-with-signup .closed-registrations-message .clock { + font-size:150%; +} + +.column .static-content.getting-started { + background-image: url('../images/logo-cybre.png'), url('../images/background-cybre.png'); + background-position: 50% 50%; + background-size:cover; +} + +.columns-area { + background: $ui-base-color url('../images/background-cybre.png'); +} + +.drawer .drawer__inner { + overflow: visible; + height:inherit; +} + +.drawer__pager { + overflow-y:auto; +} + +.column { + // trying to fix @mdhughes safari problem + max-height:100vh; +} + + + +.media-gallery { + height:auto !important; + max-height:30vh; + position:relative; + margin-top:20px; + margin-left:-68px; + width: calc(100% + 80px); +} + +.media-gallery:before{ + content: ""; + display: block; + padding-top: 100%; +} + +.media-gallery__item, +.media-gallery .media-spoiler{ + left: 0; + right: 0; + top: 0; + bottom: 0 !important; + position:absolute; +} + +.media-spoiler-video:before { + content:""; + display:block; + padding-top:100%; +} + +.media-spoiler-video, +.status__video-player, +.detailed-status > .media-spoiler, +.status > .media-spoiler { + height:auto !important; + max-height:30vh; + position:relative; + margin-top:20px; + margin-left:-68px; + width: calc(100% + 80px) !important; +} + +.status__video-player-video { + transform:unset; +} + +.detailed-status > .media-spoiler, +.status > .media-spoiler { + height:30vh !important; + vertical-align:middle; +} -- cgit From 65528fc54e2943aa259ec9129781d3fb1161ec63 Mon Sep 17 00:00:00 2001 From: Chronister Date: Mon, 29 May 2017 00:09:12 +0000 Subject: All cybrespace changes through 5/28 --- app/javascript/images/background-cybre.png | Bin 0 -> 237414 bytes app/javascript/images/logo-cybre.png | Bin 0 -> 187946 bytes .../mastodon/components/status_action_bar.js | 2 +- .../mastodon/features/getting_started/index.js | 22 ++++---- .../notifications/components/notification.js | 2 +- .../features/status/components/action_bar.js | 2 +- .../features/status/components/detailed_status.js | 2 +- app/javascript/mastodon/locales/en.json | 58 ++++++++++----------- app/javascript/styles/custom.scss | 18 +++++-- app/validators/status_length_validator.rb | 2 +- app/views/about/_links.html.haml | 2 +- app/views/about/show.html.haml | 8 +-- app/views/layouts/admin.html.haml | 2 +- app/views/layouts/auth.html.haml | 2 +- config/locales/en.yml | 36 ++++++------- config/locales/simple_form.en.yml | 6 +-- config/settings.yml | 2 +- public/500.html | 6 +-- public/android-chrome-192x192.png | Bin 14344 -> 41911 bytes public/apple-touch-icon.png | Bin 4217 -> 37614 bytes public/background-cybre.png | Bin 0 -> 237414 bytes public/browserconfig.xml | 2 +- public/clock.js | 22 ++++++++ public/emoji/1f418.png | Bin 1293 -> 7535 bytes public/emoji/1f418.svg | 18 ++++++- public/logo-cybre-glitch.gif | Bin 0 -> 837759 bytes public/mstile-150x150.png | Bin 6916 -> 27611 bytes 27 files changed, 132 insertions(+), 82 deletions(-) create mode 100644 app/javascript/images/background-cybre.png create mode 100644 app/javascript/images/logo-cybre.png create mode 100644 public/background-cybre.png create mode 100644 public/clock.js create mode 100644 public/logo-cybre-glitch.gif (limited to 'app') diff --git a/app/javascript/images/background-cybre.png b/app/javascript/images/background-cybre.png new file mode 100644 index 000000000..151fd5584 Binary files /dev/null and b/app/javascript/images/background-cybre.png differ diff --git a/app/javascript/images/logo-cybre.png b/app/javascript/images/logo-cybre.png new file mode 100644 index 000000000..41dd8fd4c Binary files /dev/null and b/app/javascript/images/logo-cybre.png differ diff --git a/app/javascript/mastodon/components/status_action_bar.js b/app/javascript/mastodon/components/status_action_bar.js index edb2d6eb0..a8ac7a70a 100644 --- a/app/javascript/mastodon/components/status_action_bar.js +++ b/app/javascript/mastodon/components/status_action_bar.js @@ -140,7 +140,7 @@ export default class StatusActionBar extends ImmutablePureComponent {
- +
diff --git a/app/javascript/mastodon/features/getting_started/index.js b/app/javascript/mastodon/features/getting_started/index.js index f8ea01024..c8490abe9 100644 --- a/app/javascript/mastodon/features/getting_started/index.js +++ b/app/javascript/mastodon/features/getting_started/index.js @@ -10,19 +10,19 @@ import ImmutablePureComponent from 'react-immutable-pure-component'; const messages = defineMessages({ heading: { id: 'getting_started.heading', defaultMessage: 'Getting started' }, - home_timeline: { id: 'tabs_bar.home', defaultMessage: 'Home' }, - notifications: { id: 'tabs_bar.notifications', defaultMessage: 'Notifications' }, - public_timeline: { id: 'navigation_bar.public_timeline', defaultMessage: 'Federated timeline' }, + home_timeline: { id: 'tabs_bar.home', defaultMessage: '/timelines/home' }, + notifications: { id: 'tabs_bar.notifications', defaultMessage: '~/.notifications' }, + public_timeline: { id: 'navigation_bar.public_timeline', defaultMessage: '/timelines/federated' }, navigation_subheading: { id: 'column_subheading.navigation', defaultMessage: 'Navigation' }, settings_subheading: { id: 'column_subheading.settings', defaultMessage: 'Settings' }, - community_timeline: { id: 'navigation_bar.community_timeline', defaultMessage: 'Local timeline' }, + community_timeline: { id: 'navigation_bar.community_timeline', defaultMessage: '/timelines/local' }, preferences: { id: 'navigation_bar.preferences', defaultMessage: 'Preferences' }, - follow_requests: { id: 'navigation_bar.follow_requests', defaultMessage: 'Follow requests' }, - sign_out: { id: 'navigation_bar.logout', defaultMessage: 'Logout' }, - favourites: { id: 'navigation_bar.favourites', defaultMessage: 'Favourites' }, - blocks: { id: 'navigation_bar.blocks', defaultMessage: 'Blocked users' }, - mutes: { id: 'navigation_bar.mutes', defaultMessage: 'Muted users' }, - info: { id: 'navigation_bar.info', defaultMessage: 'Extended information' }, + follow_requests: { id: 'navigation_bar.follow_requests', defaultMessage: '~/.follow-requests' }, + sign_out: { id: 'navigation_bar.logout', defaultMessage: 'exit' }, + favourites: { id: 'navigation_bar.favourites', defaultMessage: '~/.florps' }, + blocks: { id: 'navigation_bar.blocks', defaultMessage: '~/.blocked' }, + mutes: { id: 'navigation_bar.mutes', defaultMessage: '~/.muted' }, + info: { id: 'navigation_bar.info', defaultMessage: '/about/more' }, }); const mapStateToProps = state => ({ @@ -65,7 +65,7 @@ export default class GettingStarted extends ImmutablePureComponent { } navItems = navItems.concat([ - , + , ]); if (me.get('locked')) { diff --git a/app/javascript/mastodon/features/notifications/components/notification.js b/app/javascript/mastodon/features/notifications/components/notification.js index 9d631644a..0a4ba0214 100644 --- a/app/javascript/mastodon/features/notifications/components/notification.js +++ b/app/javascript/mastodon/features/notifications/components/notification.js @@ -39,7 +39,7 @@ export default class Notification extends ImmutablePureComponent {
- +
diff --git a/app/javascript/mastodon/features/status/components/action_bar.js b/app/javascript/mastodon/features/status/components/action_bar.js index 29080529d..03779c2c1 100644 --- a/app/javascript/mastodon/features/status/components/action_bar.js +++ b/app/javascript/mastodon/features/status/components/action_bar.js @@ -82,7 +82,7 @@ export default class ActionBar extends React.PureComponent {
-
+
diff --git a/app/javascript/mastodon/features/status/components/detailed_status.js b/app/javascript/mastodon/features/status/components/detailed_status.js index 619957dbe..6f2415965 100644 --- a/app/javascript/mastodon/features/status/components/detailed_status.js +++ b/app/javascript/mastodon/features/status/components/detailed_status.js @@ -76,7 +76,7 @@ export default class DetailedStatus extends ImmutablePureComponent { · - + diff --git a/app/javascript/mastodon/locales/en.json b/app/javascript/mastodon/locales/en.json index 608d911e9..84579f188 100644 --- a/app/javascript/mastodon/locales/en.json +++ b/app/javascript/mastodon/locales/en.json @@ -2,7 +2,7 @@ "account.block": "Block @{name}", "account.block_domain": "Hide everything from {domain}", "account.disclaimer": "This user is from another instance. This number may be larger.", - "account.edit_profile": "Edit profile", + "account.edit_profile": "edit ~/.profile", "account.follow": "Follow", "account.followers": "Followers", "account.follows": "Follows", @@ -10,7 +10,7 @@ "account.media": "Media", "account.mention": "Mention @{name}", "account.mute": "Mute @{name}", - "account.posts": "Posts", + "account.posts": "Pings", "account.report": "Report @{name}", "account.requested": "Awaiting approval", "account.unblock": "Unblock @{name}", @@ -18,14 +18,14 @@ "account.unfollow": "Unfollow", "account.unmute": "Unmute @{name}", "boost_modal.combo": "You can press {combo} to skip this next time", - "column.blocks": "Blocked users", - "column.community": "Local timeline", - "column.favourites": "Favourites", - "column.follow_requests": "Follow requests", - "column.home": "Home", - "column.mutes": "Muted users", - "column.notifications": "Notifications", - "column.public": "Federated timeline", + "column.blocks": "~/.blocked", + "column.community": "/timelines/local", + "column.favourites": "~/.florps", + "column.follow_requests": "~/.follow-requests", + "column.home": "/timelines/home", + "column.mutes": "~/.muted", + "column.notifications": "~/.notifications", + "column.public": "/timelines/federated", "column_back_button.label": "Back", "column_header.pin": "Pin", "column_header.unpin": "Unpin", @@ -33,9 +33,9 @@ "column_subheading.settings": "Settings", "compose_form.lock_disclaimer": "Your account is not {locked}. Anyone can follow you to view your follower-only posts.", "compose_form.lock_disclaimer.lock": "locked", - "compose_form.placeholder": "What is on your mind?", + "compose_form.placeholder": "What is in your databanks?", "compose_form.privacy_disclaimer": "Your post will be delivered to mentioned users on {domains}. Do you trust {domainsCount, plural, one {that server} other {those servers}}? Post privacy only works on Mastodon instances. If {domains} {domainsCount, plural, one {is not a Mastodon instance} other {are not Mastodon instances}}, there will be no indication that your post is not a public post, and it may be boosted or otherwise made visible to unintended recipients.", - "compose_form.publish": "Toot", + "compose_form.publish": "Ping", "compose_form.publish_loud": "{publish}!", "compose_form.sensitive": "Mark media as sensitive", "compose_form.spoiler": "Hide text behind warning", @@ -61,7 +61,7 @@ "emoji_button.travel": "Travel & Places", "empty_column.community": "The local timeline is empty. Write something publicly to get the ball rolling!", "empty_column.hashtag": "There is nothing in this hashtag yet.", - "empty_column.home": "You aren't following anyone yet. Visit {public} or use search to get started and meet other users.", + "empty_column.home": "You aren't following anyone yet. Visit {public} or use query to get started and meet other users.", "empty_column.home.inactivity": "Your home feed is empty. If you have been inactive for a while, it will be regenerated for you soon.", "empty_column.home.public_timeline": "the public timeline", "empty_column.notifications": "You don't have any notifications yet. Interact with others to start the conversation.", @@ -76,24 +76,24 @@ "home.column_settings.advanced": "Advanced", "home.column_settings.basic": "Basic", "home.column_settings.filter_regex": "Filter out by regular expressions", - "home.column_settings.show_reblogs": "Show boosts", + "home.column_settings.show_reblogs": "Show relays", "home.column_settings.show_replies": "Show replies", "home.settings": "Column settings", "lightbox.close": "Close", "loading_indicator.label": "Loading...", "media_gallery.toggle_visible": "Toggle visibility", "missing_indicator.label": "Not found", - "navigation_bar.blocks": "Blocked users", - "navigation_bar.community_timeline": "Local timeline", - "navigation_bar.edit_profile": "Edit profile", - "navigation_bar.favourites": "Favourites", - "navigation_bar.follow_requests": "Follow requests", - "navigation_bar.info": "About this instance", - "navigation_bar.logout": "Logout", - "navigation_bar.mutes": "Muted users", + "navigation_bar.blocks": "~/.blocks", + "navigation_bar.community_timeline": "/timelines/local", + "navigation_bar.edit_profile": "edit ~/.profile", + "navigation_bar.favourites": "~/.florps", + "navigation_bar.follow_requests": "~/.follow-requests", + "navigation_bar.info": "/about/more", + "navigation_bar.logout": "Jack out", + "navigation_bar.mutes": "~/.muted", "navigation_bar.preferences": "Preferences", - "navigation_bar.public_timeline": "Federated timeline", - "notification.favourite": "{name} favourited your status", + "navigation_bar.public_timeline": "/timelines/federated", + "notification.favourite": "{name} florped your ping", "notification.follow": "{name} followed you", "notification.mention": "{name} mentioned you", "notification.reblog": "{name} boosted your status", @@ -140,18 +140,18 @@ "report.placeholder": "Additional comments", "report.submit": "Submit", "report.target": "Reporting", - "search.placeholder": "Search", + "search.placeholder": "Query...", "search_results.total": "{count, number} {count, plural, one {result} other {results}}", - "status.cannot_reblog": "This post cannot be boosted", + "status.cannot_reblog": "This ping cannot be relayed", "status.delete": "Delete", - "status.favourite": "Favourite", + "status.favourite": "Florp", "status.load_more": "Load more", "status.media_hidden": "Media hidden", "status.mention": "Mention @{name}", "status.mute_conversation": "Mute conversation", "status.open": "Expand this status", - "status.reblog": "Boost", - "status.reblogged_by": "{name} boosted", + "status.reblog": "Relay", + "status.reblogged_by": "{name} relayed", "status.reply": "Reply", "status.replyAll": "Reply to thread", "status.report": "Report @{name}", diff --git a/app/javascript/styles/custom.scss b/app/javascript/styles/custom.scss index 8c6c12316..aa3fb9f0c 100644 --- a/app/javascript/styles/custom.scss +++ b/app/javascript/styles/custom.scss @@ -12,13 +12,25 @@ body { @media screen and (min-width: 1300px) { .column { flex-grow: 1 !important; - max-width: 400px; + max-width: 500px; } .drawer { - width: 17%; - max-width: 400px; + width: 20%; } + + .columns-area { + justify-content: center; + } +} + +@media screen and (min-width: 1900px) { + .column, .drawer { + width: 400px; + border-radius: 4px; + height: 96vh; + margin-top: 2vh; + } } .muted { diff --git a/app/validators/status_length_validator.rb b/app/validators/status_length_validator.rb index 3f3e422d9..cd791e2f3 100644 --- a/app/validators/status_length_validator.rb +++ b/app/validators/status_length_validator.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true class StatusLengthValidator < ActiveModel::Validator - MAX_CHARS = 500 + MAX_CHARS = 512 def validate(status) return unless status.local? && !status.reblog? diff --git a/app/views/about/_links.html.haml b/app/views/about/_links.html.haml index fb3350539..d7fe317e6 100644 --- a/app/views/about/_links.html.haml +++ b/app/views/about/_links.html.haml @@ -9,4 +9,4 @@ %li= link_to t('about.get_started'), new_user_registration_path %li= link_to t('auth.login'), new_user_session_path %li= link_to t('about.terms'), terms_path - %li= link_to t('about.source_code'), 'https://github.com/tootsuite/mastodon' + %li= link_to t('about.source_code'), 'https://github.com/chronister/mastodon' diff --git a/app/views/about/show.html.haml b/app/views/about/show.html.haml index d15b04163..87a729055 100644 --- a/app/views/about/show.html.haml +++ b/app/views/about/show.html.haml @@ -17,7 +17,7 @@ .wrapper %h1 - = image_tag asset_pack_path('logo.png') + = image_tag asset_pack_path('logo-cybre.png') = Setting.site_title %p!= t('about.about_mastodon') @@ -36,7 +36,7 @@ .info = link_to t('auth.login'), new_user_session_path, class: 'webapp-btn' · - = link_to t('about.other_instances'), 'https://github.com/tootsuite/documentation/blob/master/Using-Mastodon/List-of-Mastodon-instances.md' + = link_to t('about.other_instances'), 'https://instances.mastodon.xyz/' · = link_to t('about.about_this'), about_more_path @@ -82,6 +82,6 @@ · = link_to t('about.apps'), 'https://github.com/tootsuite/documentation/blob/master/Using-Mastodon/Apps.md' · - = link_to t('about.source_code'), 'https://github.com/tootsuite/mastodon' + = link_to t('about.source_code'), 'https://github.com/chronister/mastodon' · - = link_to t('about.other_instances'), 'https://github.com/tootsuite/documentation/blob/master/Using-Mastodon/List-of-Mastodon-instances.md' + = link_to t('about.other_instances'), 'https://instances.mastodon.xyz/' diff --git a/app/views/layouts/admin.html.haml b/app/views/layouts/admin.html.haml index 59d95a0c6..b49aa83f5 100644 --- a/app/views/layouts/admin.html.haml +++ b/app/views/layouts/admin.html.haml @@ -6,7 +6,7 @@ .sidebar-wrapper .sidebar = link_to root_path do - = image_tag asset_pack_path('logo.png'), class: 'logo' + = image_tag asset_pack_path('logo-cybre.png'), class: 'logo' = render_navigation .content-wrapper diff --git a/app/views/layouts/auth.html.haml b/app/views/layouts/auth.html.haml index e5429a8ed..097fc6d08 100644 --- a/app/views/layouts/auth.html.haml +++ b/app/views/layouts/auth.html.haml @@ -6,7 +6,7 @@ .logo-container %h1 = link_to root_path do - = image_tag asset_pack_path('logo.png') + = image_tag asset_pack_path('logo-cybre.png') .form-container = render 'flashes' diff --git a/config/locales/en.yml b/config/locales/en.yml index 0d33aae3f..201651d17 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1,30 +1,30 @@ --- en: about: - about_mastodon: Mastodon is a free, open-source social network. A decentralized alternative to commercial platforms, it avoids the risks of a single company monopolizing your communication. Pick a server that you trust — whichever you choose, you can interact with everyone else. Anyone can run their own Mastodon instance and participate in the social network seamlessly. + about_mastodon: Cybrespace is an instance of Mastodon, a free, open-source social network. A decentralized alternative to commercial platforms, it avoids the risks of a single company monopolizing your communication. Pick a server that you trust — whichever you choose, you can interact with everyone else. Anyone can run their own Mastodon instance and participate in the social network seamlessly. about_this: About this instance apps: Apps business_email: 'Business e-mail:' closed_registrations: Registrations are currently closed on this instance. contact: Contact - description_headline: What is %{domain}? + description_headline: What's special about %{domain}? domain_count_after: other instances domain_count_before: Connected to features: api: Open API for apps and services blocks: Rich block and muting tools - characters: 500 characters per post + characters: 512 characters per post chronology: Timelines are chronological ethics: 'Ethical design: no ads, no tracking' gifv: GIFV sets and short videos - privacy: Granular, per-post privacy settings + privacy: Granular, per-ping privacy settings public: Public timelines features_headline: What sets Mastodon apart get_started: Get started links: Links other_instances: Other instances source_code: Source code - status_count_after: statuses + status_count_after: pings status_count_before: Who authored terms: Terms user_count_after: users @@ -37,7 +37,7 @@ en: nothing_here: There is nothing here! people_followed_by: People whom %{name} follows people_who_follow: People who follow %{name} - posts: Posts + posts: Pings remote_follow: Remote follow reserved_username: The username is reserved unfollow: Unfollow @@ -205,9 +205,9 @@ en: delete_account_html: If you wish to delete your account, you can proceed here. You will be asked for confirmation. didnt_get_confirmation: Didn't receive confirmation instructions? forgot_password: Forgot your password? - login: Log in - logout: Logout - register: Sign up + login: Jack in + logout: Jack out + register: Apply for upload resend_confirmation: Resend confirmation instructions reset_password: Reset password set_new_password: Set new password @@ -255,7 +255,7 @@ en: storage: Media storage followers: domain: Domain - explanation_html: If you want to ensure the privacy of your statuses, you must be aware of who is following you. Your private statuses are delivered to all instances where you have followers. You may wish to review them, and remove followers if you do not trust your privacy to be respected by the staff or software of those instances. + explanation_html: If you want to ensure the privacy of your pings , you must be aware of who is following you. Your private pings are delivered to all instances where you have followers. You may wish to review them, and remove followers if you do not trust your privacy to be respected by the staff or software of those instances. followers_count: Number of followers lock_link: Lock your account purge: Remove from followers @@ -263,7 +263,7 @@ en: one: In the process of soft-blocking followers from one domain... other: In the process of soft-blocking followers from %{count} domains... true_privacy_html: Please mind that true privacy can only be achieved with end-to-end encryption. - unlocked_warning_html: Anyone can follow you to immediately view your private statuses. %{lock_link} to be able to review and reject followers. + unlocked_warning_html: Anyone can follow you to immediately view your private pings. %{lock_link} to be able to review and reject followers. unlocked_warning_title: Your account is not locked generic: changes_saved_msg: Changes successfully saved! @@ -284,7 +284,7 @@ en: landing_strip_signup_html: If you don't, you can sign up here. media_attachments: validations: - images_and_video: Cannot attach a video to a status that already contains images + images_and_video: Cannot attach a video to a ping that already contains images too_many: Cannot attach more than 4 files notification_mailer: digest: @@ -297,8 +297,8 @@ en: one: "1 new notification since your last visit \U0001F418" other: "%{count} new notifications since your last visit \U0001F418" favourite: - body: 'Your status was favourited by %{name}:' - subject: "%{name} favourited your status" + body: 'Your ping was florped by %{name}:' + subject: "%{name} florped your ping" follow: body: "%{name} is now following you!" subject: "%{name} is now following you" @@ -309,8 +309,8 @@ en: body: 'You were mentioned by %{name} in:' subject: You were mentioned by %{name} reblog: - body: 'Your status was boosted by %{name}:' - subject: "%{name} boosted your status" + body: 'Your ping was relayed by %{name}:' + subject: "%{name} relayed your ping" pagination: next: Next prev: Prev @@ -324,7 +324,7 @@ en: authorized_apps: Authorized apps back: Back to Mastodon delete: Account deletion - edit_profile: Edit profile + edit_profile: edit ~/.profile export: Data export followers: Authorized followers import: Import @@ -344,7 +344,7 @@ en: unlisted_long: Everyone can see, but not listed on public timelines stream_entries: click_to_show: Click to show - reblogged: boosted + reblogged: relayed sensitive_content: Sensitive content time: formats: diff --git a/config/locales/simple_form.en.yml b/config/locales/simple_form.en.yml index 3e769fb96..99173e948 100644 --- a/config/locales/simple_form.en.yml +++ b/config/locales/simple_form.en.yml @@ -8,7 +8,7 @@ en: one: 1 character left other: %{count} characters left header: PNG, GIF or JPG. At most 2MB. Will be downscaled to 700x335px - locked: Requires you to manually approve followers and defaults post privacy to followers-only + locked: Requires you to manually approve followers and defaults ping privacy to followers-only note: one: 1 character left other: %{count} characters left @@ -46,11 +46,11 @@ en: must_be_following: Block notifications from people you don't follow notification_emails: digest: Send digest e-mails - favourite: Send e-mail when someone favourites your status + favourite: Send e-mail when someone florps your ping follow: Send e-mail when someone follows you follow_request: Send e-mail when someone requests to follow you mention: Send e-mail when someone mentions you - reblog: Send e-mail when someone boosts your status + reblog: Send e-mail when someone boosts your ping 'no': 'No' required: mark: "*" diff --git a/config/settings.yml b/config/settings.yml index 7b78b6cdb..13ac097c6 100644 --- a/config/settings.yml +++ b/config/settings.yml @@ -7,7 +7,7 @@ # For more information, see docs/Running-Mastodon/Administration-guide.md # defaults: &defaults - site_title: Mastodon + site_title: 'Cybrespace' site_description: '' site_extended_description: '' site_contact_username: '' diff --git a/public/500.html b/public/500.html index d085d490b..4197f5cdd 100644 --- a/public/500.html +++ b/public/500.html @@ -8,8 +8,8 @@ + + 1f418 + + + + diff --git a/public/logo-cybre-glitch.gif b/public/logo-cybre-glitch.gif new file mode 100644 index 000000000..abe9b2a9a Binary files /dev/null and b/public/logo-cybre-glitch.gif differ diff --git a/public/mstile-150x150.png b/public/mstile-150x150.png index 57eae8355..a79f11992 100644 Binary files a/public/mstile-150x150.png and b/public/mstile-150x150.png differ -- cgit From 39b6b37b74a9aeecc35d4a68fb1d0bf058350dbd Mon Sep 17 00:00:00 2001 From: Chronister Date: Wed, 14 Jun 2017 22:25:10 +0000 Subject: cybrespace to 1.4.2 --- app/javascript/styles/custom.scss | 18 +++-------------- public/clock.js | 40 ++++++++++++++++++++++++++++++++++---- public/riot-glitch.png | Bin 0 -> 24926 bytes 3 files changed, 39 insertions(+), 19 deletions(-) create mode 100644 public/riot-glitch.png (limited to 'app') diff --git a/app/javascript/styles/custom.scss b/app/javascript/styles/custom.scss index aa3fb9f0c..8c6c12316 100644 --- a/app/javascript/styles/custom.scss +++ b/app/javascript/styles/custom.scss @@ -12,25 +12,13 @@ body { @media screen and (min-width: 1300px) { .column { flex-grow: 1 !important; - max-width: 500px; + max-width: 400px; } .drawer { - width: 20%; + width: 17%; + max-width: 400px; } - - .columns-area { - justify-content: center; - } -} - -@media screen and (min-width: 1900px) { - .column, .drawer { - width: 400px; - border-radius: 4px; - height: 96vh; - margin-top: 2vh; - } } .muted { diff --git a/public/clock.js b/public/clock.js index 63cee1e1b..ffb9beae8 100644 --- a/public/clock.js +++ b/public/clock.js @@ -3,14 +3,46 @@ document.addEventListener("DOMContentLoaded", function(event) { setInterval(updateClock, 1000); }); +function getNextOpen(now) { + var days = [[0, 14], [4, 18], [8, 22], [12], [2, 16], [6, 20], [10]] + var nowday = now.getUTCDay(); + var nour = now.getUTCHours(); + + var open_hour = -1; + var d = 0; + + while (open_hour == -1) { + var times = days[(nowday + d) % 7]; + for (var i = 0; i < times.length; ++i) { + var time = times[i]; + if (time == nour) { + return "refresh"; + } else if (time > nour || d > 0) { + open_hour = time; + break; + } + } + if (open_hour == -1) { + d += 1; + nour = -1; + } + } + + var open = new Date(Date.UTC(now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate() + d)); + var ts = open.setUTCHours(open_hour); + return open; +} + function updateClock() { var clock = document.querySelector(".closed-registrations-message .clock"); var now = new Date(); - var open = new Date(now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate()); - var ts = open.setUTCHours(19); - if (open - now < 0) { - open = new Date(ts + 24*60*60*1000); + var open = getNextOpen(now); + + if (open == "refresh") { + location.reload(); + return; } + var until = open - now; var ms = until % 1000; var s = Math.floor((until / 1000)) % 60; diff --git a/public/riot-glitch.png b/public/riot-glitch.png new file mode 100644 index 000000000..1c97ce5f1 Binary files /dev/null and b/public/riot-glitch.png differ -- cgit From b27842dc70847cb936ae2b49777095ba12c5917b Mon Sep 17 00:00:00 2001 From: Charlotte Fields Date: Mon, 19 Jun 2017 11:23:25 +1000 Subject: cybre cleanup --- app/javascript/images/background-cybre.png | Bin 237414 -> 0 bytes app/javascript/images/logo-cybre.png | Bin 187946 -> 0 bytes .../mastodon/components/status_action_bar.js | 2 +- .../mastodon/features/getting_started/index.js | 22 ++++---- .../notifications/components/notification.js | 2 +- .../features/status/components/action_bar.js | 2 +- .../features/status/components/detailed_status.js | 2 +- app/javascript/mastodon/locales/en.json | 58 ++++++++++----------- app/javascript/styles/custom.scss | 19 ------- app/views/about/show.html.haml | 2 +- app/views/layouts/admin.html.haml | 2 +- app/views/layouts/auth.html.haml | 2 +- config/locales/en.yml | 36 ++++++------- config/locales/simple_form.en.yml | 6 +-- config/settings.yml | 2 +- public/500.html | 4 +- public/android-chrome-192x192.png | Bin 41911 -> 14344 bytes public/apple-touch-icon.png | Bin 37614 -> 4217 bytes public/emoji/1f418.png | Bin 7535 -> 1293 bytes public/emoji/1f418.svg | 18 +------ public/mstile-150x150.png | Bin 27611 -> 6916 bytes 21 files changed, 72 insertions(+), 107 deletions(-) delete mode 100644 app/javascript/images/background-cybre.png delete mode 100644 app/javascript/images/logo-cybre.png (limited to 'app') diff --git a/app/javascript/images/background-cybre.png b/app/javascript/images/background-cybre.png deleted file mode 100644 index 151fd5584..000000000 Binary files a/app/javascript/images/background-cybre.png and /dev/null differ diff --git a/app/javascript/images/logo-cybre.png b/app/javascript/images/logo-cybre.png deleted file mode 100644 index 41dd8fd4c..000000000 Binary files a/app/javascript/images/logo-cybre.png and /dev/null differ diff --git a/app/javascript/mastodon/components/status_action_bar.js b/app/javascript/mastodon/components/status_action_bar.js index a8ac7a70a..edb2d6eb0 100644 --- a/app/javascript/mastodon/components/status_action_bar.js +++ b/app/javascript/mastodon/components/status_action_bar.js @@ -140,7 +140,7 @@ export default class StatusActionBar extends ImmutablePureComponent {
- +
diff --git a/app/javascript/mastodon/features/getting_started/index.js b/app/javascript/mastodon/features/getting_started/index.js index c8490abe9..f8ea01024 100644 --- a/app/javascript/mastodon/features/getting_started/index.js +++ b/app/javascript/mastodon/features/getting_started/index.js @@ -10,19 +10,19 @@ import ImmutablePureComponent from 'react-immutable-pure-component'; const messages = defineMessages({ heading: { id: 'getting_started.heading', defaultMessage: 'Getting started' }, - home_timeline: { id: 'tabs_bar.home', defaultMessage: '/timelines/home' }, - notifications: { id: 'tabs_bar.notifications', defaultMessage: '~/.notifications' }, - public_timeline: { id: 'navigation_bar.public_timeline', defaultMessage: '/timelines/federated' }, + home_timeline: { id: 'tabs_bar.home', defaultMessage: 'Home' }, + notifications: { id: 'tabs_bar.notifications', defaultMessage: 'Notifications' }, + public_timeline: { id: 'navigation_bar.public_timeline', defaultMessage: 'Federated timeline' }, navigation_subheading: { id: 'column_subheading.navigation', defaultMessage: 'Navigation' }, settings_subheading: { id: 'column_subheading.settings', defaultMessage: 'Settings' }, - community_timeline: { id: 'navigation_bar.community_timeline', defaultMessage: '/timelines/local' }, + community_timeline: { id: 'navigation_bar.community_timeline', defaultMessage: 'Local timeline' }, preferences: { id: 'navigation_bar.preferences', defaultMessage: 'Preferences' }, - follow_requests: { id: 'navigation_bar.follow_requests', defaultMessage: '~/.follow-requests' }, - sign_out: { id: 'navigation_bar.logout', defaultMessage: 'exit' }, - favourites: { id: 'navigation_bar.favourites', defaultMessage: '~/.florps' }, - blocks: { id: 'navigation_bar.blocks', defaultMessage: '~/.blocked' }, - mutes: { id: 'navigation_bar.mutes', defaultMessage: '~/.muted' }, - info: { id: 'navigation_bar.info', defaultMessage: '/about/more' }, + follow_requests: { id: 'navigation_bar.follow_requests', defaultMessage: 'Follow requests' }, + sign_out: { id: 'navigation_bar.logout', defaultMessage: 'Logout' }, + favourites: { id: 'navigation_bar.favourites', defaultMessage: 'Favourites' }, + blocks: { id: 'navigation_bar.blocks', defaultMessage: 'Blocked users' }, + mutes: { id: 'navigation_bar.mutes', defaultMessage: 'Muted users' }, + info: { id: 'navigation_bar.info', defaultMessage: 'Extended information' }, }); const mapStateToProps = state => ({ @@ -65,7 +65,7 @@ export default class GettingStarted extends ImmutablePureComponent { } navItems = navItems.concat([ - , + , ]); if (me.get('locked')) { diff --git a/app/javascript/mastodon/features/notifications/components/notification.js b/app/javascript/mastodon/features/notifications/components/notification.js index 0a4ba0214..9d631644a 100644 --- a/app/javascript/mastodon/features/notifications/components/notification.js +++ b/app/javascript/mastodon/features/notifications/components/notification.js @@ -39,7 +39,7 @@ export default class Notification extends ImmutablePureComponent {
- +
diff --git a/app/javascript/mastodon/features/status/components/action_bar.js b/app/javascript/mastodon/features/status/components/action_bar.js index 03779c2c1..29080529d 100644 --- a/app/javascript/mastodon/features/status/components/action_bar.js +++ b/app/javascript/mastodon/features/status/components/action_bar.js @@ -82,7 +82,7 @@ export default class ActionBar extends React.PureComponent {
-
+
diff --git a/app/javascript/mastodon/features/status/components/detailed_status.js b/app/javascript/mastodon/features/status/components/detailed_status.js index 6f2415965..619957dbe 100644 --- a/app/javascript/mastodon/features/status/components/detailed_status.js +++ b/app/javascript/mastodon/features/status/components/detailed_status.js @@ -76,7 +76,7 @@ export default class DetailedStatus extends ImmutablePureComponent { · - + diff --git a/app/javascript/mastodon/locales/en.json b/app/javascript/mastodon/locales/en.json index 84579f188..608d911e9 100644 --- a/app/javascript/mastodon/locales/en.json +++ b/app/javascript/mastodon/locales/en.json @@ -2,7 +2,7 @@ "account.block": "Block @{name}", "account.block_domain": "Hide everything from {domain}", "account.disclaimer": "This user is from another instance. This number may be larger.", - "account.edit_profile": "edit ~/.profile", + "account.edit_profile": "Edit profile", "account.follow": "Follow", "account.followers": "Followers", "account.follows": "Follows", @@ -10,7 +10,7 @@ "account.media": "Media", "account.mention": "Mention @{name}", "account.mute": "Mute @{name}", - "account.posts": "Pings", + "account.posts": "Posts", "account.report": "Report @{name}", "account.requested": "Awaiting approval", "account.unblock": "Unblock @{name}", @@ -18,14 +18,14 @@ "account.unfollow": "Unfollow", "account.unmute": "Unmute @{name}", "boost_modal.combo": "You can press {combo} to skip this next time", - "column.blocks": "~/.blocked", - "column.community": "/timelines/local", - "column.favourites": "~/.florps", - "column.follow_requests": "~/.follow-requests", - "column.home": "/timelines/home", - "column.mutes": "~/.muted", - "column.notifications": "~/.notifications", - "column.public": "/timelines/federated", + "column.blocks": "Blocked users", + "column.community": "Local timeline", + "column.favourites": "Favourites", + "column.follow_requests": "Follow requests", + "column.home": "Home", + "column.mutes": "Muted users", + "column.notifications": "Notifications", + "column.public": "Federated timeline", "column_back_button.label": "Back", "column_header.pin": "Pin", "column_header.unpin": "Unpin", @@ -33,9 +33,9 @@ "column_subheading.settings": "Settings", "compose_form.lock_disclaimer": "Your account is not {locked}. Anyone can follow you to view your follower-only posts.", "compose_form.lock_disclaimer.lock": "locked", - "compose_form.placeholder": "What is in your databanks?", + "compose_form.placeholder": "What is on your mind?", "compose_form.privacy_disclaimer": "Your post will be delivered to mentioned users on {domains}. Do you trust {domainsCount, plural, one {that server} other {those servers}}? Post privacy only works on Mastodon instances. If {domains} {domainsCount, plural, one {is not a Mastodon instance} other {are not Mastodon instances}}, there will be no indication that your post is not a public post, and it may be boosted or otherwise made visible to unintended recipients.", - "compose_form.publish": "Ping", + "compose_form.publish": "Toot", "compose_form.publish_loud": "{publish}!", "compose_form.sensitive": "Mark media as sensitive", "compose_form.spoiler": "Hide text behind warning", @@ -61,7 +61,7 @@ "emoji_button.travel": "Travel & Places", "empty_column.community": "The local timeline is empty. Write something publicly to get the ball rolling!", "empty_column.hashtag": "There is nothing in this hashtag yet.", - "empty_column.home": "You aren't following anyone yet. Visit {public} or use query to get started and meet other users.", + "empty_column.home": "You aren't following anyone yet. Visit {public} or use search to get started and meet other users.", "empty_column.home.inactivity": "Your home feed is empty. If you have been inactive for a while, it will be regenerated for you soon.", "empty_column.home.public_timeline": "the public timeline", "empty_column.notifications": "You don't have any notifications yet. Interact with others to start the conversation.", @@ -76,24 +76,24 @@ "home.column_settings.advanced": "Advanced", "home.column_settings.basic": "Basic", "home.column_settings.filter_regex": "Filter out by regular expressions", - "home.column_settings.show_reblogs": "Show relays", + "home.column_settings.show_reblogs": "Show boosts", "home.column_settings.show_replies": "Show replies", "home.settings": "Column settings", "lightbox.close": "Close", "loading_indicator.label": "Loading...", "media_gallery.toggle_visible": "Toggle visibility", "missing_indicator.label": "Not found", - "navigation_bar.blocks": "~/.blocks", - "navigation_bar.community_timeline": "/timelines/local", - "navigation_bar.edit_profile": "edit ~/.profile", - "navigation_bar.favourites": "~/.florps", - "navigation_bar.follow_requests": "~/.follow-requests", - "navigation_bar.info": "/about/more", - "navigation_bar.logout": "Jack out", - "navigation_bar.mutes": "~/.muted", + "navigation_bar.blocks": "Blocked users", + "navigation_bar.community_timeline": "Local timeline", + "navigation_bar.edit_profile": "Edit profile", + "navigation_bar.favourites": "Favourites", + "navigation_bar.follow_requests": "Follow requests", + "navigation_bar.info": "About this instance", + "navigation_bar.logout": "Logout", + "navigation_bar.mutes": "Muted users", "navigation_bar.preferences": "Preferences", - "navigation_bar.public_timeline": "/timelines/federated", - "notification.favourite": "{name} florped your ping", + "navigation_bar.public_timeline": "Federated timeline", + "notification.favourite": "{name} favourited your status", "notification.follow": "{name} followed you", "notification.mention": "{name} mentioned you", "notification.reblog": "{name} boosted your status", @@ -140,18 +140,18 @@ "report.placeholder": "Additional comments", "report.submit": "Submit", "report.target": "Reporting", - "search.placeholder": "Query...", + "search.placeholder": "Search", "search_results.total": "{count, number} {count, plural, one {result} other {results}}", - "status.cannot_reblog": "This ping cannot be relayed", + "status.cannot_reblog": "This post cannot be boosted", "status.delete": "Delete", - "status.favourite": "Florp", + "status.favourite": "Favourite", "status.load_more": "Load more", "status.media_hidden": "Media hidden", "status.mention": "Mention @{name}", "status.mute_conversation": "Mute conversation", "status.open": "Expand this status", - "status.reblog": "Relay", - "status.reblogged_by": "{name} relayed", + "status.reblog": "Boost", + "status.reblogged_by": "{name} boosted", "status.reply": "Reply", "status.replyAll": "Reply to thread", "status.report": "Report @{name}", diff --git a/app/javascript/styles/custom.scss b/app/javascript/styles/custom.scss index 8c6c12316..5bfe2a412 100644 --- a/app/javascript/styles/custom.scss +++ b/app/javascript/styles/custom.scss @@ -1,14 +1,5 @@ -$ui-base-color: #181818; // darkest -$ui-secondary-color: #dae8da; // lightest -$ui-primary-color: #dae8da; // lighter -$ui-highlight-color: #1ea21e; // vibrant - @import 'application'; -body { - background: $ui-base-color url('../images/background-cybre.png'); -} - @media screen and (min-width: 1300px) { .column { flex-grow: 1 !important; @@ -59,16 +50,6 @@ body { .screenshot-with-signup .closed-registrations-message .clock { font-size:150%; -} - -.column .static-content.getting-started { - background-image: url('../images/logo-cybre.png'), url('../images/background-cybre.png'); - background-position: 50% 50%; - background-size:cover; -} - -.columns-area { - background: $ui-base-color url('../images/background-cybre.png'); } .drawer .drawer__inner { diff --git a/app/views/about/show.html.haml b/app/views/about/show.html.haml index 87a729055..2a7f8c752 100644 --- a/app/views/about/show.html.haml +++ b/app/views/about/show.html.haml @@ -17,7 +17,7 @@ .wrapper %h1 - = image_tag asset_pack_path('logo-cybre.png') + = image_tag asset_pack_path('logo.png') = Setting.site_title %p!= t('about.about_mastodon') diff --git a/app/views/layouts/admin.html.haml b/app/views/layouts/admin.html.haml index b49aa83f5..59d95a0c6 100644 --- a/app/views/layouts/admin.html.haml +++ b/app/views/layouts/admin.html.haml @@ -6,7 +6,7 @@ .sidebar-wrapper .sidebar = link_to root_path do - = image_tag asset_pack_path('logo-cybre.png'), class: 'logo' + = image_tag asset_pack_path('logo.png'), class: 'logo' = render_navigation .content-wrapper diff --git a/app/views/layouts/auth.html.haml b/app/views/layouts/auth.html.haml index 097fc6d08..e5429a8ed 100644 --- a/app/views/layouts/auth.html.haml +++ b/app/views/layouts/auth.html.haml @@ -6,7 +6,7 @@ .logo-container %h1 = link_to root_path do - = image_tag asset_pack_path('logo-cybre.png') + = image_tag asset_pack_path('logo.png') .form-container = render 'flashes' diff --git a/config/locales/en.yml b/config/locales/en.yml index 201651d17..0d33aae3f 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1,30 +1,30 @@ --- en: about: - about_mastodon: Cybrespace is an instance of Mastodon, a free, open-source social network. A decentralized alternative to commercial platforms, it avoids the risks of a single company monopolizing your communication. Pick a server that you trust — whichever you choose, you can interact with everyone else. Anyone can run their own Mastodon instance and participate in the social network seamlessly. + about_mastodon: Mastodon is a free, open-source social network. A decentralized alternative to commercial platforms, it avoids the risks of a single company monopolizing your communication. Pick a server that you trust — whichever you choose, you can interact with everyone else. Anyone can run their own Mastodon instance and participate in the social network seamlessly. about_this: About this instance apps: Apps business_email: 'Business e-mail:' closed_registrations: Registrations are currently closed on this instance. contact: Contact - description_headline: What's special about %{domain}? + description_headline: What is %{domain}? domain_count_after: other instances domain_count_before: Connected to features: api: Open API for apps and services blocks: Rich block and muting tools - characters: 512 characters per post + characters: 500 characters per post chronology: Timelines are chronological ethics: 'Ethical design: no ads, no tracking' gifv: GIFV sets and short videos - privacy: Granular, per-ping privacy settings + privacy: Granular, per-post privacy settings public: Public timelines features_headline: What sets Mastodon apart get_started: Get started links: Links other_instances: Other instances source_code: Source code - status_count_after: pings + status_count_after: statuses status_count_before: Who authored terms: Terms user_count_after: users @@ -37,7 +37,7 @@ en: nothing_here: There is nothing here! people_followed_by: People whom %{name} follows people_who_follow: People who follow %{name} - posts: Pings + posts: Posts remote_follow: Remote follow reserved_username: The username is reserved unfollow: Unfollow @@ -205,9 +205,9 @@ en: delete_account_html: If you wish to delete your account, you can proceed here. You will be asked for confirmation. didnt_get_confirmation: Didn't receive confirmation instructions? forgot_password: Forgot your password? - login: Jack in - logout: Jack out - register: Apply for upload + login: Log in + logout: Logout + register: Sign up resend_confirmation: Resend confirmation instructions reset_password: Reset password set_new_password: Set new password @@ -255,7 +255,7 @@ en: storage: Media storage followers: domain: Domain - explanation_html: If you want to ensure the privacy of your pings , you must be aware of who is following you. Your private pings are delivered to all instances where you have followers. You may wish to review them, and remove followers if you do not trust your privacy to be respected by the staff or software of those instances. + explanation_html: If you want to ensure the privacy of your statuses, you must be aware of who is following you. Your private statuses are delivered to all instances where you have followers. You may wish to review them, and remove followers if you do not trust your privacy to be respected by the staff or software of those instances. followers_count: Number of followers lock_link: Lock your account purge: Remove from followers @@ -263,7 +263,7 @@ en: one: In the process of soft-blocking followers from one domain... other: In the process of soft-blocking followers from %{count} domains... true_privacy_html: Please mind that true privacy can only be achieved with end-to-end encryption. - unlocked_warning_html: Anyone can follow you to immediately view your private pings. %{lock_link} to be able to review and reject followers. + unlocked_warning_html: Anyone can follow you to immediately view your private statuses. %{lock_link} to be able to review and reject followers. unlocked_warning_title: Your account is not locked generic: changes_saved_msg: Changes successfully saved! @@ -284,7 +284,7 @@ en: landing_strip_signup_html: If you don't, you can sign up here. media_attachments: validations: - images_and_video: Cannot attach a video to a ping that already contains images + images_and_video: Cannot attach a video to a status that already contains images too_many: Cannot attach more than 4 files notification_mailer: digest: @@ -297,8 +297,8 @@ en: one: "1 new notification since your last visit \U0001F418" other: "%{count} new notifications since your last visit \U0001F418" favourite: - body: 'Your ping was florped by %{name}:' - subject: "%{name} florped your ping" + body: 'Your status was favourited by %{name}:' + subject: "%{name} favourited your status" follow: body: "%{name} is now following you!" subject: "%{name} is now following you" @@ -309,8 +309,8 @@ en: body: 'You were mentioned by %{name} in:' subject: You were mentioned by %{name} reblog: - body: 'Your ping was relayed by %{name}:' - subject: "%{name} relayed your ping" + body: 'Your status was boosted by %{name}:' + subject: "%{name} boosted your status" pagination: next: Next prev: Prev @@ -324,7 +324,7 @@ en: authorized_apps: Authorized apps back: Back to Mastodon delete: Account deletion - edit_profile: edit ~/.profile + edit_profile: Edit profile export: Data export followers: Authorized followers import: Import @@ -344,7 +344,7 @@ en: unlisted_long: Everyone can see, but not listed on public timelines stream_entries: click_to_show: Click to show - reblogged: relayed + reblogged: boosted sensitive_content: Sensitive content time: formats: diff --git a/config/locales/simple_form.en.yml b/config/locales/simple_form.en.yml index 99173e948..3e769fb96 100644 --- a/config/locales/simple_form.en.yml +++ b/config/locales/simple_form.en.yml @@ -8,7 +8,7 @@ en: one: 1 character left other: %{count} characters left header: PNG, GIF or JPG. At most 2MB. Will be downscaled to 700x335px - locked: Requires you to manually approve followers and defaults ping privacy to followers-only + locked: Requires you to manually approve followers and defaults post privacy to followers-only note: one: 1 character left other: %{count} characters left @@ -46,11 +46,11 @@ en: must_be_following: Block notifications from people you don't follow notification_emails: digest: Send digest e-mails - favourite: Send e-mail when someone florps your ping + favourite: Send e-mail when someone favourites your status follow: Send e-mail when someone follows you follow_request: Send e-mail when someone requests to follow you mention: Send e-mail when someone mentions you - reblog: Send e-mail when someone boosts your ping + reblog: Send e-mail when someone boosts your status 'no': 'No' required: mark: "*" diff --git a/config/settings.yml b/config/settings.yml index 13ac097c6..19d2ca7be 100644 --- a/config/settings.yml +++ b/config/settings.yml @@ -7,7 +7,7 @@ # For more information, see docs/Running-Mastodon/Administration-guide.md # defaults: &defaults - site_title: 'Cybrespace' + site_title: 'dev.glitch.social' site_description: '' site_extended_description: '' site_contact_username: '' diff --git a/public/500.html b/public/500.html index 4197f5cdd..5812bb476 100644 --- a/public/500.html +++ b/public/500.html @@ -8,7 +8,7 @@ - - 1f418 - - - - + \ No newline at end of file diff --git a/public/mstile-150x150.png b/public/mstile-150x150.png index a79f11992..57eae8355 100644 Binary files a/public/mstile-150x150.png and b/public/mstile-150x150.png differ -- cgit From 62a75891abd8044189bbb2fbdd48837e8890a8a5 Mon Sep 17 00:00:00 2001 From: Go Shoemake Date: Sun, 18 Jun 2017 19:32:23 -0700 Subject: Fixes drawer so stuff doesn't overflow --- app/javascript/styles/custom.scss | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'app') diff --git a/app/javascript/styles/custom.scss b/app/javascript/styles/custom.scss index 5bfe2a412..b03231102 100644 --- a/app/javascript/styles/custom.scss +++ b/app/javascript/styles/custom.scss @@ -7,7 +7,9 @@ } .drawer { - width: 17%; + flex-grow: 1 !important; + flex-basis: 200px !important; + min-width: 268px; max-width: 400px; } } -- cgit From 0d3ec19e89b7a3b6e01f2018640c713dd545ae21 Mon Sep 17 00:00:00 2001 From: kibigo! Date: Tue, 20 Jun 2017 19:44:43 -0700 Subject: ✨ Profile Metadata HACK 😈 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mastodon/features/account/components/header.js | 94 +++++++++++++++++++--- app/javascript/styles/components.scss | 41 +++++++++- 2 files changed, 124 insertions(+), 11 deletions(-) (limited to 'app') diff --git a/app/javascript/mastodon/features/account/components/header.js b/app/javascript/mastodon/features/account/components/header.js index 3239b1085..b728c66e2 100644 --- a/app/javascript/mastodon/features/account/components/header.js +++ b/app/javascript/mastodon/features/account/components/header.js @@ -16,6 +16,57 @@ const messages = defineMessages({ requested: { id: 'account.requested', defaultMessage: 'Awaiting approval' }, }); +/* + THIS IS A MESS BECAUSE EFFING MASTODON AND ITS EFFING HTML BIOS + INSTEAD OF JUST STORING EVERYTHING IN PLAIN EFFING TEXT ! ! ! ! + BLANK LINES ALSO WON'T WORK BECAUSE RIGHT NOW MASTODON CONVERTS + THOSE INTO `

` ELEMENTS INSTEAD OF LEAVING IT AS `

` ! + TL:DR; THIS IS LARGELY A HACK. WITH BETTER BACKEND STUFF WE CAN + IMPROVE THIS BY BETTER PREDICTING HOW THE METADATA WILL BE SENT + WHILE MAINTAINING BASIC PLAIN-TEXT PROCESSING. THE OTHER OPTION + IS TO TURN ALL BIOS INTO PLAIN-TEXT VIA A TREE-WALKER, AND THEN + PROCESS THE YAML AND LINKS AND EVERYTHING OURSELVES. THIS WOULD + BE INCREDIBLY COMPLICATED, AND IT WOULD BE A MILLION TIMES LESS + DIFFICULT IF MASTODON JUST GAVE US PLAIN-TEXT BIOS (WHICH QUITE + FRANKLY MAKES THE MOST SENSE SINCE THAT'S WHAT USERS PROVIDE IN + SETTINGS) TO BEGIN WITH AND LEFT ALL PROCESSING TO THE FRONTEND + TO HANDLE ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! + ANYWAY I KNOW WHAT NEEDS TO BE DONE REGARDING BACKEND STUFF BUT + I'M NOT SMART ENOUGH TO FIGURE OUT HOW TO ACTUALLY IMPLEMENT IT + SO FEEL FREE TO @ ME IF YOU NEED MY IDEAS REGARDING THAT. UNTIL + THEN WE'LL JUST HAVE TO MAKE DO WITH THIS MESSY AND UNFORTUNATE + HACKING ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! + + with love, + @kibi@glitch.social <3 +*/ + +const NEW_LINE = /(?:^|\r?\n|)/g +const YAML_OPENER = /---/; +const YAML_CLOSER = /(?:---|\.\.\.)/; +const YAML_STRING = /(?:"(?:[^"\n]){1,32}"|'(?:[^'\n]){1,32}'|(?:[^'":\n]){1,32})/g; +const YAML_LINE = new RegExp("\\s*" + YAML_STRING.source + "\\s*:\\s*" + YAML_STRING.source + "\\s*", "g"); +const BIO_REGEX = new RegExp(NEW_LINE.source + "*" + YAML_OPENER.source + NEW_LINE.source + "+(?:" + YAML_LINE.source + NEW_LINE.source + "+){0,4}" + YAML_CLOSER.source + NEW_LINE.source + "*"); + +const processBio = (data) => { + let props = {text: data, metadata: []}; + let yaml = data.match(BIO_REGEX); + if (!yaml) return props; + else yaml = yaml[0]; + let start = props.text.indexOf(yaml); + let end = start + yaml.length; + props.text = props.text.substr(0, start) + props.text.substr(end); + yaml = yaml.replace(NEW_LINE, "\n"); + let metadata = (yaml ? yaml.match(YAML_LINE) : []) || []; + for (let i = 0; i < metadata.length; i++) { + let result = metadata[i].match(YAML_STRING); + if (result[0][0] === '"' || result[0][0] === "'") result[0] = result[0].substr(1, result[0].length - 2); + if (result[1][0] === '"' || result[1][0] === "'") result[0] = result[1].substr(1, result[1].length - 2); + props.metadata.push(result); + } + return props; +}; + const makeMapStateToProps = () => { const mapStateToProps = state => ({ autoPlayGif: state.getIn(['meta', 'auto_play_gif']), @@ -122,21 +173,44 @@ export default class Header extends ImmutablePureComponent { lockedIcon = ; } - const content = { __html: emojify(account.get('note')) }; - const displayNameHTML = { __html: emojify(escapeTextContentForBrowser(displayName)) }; + const displayNameHTML = { __html: emojify(escapeTextContentForBrowser(displayName)) }; + const { text, metadata } = processBio(account.get('note')); return ( -

-
- +
+
+
+ - - @{account.get('acct')} {lockedIcon} -
+ + @{account.get('acct')} {lockedIcon} +
- {info} - {actionBtn} + {info} + {actionBtn} +
+ + {metadata.length && ( +
+ {(() => { + let data = []; + for (let i = 0; i < metadata.length; i++) { + data.push( +
+ + +
+ ); + } + return data; + })()} +
+ ) || null}
); } diff --git a/app/javascript/styles/components.scss b/app/javascript/styles/components.scss index c2062c398..10ce06940 100644 --- a/app/javascript/styles/components.scss +++ b/app/javascript/styles/components.scss @@ -820,9 +820,12 @@ padding: 10px; } -.account__header { +.account__header__wrapper { flex: 0 0 auto; background: lighten($ui-base-color, 4%); +} + +.account__header { text-align: center; background-size: cover; background-position: center; @@ -887,6 +890,42 @@ } } +.account__metadata { + display: block; + font-size: 15px; + line-height: 36px; + overflow: hidden; + + .account__metadata-item { + display: flex; + flex-direction: row; + border-top: 1px solid lighten($ui-base-color, 8%); + + & > span, & > strong { + display: inline-block; + padding: 10px 20px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + + & > span { + flex: 0 0 auto; + width: 120px; + color: $ui-primary-color; + background: lighten($ui-base-color, 13%); + font-variant: small-caps; + } + + & > strong { + flex: auto; + color: $primary-text-color; + background: $ui-base-color; + font-weight: bold; + } + } +} + .account__action-bar { border-top: 1px solid lighten($ui-base-color, 8%); border-bottom: 1px solid lighten($ui-base-color, 8%); -- cgit From 93c52301ade71fb685d937b90451974d03d710af Mon Sep 17 00:00:00 2001 From: kibigo! Date: Wed, 21 Jun 2017 19:05:24 -0700 Subject: Collapsable toots [1/??] ☕️ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/javascript/mastodon/components/icon_button.js | 3 +- app/javascript/mastodon/components/status.js | 47 +++++++++++++++++----- .../mastodon/components/status_action_bar.js | 3 ++ .../mastodon/locales/defaultMessages.json | 10 ++++- app/javascript/mastodon/locales/en.json | 2 + app/javascript/styles/components.scss | 18 ++++++++- 6 files changed, 71 insertions(+), 12 deletions(-) (limited to 'app') diff --git a/app/javascript/mastodon/components/icon_button.js b/app/javascript/mastodon/components/icon_button.js index ac734f5ad..f4cedb854 100644 --- a/app/javascript/mastodon/components/icon_button.js +++ b/app/javascript/mastodon/components/icon_button.js @@ -17,6 +17,7 @@ export default class IconButton extends React.PureComponent { disabled: PropTypes.bool, inverted: PropTypes.bool, animate: PropTypes.bool, + flip: PropTypes.bool, overlay: PropTypes.bool, }; @@ -69,7 +70,7 @@ export default class IconButton extends React.PureComponent { } return ( - + {({ rotate }) =>
); } } + +const Status = injectIntl(StatusUnextended); +export default Status; -- cgit From 414dfb39551f7d35c704823b4bae7a0df293bf16 Mon Sep 17 00:00:00 2001 From: kibigo! Date: Fri, 23 Jun 2017 18:43:30 -0700 Subject: ESLint improvements for Profile Metadata --- .../mastodon/features/account/components/header.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'app') diff --git a/app/javascript/mastodon/features/account/components/header.js b/app/javascript/mastodon/features/account/components/header.js index b728c66e2..f929f1162 100644 --- a/app/javascript/mastodon/features/account/components/header.js +++ b/app/javascript/mastodon/features/account/components/header.js @@ -41,27 +41,27 @@ const messages = defineMessages({ @kibi@glitch.social <3 */ -const NEW_LINE = /(?:^|\r?\n|)/g +const NEW_LINE = /(?:^|\r?\n|)/g; const YAML_OPENER = /---/; const YAML_CLOSER = /(?:---|\.\.\.)/; const YAML_STRING = /(?:"(?:[^"\n]){1,32}"|'(?:[^'\n]){1,32}'|(?:[^'":\n]){1,32})/g; -const YAML_LINE = new RegExp("\\s*" + YAML_STRING.source + "\\s*:\\s*" + YAML_STRING.source + "\\s*", "g"); -const BIO_REGEX = new RegExp(NEW_LINE.source + "*" + YAML_OPENER.source + NEW_LINE.source + "+(?:" + YAML_LINE.source + NEW_LINE.source + "+){0,4}" + YAML_CLOSER.source + NEW_LINE.source + "*"); +const YAML_LINE = new RegExp('\\s*' + YAML_STRING.source + '\\s*:\\s*' + YAML_STRING.source + '\\s*', 'g'); +const BIO_REGEX = new RegExp(NEW_LINE.source + '*' + YAML_OPENER.source + NEW_LINE.source + '+(?:' + YAML_LINE.source + NEW_LINE.source + '+){0,4}' + YAML_CLOSER.source + NEW_LINE.source + '*'); const processBio = (data) => { - let props = {text: data, metadata: []}; + let props = { text: data, metadata: [] }; let yaml = data.match(BIO_REGEX); if (!yaml) return props; else yaml = yaml[0]; let start = props.text.indexOf(yaml); let end = start + yaml.length; props.text = props.text.substr(0, start) + props.text.substr(end); - yaml = yaml.replace(NEW_LINE, "\n"); + yaml = yaml.replace(NEW_LINE, '\n'); let metadata = (yaml ? yaml.match(YAML_LINE) : []) || []; for (let i = 0; i < metadata.length; i++) { let result = metadata[i].match(YAML_STRING); - if (result[0][0] === '"' || result[0][0] === "'") result[0] = result[0].substr(1, result[0].length - 2); - if (result[1][0] === '"' || result[1][0] === "'") result[0] = result[1].substr(1, result[1].length - 2); + if (result[0][0] === '"' || result[0][0] === '\'') result[0] = result[0].substr(1, result[0].length - 2); + if (result[1][0] === '"' || result[1][0] === '\'') result[0] = result[1].substr(1, result[1].length - 2); props.metadata.push(result); } return props; @@ -184,7 +184,7 @@ export default class Header extends ImmutablePureComponent { @{account.get('acct')} {lockedIcon} -
+
{info} {actionBtn} @@ -199,11 +199,11 @@ export default class Header extends ImmutablePureComponent { data.push(
- - + +
); } -- cgit From 2513d92c54aaf30da3b658acdca8a70fb0a85a28 Mon Sep 17 00:00:00 2001 From: kibigo! Date: Fri, 23 Jun 2017 19:39:44 -0700 Subject: Un-hide dropdown menu ;P --- app/javascript/styles/components.scss | 1 - 1 file changed, 1 deletion(-) (limited to 'app') diff --git a/app/javascript/styles/components.scss b/app/javascript/styles/components.scss index 80ed548a6..e1176a654 100644 --- a/app/javascript/styles/components.scss +++ b/app/javascript/styles/components.scss @@ -547,7 +547,6 @@ height: auto; min-height: 48px; border-bottom: 1px solid lighten($ui-base-color, 8%); - overflow: hidden; cursor: default; @keyframes fade { -- cgit From f1a60d4b81ced3bc6d2bc7251b6f6f75d6d76593 Mon Sep 17 00:00:00 2001 From: Matthew Walsh Date: Sun, 18 Jun 2017 15:09:03 -0700 Subject: Unified avatar styling Avatars now have consistent styling across all pages; border radius can be adjusted with a SASS variable ($ui-avatar-border-size) --- .../mastodon/features/account/components/header.js | 12 +++++------- app/javascript/styles/_mixins.scss | 2 +- app/javascript/styles/about.scss | 8 +++----- app/javascript/styles/accounts.scss | 20 ++++++++------------ app/javascript/styles/components.scss | 5 ++--- app/javascript/styles/stream_entries.scss | 13 +++++-------- app/javascript/styles/variables.scss | 3 +++ 7 files changed, 27 insertions(+), 36 deletions(-) (limited to 'app') diff --git a/app/javascript/mastodon/features/account/components/header.js b/app/javascript/mastodon/features/account/components/header.js index f929f1162..f5fce482a 100644 --- a/app/javascript/mastodon/features/account/components/header.js +++ b/app/javascript/mastodon/features/account/components/header.js @@ -5,9 +5,7 @@ import emojify from '../../../emoji'; import escapeTextContentForBrowser from 'escape-html'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import IconButton from '../../../components/icon_button'; -import Motion from 'react-motion/lib/Motion'; -import spring from 'react-motion/lib/spring'; -import { connect } from 'react-redux'; +import Avatar from '../../../components/avatar'; import ImmutablePureComponent from 'react-immutable-pure-component'; const messages = defineMessages({ @@ -130,7 +128,6 @@ export default class Header extends ImmutablePureComponent { me: PropTypes.number.isRequired, onFollow: PropTypes.func.isRequired, intl: PropTypes.object.isRequired, - autoPlayGif: PropTypes.bool.isRequired, }; render () { @@ -180,9 +177,10 @@ export default class Header extends ImmutablePureComponent {
- - - + + + + @{account.get('acct')} {lockedIcon}
diff --git a/app/javascript/styles/_mixins.scss b/app/javascript/styles/_mixins.scss index 67d768a6c..455062135 100644 --- a/app/javascript/styles/_mixins.scss +++ b/app/javascript/styles/_mixins.scss @@ -1,5 +1,5 @@ @mixin avatar-radius() { - border-radius: 4px; + border-radius: $ui-avatar-border-size; background: transparent no-repeat; background-position: 50%; background-clip: padding-box; diff --git a/app/javascript/styles/about.scss b/app/javascript/styles/about.scss index 3512bdcb4..7145d0092 100644 --- a/app/javascript/styles/about.scss +++ b/app/javascript/styles/about.scss @@ -172,16 +172,14 @@ text-align: center; .avatar { - width: 80px; - height: 80px; + @include avatar-size(80px); margin: 0 auto; margin-bottom: 15px; img { + @include avatar-radius(); + @include avatar-size(80px); display: block; - width: 80px; - height: 80px; - border-radius: 48px; } } diff --git a/app/javascript/styles/accounts.scss b/app/javascript/styles/accounts.scss index 801817d80..10f8bd2b9 100644 --- a/app/javascript/styles/accounts.scss +++ b/app/javascript/styles/accounts.scss @@ -46,17 +46,16 @@ } .avatar { - width: 120px; + @include avatar-size(120px); margin: 0 auto; margin-bottom: 15px; position: relative; z-index: 2; img { - width: 120px; - height: 120px; + @include avatar-radius(); + @include avatar-size(120px); display: block; - border-radius: 120px; } } @@ -283,16 +282,14 @@ } .avatar { - width: 60px; - height: 60px; + @include avatar-size(60px); float: left; margin-right: 15px; img { + @include avatar-radius(); + @include avatar-size(60px); display: block; - width: 60px; - height: 60px; - border-radius: 60px; } } @@ -359,15 +356,14 @@ } & > div { + @include avatar-size(48px); float: left; margin-right: 10px; - width: 48px; - height: 48px; } .avatar { + @include avatar-radius(); display: block; - border-radius: 4px; } .display-name { diff --git a/app/javascript/styles/components.scss b/app/javascript/styles/components.scss index e1176a654..025ef2f64 100644 --- a/app/javascript/styles/components.scss +++ b/app/javascript/styles/components.scss @@ -1004,12 +1004,11 @@ } .account__header__avatar { - background-size: 90px 90px; + @include avatar-radius(); + @include avatar-size(90px); display: block; - height: 90px; margin: 0 auto 10px; overflow: hidden; - width: 90px; } .account-authorize { diff --git a/app/javascript/styles/stream_entries.scss b/app/javascript/styles/stream_entries.scss index fcec32d44..490e36fab 100644 --- a/app/javascript/styles/stream_entries.scss +++ b/app/javascript/styles/stream_entries.scss @@ -64,19 +64,17 @@ .status__avatar { position: absolute; + @include avatar-size(48px); left: 14px; top: 14px; - width: 48px; - height: 48px; & > div { - width: 48px; - height: 48px; + @include avatar-size(48px); } img { + @include avatar-radius(); display: block; - border-radius: 4px; } } @@ -164,12 +162,11 @@ } .avatar { - width: 48px; - height: 48px; + @include avatar-size(48px); img { + @include avatar-radius(); display: block; - border-radius: 4px; } } diff --git a/app/javascript/styles/variables.scss b/app/javascript/styles/variables.scss index 8362096e1..bf8c12bc0 100644 --- a/app/javascript/styles/variables.scss +++ b/app/javascript/styles/variables.scss @@ -26,3 +26,6 @@ $ui-base-color: $classic-base-color !default; // Darkest $ui-primary-color: $classic-primary-color !default; // Lighter $ui-secondary-color: $classic-secondary-color !default; // Lightest $ui-highlight-color: $classic-highlight-color !default; // Vibrant + +// Avatar border size (8% default, 100% for rounded avatars) +$ui-avatar-border-size: 8%; -- cgit From 8b23bf7cbdc525f1fb0926456752e13012dc8e91 Mon Sep 17 00:00:00 2001 From: beatrix-bitrot Date: Sat, 24 Jun 2017 03:51:01 +0000 Subject: clean up old avatar class --- .../mastodon/features/account/components/header.js | 55 ---------------------- 1 file changed, 55 deletions(-) (limited to 'app') diff --git a/app/javascript/mastodon/features/account/components/header.js b/app/javascript/mastodon/features/account/components/header.js index f5fce482a..6f802ceda 100644 --- a/app/javascript/mastodon/features/account/components/header.js +++ b/app/javascript/mastodon/features/account/components/header.js @@ -65,61 +65,6 @@ const processBio = (data) => { return props; }; -const makeMapStateToProps = () => { - const mapStateToProps = state => ({ - autoPlayGif: state.getIn(['meta', 'auto_play_gif']), - }); - - return mapStateToProps; -}; - -class Avatar extends ImmutablePureComponent { - - static propTypes = { - account: ImmutablePropTypes.map.isRequired, - autoPlayGif: PropTypes.bool.isRequired, - }; - - state = { - isHovered: false, - }; - - handleMouseOver = () => { - if (this.state.isHovered) return; - this.setState({ isHovered: true }); - } - - handleMouseOut = () => { - if (!this.state.isHovered) return; - this.setState({ isHovered: false }); - } - - render () { - const { account, autoPlayGif } = this.props; - const { isHovered } = this.state; - - return ( - - {({ radius }) => - - } - - ); - } - -} - -@connect(makeMapStateToProps) @injectIntl export default class Header extends ImmutablePureComponent { -- cgit From a70468aa562e51c3dd0d4a7505f4163e3572ea13 Mon Sep 17 00:00:00 2001 From: Surinna Curtis Date: Sat, 24 Jun 2017 13:18:54 -0500 Subject: Support overriding media queries for deciding between single-column/multi-column layouts with a class --- app/javascript/mastodon/features/ui/index.js | 2 +- app/javascript/styles/_mixins.scss | 22 ++++++++++++++++++++++ app/javascript/styles/accounts.scss | 8 ++++---- app/javascript/styles/components.scss | 22 +++++++++++----------- app/javascript/styles/containers.scss | 4 ++-- app/javascript/styles/custom.scss | 2 +- 6 files changed, 41 insertions(+), 19 deletions(-) (limited to 'app') diff --git a/app/javascript/mastodon/features/ui/index.js b/app/javascript/mastodon/features/ui/index.js index 8453679b0..f3a8bebe9 100644 --- a/app/javascript/mastodon/features/ui/index.js +++ b/app/javascript/mastodon/features/ui/index.js @@ -179,7 +179,7 @@ export default class UI extends React.PureComponent { const { children } = this.props; return ( -
+
diff --git a/app/javascript/styles/_mixins.scss b/app/javascript/styles/_mixins.scss index 455062135..76302af99 100644 --- a/app/javascript/styles/_mixins.scss +++ b/app/javascript/styles/_mixins.scss @@ -10,3 +10,25 @@ height: $size; background-size: $size $size; } + +@mixin single-column($media, $parent: '&') { + .auto-columns #{$parent} { + @media #{$media} { + @content; + } + } + .single-column #{$parent} { + @content; + } +} + +@mixin multi-columns($media, $parent: '&') { + .auto-columns #{$parent} { + @media #{$media} { + @content; + } + } + .multi-columns #{$parent} { + @content; + } +} \ No newline at end of file diff --git a/app/javascript/styles/accounts.scss b/app/javascript/styles/accounts.scss index 10f8bd2b9..815f8b94f 100644 --- a/app/javascript/styles/accounts.scss +++ b/app/javascript/styles/accounts.scss @@ -9,7 +9,7 @@ overflow: hidden; position: relative; - @media screen and (max-width: 700px) { + @include single-column('screen and (max-width: 700px)') { border-radius: 0; box-shadow: none; } @@ -148,7 +148,7 @@ order: 1; } - @media screen and (max-width: 480px) { + @include single-column('screen and (max-width: 480px)') { .details { display: block; } @@ -230,7 +230,7 @@ color: lighten($ui-base-color, 10%); } - @media screen and (max-width: 360px) { + @include single-column('screen and (max-width: 360px)') { padding: 30px 20px; a, @@ -258,7 +258,7 @@ display: flex; flex-wrap: wrap; - @media screen and (max-width: 700px) { + @include single-column('screen and (max-width: 700px)') { border-radius: 0; box-shadow: none; } diff --git a/app/javascript/styles/components.scss b/app/javascript/styles/components.scss index 025ef2f64..e204f3637 100644 --- a/app/javascript/styles/components.scss +++ b/app/javascript/styles/components.scss @@ -1330,7 +1330,7 @@ position: relative; } -@media screen and (min-width: 360px) { +@include multi-columns('screen and (min-width: 360px)', $parent: null) { .columns-area { padding: 10px; } @@ -1386,7 +1386,7 @@ } } -@media screen and (min-width: 360px) { +@include multi-columns('screen and (min-width: 360px)', $parent: null) { .tabs-bar { margin: 10px; margin-bottom: 0; @@ -1397,7 +1397,7 @@ } } -@media screen and (max-width: 1024px) { +@include single-column('screen and (max-width: 1024px)', $parent: null) { .column, .drawer { width: 100%; @@ -1414,7 +1414,7 @@ } } -@media screen and (min-width: 1025px) { +@include multi-columns('screen and (min-width: 1025px)', $parent: null) { .columns-area { padding: 0; } @@ -1540,7 +1540,7 @@ } } -@media screen and (min-width: 600px) { +@include multi-columns('screen and (min-width: 600px)', $parent: null) { .tabs-bar__link { span { display: inline; @@ -1548,7 +1548,7 @@ } } -@media screen and (min-width: 1025px) { +@include multi-columns('screen and (min-width: 1025px)', $parent: null) { .tabs-bar { display: none; } @@ -1737,7 +1737,7 @@ } &.hidden-on-mobile { - @media screen and (max-width: 1024px) { + @include single-column('screen and (max-width: 1024px)') { display: none; } } @@ -2114,7 +2114,7 @@ button.icon-button.active i.fa-retweet { } &.hidden-on-mobile { - @media screen and (max-width: 1024px) { + @include single-column('screen and (max-width: 1024px)') { display: none; } } @@ -3073,7 +3073,7 @@ button.icon-button.active i.fa-retweet { } } -@media screen and (max-width: 550px) { +@include single-column('screen and (max-width: 550px)', $parent: null) { .onboarding-modal { width: 100%; height: 100%; @@ -3209,7 +3209,7 @@ button.icon-button.active i.fa-retweet { margin-right: 15px; } -@media screen and (max-width: 400px) { +@include single-column('screen and (max-width: 400px)', $parent: null) { .onboarding-modal__page-one { flex-direction: column; } @@ -3284,7 +3284,7 @@ button.icon-button.active i.fa-retweet { } } -@media screen and (max-width: 320px) and (max-height: 600px) { +@include single-column('screen and (max-width: 320px) and (max-height: 600px)', $parent: null) { .onboarding-modal__page p { font-size: 14px; line-height: 20px; diff --git a/app/javascript/styles/containers.scss b/app/javascript/styles/containers.scss index 68f73e0c0..34d6cbc69 100644 --- a/app/javascript/styles/containers.scss +++ b/app/javascript/styles/containers.scss @@ -3,7 +3,7 @@ margin: 0 auto; margin-top: 40px; - @media screen and (max-width: 700px) { + @include single-column('screen and (max-width: 700px)') { width: 100%; margin: 0; } @@ -15,7 +15,7 @@ margin-bottom: 0; cursor: default; - @media screen and (max-width: 360px) { + @include single-column('screen and (max-width: 360px)') { margin: 30px auto; } diff --git a/app/javascript/styles/custom.scss b/app/javascript/styles/custom.scss index b03231102..7a0509842 100644 --- a/app/javascript/styles/custom.scss +++ b/app/javascript/styles/custom.scss @@ -1,6 +1,6 @@ @import 'application'; -@media screen and (min-width: 1300px) { +@include multi-columns('screen and (min-width: 1300px)', $parent: null) { .column { flex-grow: 1 !important; max-width: 400px; -- cgit From ceb545c08002ed34f8837ddd2fd032178f59c6ed Mon Sep 17 00:00:00 2001 From: Surinna Curtis Date: Sat, 24 Jun 2017 14:22:55 -0500 Subject: Pass in correct "singleColumn" prop value when auto-columns is not used. --- app/javascript/mastodon/features/ui/index.js | 15 +++++++++++++-- app/javascript/mastodon/is_mobile.js | 11 +++++++++-- 2 files changed, 22 insertions(+), 4 deletions(-) (limited to 'app') diff --git a/app/javascript/mastodon/features/ui/index.js b/app/javascript/mastodon/features/ui/index.js index f3a8bebe9..a372deac5 100644 --- a/app/javascript/mastodon/features/ui/index.js +++ b/app/javascript/mastodon/features/ui/index.js @@ -74,6 +74,15 @@ class WrappedRoute extends React.Component { } +function columnClass(columns) { + switch (columns) { + case "auto": return "auto-columns"; + case "single": return "single-column"; + case "multiple": return "multi-columns"; + default: return "auto-columns"; + } +} + @connect() export default class UI extends React.PureComponent { @@ -178,10 +187,12 @@ export default class UI extends React.PureComponent { const { width, draggingOver } = this.state; const { children } = this.props; + const columns = "auto"; + return ( -
+
- + diff --git a/app/javascript/mastodon/is_mobile.js b/app/javascript/mastodon/is_mobile.js index 992e63727..8689dbe23 100644 --- a/app/javascript/mastodon/is_mobile.js +++ b/app/javascript/mastodon/is_mobile.js @@ -1,7 +1,14 @@ const LAYOUT_BREAKPOINT = 1024; -export function isMobile(width) { - return width <= LAYOUT_BREAKPOINT; +export function isMobile(width, columns) { + switch (columns) { + case "multiple": + return false; + case "single": + return true; + default: + return width <= LAYOUT_BREAKPOINT; + } }; const iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream; -- cgit From ddba5d3b8c065cdf1ef206b13fea02444ffdf1f7 Mon Sep 17 00:00:00 2001 From: kibigo! Date: Sat, 24 Jun 2017 17:07:25 -0700 Subject: Use Redux store to keep track of layout --- app/javascript/mastodon/containers/mastodon.js | 1 + app/javascript/mastodon/features/ui/index.js | 31 +++++++++++++++----------- app/javascript/mastodon/is_mobile.js | 4 ++-- app/javascript/mastodon/reducers/settings.js | 1 + 4 files changed, 22 insertions(+), 15 deletions(-) (limited to 'app') diff --git a/app/javascript/mastodon/containers/mastodon.js b/app/javascript/mastodon/containers/mastodon.js index 3bd89902f..f66110520 100644 --- a/app/javascript/mastodon/containers/mastodon.js +++ b/app/javascript/mastodon/containers/mastodon.js @@ -24,6 +24,7 @@ addLocaleData(localeData); const store = configureStore(); const initialState = JSON.parse(document.getElementById('initial-state').textContent); +if (localStorage) initialState.layout = localStorage.getItem('mastodon-layout'); store.dispatch(hydrateStore(initialState)); export default class Mastodon extends React.PureComponent { diff --git a/app/javascript/mastodon/features/ui/index.js b/app/javascript/mastodon/features/ui/index.js index a372deac5..f8c10f9a3 100644 --- a/app/javascript/mastodon/features/ui/index.js +++ b/app/javascript/mastodon/features/ui/index.js @@ -74,21 +74,17 @@ class WrappedRoute extends React.Component { } -function columnClass(columns) { - switch (columns) { - case "auto": return "auto-columns"; - case "single": return "single-column"; - case "multiple": return "multi-columns"; - default: return "auto-columns"; - } -} +const mapStateToProps = state => ({ + layout: state.getIn(['settings', 'layout']), +}); -@connect() +@connect(mapStateToProps) export default class UI extends React.PureComponent { static propTypes = { dispatch: PropTypes.func.isRequired, children: PropTypes.node, + layout: PropTypes.string, }; state = { @@ -184,15 +180,24 @@ export default class UI extends React.PureComponent { } render () { - const { width, draggingOver } = this.state; + const { width, draggingOver, layout } = this.state; const { children } = this.props; - const columns = "auto"; + const columnsClass = layout => { + switch (layout) { + case 'single': + return 'single-column'; + case 'multiple': + return 'multiple-columns'; + default: + return 'auto-columns'; + } + } return ( -
+
- + diff --git a/app/javascript/mastodon/is_mobile.js b/app/javascript/mastodon/is_mobile.js index 8689dbe23..014a9a8d5 100644 --- a/app/javascript/mastodon/is_mobile.js +++ b/app/javascript/mastodon/is_mobile.js @@ -2,9 +2,9 @@ const LAYOUT_BREAKPOINT = 1024; export function isMobile(width, columns) { switch (columns) { - case "multiple": + case 'multiple': return false; - case "single": + case 'single': return true; default: return width <= LAYOUT_BREAKPOINT; diff --git a/app/javascript/mastodon/reducers/settings.js b/app/javascript/mastodon/reducers/settings.js index ddad7a4fc..9a15a1fe3 100644 --- a/app/javascript/mastodon/reducers/settings.js +++ b/app/javascript/mastodon/reducers/settings.js @@ -6,6 +6,7 @@ import uuid from '../uuid'; const initialState = Immutable.Map({ onboarded: false, + layout: 'auto', home: Immutable.Map({ shows: Immutable.Map({ -- cgit From 4c37f629bce6fede13b6105749a10e585fb9c3b0 Mon Sep 17 00:00:00 2001 From: kibigo! Date: Sat, 24 Jun 2017 18:30:59 -0700 Subject: Don't change layout of static pages --- app/javascript/styles/accounts.scss | 8 ++++---- app/javascript/styles/containers.scss | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'app') diff --git a/app/javascript/styles/accounts.scss b/app/javascript/styles/accounts.scss index 815f8b94f..10f8bd2b9 100644 --- a/app/javascript/styles/accounts.scss +++ b/app/javascript/styles/accounts.scss @@ -9,7 +9,7 @@ overflow: hidden; position: relative; - @include single-column('screen and (max-width: 700px)') { + @media screen and (max-width: 700px) { border-radius: 0; box-shadow: none; } @@ -148,7 +148,7 @@ order: 1; } - @include single-column('screen and (max-width: 480px)') { + @media screen and (max-width: 480px) { .details { display: block; } @@ -230,7 +230,7 @@ color: lighten($ui-base-color, 10%); } - @include single-column('screen and (max-width: 360px)') { + @media screen and (max-width: 360px) { padding: 30px 20px; a, @@ -258,7 +258,7 @@ display: flex; flex-wrap: wrap; - @include single-column('screen and (max-width: 700px)') { + @media screen and (max-width: 700px) { border-radius: 0; box-shadow: none; } diff --git a/app/javascript/styles/containers.scss b/app/javascript/styles/containers.scss index 34d6cbc69..68f73e0c0 100644 --- a/app/javascript/styles/containers.scss +++ b/app/javascript/styles/containers.scss @@ -3,7 +3,7 @@ margin: 0 auto; margin-top: 40px; - @include single-column('screen and (max-width: 700px)') { + @media screen and (max-width: 700px) { width: 100%; margin: 0; } @@ -15,7 +15,7 @@ margin-bottom: 0; cursor: default; - @include single-column('screen and (max-width: 360px)') { + @media screen and (max-width: 360px) { margin: 30px auto; } -- cgit From da05cde72108e4caf3a053d3dd949d97fe8ff711 Mon Sep 17 00:00:00 2001 From: kibigo! Date: Sat, 24 Jun 2017 19:12:34 -0700 Subject: Better settings handling with localSettings (new!) --- app/javascript/mastodon/actions/local_settings.js | 20 ++++++++++++++++++++ app/javascript/mastodon/containers/mastodon.js | 6 +++++- app/javascript/mastodon/features/ui/index.js | 10 +++++----- app/javascript/mastodon/reducers/index.js | 2 ++ app/javascript/mastodon/reducers/local_settings.js | 20 ++++++++++++++++++++ 5 files changed, 52 insertions(+), 6 deletions(-) create mode 100644 app/javascript/mastodon/actions/local_settings.js create mode 100644 app/javascript/mastodon/reducers/local_settings.js (limited to 'app') diff --git a/app/javascript/mastodon/actions/local_settings.js b/app/javascript/mastodon/actions/local_settings.js new file mode 100644 index 000000000..742a1eec2 --- /dev/null +++ b/app/javascript/mastodon/actions/local_settings.js @@ -0,0 +1,20 @@ +export const LOCAL_SETTING_CHANGE = 'LOCAL_SETTING_CHANGE'; + +export function changeLocalSetting(key, value) { + return dispatch => { + dispatch({ + type: LOCAL_SETTING_CHANGE, + key, + value, + }); + + dispatch(saveLocalSettings()); + }; +}; + +export function saveLocalSettings() { + return (_, getState) => { + const localSettings = getState().get('localSettings').toJS(); + localStorage.setItem('mastodon-settings', JSON.stringify(localSettings)); + }; +}; diff --git a/app/javascript/mastodon/containers/mastodon.js b/app/javascript/mastodon/containers/mastodon.js index f66110520..3468a7944 100644 --- a/app/javascript/mastodon/containers/mastodon.js +++ b/app/javascript/mastodon/containers/mastodon.js @@ -24,7 +24,11 @@ addLocaleData(localeData); const store = configureStore(); const initialState = JSON.parse(document.getElementById('initial-state').textContent); -if (localStorage) initialState.layout = localStorage.getItem('mastodon-layout'); +try { + initialState.localSettings = JSON.parse(localStorage.getItem('mastodon-settings')); +} catch (e) { + initialState.localSettings = {}; +} store.dispatch(hydrateStore(initialState)); export default class Mastodon extends React.PureComponent { diff --git a/app/javascript/mastodon/features/ui/index.js b/app/javascript/mastodon/features/ui/index.js index f8c10f9a3..e5915ffe0 100644 --- a/app/javascript/mastodon/features/ui/index.js +++ b/app/javascript/mastodon/features/ui/index.js @@ -75,7 +75,7 @@ class WrappedRoute extends React.Component { } const mapStateToProps = state => ({ - layout: state.getIn(['settings', 'layout']), + layout: state.getIn(['localSettings', 'layout']), }); @connect(mapStateToProps) @@ -180,19 +180,19 @@ export default class UI extends React.PureComponent { } render () { - const { width, draggingOver, layout } = this.state; - const { children } = this.props; + const { width, draggingOver } = this.state; + const { children, layout } = this.props; const columnsClass = layout => { switch (layout) { case 'single': return 'single-column'; case 'multiple': - return 'multiple-columns'; + return 'multi-columns'; default: return 'auto-columns'; } - } + }; return (
diff --git a/app/javascript/mastodon/reducers/index.js b/app/javascript/mastodon/reducers/index.js index be402a16b..24f7f94a6 100644 --- a/app/javascript/mastodon/reducers/index.js +++ b/app/javascript/mastodon/reducers/index.js @@ -14,6 +14,7 @@ import relationships from './relationships'; import search from './search'; import notifications from './notifications'; import settings from './settings'; +import localSettings from './local_settings'; import status_lists from './status_lists'; import cards from './cards'; import reports from './reports'; @@ -36,6 +37,7 @@ export default combineReducers({ search, notifications, settings, + localSettings, cards, reports, contexts, diff --git a/app/javascript/mastodon/reducers/local_settings.js b/app/javascript/mastodon/reducers/local_settings.js new file mode 100644 index 000000000..529d31ebb --- /dev/null +++ b/app/javascript/mastodon/reducers/local_settings.js @@ -0,0 +1,20 @@ +import { LOCAL_SETTING_CHANGE } from '../actions/local_settings'; +import { STORE_HYDRATE } from '../actions/store'; +import Immutable from 'immutable'; + +const initialState = Immutable.Map({ + layout: 'auto', +}); + +const hydrate = (state, localSettings) => state.mergeDeep(localSettings); + +export default function localSettings(state = initialState, action) { + switch(action.type) { + case STORE_HYDRATE: + return hydrate(state, action.state.get('localSettings')); + case LOCAL_SETTING_CHANGE: + return state.setIn(action.key, action.value); + default: + return state; + } +}; -- cgit From ca0d30c04b96a87deed0e2da824212e2d644eb91 Mon Sep 17 00:00:00 2001 From: kibigo! Date: Sat, 24 Jun 2017 20:04:46 -0700 Subject: OKAY THIS WORKS THIS WORKS --- app/javascript/mastodon/features/compose/index.js | 57 +++++++++++++++++++++- .../mastodon/locales/defaultMessages.json | 16 ++++++ app/javascript/mastodon/locales/en.json | 4 ++ app/javascript/styles/components.scss | 33 ++++++++++--- 4 files changed, 100 insertions(+), 10 deletions(-) (limited to 'app') diff --git a/app/javascript/mastodon/features/compose/index.js b/app/javascript/mastodon/features/compose/index.js index 747fe4216..512167193 100644 --- a/app/javascript/mastodon/features/compose/index.js +++ b/app/javascript/mastodon/features/compose/index.js @@ -4,8 +4,9 @@ import NavigationContainer from './containers/navigation_container'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { mountCompose, unmountCompose } from '../../actions/compose'; +import { changeLocalSetting } from '../../actions/local_settings'; import Link from 'react-router-dom/Link'; -import { injectIntl, defineMessages } from 'react-intl'; +import { injectIntl, defineMessages, FormattedMessage } from 'react-intl'; import SearchContainer from './containers/search_container'; import Motion from 'react-motion/lib/Motion'; import spring from 'react-motion/lib/spring'; @@ -21,6 +22,7 @@ const messages = defineMessages({ const mapStateToProps = state => ({ showSearch: state.getIn(['search', 'submitted']) && !state.getIn(['search', 'hidden']), + layout: state.getIn(['localSettings', 'layout']), }); @connect(mapStateToProps) @@ -32,6 +34,7 @@ export default class Compose extends React.PureComponent { multiColumn: PropTypes.bool, showSearch: PropTypes.bool, intl: PropTypes.object.isRequired, + layout: PropTypes.string, }; componentDidMount () { @@ -42,8 +45,14 @@ export default class Compose extends React.PureComponent { this.props.dispatch(unmountCompose()); } + onLayoutClick = (e) => { + const layout = e.currentTarget.getAttribute('data-mastodon-layout'); + this.props.dispatch(changeLocalSetting(['layout'], layout)); + e.preventDefault(); + } + render () { - const { multiColumn, showSearch, intl } = this.props; + const { multiColumn, showSearch, intl, layout } = this.props; let header = ''; @@ -59,6 +68,47 @@ export default class Compose extends React.PureComponent { ); } + let layoutContent = ''; + + switch (layout) { + case 'single': + layoutContent = ( + + ); + break; + case 'multiple': + layoutContent = ( +
+

+ +

+

+ +

+
+ ); + break; + default: + layoutContent = ( +
+

+ +

+

+ +

+
+ ); + break; + } + return (
{header} @@ -79,6 +129,9 @@ export default class Compose extends React.PureComponent { }
+ + {layoutContent} +
); } diff --git a/app/javascript/mastodon/locales/defaultMessages.json b/app/javascript/mastodon/locales/defaultMessages.json index dd790f659..803d9b292 100644 --- a/app/javascript/mastodon/locales/defaultMessages.json +++ b/app/javascript/mastodon/locales/defaultMessages.json @@ -658,6 +658,22 @@ { "defaultMessage": "Logout", "id": "navigation_bar.logout" + }, + { + "defaultMessage": "Your current layout is:", + "id": "layout.current_is" + }, + { + "defaultMessage": "Mobile", + "id": "layout.mobile" + }, + { + "defaultMessage": "Desktop", + "id": "layout.desktop" + }, + { + "defaultMessage": "Auto", + "id": "layout.auto" } ], "path": "app/javascript/mastodon/features/compose/index.json" diff --git a/app/javascript/mastodon/locales/en.json b/app/javascript/mastodon/locales/en.json index 8fb409618..c19d4aa02 100644 --- a/app/javascript/mastodon/locales/en.json +++ b/app/javascript/mastodon/locales/en.json @@ -79,6 +79,10 @@ "home.column_settings.show_reblogs": "Show boosts", "home.column_settings.show_replies": "Show replies", "home.settings": "Column settings", + "layout.auto": "Auto", + "layout.current_is": "Your current layout is:", + "layout.desktop": "Desktop", + "layout.mobile": "Mobile", "lightbox.close": "Close", "loading_indicator.label": "Loading...", "media_gallery.toggle_visible": "Toggle visibility", diff --git a/app/javascript/styles/components.scss b/app/javascript/styles/components.scss index e204f3637..1fa20a731 100644 --- a/app/javascript/styles/components.scss +++ b/app/javascript/styles/components.scss @@ -1447,28 +1447,26 @@ .drawer__pager { box-sizing: border-box; padding: 0; - flex-grow: 1; + flex: 0 0 auto; position: relative; overflow: hidden; - display: flex; } .drawer__inner { - position: absolute; - top: 0; - left: 0; background: lighten($ui-base-color, 13%); box-sizing: border-box; padding: 0; - display: flex; - flex-direction: column; overflow: hidden; overflow-y: auto; width: 100%; - height: 100%; &.darker { + position: absolute; + top: 0; + left: 0; background: $ui-base-color; + width: 100%; + height: 100%; } } @@ -1496,6 +1494,25 @@ } } +.layout__selector { + margin-top: 20px; + + a { + text-decoration: underline; + cursor: pointer; + color: lighten($ui-base-color, 26%); + } + + b { + font-weight: bold; + } + + p { + font-size: 13px; + color: $ui-secondary-color; + } +} + .tabs-bar { display: flex; background: lighten($ui-base-color, 8%); -- cgit From 7427680e75330335ab7e19a731609bd0270db010 Mon Sep 17 00:00:00 2001 From: kibigo! Date: Sat, 24 Jun 2017 20:14:58 -0700 Subject: Allowed little media rules --- app/javascript/styles/_mixins.scss | 2 +- app/javascript/styles/components.scss | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'app') diff --git a/app/javascript/styles/_mixins.scss b/app/javascript/styles/_mixins.scss index 76302af99..ba9f8e5b6 100644 --- a/app/javascript/styles/_mixins.scss +++ b/app/javascript/styles/_mixins.scss @@ -31,4 +31,4 @@ .multi-columns #{$parent} { @content; } -} \ No newline at end of file +} diff --git a/app/javascript/styles/components.scss b/app/javascript/styles/components.scss index 1fa20a731..54a44937e 100644 --- a/app/javascript/styles/components.scss +++ b/app/javascript/styles/components.scss @@ -1330,7 +1330,7 @@ position: relative; } -@include multi-columns('screen and (min-width: 360px)', $parent: null) { +@media screen and (min-width: 360px) { .columns-area { padding: 10px; } @@ -1386,7 +1386,7 @@ } } -@include multi-columns('screen and (min-width: 360px)', $parent: null) { +@media screen and (min-width: 360px) { .tabs-bar { margin: 10px; margin-bottom: 0; @@ -1557,7 +1557,7 @@ } } -@include multi-columns('screen and (min-width: 600px)', $parent: null) { +@media screen and (min-width: 600px) { .tabs-bar__link { span { display: inline; @@ -3090,7 +3090,7 @@ button.icon-button.active i.fa-retweet { } } -@include single-column('screen and (max-width: 550px)', $parent: null) { +@media screen and (max-width: 550px) { .onboarding-modal { width: 100%; height: 100%; @@ -3226,7 +3226,7 @@ button.icon-button.active i.fa-retweet { margin-right: 15px; } -@include single-column('screen and (max-width: 400px)', $parent: null) { +@media screen and (max-width: 400px) { .onboarding-modal__page-one { flex-direction: column; } @@ -3301,7 +3301,7 @@ button.icon-button.active i.fa-retweet { } } -@include single-column('screen and (max-width: 320px) and (max-height: 600px)', $parent: null) { +@media screen and (max-width: 320px) and (max-height: 600px) { .onboarding-modal__page p { font-size: 14px; line-height: 20px; -- cgit From b8a5052d5361b812df3873fdeaa96f901843ef11 Mon Sep 17 00:00:00 2001 From: kibigo! Date: Sat, 24 Jun 2017 20:32:03 -0700 Subject: Better style handling at small sizes --- app/javascript/styles/_mixins.scss | 8 ++++++++ app/javascript/styles/components.scss | 27 +++++++++++++++------------ 2 files changed, 23 insertions(+), 12 deletions(-) (limited to 'app') diff --git a/app/javascript/styles/_mixins.scss b/app/javascript/styles/_mixins.scss index ba9f8e5b6..7412991b8 100644 --- a/app/javascript/styles/_mixins.scss +++ b/app/javascript/styles/_mixins.scss @@ -22,6 +22,14 @@ } } +@mixin limited-single-column($media, $parent: '&') { + .auto-columns #{$parent}, .single-column #{$parent} { + @media #{$media} { + @content; + } + } +} + @mixin multi-columns($media, $parent: '&') { .auto-columns #{$parent} { @media #{$media} { diff --git a/app/javascript/styles/components.scss b/app/javascript/styles/components.scss index 54a44937e..af9da6c37 100644 --- a/app/javascript/styles/components.scss +++ b/app/javascript/styles/components.scss @@ -1328,11 +1328,12 @@ justify-content: flex-start; overflow-x: auto; position: relative; + padding: 10px; } -@media screen and (min-width: 360px) { +@include limited-single-column('screen and (max-width: 360px)', $parent: null) { .columns-area { - padding: 10px; + padding: 0; } } @@ -1386,14 +1387,13 @@ } } -@media screen and (min-width: 360px) { +@include limited-single-column('screen and (max-width: 360px)', $parent: null) { .tabs-bar { - margin: 10px; - margin-bottom: 0; + margin: 0; } .search { - margin-bottom: 10px; + margin-bottom: 0; } } @@ -1518,6 +1518,8 @@ background: lighten($ui-base-color, 8%); flex: 0 0 auto; overflow-y: auto; + margin: 10px; + margin-bottom: 0; } .tabs-bar__link { @@ -1545,7 +1547,7 @@ &:hover, &:focus, &:active { - @media screen and (min-width: 1025px) { + @include multi-columns('screen and (min-width: 1025px)') { background: lighten($ui-base-color, 14%); transition: all 100ms linear; } @@ -1557,7 +1559,7 @@ } } -@media screen and (min-width: 600px) { +@include limited-single-column('screen and (max-width: 600px)', $parent: null) { .tabs-bar__link { span { display: inline; @@ -1798,7 +1800,7 @@ outline: 0; } - @media screen and (max-width: 600px) { + @include limited-single-column('screen and (max-width: 600px)') { font-size: 16px; } } @@ -1815,7 +1817,7 @@ padding-right: 10px + 22px; resize: none; - @media screen and (max-width: 600px) { + @include limited-single-column('screen and (max-width: 600px)') { height: 100px !important; // prevent auto-resize textarea resize: vertical; } @@ -1928,7 +1930,7 @@ border-bottom-color: $ui-highlight-color; } - @media screen and (max-width: 600px) { + @include limited-single-column('screen and (max-width: 600px)') { font-size: 16px; } } @@ -2889,6 +2891,7 @@ button.icon-button.active i.fa-retweet { .search { position: relative; + margin-bottom: 10px; } .search__input { @@ -2921,7 +2924,7 @@ button.icon-button.active i.fa-retweet { background: lighten($ui-base-color, 4%); } - @media screen and (max-width: 600px) { + @include limited-single-column('screen and (max-width: 600px)') { font-size: 16px; } } -- cgit From af178d0ba60d8f655db635190bde2735e40ad63a Mon Sep 17 00:00:00 2001 From: kibigo! Date: Sat, 24 Jun 2017 21:28:30 -0700 Subject: Removed no-longer-necessary custom style --- app/javascript/styles/custom.scss | 1 - 1 file changed, 1 deletion(-) (limited to 'app') diff --git a/app/javascript/styles/custom.scss b/app/javascript/styles/custom.scss index 7a0509842..2424b66f0 100644 --- a/app/javascript/styles/custom.scss +++ b/app/javascript/styles/custom.scss @@ -56,7 +56,6 @@ .drawer .drawer__inner { overflow: visible; - height:inherit; } .drawer__pager { -- cgit From 7eda83a36a56301b890e2fa33f5a34226110d42e Mon Sep 17 00:00:00 2001 From: Shel Raphen Date: Wed, 21 Jun 2017 13:02:02 -0400 Subject: Glitchsocification --- app/javascript/mastodon/features/getting_started/index.js | 4 ++-- .../mastodon/features/ui/components/onboarding_modal.js | 11 ++++++----- app/javascript/mastodon/locales/defaultMessages.json | 8 ++++---- app/javascript/mastodon/locales/en.json | 8 ++++---- 4 files changed, 16 insertions(+), 15 deletions(-) (limited to 'app') diff --git a/app/javascript/mastodon/features/getting_started/index.js b/app/javascript/mastodon/features/getting_started/index.js index f8ea01024..16f71966b 100644 --- a/app/javascript/mastodon/features/getting_started/index.js +++ b/app/javascript/mastodon/features/getting_started/index.js @@ -96,8 +96,8 @@ export default class GettingStarted extends ImmutablePureComponent {

tootsuite/mastodon }} + defaultMessage='Glitchsoc is open source software, a friendly fork of {Mastodon}. You can contribute or report issues on GitHub at {github}.' + values={{ github: glitch-soc/mastodon, Mastodon: Mastodon}} />

diff --git a/app/javascript/mastodon/features/ui/components/onboarding_modal.js b/app/javascript/mastodon/features/ui/components/onboarding_modal.js index d2e02d63b..1b8d844d3 100644 --- a/app/javascript/mastodon/features/ui/components/onboarding_modal.js +++ b/app/javascript/mastodon/features/ui/components/onboarding_modal.js @@ -29,8 +29,8 @@ const PageOne = ({ acct, domain }) => (
-

-

+

+

{acct}@{domain} }} />

@@ -149,13 +149,14 @@ const PageSix = ({ admin, domain }) => {

{adminSection} -

GitHub }} />

-

}} />

+

fork, Mastodon: Mastodon, github: GitHub }} />

+

}} />

); }; - +GitHub }} />

+

Date: Sun, 25 Jun 2017 12:51:31 -0700 Subject: Patching rebase errors --- app/javascript/mastodon/features/getting_started/index.js | 2 +- app/javascript/mastodon/features/ui/components/onboarding_modal.js | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'app') diff --git a/app/javascript/mastodon/features/getting_started/index.js b/app/javascript/mastodon/features/getting_started/index.js index 16f71966b..ac93b3d47 100644 --- a/app/javascript/mastodon/features/getting_started/index.js +++ b/app/javascript/mastodon/features/getting_started/index.js @@ -97,7 +97,7 @@ export default class GettingStarted extends ImmutablePureComponent { glitch-soc/mastodon, Mastodon: Mastodon}} + values={{ github: glitch-soc/mastodon, Mastodon: Mastodon }} />

diff --git a/app/javascript/mastodon/features/ui/components/onboarding_modal.js b/app/javascript/mastodon/features/ui/components/onboarding_modal.js index 1b8d844d3..4c1c0f7c1 100644 --- a/app/javascript/mastodon/features/ui/components/onboarding_modal.js +++ b/app/javascript/mastodon/features/ui/components/onboarding_modal.js @@ -155,8 +155,7 @@ const PageSix = ({ admin, domain }) => {
); }; -GitHub }} />

-

; + if (!status.get('sensitive')) thumb = status.getIn(['media_attachments', 0]).get('preview_url'); } else { media = ; + if (!status.get('sensitive')) thumb = status.getIn(['media_attachments', 0]).get('preview_url'); } } @@ -233,7 +236,7 @@ class StatusUnextended extends ImmutablePureComponent { } return ( -

+
Date: Sun, 25 Jun 2017 14:22:11 -0700 Subject: Adds media icons to toots --- app/javascript/mastodon/components/status.js | 22 ++++++++++++++-------- app/javascript/styles/components.scss | 4 +++- 2 files changed, 17 insertions(+), 9 deletions(-) (limited to 'app') diff --git a/app/javascript/mastodon/components/status.js b/app/javascript/mastodon/components/status.js index ec9b2a255..a3b9c477b 100644 --- a/app/javascript/mastodon/components/status.js +++ b/app/javascript/mastodon/components/status.js @@ -175,6 +175,7 @@ class StatusUnextended extends ImmutablePureComponent { render () { let media = null; + let mediaType = null; let thumb = null; let statusAvatar; @@ -222,9 +223,11 @@ class StatusUnextended extends ImmutablePureComponent { } else if (status.getIn(['media_attachments', 0, 'type']) === 'video') { media = ; + mediaType =