From 25f4c427b8ba39b01889ad3bf9f5ab4092c569b1 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 12 Jun 2020 01:02:18 -0500 Subject: [PATCH 01/17] Simplify GitLab CI for faster builds --- .gitlab-ci.yml | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d64f17a4a..a9c43e5ce 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -30,15 +30,6 @@ jest: stage: test script: yarn test:jest -build-development: - stage: build - script: yarn build - variables: - NODE_ENV: development - artifacts: - paths: - - static - build-production: stage: build script: yarn build @@ -48,11 +39,13 @@ build-production: paths: - static -i18n: - stage: build - script: yarn manage:translations - variables: - NODE_ENV: development - before_script: - - yarn - - yarn build +# Supposed to fail when translations are outdated, instead always passes +# +# i18n: +# stage: build +# script: yarn manage:translations +# variables: +# NODE_ENV: development +# before_script: +# - yarn +# - yarn build From 9bf8b5d0fb913aec5c89588444eea443958601fc Mon Sep 17 00:00:00 2001 From: crockwave Date: Fri, 12 Jun 2020 10:07:17 -0500 Subject: [PATCH 02/17] Rationalize warning and explanation box styling. Fixes #188 --- app/styles/basics.scss | 4 ++-- app/styles/components/compose-form.scss | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/styles/basics.scss b/app/styles/basics.scss index d7f531394..7f5b06e0e 100644 --- a/app/styles/basics.scss +++ b/app/styles/basics.scss @@ -182,10 +182,10 @@ body { a { color: var(--brand-color--hicontrast); - text-decoration: none; + text-decoration: underline; &:hover { - text-decoration: underline; + text-decoration: none; } } } diff --git a/app/styles/components/compose-form.scss b/app/styles/components/compose-form.scss index 0c9782345..0b144c700 100644 --- a/app/styles/components/compose-form.scss +++ b/app/styles/components/compose-form.scss @@ -31,7 +31,7 @@ .compose-form__warning { color: var(--primary-text-color); margin-bottom: 10px; - background: var(--brand-color--med); + background: var(--brand-color--faint); box-shadow: 0 2px 6px rgba($base-shadow-color, 0.3); padding: 8px 10px; border-radius: 4px; @@ -49,7 +49,7 @@ } a { - color: var(--accent-color--bright); + color: var(--brand-color--hicontrast); font-weight: 500; text-decoration: underline; From cbdcccb8b2b2b8d03462810353c34bd6a8233433 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 12 Jun 2020 10:48:04 -0500 Subject: [PATCH 03/17] Fix RGB->HSL precision issues Moved back to chromatism. Well worth it for the accuracy. --- app/soapbox/utils/theme.js | 4 ++-- package.json | 2 +- yarn.lock | 23 +++++------------------ 3 files changed, 8 insertions(+), 21 deletions(-) diff --git a/app/soapbox/utils/theme.js b/app/soapbox/utils/theme.js index 4d0205c56..a4fb01c8c 100644 --- a/app/soapbox/utils/theme.js +++ b/app/soapbox/utils/theme.js @@ -1,5 +1,5 @@ import { Map as ImmutableMap } from 'immutable'; -import hexToHsl from 'hex-to-hsl'; +import { convert } from 'chromatism'; export const generateThemeCss = brandColor => { if (!brandColor) return null; @@ -7,7 +7,7 @@ export const generateThemeCss = brandColor => { }; export const brandColorToThemeData = brandColor => { - const [ h, s, l ] = hexToHsl(brandColor); + const { h, s, l } = convert(brandColor).hsl; return ImmutableMap({ 'brand-color_h': h, 'brand-color_s': `${s}%`, diff --git a/package.json b/package.json index 1477b3030..d365818ba 100644 --- a/package.json +++ b/package.json @@ -56,6 +56,7 @@ "babel-plugin-transform-react-remove-prop-types": "^0.4.24", "babel-runtime": "^6.26.0", "blurhash": "^1.0.0", + "chromatism": "^3.0.0", "classnames": "^2.2.5", "compression-webpack-plugin": "^3.0.0", "cross-env": "^6.0.0", @@ -71,7 +72,6 @@ "file-loader": "^4.0.0", "font-awesome": "^4.7.0", "glob": "^7.1.1", - "hex-to-hsl": "^1.0.2", "html-webpack-harddisk-plugin": "^1.0.1", "html-webpack-plugin": "^4.3.0", "http-link-header": "^1.0.2", diff --git a/yarn.lock b/yarn.lock index 69f21befb..aee589968 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3055,6 +3055,11 @@ chownr@^1.1.1: resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.1.tgz#54726b8b8fff4df053c42187e801fb4412df1494" integrity sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g== +chromatism@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/chromatism/-/chromatism-3.0.0.tgz#a7249d353c1e4f3577e444ac41171c4e2e624b12" + integrity sha1-pySdNTweTzV35ESsQRccTi5iSxI= + chrome-trace-event@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz#234090ee97c7d4ad1a2c4beae27505deffc608a4" @@ -5607,19 +5612,6 @@ hex-color-regex@^1.1.0: resolved "https://registry.yarnpkg.com/hex-color-regex/-/hex-color-regex-1.1.0.tgz#4c06fccb4602fe2602b3c93df82d7e7dbf1a8a8e" integrity sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ== -hex-to-hsl@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/hex-to-hsl/-/hex-to-hsl-1.0.2.tgz#d5c59ece00178444e821c8fc58a430afc09831c2" - integrity sha1-1cWezgAXhEToIcj8WKQwr8CYMcI= - dependencies: - hex-to-rgb "^1.0.1" - rgb-to-hsl "0.0.2" - -hex-to-rgb@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/hex-to-rgb/-/hex-to-rgb-1.0.1.tgz#100b9df126b32f2762adf8486be68c65ef8ed2a4" - integrity sha1-EAud8SazLydirfhIa+aMZe+O0qQ= - history@^4.7.2: version "4.10.1" resolved "https://registry.yarnpkg.com/history/-/history-4.10.1.tgz#33371a65e3a83b267434e2b3f3b1b4c58aad4cf3" @@ -10214,11 +10206,6 @@ rgb-regex@^1.0.1: resolved "https://registry.yarnpkg.com/rgb-regex/-/rgb-regex-1.0.1.tgz#c0e0d6882df0e23be254a475e8edd41915feaeb1" integrity sha1-wODWiC3w4jviVKR16O3UGRX+rrE= -rgb-to-hsl@0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/rgb-to-hsl/-/rgb-to-hsl-0.0.2.tgz#36f9fc286376b90acc457e699005b4cb42d350ec" - integrity sha1-Nvn8KGN2uQrMRX5pkAW0y0LTUOw= - rgba-regex@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/rgba-regex/-/rgba-regex-1.0.0.tgz#43374e2e2ca0968b0ef1523460b7d730ff22eeb3" From 27925d274653e9d4b3edf6ab44ada4c9fe8d51d4 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 12 Jun 2020 14:07:06 -0500 Subject: [PATCH 04/17] Account Timeline: Filter media from reposts --- app/soapbox/selectors/index.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/app/soapbox/selectors/index.js b/app/soapbox/selectors/index.js index 7249927fc..0ee8a7ca4 100644 --- a/app/soapbox/selectors/index.js +++ b/app/soapbox/selectors/index.js @@ -136,12 +136,10 @@ export const getAccountGallery = createSelector([ (state, id) => state.getIn(['timelines', `account:${id}:media`, 'items'], ImmutableList()), state => state.get('statuses'), ], (statusIds, statuses) => { - let medias = ImmutableList(); - statusIds.forEach(statusId => { + return statusIds.reduce((medias, statusId) => { const status = statuses.get(statusId); - medias = medias.concat(status.get('media_attachments').map(media => media.set('status', status))); - }); - - return medias; + if (status.get('reblogged') !== false) return medias; + return medias.concat(status.get('media_attachments').map(media => media.set('status', status))); + }, ImmutableList()); }); From 1a07c3bac55555dc6da81ed5c3c4d365ff79ba60 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 12 Jun 2020 14:11:53 -0500 Subject: [PATCH 05/17] Account Media Timeline: Fix key duplication error --- app/soapbox/features/account_gallery/index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/soapbox/features/account_gallery/index.js b/app/soapbox/features/account_gallery/index.js index c175c4c9f..caa361e3b 100644 --- a/app/soapbox/features/account_gallery/index.js +++ b/app/soapbox/features/account_gallery/index.js @@ -204,7 +204,12 @@ class AccountGallery extends ImmutablePureComponent { {attachments.map((attachment, index) => attachment === null ? ( 0 ? attachments.getIn(index - 1, 'id') : null} onLoadMore={this.handleLoadMore} /> ) : ( - + ))} { From d3b31c8bcf31ae3e13de0f36de272894f6d08510 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 12 Jun 2020 14:39:56 -0500 Subject: [PATCH 06/17] About page: restore functionality, fix tests --- app/soapbox/actions/__tests__/about-test.js | 6 +++--- app/soapbox/actions/about.js | 8 +++++--- app/soapbox/features/about/index.js | 4 ++-- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/app/soapbox/actions/__tests__/about-test.js b/app/soapbox/actions/__tests__/about-test.js index 73c7b5d4f..19fa9bcad 100644 --- a/app/soapbox/actions/__tests__/about-test.js +++ b/app/soapbox/actions/__tests__/about-test.js @@ -17,7 +17,7 @@ describe('fetchAboutPage()', () => { const expectedActions = [ { type: FETCH_ABOUT_PAGE_REQUEST, slug: 'index' }, - { type: FETCH_ABOUT_PAGE_SUCCESS, slug: 'index' }, + { type: FETCH_ABOUT_PAGE_SUCCESS, slug: 'index', html: '

Hello world

' }, ]; const store = mockStore(ImmutableMap()); @@ -29,11 +29,11 @@ describe('fetchAboutPage()', () => { it('creates the expected actions on failure', () => { const expectedActions = [ { type: FETCH_ABOUT_PAGE_REQUEST, slug: 'asdf' }, - { type: FETCH_ABOUT_PAGE_FAIL, slug: 'asdf' }, + { type: FETCH_ABOUT_PAGE_FAIL, slug: 'asdf', error: new Error('Request failed with status code 404') }, ]; const store = mockStore(ImmutableMap()); - return store.dispatch(fetchAboutPage('asdf')).then(() => { + return store.dispatch(fetchAboutPage('asdf')).catch(() => { expect(store.getActions()).toEqual(expectedActions); }); }); diff --git a/app/soapbox/actions/about.js b/app/soapbox/actions/about.js index 81c162b6b..a515bdfbb 100644 --- a/app/soapbox/actions/about.js +++ b/app/soapbox/actions/about.js @@ -7,10 +7,12 @@ export const FETCH_ABOUT_PAGE_FAIL = 'FETCH_ABOUT_PAGE_FAIL'; export function fetchAboutPage(slug = 'index') { return (dispatch, getState) => { dispatch({ type: FETCH_ABOUT_PAGE_REQUEST, slug }); - return api(getState).get(`/instance/about/${slug}.html`).then(() => { - dispatch({ type: FETCH_ABOUT_PAGE_SUCCESS, slug }); + return api(getState).get(`/instance/about/${slug}.html`).then(response => { + dispatch({ type: FETCH_ABOUT_PAGE_SUCCESS, slug, html: response.data }); + return response.data; }).catch(error => { - dispatch({ type: FETCH_ABOUT_PAGE_FAIL, slug }); + dispatch({ type: FETCH_ABOUT_PAGE_FAIL, slug, error }); + throw error; }); }; } diff --git a/app/soapbox/features/about/index.js b/app/soapbox/features/about/index.js index de2475eac..55d716878 100644 --- a/app/soapbox/features/about/index.js +++ b/app/soapbox/features/about/index.js @@ -12,8 +12,8 @@ class AboutPage extends ImmutablePureComponent { loadPageHtml = () => { const { dispatch, match } = this.props; const { slug } = match.params; - dispatch(fetchAboutPage(slug)).then(response => { - this.setState({ pageHtml: response.data }); + dispatch(fetchAboutPage(slug)).then(html => { + this.setState({ pageHtml: html }); }).catch(error => { // TODO: Better error handling. 404 page? this.setState({ pageHtml: '

Page not found

' }); From 64cb0f61ae7e949bb078d66383d54173bb51eca8 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 12 Jun 2020 14:46:31 -0500 Subject: [PATCH 07/17] About: Improve formatting of about.example boilerplate --- static/instance/about.example/dmca.html | 41 ++++--- static/instance/about.example/index.html | 10 +- static/instance/about.example/privacy.html | 119 +++++++++++---------- static/instance/about.example/tos.html | 7 +- 4 files changed, 81 insertions(+), 96 deletions(-) diff --git a/static/instance/about.example/dmca.html b/static/instance/about.example/dmca.html index a95d21d13..516748de8 100644 --- a/static/instance/about.example/dmca.html +++ b/static/instance/about.example/dmca.html @@ -1,42 +1,37 @@ - - -

COPYRIGHT POLICY

+

Reporting Claims of Copyright Infringement

We take claims of copyright infringement seriously. We will respond to notices of alleged copyright infringement that comply with applicable law. If you believe any materials accessible on or from this site (the "Website") infringe your copyright, you may request removal of those materials (or access to them) from the Website by submitting written notification to our copyright agent designated below. In accordance with the Online Copyright Infringement Liability Limitation Act of the Digital Millennium Copyright Act (17 U.S.C. § 512) ("DMCA"), the written notice (the "DMCA Notice") must include substantially the following:

    -
  • Your physical or electronic signature.
  • -
  • Identification of the copyrighted work you believe to have been infringed or, if the claim involves multiple works on the Website, a representative list of such works.
  • -
  • Identification of the material you believe to be infringing in a sufficiently precise manner to allow us to locate that material.
  • -
  • Adequate information by which we can contact you (including your name, postal address, telephone number, and, if available, email address).
  • -
  • A statement that you have a good faith belief that use of the copyrighted material is not authorized by the copyright owner, its agent, or the law.
  • -
  • A statement that the information in the written notice is accurate.
  • -
  • A statement, under penalty of perjury, that you are authorized to act on behalf of the copyright owner.
  • +
  • Your physical or electronic signature.
  • +
  • Identification of the copyrighted work you believe to have been infringed or, if the claim involves multiple works on the Website, a representative list of such works.
  • +
  • Identification of the material you believe to be infringing in a sufficiently precise manner to allow us to locate that material.
  • +
  • Adequate information by which we can contact you (including your name, postal address, telephone number, and, if available, email address).
  • +
  • A statement that you have a good faith belief that use of the copyrighted material is not authorized by the copyright owner, its agent, or the law.
  • +
  • A statement that the information in the written notice is accurate.
  • +
  • A statement, under penalty of perjury, that you are authorized to act on behalf of the copyright owner.

Please send copyright notices to

-Your_Entity_Name -
-Your_Street_Address -
-Your_City_State_Zip + Your_Entity_Name
+ Your_Street_Address
+ Your_City_State_Zip

Or via any contact form at the bottom of this page.

If you fail to comply with all of the requirements of Section 512(c)(3) of the DMCA, your DMCA Notice may not be effective.

Please be aware that if you knowingly materially misrepresent that material or activity on the Website is infringing your copyright, you may be held liable for damages (including costs and attorney's fees) under Section 512(f) of the DMCA.

+

Counter Notification Procedures

If you believe that material you posted on the Website was removed or access to it was disabled by mistake or misidentification, you may file a counter notification with us (a "Counter Notice") by submitting written notification to our DMCA address (above) Pursuant to the DMCA, the Counter Notice must include substantially the following:

    -
  • Your physical or electronic signature.
  • -
  • An identification of the material that has been removed or to which access has been disabled and the location at which the material appeared before it was removed or access disabled.
  • -
  • Adequate information by which we can contact you (including your name, postal address, telephone number, and, if available, email address).
  • -
  • A statement under penalty of perjury by you that you have a good faith belief that the material identified above was removed or disabled as a result of a mistake or misidentification of the material to be removed or disabled.
  • -
  • A statement that you will consent to the jurisdiction of the Federal District Court for the judicial district in which your address is located (or if you reside outside the United States for any judicial district in which the Website may be found) and that you will accept service from the person (or an agent of that person) who provided the Website with the complaint at issue.
  • +
  • Your physical or electronic signature.
  • +
  • An identification of the material that has been removed or to which access has been disabled and the location at which the material appeared before it was removed or access disabled.
  • +
  • Adequate information by which we can contact you (including your name, postal address, telephone number, and, if available, email address).
  • +
  • A statement under penalty of perjury by you that you have a good faith belief that the material identified above was removed or disabled as a result of a mistake or misidentification of the material to be removed or disabled.
  • +
  • A statement that you will consent to the jurisdiction of the Federal District Court for the judicial district in which your address is located (or if you reside outside the United States for any judicial district in which the Website may be found) and that you will accept service from the person (or an agent of that person) who provided the Website with the complaint at issue.

The DMCA allows us to restore the removed content if the party filing the original DMCA Notice does not file a court action against you within ten business days of receiving the copy of your Counter Notice.

Please be aware that if you knowingly materially misrepresent that material or activity on the Website was removed or disabled by mistake or misidentification, you may be held liable for damages (including costs and attorney's fees) under Section 512(f) of the DMCA.

+

Repeat Infringers

It is our policy in appropriate circumstances to disable and/or terminate the accounts of users who are repeat infringers.

-
- - diff --git a/static/instance/about.example/index.html b/static/instance/about.example/index.html index aee4a2e19..5efb11fc9 100644 --- a/static/instance/about.example/index.html +++ b/static/instance/about.example/index.html @@ -1,13 +1,8 @@ - - -

About Your_Instance

- +

About Your_Instance

Your_Instance description

-

Your_Instance is a way to join the Fediverse, to be part of a community, and to reclaim your freedom of speech in social media.

Site rules

-

Please refrain from:

  1. Posting anything illegal.
  2. @@ -31,6 +26,3 @@

    Soapbox is free and open source (FOSS) software that runs atop a Pleroma server

    The Soapbox repository can be found at Soapbox-fe

    The Pleroma server repository can be found at Pleroma-be

    -
- - diff --git a/static/instance/about.example/privacy.html b/static/instance/about.example/privacy.html index 231ff77dc..2b9869ba2 100644 --- a/static/instance/about.example/privacy.html +++ b/static/instance/about.example/privacy.html @@ -1,13 +1,11 @@ - - -

PRIVACY POLICY

Last Updated: Your_Update_Date

+

Your_Entity_Name ("Company" or "We") respect your privacy and are committed to protecting it through our compliance with this policy.

-This policy describes the types of information we may collect from you or that you may provide when you visit the website -Your_Instance_Name -and our practices for collecting, using, maintaining, protecting, and disclosing that information. + This policy describes the types of information we may collect from you or that you may provide when you visit the website + Your_Instance_Name + and our practices for collecting, using, maintaining, protecting, and disclosing that information.

This policy applies to information we collect:

On the Website.

@@ -16,106 +14,111 @@ and our practices for collecting, using, maintaining, protecting, and disclosing

When you interact with our advertising and applications on third-party websites and services, if those applications or advertising include links to this policy.

It does not apply to information collected by:

    -
  • Us offline or through any other means, including on any other website operated by Company or any third party (including our affiliates and subsidiaries); or
  • -
  • Any third party (including our affiliates and subsidiaries), including through any application or content (including advertising) that may link to or be accessible from from the Website.
  • -
  • Please read this policy carefully to understand our policies and practices regarding your information and how we will treat it. If you do not agree with our policies and practices, your choice is not to use our Website. By accessing or using this Website, you agree to this privacy policy. This policy may change from time to time (see Changes to our Privacy Policy, below). Your continued use of this Website after we make changes is deemed to be acceptance of those changes, so please check the policy periodically for updates.
  • +
  • Us offline or through any other means, including on any other website operated by Company or any third party (including our affiliates and subsidiaries); or
  • +
  • Any third party (including our affiliates and subsidiaries), including through any application or content (including advertising) that may link to or be accessible from from the Website.
  • +
  • Please read this policy carefully to understand our policies and practices regarding your information and how we will treat it. If you do not agree with our policies and practices, your choice is not to use our Website. By accessing or using this Website, you agree to this privacy policy. This policy may change from time to time (see Changes to our Privacy Policy, below). Your continued use of this Website after we make changes is deemed to be acceptance of those changes, so please check the policy periodically for updates.
+

Children Under the Age of 18

Our Website is not intended for children under 18 years of age. No one under age 18 may provide any information to or on the Website. We do not knowingly collect personal information from children under 18. If you are under 18, do not use or provide any information on this Website, register on the Website, make any purchases through the Website, use any of the interactive or public comment features of this Website, or provide any information about yourself to us, including your name, address, telephone number, email address, or any screen name or user name you may use. If we learn we have collected or received personal information from a child under 18 without verification of parental consent, we will delete that information and any associated accounts. If you believe we might have any information from or about a child under 18, please contact us at support [at] Your_Instance [dot] com.

+

Information We Collect About You and How We Collect It

We collect several types of information from and about users of our Website, including information:

    -
  • By which you may be personally identified, such as an e-mail address ("personal information");
  • -
  • That is about you but individually does not identify you, such as the content of your user profile; and/or
  • -
  • About your internet connection, the equipment you use to access our Website, and usage details.
  • +
  • By which you may be personally identified, such as an e-mail address ("personal information");
  • +
  • That is about you but individually does not identify you, such as the content of your user profile; and/or
  • +
  • About your internet connection, the equipment you use to access our Website, and usage details.
    -
  • We collect this information:
  • -
  • Directly from you when you provide it to us.
  • -
  • Automatically as you navigate through the site. Information collected automatically may include usage details and IP addresses.
  • -
  • From third parties, for example, our business partners.
  • +
  • We collect this information:
  • +
  • Directly from you when you provide it to us.
  • +
  • Automatically as you navigate through the site. Information collected automatically may include usage details and IP addresses.
  • +
  • From third parties, for example, our business partners.
+

Information You Provide to Us

The information we collect on or through our Website may include:

Information that you provide by filling in forms on our Website. This includes information provided at the time of registering to use our Website, subscribing to our service, posting material, or requesting further services. We may also ask you for information when you report a problem with our Website.

Records and copies of your correspondence (including email addresses), if you contact us.

Details of transactions you carry out through our Website and of the fulfillment of your orders. You may be required to provide financial information before placing an order through our Website.

You also may provide information to be published or displayed (hereinafter, "posted") on public areas of the Website, or transmitted to other users of the Website or third parties (collectively, "User Contributions"). The overwhelming majority of User Contributions are public and may be seen by any person who navigates to them. Your User Contributions are posted on and transmitted to others at your own risk. Although you may set certain privacy settings for such information by logging into your account profile, please be aware that no security measures are perfect or impenetrable. Additionally, we cannot control the actions of other users of the Website with whom you may choose to share your User Contributions. Therefore, we cannot and do not guarantee that your User Contributions will not be viewed by unauthorized persons.

+

Information We Collect Through Automatic Data Collection

As you navigate through and interact with our Website, we may use automatic data collection technologies to collect certain information about your equipment, browsing actions, and patterns, including:

    -
  • Details of your visits to our Website, including traffic data, logs, and other communication data and the resources that you access and use on the Website.
  • -
  • Information about your computer and internet connection, including your IP address, operating system, and browser type.
  • +
  • Details of your visits to our Website, including traffic data, logs, and other communication data and the resources that you access and use on the Website.
  • +
  • Information about your computer and internet connection, including your IP address, operating system, and browser type.

The information we collect automatically may be only statistical data and may not include personal information. It helps us to improve our Website and to deliver a better and more personalized service, including by enabling us to:

    -
  • Estimate our audience size and usage patterns.
  • -
  • Store information about your preferences, allowing us to customize our Website according to your individual interests.
  • -
  • Speed up your searches.
  • -
  • Recognize you when you return to our Website.
  • +
  • Estimate our audience size and usage patterns.
  • +
  • Store information about your preferences, allowing us to customize our Website according to your individual interests.
  • +
  • Speed up your searches.
  • +
  • Recognize you when you return to our Website.

The technologies we use for this automatic data collection may include:

-
    -
  • Cookies (or browser cookies). A cookie is a small file placed on the hard drive of your computer. You may refuse to accept browser cookies by activating the appropriate setting on your browser. However, if you select this setting you may be unable to access certain parts of our Website. Unless you have adjusted your browser setting so that it will refuse cookies, our system will issue cookies when you direct your browser to our Website.
  • -
  • We do not collect personal information automatically, but we may tie this information to personal information about you that we collect from other sources or you provide to us.
  • +
      +
    • Cookies (or browser cookies). A cookie is a small file placed on the hard drive of your computer. You may refuse to accept browser cookies by activating the appropriate setting on your browser. However, if you select this setting you may be unable to access certain parts of our Website. Unless you have adjusted your browser setting so that it will refuse cookies, our system will issue cookies when you direct your browser to our Website.
    • +
    • We do not collect personal information automatically, but we may tie this information to personal information about you that we collect from other sources or you provide to us.
    +

    How We Use Your Information

    We use information that we collect about you or that you provide to us, including any personal information:

      -
    • To present our Website and its contents to you.
    • -
    • To provide you with information about our products or services.
    • -
    • To fulfill any other purpose for which you provide it.
    • -
    • To provide you with notices about your account, including expiration and renewal notices.
    • -
    • To carry out our obligations and enforce our rights arising from any contracts entered into between you and us, including for billing and collection.
    • -
    • To notify you about changes to our Website or any products or services we offer or provide though it.
    • -
    • To allow you to participate in interactive features on our Website.
    • -
    • In any other way we may describe when you provide the information.
    • -
    • For any other purpose with your consent.
    • +
    • To present our Website and its contents to you.
    • +
    • To provide you with information about our products or services.
    • +
    • To fulfill any other purpose for which you provide it.
    • +
    • To provide you with notices about your account, including expiration and renewal notices.
    • +
    • To carry out our obligations and enforce our rights arising from any contracts entered into between you and us, including for billing and collection.
    • +
    • To notify you about changes to our Website or any products or services we offer or provide though it.
    • +
    • To allow you to participate in interactive features on our Website.
    • +
    • In any other way we may describe when you provide the information.
    • +
    • For any other purpose with your consent.

    We may also use your information to contact you about our own and third-parties' goods and services that may be of interest to you.

    +

    Disclosure of Your Information

    We may disclose aggregated information about our users, and information that does not identify any individual, without restriction.

    It is the policy of the Company to not provide any user data to any person unless compelled by a court order issued by a U.S. court, except in cases of life-threatening emergency. The Company reserves the right to change or deviate from this policy at any time, in its sole and absolute discretion, with or without notice to you.

    We may disclose personal information that we collect or you provide as described in this privacy policy:

      -
    • To our subsidiaries and affiliates.
    • -
    • To contractors, service providers, and other third parties we use to support our business and who are bound by contractual obligations to keep personal information confidential and use it only for the purposes for which we disclose it to them.
    • -
    • To a buyer or other successor in the event of a merger, divestiture, restructuring, reorganization, dissolution, or other sale or transfer of some or all of Your_Entity_Name's assets, whether as a going concern or as part of bankruptcy, liquidation, or similar proceeding, in which personal information held by Your_Entity_Name about our Website users is among the assets transferred.
    • -
    • To fulfill the purpose for which you provide it.
    • -
    • For any other purpose disclosed by us when you provide the information.
    • -
    • With your consent.
    • -
    • We may also disclose your personal information:
    • -
    • To comply with any court order, law, or legal process, including to respond to any government or regulatory request.
    • -
    • -To enforce or apply our -Terms of Service -and other agreements, including for billing and collection purposes. -
    • -
    • If we believe disclosure is necessary or appropriate to protect the rights, property, or safety of Your_Entity_Name, our employees, our customers, or any other person.
    • +
    • To our subsidiaries and affiliates.
    • +
    • To contractors, service providers, and other third parties we use to support our business and who are bound by contractual obligations to keep personal information confidential and use it only for the purposes for which we disclose it to them.
    • +
    • To a buyer or other successor in the event of a merger, divestiture, restructuring, reorganization, dissolution, or other sale or transfer of some or all of Your_Entity_Name's assets, whether as a going concern or as part of bankruptcy, liquidation, or similar proceeding, in which personal information held by Your_Entity_Name about our Website users is among the assets transferred.
    • +
    • To fulfill the purpose for which you provide it.
    • +
    • For any other purpose disclosed by us when you provide the information.
    • +
    • With your consent.
    • +
    • We may also disclose your personal information:
    • +
    • To comply with any court order, law, or legal process, including to respond to any government or regulatory request.
    • +
    • + To enforce or apply our + Terms of Service + and other agreements, including for billing and collection purposes. +
    • +
    • If we believe disclosure is necessary or appropriate to protect the rights, property, or safety of Your_Entity_Name, our employees, our customers, or any other person.
    +

    Accessing, Correcting and Deleting Your Information

    You can review and change your personal information by logging into the Website and visiting your account profile page.

    You may also send us an email at support [at] Your_Instance_URL [dot] Your_Instance_TLD to request access to, correct or delete any personal information that you have provided to us. We cannot delete your personal information except by also deleting your user account. We may not accommodate a request to change information if we believe the change would violate any law or legal requirement or cause the information to be incorrect.

    -If you delete your User Contributions from the Website, copies of your User Contributions may remain viewable in cached and archived pages, or might have been copied or stored by other Website users. Proper access and use of information provided on the Website, including User Contributions, is governed by our -Terms of Service. + If you delete your User Contributions from the Website, copies of your User Contributions may remain viewable in cached and archived pages, or might have been copied or stored by other Website users. Proper access and use of information provided on the Website, including User Contributions, is governed by our + Terms of Service.

    +

    Data Security

    We have implemented measures designed to secure your personal information from accidental loss and from unauthorized access, use, alteration, and disclosure. All information you provide to us is stored on our secure servers behind firewalls. Any payment transactions will be encrypted using SSL.

    The safety and security of your information also depends on you. Most information on the Website is public. Where we have given you (or where you have chosen) a password for access to certain parts of our Website, you are responsible for keeping this password confidential. We ask you not to share your password with anyone. We urge you to be careful about giving out information in public areas of the Website like message boards. The information you share in public areas may be viewed by any user of the Website, whether that user is registered on the site or not.

    Unfortunately, the transmission of information via the internet is not completely secure. Although we do our best to protect your personal information, we cannot guarantee the security of your personal information transmitted to our Website. Any transmission of personal information is at your own risk. We are not responsible for circumvention of any privacy settings or security measures contained on the Website.

    +

    Changes to Our Privacy Policy

    It is our policy to post any changes we make to our privacy policy on this page with a notice that the privacy policy has been updated on the Website home page. If we make material changes to how we treat our users’ personal information, we will notify you through a notice on the Website home page. The date the privacy policy was last revised is identified at the top of the page. You are responsible for ensuring we have an up-to-date active and deliverable email address for you, and for periodically visiting our Website and this privacy policy to check for any changes.

    +

    Contact Information

    To ask questions or comment about this privacy policy and our privacy practices, contact us at

    -Your_Entity_Name -
    -Your_Street_Address -
    -Your_City_State_Zip + Your_Entity_Name
    + Your_Street_Address
    + Your_City_State_Zip

    Or by any contact form at the bottom of this page.

    -
- - diff --git a/static/instance/about.example/tos.html b/static/instance/about.example/tos.html index 0cf38c355..85464c282 100644 --- a/static/instance/about.example/tos.html +++ b/static/instance/about.example/tos.html @@ -1,11 +1,9 @@ - - -

Terms of Service

By using this web site, you agree to these Terms of Use, to our Copyright Policy, and to our Privacy Policy.

+

Our Terms of Use are simple:

  • @@ -28,6 +26,3 @@ You are liable for what you post, and we are not liable for it.
-
- - From 1629b52cfc9d3ce5976323da5716d8ee10476adc Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 12 Jun 2020 14:54:00 -0500 Subject: [PATCH 08/17] Fix styles: disabled toggle --- app/styles/components/react-toggle.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/styles/components/react-toggle.scss b/app/styles/components/react-toggle.scss index e6bd7db7b..699b6e86d 100644 --- a/app/styles/components/react-toggle.scss +++ b/app/styles/components/react-toggle.scss @@ -32,7 +32,7 @@ height: 24px; padding: 0; border-radius: 30px; - background-color: var(--brand-color); + background-color: var(--foreground-color); transition: background-color 0.2s ease; } From 4a878d49dc1b54975cbe04e2db09453a3c8bf778 Mon Sep 17 00:00:00 2001 From: Sean King Date: Fri, 12 Jun 2020 20:58:20 +0000 Subject: [PATCH 09/17] Fix customization.md soapbox example typo --- docs/customization.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/customization.md b/docs/customization.md index 85c372165..41903834a 100644 --- a/docs/customization.md +++ b/docs/customization.md @@ -37,7 +37,7 @@ After editing your HTML files and folder names, re-create the webpack and restar Following is an example of the contents of `soapbox.example.json`: ``` { - "logo": ""/instance/images/soapbox-logo.svg", + "logo": "/instance/images/soapbox-logo.svg", "brandColor": "#0482d8", "promoPanel": { "items": [{ From 77d02b790d941f5006a3bfc0505d35ca2e8ccd68 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 12 Jun 2020 16:31:38 -0500 Subject: [PATCH 10/17] Update customization docs --- docs/customization.md | 96 ++++++++++++++++++++++--------------------- 1 file changed, 50 insertions(+), 46 deletions(-) diff --git a/docs/customization.md b/docs/customization.md index 41903834a..57a4c8345 100644 --- a/docs/customization.md +++ b/docs/customization.md @@ -1,41 +1,17 @@ # Customizing Soapbox -First [Install Soapbox](https://soapbox.pub/) +If you haven't already, [install Soapbox](https://soapbox.pub/). -Soapbox supports customization of the user interface, to allow per instance branding and other features. Current customization features include: -* Instance name -* Site logo -* Promo panel list items, e.g. blog site link -* Favicon -* About page -* Terms of Service page -* Privacy Policy page -* Copyright Policy page -* Soapbox extensions -* Default settings +There are two main places Soapbox gets its configuration: -## Instance Name -Instance name is edited during the Pleroma installation step or via admin configuration +- `/opt/pleroma/config/prod.secret.exs` -## Instance Description -Instance description is edited during the Pleroma installation step or via admin configuration +- `/opt/pleroma/instance/static/instance/soapbox.json` -## Captcha on Registration Page -Use of the Captcha feature on the registration page is configured during the Pleroma installation step or via admin configuration +Logos, branding, etc. take place in the `soapbox.json` file. +For example: -## Site Logo, Brand Color, and Promo Panel List Items -The site logo, brand color, and promo panel list items are customized by copying `soapbox.example.json` in the `static/instance` folder to `soapbox.json` and editing that file. It is recommended that you test your edited soapbox.json file in a JSON validator, such as [JSONLint](https://jsonlint.com/), before using it. -The site logo, in SVG format, is rendered to be able to allow the site theme colors to appear in the less than 100% opaque sections of the logo. -The logo colors are rendered in a color that provides contrast for the site theme. - -The `navlinks` section of the `soapbox.json` file references the links that are displayed at the bottom of the Registration/Login, About, Terms of Service, Privacy Policy and Copyright Policy (DMCA) pages. - -The `brandColor` in `soapbox.json` refers to the main color upon which the look of soapbox-fe is defined. - -After editing your HTML files and folder names, re-create the webpack and restart the soapbox-fe service to effect the changes. - -Following is an example of the contents of `soapbox.example.json`: -``` +```json { "logo": "/instance/images/soapbox-logo.svg", "brandColor": "#0482d8", @@ -55,9 +31,9 @@ Following is an example of the contents of `soapbox.example.json`: }, "defaultSettings": { "autoPlayGif": false, - "theme": "light" + "themeMode": "light" }, - "copyright": "?2020. Copying is an act of love. Please copy and share.", + "copyright": "♡2020. Copying is an act of love. Please copy and share.", "navlinks": { "homeFooter": [ { "title": "About", "url": "/about" }, @@ -70,24 +46,52 @@ Following is an example of the contents of `soapbox.example.json`: } ``` +Customizable features include: + +* Instance name +* Site logo +* Promo panel list items, e.g. blog site link +* Favicon +* About pages +* Default user settings + +## Instance Name +Instance name is edited during the Pleroma installation step or via AdminFE. + +## Instance Description +Instance description is edited during the Pleroma installation step or via AdminFE. + +## Captcha on Registration Page +Use of the Captcha feature on the registration page is configured during the Pleroma installation step or via AdminFE. + +## Site Logo, Brand Color, and Promo Panel List Items +The site logo, brand color, and promo panel list items are customized by copying `soapbox.example.json` in the `static/instance` folder to `soapbox.json` and editing that file. It is recommended that you test your edited soapbox.json file in a JSON validator, such as [JSONLint](https://jsonlint.com/), before using it. +The site logo, in SVG format, is rendered to be able to allow the site theme colors to appear in the less than 100% opaque sections of the logo. +The logo colors are rendered in a color that provides contrast for the site theme. + +The `navlinks` section of the `soapbox.json` file references the links that are displayed at the bottom of the Registration/Login, About, Terms of Service, Privacy Policy and Copyright Policy (DMCA) pages. + +The `brandColor` in `soapbox.json` refers to the main color upon which the look of soapbox-fe is defined. + +After editing your HTML files and folder names, re-create the webpack and restart the soapbox-fe service to effect the changes. + ## Favicon -The favicon is customized by dropping a favicon.png file into the `/static` folder. +The favicon is customized by dropping a favicon.png file into the `/static` folder. Re-create the webpack and start the soapbox-fe service to effect the changes. -## About Page, Terms of Service Page, Privacy Policy Page and Copyright Policy (DMCA) Page -These pages are all available for editing in the `static/instance/about.example` folder, as template files, named as: +## About Pages +Soapbox supports any number of custom HTML pages under `yoursite.com/about/:slug`. + +The finder will search `/opt/pleroma/instance/static/instance/about/:slug.html` to find your page. +Use the name `index.html` for the root page. + +Example templates are available for editing in the `static/instance/about.example` folder, such as: * index.html * tos.html * privacy.html * dmca.html - -The `soapbox.json` file navlinks section's default URL valuess are pointing to the above file location, when the `about.example` folder is renamed to `about` + +Simply rename `about.example` to `about`, or create your own. + +The `soapbox.json` file navlinks section's default URL values are pointing to the above file location, when the `about.example` folder is renamed to `about` These four template files have placeholders in them, e.g. "Your_Instance", that should be edited to match your Soapbox instance configuration, and will be meaningless to your users until you edit them. - -These pages will not become available resources on your instance until you rename the `static/instance/about.example` folder to `static/instance/about`, re-create the webpack and start the soapbox-fe service. - -## Source Code Link -The Source Code link in the `soapbox.json` file, if used, references a bookmark in the `index.html` file in the `about` folder. The template index.html file has a default bookmark and URL defined in it that you can edit. - - - From 8c10afad3e80fc4e202562fe6a6bbbd17c9e4b50 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 12 Jun 2020 16:46:46 -0500 Subject: [PATCH 11/17] Fix empty column display --- app/soapbox/components/scrollable_list.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/soapbox/components/scrollable_list.js b/app/soapbox/components/scrollable_list.js index d5e4975a1..cce6bd6df 100644 --- a/app/soapbox/components/scrollable_list.js +++ b/app/soapbox/components/scrollable_list.js @@ -271,7 +271,7 @@ export default class ScrollableList extends PureComponent { {alwaysPrepend && prepend}
- {emptyMessage} +
{emptyMessage}
); From 06ea73b363d97ee75dc1174a4595cde8a7c5f971 Mon Sep 17 00:00:00 2001 From: Curtis Date: Fri, 12 Jun 2020 22:23:51 +0000 Subject: [PATCH 12/17] Update customization.md to include fork awesome font reference and refresh browser reference --- docs/customization.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/customization.md b/docs/customization.md index 57a4c8345..194da8ae2 100644 --- a/docs/customization.md +++ b/docs/customization.md @@ -66,6 +66,9 @@ Use of the Captcha feature on the registration page is configured during the Ple ## Site Logo, Brand Color, and Promo Panel List Items The site logo, brand color, and promo panel list items are customized by copying `soapbox.example.json` in the `static/instance` folder to `soapbox.json` and editing that file. It is recommended that you test your edited soapbox.json file in a JSON validator, such as [JSONLint](https://jsonlint.com/), before using it. + +The icon names for the promo panel list items can be source from [Fork Awesome](https://forkaweso.me/Fork-Awesome/icons/). Note that you should hover over or click a selected icon to see what the icon's real name is, e.g. `world` + The site logo, in SVG format, is rendered to be able to allow the site theme colors to appear in the less than 100% opaque sections of the logo. The logo colors are rendered in a color that provides contrast for the site theme. @@ -73,11 +76,10 @@ The `navlinks` section of the `soapbox.json` file references the links that are The `brandColor` in `soapbox.json` refers to the main color upon which the look of soapbox-fe is defined. -After editing your HTML files and folder names, re-create the webpack and restart the soapbox-fe service to effect the changes. +After editing your HTML files and folder names, save the file and refresh your browser. ## Favicon -The favicon is customized by dropping a favicon.png file into the `/static` folder. -Re-create the webpack and start the soapbox-fe service to effect the changes. +The favicon is customized by dropping a favicon.png file into the `/static` folder and refreshing your browser. ## About Pages Soapbox supports any number of custom HTML pages under `yoursite.com/about/:slug`. From aa0a4e49bed933773fc0cb63339a273926724158 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 12 Jun 2020 18:43:48 -0500 Subject: [PATCH 13/17] Disable "Embed" button for now, fixes #192 --- app/soapbox/components/status_action_bar.js | 3 +-- app/soapbox/features/status/components/action_bar.js | 2 +- app/soapbox/features/ui/components/embed_modal.js | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/soapbox/components/status_action_bar.js b/app/soapbox/components/status_action_bar.js index 39d09d91b..807c8f3cf 100644 --- a/app/soapbox/components/status_action_bar.js +++ b/app/soapbox/components/status_action_bar.js @@ -1,4 +1,3 @@ - import React from 'react'; import { connect } from 'react-redux'; import ImmutablePropTypes from 'react-immutable-proptypes'; @@ -244,7 +243,7 @@ class StatusActionBar extends ImmutablePureComponent { if (publicStatus) { menu.push({ text: intl.formatMessage(messages.copy), action: this.handleCopy }); - menu.push({ text: intl.formatMessage(messages.embed), action: this.handleEmbed }); + // menu.push({ text: intl.formatMessage(messages.embed), action: this.handleEmbed }); } if (!me) { diff --git a/app/soapbox/features/status/components/action_bar.js b/app/soapbox/features/status/components/action_bar.js index a06349c0d..c5db0cab5 100644 --- a/app/soapbox/features/status/components/action_bar.js +++ b/app/soapbox/features/status/components/action_bar.js @@ -236,7 +236,7 @@ class ActionBar extends React.PureComponent { if (publicStatus) { menu.push({ text: intl.formatMessage(messages.copy), action: this.handleCopy }); - menu.push({ text: intl.formatMessage(messages.embed), action: this.handleEmbed }); + // menu.push({ text: intl.formatMessage(messages.embed), action: this.handleEmbed }); menu.push(null); } diff --git a/app/soapbox/features/ui/components/embed_modal.js b/app/soapbox/features/ui/components/embed_modal.js index cfb83f347..86b79e2f3 100644 --- a/app/soapbox/features/ui/components/embed_modal.js +++ b/app/soapbox/features/ui/components/embed_modal.js @@ -2,7 +2,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { FormattedMessage, injectIntl } from 'react-intl'; -import api from '../../../api'; +import axios from 'axios'; export default @injectIntl class EmbedModal extends ImmutablePureComponent { @@ -24,7 +24,7 @@ class EmbedModal extends ImmutablePureComponent { this.setState({ loading: true }); - api().post('/api/web/embed', { url }).then(res => { + axios.post('/api/web/embed', { url }).then(res => { this.setState({ loading: false, oembed: res.data }); const iframeDocument = this.iframe.contentWindow.document; From 741b27195e87cc399dc72fa1dd3e7cd04afa5602 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 12 Jun 2020 20:10:07 -0500 Subject: [PATCH 14/17] Account Gallery: Fix "view context" button, fixes #193 --- app/soapbox/features/account_gallery/index.js | 2 +- app/soapbox/features/ui/components/media_modal.js | 6 +++++- app/soapbox/selectors/index.js | 7 +++++-- app/styles/components/modal.scss | 2 +- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/app/soapbox/features/account_gallery/index.js b/app/soapbox/features/account_gallery/index.js index caa361e3b..de2213b07 100644 --- a/app/soapbox/features/account_gallery/index.js +++ b/app/soapbox/features/account_gallery/index.js @@ -137,7 +137,7 @@ class AccountGallery extends ImmutablePureComponent { const media = attachment.getIn(['status', 'media_attachments']); const index = media.findIndex(x => x.get('id') === attachment.get('id')); - this.props.dispatch(openModal('MEDIA', { media, index, status: attachment.get('status') })); + this.props.dispatch(openModal('MEDIA', { media, index, status: attachment.get('status'), account: attachment.get('account') })); } } diff --git a/app/soapbox/features/ui/components/media_modal.js b/app/soapbox/features/ui/components/media_modal.js index e0cdc39c4..a209d8fee 100644 --- a/app/soapbox/features/ui/components/media_modal.js +++ b/app/soapbox/features/ui/components/media_modal.js @@ -25,6 +25,7 @@ class MediaModal extends ImmutablePureComponent { static propTypes = { media: ImmutablePropTypes.list.isRequired, status: ImmutablePropTypes.map, + account: ImmutablePropTypes.map, index: PropTypes.number.isRequired, onClose: PropTypes.func.isRequired, intl: PropTypes.object.isRequired, @@ -110,7 +111,10 @@ class MediaModal extends ImmutablePureComponent { handleStatusClick = e => { if (e.button === 0 && !(e.ctrlKey || e.metaKey)) { e.preventDefault(); - this.context.router.history.push(`/@${this.props.status.getIn(['account', 'acct'])}/posts/${this.props.status.get('id')}`); + const { status, account } = this.props; + const acct = account.get('acct'); + const statusId = status.get('id'); + this.context.router.history.push(`/@${acct}/posts/${statusId}`); } } diff --git a/app/soapbox/selectors/index.js b/app/soapbox/selectors/index.js index 0ee8a7ca4..0353cd177 100644 --- a/app/soapbox/selectors/index.js +++ b/app/soapbox/selectors/index.js @@ -135,11 +135,14 @@ export const makeGetNotification = () => { export const getAccountGallery = createSelector([ (state, id) => state.getIn(['timelines', `account:${id}:media`, 'items'], ImmutableList()), state => state.get('statuses'), -], (statusIds, statuses) => { + state => state.get('accounts'), +], (statusIds, statuses, accounts) => { return statusIds.reduce((medias, statusId) => { const status = statuses.get(statusId); + const account = accounts.get(status.get('account')); if (status.get('reblogged') !== false) return medias; - return medias.concat(status.get('media_attachments').map(media => media.set('status', status))); + return medias.concat(status.get('media_attachments') + .map(media => media.merge({ status, account }))); }, ImmutableList()); }); diff --git a/app/styles/components/modal.scss b/app/styles/components/modal.scss index c0d22c5ce..6d1cf7c5c 100644 --- a/app/styles/components/modal.scss +++ b/app/styles/components/modal.scss @@ -143,7 +143,7 @@ a { text-decoration: none; font-weight: 500; - color: var(--background-color); + color: #fff; &:hover, &:focus, From 3179eacadd6bb30c6e3e67294393256fccccb166 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 12 Jun 2020 20:47:43 -0500 Subject: [PATCH 15/17] Account Media: Filter non-owned media for other users --- app/soapbox/selectors/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/soapbox/selectors/index.js b/app/soapbox/selectors/index.js index 0353cd177..c8bc22424 100644 --- a/app/soapbox/selectors/index.js +++ b/app/soapbox/selectors/index.js @@ -141,7 +141,7 @@ export const getAccountGallery = createSelector([ return statusIds.reduce((medias, statusId) => { const status = statuses.get(statusId); const account = accounts.get(status.get('account')); - if (status.get('reblogged') !== false) return medias; + if (status.get('reblog')) return medias; return medias.concat(status.get('media_attachments') .map(media => media.merge({ status, account }))); }, ImmutableList()); From b4532ccb4096ef3983847c7ea02ce6a221d35291 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 12 Jun 2020 22:04:20 -0500 Subject: [PATCH 16/17] Conversations: Change the way otherAccounts is handled Fixes #191 --- app/soapbox/components/display_name.js | 10 ++-------- app/soapbox/components/status.js | 2 +- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/app/soapbox/components/display_name.js b/app/soapbox/components/display_name.js index a376dc761..1016c9f5a 100644 --- a/app/soapbox/components/display_name.js +++ b/app/soapbox/components/display_name.js @@ -11,9 +11,9 @@ export default class DisplayName extends React.PureComponent { }; render() { - const { others } = this.props; + const { account, others } = this.props; - let displayName, suffix, account; + let displayName, suffix; if (others && others.size > 1) { displayName = others.take(2).map(a => [ @@ -27,12 +27,6 @@ export default class DisplayName extends React.PureComponent { suffix = `+${others.size - 2}`; } } else { - if (others && others.size > 0) { - account = others.first(); - } else { - account = this.props.account; - } - displayName = ( <> diff --git a/app/soapbox/components/status.js b/app/soapbox/components/status.js index 848082da6..bc0dc1cbc 100644 --- a/app/soapbox/components/status.js +++ b/app/soapbox/components/status.js @@ -386,7 +386,7 @@ class Status extends ImmutablePureComponent { ); } - if (otherAccounts && otherAccounts.size > 0) { + if (otherAccounts && otherAccounts.size > 1) { statusAvatar = ; } else if (account === undefined || account === null) { statusAvatar = ; From 5ea6aaf48e9d8001f4644c147d9202e208a0a32d Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sat, 13 Jun 2020 10:16:43 -0500 Subject: [PATCH 17/17] EditProfile: Remove display name limits, redirect /user-settings --- app/soapbox/features/edit_profile/index.js | 2 -- app/soapbox/features/ui/index.js | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/soapbox/features/edit_profile/index.js b/app/soapbox/features/edit_profile/index.js index a37cb87c2..bd908afd4 100644 --- a/app/soapbox/features/edit_profile/index.js +++ b/app/soapbox/features/edit_profile/index.js @@ -170,8 +170,6 @@ class EditProfile extends ImmutablePureComponent { label={} name='display_name' value={this.state.display_name} - maxLength={30} - size={30} onChange={this.handleTextChange} /> */} - {/* Redirects for non-static Pleroma FE config*/} + {/* Redirects from Pleroma FE, etc. to fix old bookmarks */} +