From 32b43a96a774c169dd3023570656a5f89d10bb6d Mon Sep 17 00:00:00 2001 From: kedama Date: Mon, 28 Nov 2022 04:36:21 +0900 Subject: [Glitch] Fix status mismatch of sensitive check Port 14e2354eeaf1f89a0f81302aa92661977be15daf to glitch-soc Signed-off-by: Claire --- app/javascript/flavours/glitch/reducers/compose.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/javascript/flavours') diff --git a/app/javascript/flavours/glitch/reducers/compose.js b/app/javascript/flavours/glitch/reducers/compose.js index 1edc70add..b1c792406 100644 --- a/app/javascript/flavours/glitch/reducers/compose.js +++ b/app/javascript/flavours/glitch/reducers/compose.js @@ -578,6 +578,10 @@ export default function compose(state = initialState, action) { if (action.status.get('spoiler_text').length > 0) { map.set('spoiler', true); map.set('spoiler_text', action.status.get('spoiler_text')); + + if (map.get('media_attachments').size >= 1) { + map.set('sensitive', true); + } } else { map.set('spoiler', false); map.set('spoiler_text', ''); -- cgit From c0bf90ac19fd4e8d6b11b8e4f3d48174f15ca57e Mon Sep 17 00:00:00 2001 From: Claire Date: Sun, 27 Nov 2022 20:42:17 +0100 Subject: [Glitch] Fix “Share @{name}'s profile” profile menu item MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Port fe421257e5e9e3225393f544da0437596aa9a61b to glitch-soc Signed-off-by: Claire --- .../flavours/glitch/features/account/components/header.js | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'app/javascript/flavours') diff --git a/app/javascript/flavours/glitch/features/account/components/header.js b/app/javascript/flavours/glitch/features/account/components/header.js index 47c074ec3..9a5f2fd62 100644 --- a/app/javascript/flavours/glitch/features/account/components/header.js +++ b/app/javascript/flavours/glitch/features/account/components/header.js @@ -141,6 +141,17 @@ class Header extends ImmutablePureComponent { } } + handleShare = () => { + const { account } = this.props; + + navigator.share({ + text: `${titleFromAccount(account)}\n${account.get('note_plain')}`, + url: account.get('url'), + }).catch((e) => { + if (e.name !== 'AbortError') console.error(e); + }); + } + render () { const { account, hidden, intl, domain } = this.props; const { signedIn } = this.context.identity; -- cgit From 2815ac41557864932d163d52f67ff4aee7b834fb Mon Sep 17 00:00:00 2001 From: James Adney Date: Sun, 27 Nov 2022 11:46:23 -0800 Subject: [Glitch] fix gif autoplay on iOS Port c0dcf15d1ec357cedd89025a1b210bdc21422b59 to glitch-soc Signed-off-by: Claire --- app/javascript/flavours/glitch/components/media_gallery.js | 4 ++-- .../flavours/glitch/features/account_gallery/components/media_item.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'app/javascript/flavours') diff --git a/app/javascript/flavours/glitch/components/media_gallery.js b/app/javascript/flavours/glitch/components/media_gallery.js index 5414b4858..ac0d05926 100644 --- a/app/javascript/flavours/glitch/components/media_gallery.js +++ b/app/javascript/flavours/glitch/components/media_gallery.js @@ -4,7 +4,6 @@ import PropTypes from 'prop-types'; import { is } from 'immutable'; import IconButton from './icon_button'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; -import { isIOS } from '../is_mobile'; import classNames from 'classnames'; import { autoPlayGif, displayMedia, useBlurhash } from 'flavours/glitch/initial_state'; import { debounce } from 'lodash'; @@ -202,7 +201,7 @@ class Item extends React.PureComponent { ); } else if (attachment.get('type') === 'gifv') { - const autoPlay = !isIOS() && this.getAutoPlay(); + const autoPlay = this.getAutoPlay(); thumbnail = (
@@ -216,6 +215,7 @@ class Item extends React.PureComponent { onMouseEnter={this.handleMouseEnter} onMouseLeave={this.handleMouseLeave} autoPlay={autoPlay} + playsInline loop muted /> diff --git a/app/javascript/flavours/glitch/features/account_gallery/components/media_item.js b/app/javascript/flavours/glitch/features/account_gallery/components/media_item.js index a16ee4806..f7a7fd467 100644 --- a/app/javascript/flavours/glitch/features/account_gallery/components/media_item.js +++ b/app/javascript/flavours/glitch/features/account_gallery/components/media_item.js @@ -2,7 +2,6 @@ import Blurhash from 'flavours/glitch/components/blurhash'; import classNames from 'classnames'; import Icon from 'flavours/glitch/components/icon'; import { autoPlayGif, displayMedia, useBlurhash } from 'flavours/glitch/initial_state'; -import { isIOS } from 'flavours/glitch/is_mobile'; import PropTypes from 'prop-types'; import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; @@ -109,7 +108,8 @@ export default class MediaItem extends ImmutablePureComponent { src={attachment.get('url')} onMouseEnter={this.handleMouseEnter} onMouseLeave={this.handleMouseLeave} - autoPlay={!isIOS() && autoPlayGif} + autoPlay={autoPlayGif} + playsInline loop muted /> -- cgit From 98c5ca1037d4058e4666606b0ee319a825b7c904 Mon Sep 17 00:00:00 2001 From: Claire Date: Sun, 27 Nov 2022 20:48:12 +0100 Subject: [Glitch] Fix infinite loading instead of soft 404 for non-existing remote accounts Port 3ffaa966b0ba11b318e9a93b41854aa765d2ed5c to glitch-soc Signed-off-by: Claire --- app/javascript/flavours/glitch/features/account_timeline/index.js | 8 +++++++- app/javascript/flavours/glitch/reducers/accounts_map.js | 3 +++ 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'app/javascript/flavours') diff --git a/app/javascript/flavours/glitch/features/account_timeline/index.js b/app/javascript/flavours/glitch/features/account_timeline/index.js index b735af0ac..b79082f00 100644 --- a/app/javascript/flavours/glitch/features/account_timeline/index.js +++ b/app/javascript/flavours/glitch/features/account_timeline/index.js @@ -25,7 +25,13 @@ const emptyList = ImmutableList(); const mapStateToProps = (state, { params: { acct, id, tagged }, withReplies = false }) => { const accountId = id || state.getIn(['accounts_map', normalizeForLookup(acct)]); - if (!accountId) { + if (accountId === null) { + return { + isLoading: false, + isAccount: false, + statusIds: emptyList, + }; + } else if (!accountId) { return { isLoading: true, statusIds: emptyList, diff --git a/app/javascript/flavours/glitch/reducers/accounts_map.js b/app/javascript/flavours/glitch/reducers/accounts_map.js index 53e08c8fb..444bbda19 100644 --- a/app/javascript/flavours/glitch/reducers/accounts_map.js +++ b/app/javascript/flavours/glitch/reducers/accounts_map.js @@ -1,4 +1,5 @@ import { ACCOUNT_IMPORT, ACCOUNTS_IMPORT } from '../actions/importer'; +import { ACCOUNT_LOOKUP_FAIL } from '../actions/accounts'; import { Map as ImmutableMap } from 'immutable'; export const normalizeForLookup = str => str.toLowerCase(); @@ -7,6 +8,8 @@ const initialState = ImmutableMap(); export default function accountsMap(state = initialState, action) { switch(action.type) { + case ACCOUNT_LOOKUP_FAIL: + return action.error?.response?.status === 404 ? state.set(normalizeForLookup(action.acct), null) : state; case ACCOUNT_IMPORT: return state.set(normalizeForLookup(action.account.acct), action.account.id); case ACCOUNTS_IMPORT: -- cgit From f51990bd62f434f377b5bbcbaa0ea205a87af403 Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Sun, 27 Nov 2022 15:49:32 -0700 Subject: [Glitch] Make the 'Trending now' header a link to Explore. Port cec1e902e006730f68bde0a4334e5b819a12a475 to glitch-soc Signed-off-by: Claire --- .../glitch/features/getting_started/components/trends.js | 7 ++++++- app/javascript/flavours/glitch/styles/components/index.scss | 10 +++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) (limited to 'app/javascript/flavours') diff --git a/app/javascript/flavours/glitch/features/getting_started/components/trends.js b/app/javascript/flavours/glitch/features/getting_started/components/trends.js index ce4d94c64..d7e222d71 100644 --- a/app/javascript/flavours/glitch/features/getting_started/components/trends.js +++ b/app/javascript/flavours/glitch/features/getting_started/components/trends.js @@ -4,6 +4,7 @@ import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { ImmutableHashtag as Hashtag } from 'flavours/glitch/components/hashtag'; import { FormattedMessage } from 'react-intl'; +import { Link } from 'react-router-dom'; export default class Trends extends ImmutablePureComponent { @@ -36,7 +37,11 @@ export default class Trends extends ImmutablePureComponent { return (
-

+

+ + + +

{trends.take(3).map(hashtag => )}
diff --git a/app/javascript/flavours/glitch/styles/components/index.scss b/app/javascript/flavours/glitch/styles/components/index.scss index b00038afd..80b0598a5 100644 --- a/app/javascript/flavours/glitch/styles/components/index.scss +++ b/app/javascript/flavours/glitch/styles/components/index.scss @@ -1051,12 +1051,16 @@ margin-top: 10px; h4 { + border-bottom: 1px solid lighten($ui-base-color, 8%); + padding: 10px; font-size: 12px; text-transform: uppercase; - color: $darker-text-color; - padding: 10px; font-weight: 500; - border-bottom: 1px solid lighten($ui-base-color, 8%); + + a { + color: $darker-text-color; + text-decoration: none; + } } @media screen and (max-height: 810px) { -- cgit