From 5ee0b51ac8363da1687cc518e80eac53c23b048a Mon Sep 17 00:00:00 2001 From: Masoud Abkenar Date: Tue, 30 Oct 2018 00:47:43 +0100 Subject: RTL: fix preferences page checkbox margins (#9145) * RTL: fix preferences page checkbox margins * Update rtl.scss --- app/javascript/styles/mastodon/rtl.scss | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'app/javascript') diff --git a/app/javascript/styles/mastodon/rtl.scss b/app/javascript/styles/mastodon/rtl.scss index 176fb5ce0..e5621c519 100644 --- a/app/javascript/styles/mastodon/rtl.scss +++ b/app/javascript/styles/mastodon/rtl.scss @@ -199,12 +199,16 @@ body.rtl { margin-left: 5px; } - .simple_form .check_boxes .checkbox label, - .simple_form .input.with_label.boolean label.checkbox { + .simple_form .check_boxes .checkbox label { padding-left: 0; padding-right: 25px; } + .simple_form .input.with_label.boolean label.checkbox { + padding-left: 25px; + padding-right: 0; + } + .simple_form .check_boxes .checkbox input[type="checkbox"], .simple_form .input.boolean input[type="checkbox"] { left: auto; -- cgit From e961a763a2cf722bd5f1311a2de706e28d6c33c6 Mon Sep 17 00:00:00 2001 From: Masoud Abkenar Date: Tue, 30 Oct 2018 00:49:29 +0100 Subject: RTL: fix toot privacy preferences radio buttonss (#9146) --- app/javascript/styles/mastodon/rtl.scss | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app/javascript') diff --git a/app/javascript/styles/mastodon/rtl.scss b/app/javascript/styles/mastodon/rtl.scss index e5621c519..940dc8af2 100644 --- a/app/javascript/styles/mastodon/rtl.scss +++ b/app/javascript/styles/mastodon/rtl.scss @@ -374,4 +374,9 @@ body.rtl { padding-left: 0; padding-right: 10px; } + + .simple_form .input.radio_buttons .radio > label input { + left: auto; + right: 0; + } } -- cgit From 2cc099c70f92a9d845c64996b7ff14f90f55b9e1 Mon Sep 17 00:00:00 2001 From: trwnh Date: Tue, 30 Oct 2018 00:33:02 -0500 Subject: Make detailed-status__wrapper actually wrap detailed status (#8547) * Remove class from scrollable div .detailed-status__wrapper does not actually wrap the detailed status here * Re-add class to focusable div .detailed-status__wrapper now wraps the detailed status instead of the entire scrollable area --- app/javascript/mastodon/features/status/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/javascript') diff --git a/app/javascript/mastodon/features/status/index.js b/app/javascript/mastodon/features/status/index.js index b36d82865..a092f7bb1 100644 --- a/app/javascript/mastodon/features/status/index.js +++ b/app/javascript/mastodon/features/status/index.js @@ -428,11 +428,11 @@ class Status extends ImmutablePureComponent { /> -
+
{ancestors} -
+
Date: Tue, 30 Oct 2018 00:47:43 +0100 Subject: [Glitch] RTL: fix preferences page checkbox margins Port 5ee0b51ac8363da1687cc518e80eac53c23b048a to glitch-soc --- app/javascript/flavours/glitch/styles/rtl.scss | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'app/javascript') diff --git a/app/javascript/flavours/glitch/styles/rtl.scss b/app/javascript/flavours/glitch/styles/rtl.scss index d4618440d..c0079a286 100644 --- a/app/javascript/flavours/glitch/styles/rtl.scss +++ b/app/javascript/flavours/glitch/styles/rtl.scss @@ -210,12 +210,16 @@ body.rtl { margin-left: 5px; } - .simple_form .check_boxes .checkbox label, - .simple_form .input.with_label.boolean label.checkbox { + .simple_form .check_boxes .checkbox label { padding-left: 0; padding-right: 25px; } + .simple_form .input.with_label.boolean label.checkbox { + padding-left: 25px; + padding-right: 0; + } + .simple_form .check_boxes .checkbox input[type="checkbox"], .simple_form .input.boolean input[type="checkbox"] { left: auto; -- cgit From 3aa2418217edf77ccfd499064938896dce4c2bee Mon Sep 17 00:00:00 2001 From: Masoud Abkenar Date: Tue, 30 Oct 2018 00:49:29 +0100 Subject: [Glitch] RTL: fix toot privacy preferences radio buttonss Port e961a763a2cf722bd5f1311a2de706e28d6c33c6 to glitch-soc --- app/javascript/flavours/glitch/styles/rtl.scss | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app/javascript') diff --git a/app/javascript/flavours/glitch/styles/rtl.scss b/app/javascript/flavours/glitch/styles/rtl.scss index c0079a286..9e0a93ec2 100644 --- a/app/javascript/flavours/glitch/styles/rtl.scss +++ b/app/javascript/flavours/glitch/styles/rtl.scss @@ -385,4 +385,9 @@ body.rtl { padding-left: 0; padding-right: 10px; } + + .simple_form .input.radio_buttons .radio > label input { + left: auto; + right: 0; + } } -- cgit From a3d40ba53b1154a8711d625a4ec6162b343a217d Mon Sep 17 00:00:00 2001 From: Quentí <33203663+Quenty31@users.noreply.github.com> Date: Tue, 30 Oct 2018 15:05:01 +0100 Subject: [i18n] Update for Occitan (#9157) * Update oc.json * Update devise.oc.yml * Update oc.yml * Update oc.json --- app/javascript/mastodon/locales/oc.json | 6 +++--- config/locales/devise.oc.yml | 4 ++-- config/locales/oc.yml | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) (limited to 'app/javascript') diff --git a/app/javascript/mastodon/locales/oc.json b/app/javascript/mastodon/locales/oc.json index 64ada60da..93ab4be7d 100644 --- a/app/javascript/mastodon/locales/oc.json +++ b/app/javascript/mastodon/locales/oc.json @@ -157,7 +157,7 @@ "keyboard_shortcuts.legend": "mostrar aquesta legenda", "keyboard_shortcuts.local": "per dobrir lo flux public local", "keyboard_shortcuts.mention": "mencionar l’autor", - "keyboard_shortcuts.muted": "per dorbir la lista dels utilizaires silenciats", + "keyboard_shortcuts.muted": "per dobrir la lista dels utilizaires silenciats", "keyboard_shortcuts.my_profile": "per dobrir vòstre perfil", "keyboard_shortcuts.notifications": "per dobrir la columna de notificacions", "keyboard_shortcuts.pinned": "per dobrir la lista dels tuts penjats", @@ -314,8 +314,8 @@ "status.show_more_all": "Los desplegar totes", "status.unmute_conversation": "Tornar mostrar la conversacion", "status.unpin": "Tirar del perfil", - "suggestions.dismiss": "Dismiss suggestion", - "suggestions.header": "You might be interested in…", + "suggestions.dismiss": "Regetar la suggestion", + "suggestions.header": "Aquò vos poiriá interessar…", "tabs_bar.federated_timeline": "Flux public global", "tabs_bar.home": "Acuèlh", "tabs_bar.local_timeline": "Flux public local", diff --git a/config/locales/devise.oc.yml b/config/locales/devise.oc.yml index beecbb426..16633e233 100644 --- a/config/locales/devise.oc.yml +++ b/config/locales/devise.oc.yml @@ -8,10 +8,10 @@ oc: failure: already_authenticated: Sètz ja connectat. inactive: Vòstre compte es pas encara activat. - invalid: "%{authentication_keys} invalid." + invalid: "%{authentication_keys} invalida." last_attempt: Vos demòra un ensag abans que vòstre compte siasque blocat. locked: Vòstre compte es blocat. - not_found_in_database: "%{authentication_keys} invalid." + not_found_in_database: "%{authentication_keys} invalida." timeout: Vòstra session a expirat. Mercés de vos tornar connectar per contunhar. unauthenticated: Vos cal vos connectar o marcar abans de contunhar. unconfirmed: Vos cal confirmar vòstra adreça de corrièl abans de contunhar. diff --git a/config/locales/oc.yml b/config/locales/oc.yml index 0fb4684b1..820f094ff 100644 --- a/config/locales/oc.yml +++ b/config/locales/oc.yml @@ -311,7 +311,7 @@ oc: description_html: Un relai de federacion es un servidor intermediari qu’escàmbia de bèls volumes de tuts publics entre servidors que son abonats e i publican.Pòt ajudar de pichons e mejans servidors a trobar de contenguts del fediverse estant, qu’autrament demandariá als utilizaires locals de s’abonar manualament a d’autres monde marcats sus de servidors alonhats. disable: Desactivar disabled: Desactivat - enable: Activat + enable: Activar enable_hint: Un còp activat, vòstre servidor s’abonarà a totes los tuts publics del relai estant, e començarà de mandar sos tuts publics a aqueste d’enlà. enabled: Activat inbox_url: URL del relai @@ -533,7 +533,7 @@ oc: formats: default: "%e/%m/%Y" long: Lo %e %B de %Y - short: "%e %b. de %Y" + short: "%e %B de %Y" month_names: - None - de genièr @@ -557,7 +557,7 @@ oc: about_x_hours: "%{count} h" about_x_months: "%{count} meses" about_x_years: "%{count} ans" - almost_x_years: "%{count}ans" + almost_x_years: "%{count} ans" half_a_minute: Ara less_than_x_minutes: "%{count} min" less_than_x_seconds: Ara meteis -- cgit From f59b840549d1b4dfd02ae4f52b64149ff8de0165 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Tue, 30 Oct 2018 17:06:12 +0100 Subject: Fix empty display name precedence over username in web UI (#9163) Fix #9131 --- app/javascript/mastodon/actions/importer/normalizer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/javascript') diff --git a/app/javascript/mastodon/actions/importer/normalizer.js b/app/javascript/mastodon/actions/importer/normalizer.js index a2af3222e..34a4150fa 100644 --- a/app/javascript/mastodon/actions/importer/normalizer.js +++ b/app/javascript/mastodon/actions/importer/normalizer.js @@ -14,7 +14,7 @@ export function normalizeAccount(account) { account = { ...account }; const emojiMap = makeEmojiMap(account); - const displayName = account.display_name.length === 0 ? account.username : account.display_name; + const displayName = account.display_name.trim().length === 0 ? account.username : account.display_name; account.display_name_html = emojify(escapeTextContentForBrowser(displayName), emojiMap); account.note_emojified = emojify(account.note, emojiMap); -- cgit From ac9780b8449527a6a7ab5e2031eeb37f7f2291e7 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Mon, 29 Oct 2018 14:44:04 +0100 Subject: [Glitch] Include preview cards in status entity in REST API Port 795f0107d23c1c9bd039f6449fa1e094ab7653a7 to glitch-soc --- .../flavours/glitch/components/status.js | 10 ++++++++ .../glitch/features/status/components/card.js | 18 +++++++------- .../features/status/containers/card_container.js | 2 +- app/javascript/flavours/glitch/reducers/index.js | 2 -- .../flavours/glitch/reducers/statuses.js | 5 ++++ .../flavours/glitch/styles/components/status.scss | 28 ++++++++++++++++++++++ 6 files changed, 54 insertions(+), 11 deletions(-) (limited to 'app/javascript') diff --git a/app/javascript/flavours/glitch/components/status.js b/app/javascript/flavours/glitch/components/status.js index 449532ea4..3a22f165b 100644 --- a/app/javascript/flavours/glitch/components/status.js +++ b/app/javascript/flavours/glitch/components/status.js @@ -7,6 +7,7 @@ import StatusIcons from './status_icons'; import StatusContent from './status_content'; import StatusActionBar from './status_action_bar'; import AttachmentList from './attachment_list'; +import Card from '../features/status/components/card'; import { injectIntl, FormattedMessage } from 'react-intl'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { MediaGallery, Video } from 'flavours/glitch/util/async-components'; @@ -477,6 +478,15 @@ export default class Status extends ImmutablePureComponent { if (!status.get('sensitive') && !(status.get('spoiler_text').length > 0) && settings.getIn(['collapsed', 'backgrounds', 'preview_images'])) { background = attachments.getIn([0, 'preview_url']); } + } else if (status.get('card')) { + media = ( + + ); + //TODO: set mediaIcon? } // Here we prepare extra data-* attributes for CSS selectors. diff --git a/app/javascript/flavours/glitch/features/status/components/card.js b/app/javascript/flavours/glitch/features/status/components/card.js index b52f3c4fa..9a87f7a3f 100644 --- a/app/javascript/flavours/glitch/features/status/components/card.js +++ b/app/javascript/flavours/glitch/features/status/components/card.js @@ -59,10 +59,12 @@ export default class Card extends React.PureComponent { card: ImmutablePropTypes.map, maxDescription: PropTypes.number, onOpenMedia: PropTypes.func.isRequired, + compact: PropTypes.boolean, }; static defaultProps = { maxDescription: 50, + compact: false, }; state = { @@ -131,25 +133,25 @@ export default class Card extends React.PureComponent { } render () { - const { card, maxDescription } = this.props; - const { width, embedded } = this.state; + const { card, maxDescription, compact } = this.props; + const { width, embedded } = this.state; if (card === null) { return null; } const provider = card.get('provider_name').length === 0 ? decodeIDNA(getHostname(card.get('url'))) : card.get('provider_name'); - const horizontal = card.get('width') > card.get('height') && (card.get('width') + 100 >= width) || card.get('type') !== 'link'; - const className = classnames('status-card', { horizontal }); + const horizontal = (!compact && card.get('width') > card.get('height') && (card.get('width') + 100 >= width)) || card.get('type') !== 'link' || embedded; const interactive = card.get('type') !== 'link'; + const className = classnames('status-card', { horizontal, compact, interactive }); const title = interactive ? {card.get('title')} : {card.get('title')}; - const ratio = card.get('width') / card.get('height'); + const ratio = compact ? 16 / 9 : card.get('width') / card.get('height'); const height = card.get('width') > card.get('height') ? (width / ratio) : (width * ratio); const description = (
{title} - {!horizontal &&

{trim(card.get('description') || '', maxDescription)}

} + {!(horizontal || compact) &&

{trim(card.get('description') || '', maxDescription)}

} {provider}
); @@ -174,7 +176,7 @@ export default class Card extends React.PureComponent {
- + {horizontal && }
@@ -184,7 +186,7 @@ export default class Card extends React.PureComponent { return (
{embed} - {description} + {!compact && description}
); } else if (card.get('image')) { diff --git a/app/javascript/flavours/glitch/features/status/containers/card_container.js b/app/javascript/flavours/glitch/features/status/containers/card_container.js index a97404de1..6170d9fd8 100644 --- a/app/javascript/flavours/glitch/features/status/containers/card_container.js +++ b/app/javascript/flavours/glitch/features/status/containers/card_container.js @@ -2,7 +2,7 @@ import { connect } from 'react-redux'; import Card from '../components/card'; const mapStateToProps = (state, { statusId }) => ({ - card: state.getIn(['cards', statusId], null), + card: state.getIn(['statuses', statusId, 'card'], null), }); export default connect(mapStateToProps)(Card); diff --git a/app/javascript/flavours/glitch/reducers/index.js b/app/javascript/flavours/glitch/reducers/index.js index 218a5ac8f..ae9e2b639 100644 --- a/app/javascript/flavours/glitch/reducers/index.js +++ b/app/javascript/flavours/glitch/reducers/index.js @@ -15,7 +15,6 @@ import settings from './settings'; import local_settings from './local_settings'; import push_notifications from './push_notifications'; import status_lists from './status_lists'; -import cards from './cards'; import mutes from './mutes'; import reports from './reports'; import contexts from './contexts'; @@ -47,7 +46,6 @@ const reducers = { settings, local_settings, push_notifications, - cards, mutes, reports, contexts, diff --git a/app/javascript/flavours/glitch/reducers/statuses.js b/app/javascript/flavours/glitch/reducers/statuses.js index 617d96e5d..4c6387461 100644 --- a/app/javascript/flavours/glitch/reducers/statuses.js +++ b/app/javascript/flavours/glitch/reducers/statuses.js @@ -23,6 +23,9 @@ import { STATUS_MUTE_SUCCESS, STATUS_UNMUTE_SUCCESS, } from 'flavours/glitch/actions/statuses'; +import { + STATUS_CARD_FETCH_SUCCESS +} from 'flavours/glitch/actions/cards'; import { TIMELINE_UPDATE, TIMELINE_DELETE, @@ -143,6 +146,8 @@ export default function statuses(state = initialState, action) { return normalizeStatuses(state, action.statuses); case TIMELINE_DELETE: return deleteStatus(state, action.id, action.references); + case STATUS_CARD_FETCH_SUCCESS: + return state.setIn([action.id, 'card'], fromJS(action.card)); default: return state; } diff --git a/app/javascript/flavours/glitch/styles/components/status.scss b/app/javascript/flavours/glitch/styles/components/status.scss index aa49aba55..38ead06cf 100644 --- a/app/javascript/flavours/glitch/styles/components/status.scss +++ b/app/javascript/flavours/glitch/styles/components/status.scss @@ -731,6 +731,9 @@ a.status-card { display: block; margin-top: 5px; font-size: 13px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } .status-card__image { @@ -755,6 +758,31 @@ a.status-card { } } +.status-card.compact { + border-color: lighten($ui-base-color, 4%); + + &.interactive { + border: 0; + } + + .status-card__content { + padding: 8px; + padding-top: 10px; + } + + .status-card__title { + white-space: nowrap; + } + + .status-card__image { + flex: 0 0 60px; + } +} + +a.status-card.compact:hover { + background-color: lighten($ui-base-color, 4%); +} + .status-card__image-image { border-radius: 4px 0 0 4px; display: block; -- cgit From b21615e9579a6f33ed1cdf6fc37fc8a1ff24a0d5 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Mon, 29 Oct 2018 14:56:53 +0100 Subject: [Glitch] Fix dimensions of preview cards, fix crash in web UI, fix warning Port 9c38c5daa3d7298f02c763a84a74680dcc89dac2 to glitch-soc --- app/javascript/flavours/glitch/actions/cards.js | 52 ---------------------- app/javascript/flavours/glitch/actions/statuses.js | 2 - .../glitch/features/status/components/card.js | 8 ++-- .../features/status/components/detailed_status.js | 4 +- .../features/status/containers/card_container.js | 8 ---- app/javascript/flavours/glitch/reducers/cards.js | 14 ------ .../flavours/glitch/reducers/statuses.js | 5 --- 7 files changed, 6 insertions(+), 87 deletions(-) delete mode 100644 app/javascript/flavours/glitch/actions/cards.js delete mode 100644 app/javascript/flavours/glitch/features/status/containers/card_container.js delete mode 100644 app/javascript/flavours/glitch/reducers/cards.js (limited to 'app/javascript') diff --git a/app/javascript/flavours/glitch/actions/cards.js b/app/javascript/flavours/glitch/actions/cards.js deleted file mode 100644 index c897daf58..000000000 --- a/app/javascript/flavours/glitch/actions/cards.js +++ /dev/null @@ -1,52 +0,0 @@ -import api from 'flavours/glitch/util/api'; - -export const STATUS_CARD_FETCH_REQUEST = 'STATUS_CARD_FETCH_REQUEST'; -export const STATUS_CARD_FETCH_SUCCESS = 'STATUS_CARD_FETCH_SUCCESS'; -export const STATUS_CARD_FETCH_FAIL = 'STATUS_CARD_FETCH_FAIL'; - -export function fetchStatusCard(id) { - return (dispatch, getState) => { - if (getState().getIn(['cards', id], null) !== null) { - return; - } - - dispatch(fetchStatusCardRequest(id)); - - api(getState).get(`/api/v1/statuses/${id}/card`).then(response => { - if (!response.data.url) { - return; - } - - dispatch(fetchStatusCardSuccess(id, response.data)); - }).catch(error => { - dispatch(fetchStatusCardFail(id, error)); - }); - }; -}; - -export function fetchStatusCardRequest(id) { - return { - type: STATUS_CARD_FETCH_REQUEST, - id, - skipLoading: true, - }; -}; - -export function fetchStatusCardSuccess(id, card) { - return { - type: STATUS_CARD_FETCH_SUCCESS, - id, - card, - skipLoading: true, - }; -}; - -export function fetchStatusCardFail(id, error) { - return { - type: STATUS_CARD_FETCH_FAIL, - id, - error, - skipLoading: true, - skipAlert: true, - }; -}; diff --git a/app/javascript/flavours/glitch/actions/statuses.js b/app/javascript/flavours/glitch/actions/statuses.js index fa8845002..6183f3c03 100644 --- a/app/javascript/flavours/glitch/actions/statuses.js +++ b/app/javascript/flavours/glitch/actions/statuses.js @@ -1,7 +1,6 @@ import api from 'flavours/glitch/util/api'; import { deleteFromTimelines } from './timelines'; -import { fetchStatusCard } from './cards'; export const STATUS_FETCH_REQUEST = 'STATUS_FETCH_REQUEST'; export const STATUS_FETCH_SUCCESS = 'STATUS_FETCH_SUCCESS'; @@ -38,7 +37,6 @@ export function fetchStatus(id) { const skipLoading = getState().getIn(['statuses', id], null) !== null; dispatch(fetchContext(id)); - dispatch(fetchStatusCard(id)); if (skipLoading) { return; diff --git a/app/javascript/flavours/glitch/features/status/components/card.js b/app/javascript/flavours/glitch/features/status/components/card.js index 9a87f7a3f..743fe779a 100644 --- a/app/javascript/flavours/glitch/features/status/components/card.js +++ b/app/javascript/flavours/glitch/features/status/components/card.js @@ -59,7 +59,7 @@ export default class Card extends React.PureComponent { card: ImmutablePropTypes.map, maxDescription: PropTypes.number, onOpenMedia: PropTypes.func.isRequired, - compact: PropTypes.boolean, + compact: PropTypes.bool, }; static defaultProps = { @@ -120,7 +120,7 @@ export default class Card extends React.PureComponent { const content = { __html: addAutoPlay(card.get('html')) }; const { width } = this.state; const ratio = card.get('width') / card.get('height'); - const height = card.get('width') > card.get('height') ? (width / ratio) : (width * ratio); + const height = width / ratio; return (
{card.get('title')} : {card.get('title')}; - const ratio = compact ? 16 / 9 : card.get('width') / card.get('height'); - const height = card.get('width') > card.get('height') ? (width / ratio) : (width * ratio); + const ratio = card.get('width') / card.get('height'); + const height = (compact && !embedded) ? (width / (16 / 9)) : (width / ratio); const description = (
diff --git a/app/javascript/flavours/glitch/features/status/components/detailed_status.js b/app/javascript/flavours/glitch/features/status/components/detailed_status.js index 2e61e6d8c..1fe0c069d 100644 --- a/app/javascript/flavours/glitch/features/status/components/detailed_status.js +++ b/app/javascript/flavours/glitch/features/status/components/detailed_status.js @@ -8,7 +8,7 @@ import MediaGallery from 'flavours/glitch/components/media_gallery'; import AttachmentList from 'flavours/glitch/components/attachment_list'; import { Link } from 'react-router-dom'; import { FormattedDate, FormattedNumber } from 'react-intl'; -import CardContainer from '../containers/card_container'; +import Card from './card'; import ImmutablePureComponent from 'react-immutable-pure-component'; import Video from 'flavours/glitch/features/video'; import VisibilityIcon from 'flavours/glitch/components/status_visibility_icon'; @@ -83,7 +83,7 @@ export default class DetailedStatus extends ImmutablePureComponent { ); mediaIcon = 'picture-o'; } - } else media = ; + } else media = ; if (status.get('application')) { applicationLink = · {status.getIn(['application', 'name'])}; diff --git a/app/javascript/flavours/glitch/features/status/containers/card_container.js b/app/javascript/flavours/glitch/features/status/containers/card_container.js deleted file mode 100644 index 6170d9fd8..000000000 --- a/app/javascript/flavours/glitch/features/status/containers/card_container.js +++ /dev/null @@ -1,8 +0,0 @@ -import { connect } from 'react-redux'; -import Card from '../components/card'; - -const mapStateToProps = (state, { statusId }) => ({ - card: state.getIn(['statuses', statusId, 'card'], null), -}); - -export default connect(mapStateToProps)(Card); diff --git a/app/javascript/flavours/glitch/reducers/cards.js b/app/javascript/flavours/glitch/reducers/cards.js deleted file mode 100644 index 92ecfd086..000000000 --- a/app/javascript/flavours/glitch/reducers/cards.js +++ /dev/null @@ -1,14 +0,0 @@ -import { STATUS_CARD_FETCH_SUCCESS } from 'flavours/glitch/actions/cards'; - -import { Map as ImmutableMap, fromJS } from 'immutable'; - -const initialState = ImmutableMap(); - -export default function cards(state = initialState, action) { - switch(action.type) { - case STATUS_CARD_FETCH_SUCCESS: - return state.set(action.id, fromJS(action.card)); - default: - return state; - } -}; diff --git a/app/javascript/flavours/glitch/reducers/statuses.js b/app/javascript/flavours/glitch/reducers/statuses.js index 4c6387461..617d96e5d 100644 --- a/app/javascript/flavours/glitch/reducers/statuses.js +++ b/app/javascript/flavours/glitch/reducers/statuses.js @@ -23,9 +23,6 @@ import { STATUS_MUTE_SUCCESS, STATUS_UNMUTE_SUCCESS, } from 'flavours/glitch/actions/statuses'; -import { - STATUS_CARD_FETCH_SUCCESS -} from 'flavours/glitch/actions/cards'; import { TIMELINE_UPDATE, TIMELINE_DELETE, @@ -146,8 +143,6 @@ export default function statuses(state = initialState, action) { return normalizeStatuses(state, action.statuses); case TIMELINE_DELETE: return deleteStatus(state, action.id, action.references); - case STATUS_CARD_FETCH_SUCCESS: - return state.setIn([action.id, 'card'], fromJS(action.card)); default: return state; } -- cgit From bdc23388334f9d683d3829c5880cc6064cc994d0 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Tue, 30 Oct 2018 14:39:00 +0100 Subject: Add a “link” status icon for toots with a preview card MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/javascript/flavours/glitch/components/status.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/javascript') diff --git a/app/javascript/flavours/glitch/components/status.js b/app/javascript/flavours/glitch/components/status.js index 3a22f165b..0c82ea7c6 100644 --- a/app/javascript/flavours/glitch/components/status.js +++ b/app/javascript/flavours/glitch/components/status.js @@ -486,7 +486,7 @@ export default class Status extends ImmutablePureComponent { compact /> ); - //TODO: set mediaIcon? + mediaIcon = 'link'; } // Here we prepare extra data-* attributes for CSS selectors. -- cgit From 7e18e95716052d5566f2e31559cbe4a68268f493 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Tue, 30 Oct 2018 14:46:48 +0100 Subject: Add a local setting for inline preview cards --- app/javascript/flavours/glitch/components/status.js | 2 +- .../flavours/glitch/features/local_settings/page/index.js | 8 ++++++++ app/javascript/flavours/glitch/reducers/local_settings.js | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) (limited to 'app/javascript') diff --git a/app/javascript/flavours/glitch/components/status.js b/app/javascript/flavours/glitch/components/status.js index 0c82ea7c6..9ff53485e 100644 --- a/app/javascript/flavours/glitch/components/status.js +++ b/app/javascript/flavours/glitch/components/status.js @@ -478,7 +478,7 @@ export default class Status extends ImmutablePureComponent { if (!status.get('sensitive') && !(status.get('spoiler_text').length > 0) && settings.getIn(['collapsed', 'backgrounds', 'preview_images'])) { background = attachments.getIn([0, 'preview_url']); } - } else if (status.get('card')) { + } else if (status.get('card') && settings.get('inline_preview_cards')) { media = ( + + +
), ]; diff --git a/app/javascript/flavours/glitch/reducers/local_settings.js b/app/javascript/flavours/glitch/reducers/local_settings.js index 19233a963..bf42810e9 100644 --- a/app/javascript/flavours/glitch/reducers/local_settings.js +++ b/app/javascript/flavours/glitch/reducers/local_settings.js @@ -15,6 +15,7 @@ const initialState = ImmutableMap({ always_show_spoilers_field: false, confirm_missing_media_description: false, preselect_on_reply: true, + inline_preview_cards: true, content_warnings : ImmutableMap({ auto_unfold : false, filter : null, -- cgit From 0d6b8f36aaee9c8c68c64ce4a63bcc66c6faf78d Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Tue, 30 Oct 2018 17:54:50 +0100 Subject: [Glitch] Fix empty display name precedence over username in web UI Port f59b840549d1b4dfd02ae4f52b64149ff8de0165 to glitch-soc --- app/javascript/flavours/glitch/reducers/accounts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/javascript') diff --git a/app/javascript/flavours/glitch/reducers/accounts.js b/app/javascript/flavours/glitch/reducers/accounts.js index c2f016a87..860c13534 100644 --- a/app/javascript/flavours/glitch/reducers/accounts.js +++ b/app/javascript/flavours/glitch/reducers/accounts.js @@ -72,7 +72,7 @@ const normalizeAccount = (state, account) => { delete account.statuses_count; const emojiMap = makeEmojiMap(account); - const displayName = account.display_name.length === 0 ? account.username : account.display_name; + const displayName = account.display_name.trim().length === 0 ? account.username : account.display_name; account.display_name_html = emojify(escapeTextContentForBrowser(displayName), emojiMap); account.note_emojified = emojify(account.note, emojiMap); -- cgit From 804586172ed726dbfaa213365dd309c4d7fd55d9 Mon Sep 17 00:00:00 2001 From: Quentí <33203663+Quenty31@users.noreply.github.com> Date: Tue, 30 Oct 2018 22:06:31 +0100 Subject: [i18n] Update for Occitan (#9169) * Update oc.json * Update oc.yml * Update simple_form.oc.yml * Update simple_form.oc.yml * Update oc.json --- app/javascript/mastodon/locales/oc.json | 14 +++++++------- config/locales/oc.yml | 6 +++--- config/locales/simple_form.oc.yml | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) (limited to 'app/javascript') diff --git a/app/javascript/mastodon/locales/oc.json b/app/javascript/mastodon/locales/oc.json index 93ab4be7d..5df64e192 100644 --- a/app/javascript/mastodon/locales/oc.json +++ b/app/javascript/mastodon/locales/oc.json @@ -90,9 +90,9 @@ "confirmations.mute.confirm": "Rescondre", "confirmations.mute.message": "Volètz vertadièrament rescondre {name} ?", "confirmations.redraft.confirm": "Escafar & tornar formular", - "confirmations.redraft.message": "Volètz vertadièrament escafar aqueste estatut e lo reformular ? Tote sos partiments e favorits seràn perduts, e sas responsas seràn orfanèlas.", + "confirmations.redraft.message": "Volètz vertadièrament escafar aqueste estatut e lo reformular ? Totes sos partiments e favorits seràn perduts, e sas responsas seràn orfanèlas.", "confirmations.reply.confirm": "Respondre", - "confirmations.reply.message": "Respondre remplaçarà lo messatge que sètz a escriure. Volètz vertadièrament contunhar ?", + "confirmations.reply.message": "Respondre remplaçarà lo messatge que sètz a escriure. Volètz vertadièrament contunhar ?", "confirmations.unfollow.confirm": "Quitar de sègre", "confirmations.unfollow.message": "Volètz vertadièrament quitar de sègre {name} ?", "embed.instructions": "Embarcar aqueste estatut per lo far veire sus un site Internet en copiar lo còdi çai-jos.", @@ -115,8 +115,8 @@ "empty_column.community": "Lo flux public local es void. Escrivètz quicòm per lo garnir !", "empty_column.direct": "Avètz pas encara cap de messatges. Quand ne mandatz un o que ne recebètz un, serà mostrat aquí.", "empty_column.domain_blocks": "I a pas encara cap de domeni amagat.", - "empty_column.favourited_statuses": "Avètz pas encara cap de tut favorit. Quanda n’auretz un, apareisserà aquí.", - "empty_column.favourites": "Degun a pas encara mes en favorit aqueste tut. Quanda qualqu’un o farà, apareisserà aquí.", + "empty_column.favourited_statuses": "Avètz pas encara cap de tut favorit. Quand n’auretz un, apareisserà aquí.", + "empty_column.favourites": "Degun a pas encara mes en favorit aqueste tut. Quand qualqu’un o farà, apareisserà aquí.", "empty_column.follow_requests": "Avètz pas encara de demanda d’abonament. Quand n’auretz una apareisserà aquí.", "empty_column.hashtag": "I a pas encara de contengut ligat a aquesta etiqueta.", "empty_column.home": "Vòstre flux d’acuèlh es void. Visitatz {public} o utilizatz la recèrca per vos connectar a d’autras personas.", @@ -129,7 +129,7 @@ "follow_request.authorize": "Acceptar", "follow_request.reject": "Regetar", "getting_started.developers": "Desvelopaires", - "getting_started.documentation": "Documentation", + "getting_started.documentation": "Documentacion", "getting_started.find_friends": "Trobar d’amics de Twitter", "getting_started.heading": "Per començar", "getting_started.invite": "Convidar de monde", @@ -145,7 +145,7 @@ "keyboard_shortcuts.column": "centrar un estatut a una colomna", "keyboard_shortcuts.compose": "anar al camp tèxte", "keyboard_shortcuts.description": "Descripcion", - "keyboard_shortcuts.direct": "per dobrir la columna de messatges dirèctes", + "keyboard_shortcuts.direct": "per dobrir la colomna de messatges dirèctes", "keyboard_shortcuts.down": "far davalar dins la lista", "keyboard_shortcuts.enter": "dobrir los estatuts", "keyboard_shortcuts.favourite": "apondre als favorits", @@ -159,7 +159,7 @@ "keyboard_shortcuts.mention": "mencionar l’autor", "keyboard_shortcuts.muted": "per dobrir la lista dels utilizaires silenciats", "keyboard_shortcuts.my_profile": "per dobrir vòstre perfil", - "keyboard_shortcuts.notifications": "per dobrir la columna de notificacions", + "keyboard_shortcuts.notifications": "per dobrir la colomna de notificacions", "keyboard_shortcuts.pinned": "per dobrir la lista dels tuts penjats", "keyboard_shortcuts.profile": "per dobrir lo perfil de l’autor", "keyboard_shortcuts.reply": "respondre", diff --git a/config/locales/oc.yml b/config/locales/oc.yml index 820f094ff..428bbfffe 100644 --- a/config/locales/oc.yml +++ b/config/locales/oc.yml @@ -139,7 +139,7 @@ oc: resend_confirmation: already_confirmed: Aqueste utilizaire es ja confirmat send: Tornar mandar lo corrièl de confirmacion - success: Corrièl de confirmacion corrèctament mandat ! + success: Corrièl de confirmacion corrèctament mandat ! reset: Reïnicializar reset_password: Reïnicializar lo senhal resubscribe: Se tornar abonar @@ -438,11 +438,11 @@ oc: title: WebSub topic: Subjècte suspensions: - bad_acct_msg: La valor de confirmacion a pas coïncidit. Sètz a suspendre lo bon compte ? + bad_acct_msg: La valor de confirmacion a pas coïncidit. Sètz a suspendre lo bon compte ? hint_html: 'Per confirmar la suspension del compte, picatz %{value} al camp çai-jos :' proceed: Tractat title: Suspension de %{acct} - warning_html: 'Suspendre aqueste compte suprimirà irreversiblament las donadas del compte, aquò compren :' + warning_html: 'Suspendre aqueste compte suprimirà irreversiblament las donadas del compte, aquò compren :' title: Administracion admin_mailer: new_report: diff --git a/config/locales/simple_form.oc.yml b/config/locales/simple_form.oc.yml index c7cc2b471..bb9e3529c 100644 --- a/config/locales/simple_form.oc.yml +++ b/config/locales/simple_form.oc.yml @@ -30,7 +30,7 @@ oc: imports: data: Fichièr CSV exportat d’una autra instància Mastodon sessions: - otp: 'Picatz lo còdi d’autentificacion en dos temps (Two factor code) de vòstra aplicacion mobil o utilizatz un de vòstres còdis de recuperacion :' + otp: 'Picatz lo còdi d’autentificacion en dos temps (Two factor code) de vòstra aplicacion mobil o utilizatz un de vòstres còdis de recuperacion :' user: chosen_languages: Quand seleccionadas, solament los tuts dins las lengas triadas seràn mostrats dins vòstre flux d’actualitat labels: -- cgit From b9d0d209cd16ef19b306528a9c4be34b47cf1945 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Wed, 31 Oct 2018 00:55:20 +0100 Subject: Fix reducer error when conversation has no last status in web UI (#9173) Fix #9170 --- app/javascript/mastodon/reducers/conversations.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/javascript') diff --git a/app/javascript/mastodon/reducers/conversations.js b/app/javascript/mastodon/reducers/conversations.js index ea39fccee..b13a9fdf4 100644 --- a/app/javascript/mastodon/reducers/conversations.js +++ b/app/javascript/mastodon/reducers/conversations.js @@ -21,7 +21,7 @@ const conversationToMap = item => ImmutableMap({ id: item.id, unread: item.unread, accounts: ImmutableList(item.accounts.map(a => a.id)), - last_status: item.last_status.id, + last_status: item.last_status ? item.last_status.id : null, }); const updateConversation = (state, item) => state.update('items', list => { -- cgit From 2b2facbbdfb7c0b53e38048e932143d592af401e Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Sat, 27 Oct 2018 23:09:07 +0200 Subject: [Glitch] Port some of upstream's getting started footer links --- .../glitch/features/getting_started/index.js | 40 ++++++++++------------ .../flavours/glitch/styles/components/index.scss | 36 +++++++++++++++++++ .../flavours/glitch/util/initial_state.js | 2 ++ 3 files changed, 57 insertions(+), 21 deletions(-) (limited to 'app/javascript') diff --git a/app/javascript/flavours/glitch/features/getting_started/index.js b/app/javascript/flavours/glitch/features/getting_started/index.js index c1897cc33..ce1ae50e4 100644 --- a/app/javascript/flavours/glitch/features/getting_started/index.js +++ b/app/javascript/flavours/glitch/features/getting_started/index.js @@ -8,7 +8,7 @@ import { openModal } from 'flavours/glitch/actions/modal'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; -import { me } from 'flavours/glitch/util/initial_state'; +import { me, invitesEnabled, version } from 'flavours/glitch/util/initial_state'; import { fetchFollowRequests } from 'flavours/glitch/actions/accounts'; import { List as ImmutableList } from 'immutable'; import { createSelector } from 'reselect'; @@ -163,26 +163,24 @@ export default class GettingStarted extends ImmutablePureComponent {
-
-

- - -  •  - - - -

-

- glitch-soc/mastodon, - Mastodon: Mastodon, - }} - /> -

-
+
    +
  • ·
  • + {invitesEnabled &&
  • ·
  • } +
  • ·
  • +
  • ·
  • +
  • ·
  • +
  • +
+ +

+ glitch-soc/mastodon (v{version}), + Mastodon: Mastodon }} + /> +

diff --git a/app/javascript/flavours/glitch/styles/components/index.scss b/app/javascript/flavours/glitch/styles/components/index.scss index cbf968ec4..7d71f0d1d 100644 --- a/app/javascript/flavours/glitch/styles/components/index.scss +++ b/app/javascript/flavours/glitch/styles/components/index.scss @@ -732,6 +732,42 @@ a { color: $dark-text-color; } + + &__footer { + flex: 0 0 auto; + padding: 10px; + padding-top: 20px; + + ul { + margin-bottom: 10px; + } + + ul li { + display: inline; + } + + p { + color: $dark-text-color; + font-size: 13px; + margin-bottom: 20px; + + a { + color: $dark-text-color; + text-decoration: underline; + } + } + + a { + text-decoration: none; + color: $darker-text-color; + + &:hover, + &:focus, + &:active { + text-decoration: underline; + } + } + } } .column-link__badge { diff --git a/app/javascript/flavours/glitch/util/initial_state.js b/app/javascript/flavours/glitch/util/initial_state.js index 0aaf65904..d12c05c0d 100644 --- a/app/javascript/flavours/glitch/util/initial_state.js +++ b/app/javascript/flavours/glitch/util/initial_state.js @@ -22,6 +22,8 @@ export const deleteModal = getMeta('delete_modal'); export const me = getMeta('me'); export const searchEnabled = getMeta('search_enabled'); export const maxChars = (initialState && initialState.max_toot_chars) || 500; +export const invitesEnabled = getMeta('invites_enabled'); +export const version = getMeta('version'); export const isStaff = getMeta('is_staff'); export default initialState; -- cgit From b3c13809808560870ac649c438211e4c64a24749 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Wed, 31 Oct 2018 11:01:50 +0100 Subject: Fix styling of display names in public pages --- app/javascript/flavours/glitch/styles/stream_entries.scss | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'app/javascript') diff --git a/app/javascript/flavours/glitch/styles/stream_entries.scss b/app/javascript/flavours/glitch/styles/stream_entries.scss index 80e2d0ca0..7b6060628 100644 --- a/app/javascript/flavours/glitch/styles/stream_entries.scss +++ b/app/javascript/flavours/glitch/styles/stream_entries.scss @@ -175,12 +175,6 @@ .embed, .public-layout { .status { - .status__info .status__display-name { - display: block; - max-width: 100%; - padding-right: 25px; - } - .status__info { font-size: 15px; display: initial; @@ -200,6 +194,10 @@ max-width: 100%; padding-right: 25px; margin: initial; + + .display-name strong { + display: inline; + } } .status__avatar { -- cgit From 34209c0340ca6b7c61de964a17f5f3fe2e0f7c7b Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Wed, 31 Oct 2018 11:10:51 +0100 Subject: Fix timestamp position in public pages with RTL languages --- app/javascript/flavours/glitch/styles/stream_entries.scss | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'app/javascript') diff --git a/app/javascript/flavours/glitch/styles/stream_entries.scss b/app/javascript/flavours/glitch/styles/stream_entries.scss index 7b6060628..45dcf70ed 100644 --- a/app/javascript/flavours/glitch/styles/stream_entries.scss +++ b/app/javascript/flavours/glitch/styles/stream_entries.scss @@ -208,3 +208,11 @@ } } } + +.rtl { + .embed, .public-layout { + .status .status__relative-time { + float: left; + } + } +} -- cgit