From e25b7feb72d0abc5e411fd32749c968041ade182 Mon Sep 17 00:00:00 2001
From: ThibG
Date: Sun, 22 Sep 2019 14:15:18 +0200
Subject: [Glitch] Show user what options they have voted
Port front-end changes from b359974d9b356bb723fe046466b178328cf9bbaf to glitch-soc
Signed-off-by: Thibaut Girka
---
app/javascript/flavours/glitch/actions/importer/normalizer.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
(limited to 'app/javascript/flavours/glitch/actions')
diff --git a/app/javascript/flavours/glitch/actions/importer/normalizer.js b/app/javascript/flavours/glitch/actions/importer/normalizer.js
index 52d85c059..b35c4d7bd 100644
--- a/app/javascript/flavours/glitch/actions/importer/normalizer.js
+++ b/app/javascript/flavours/glitch/actions/importer/normalizer.js
@@ -71,8 +71,9 @@ export function normalizePoll(poll) {
const emojiMap = makeEmojiMap(normalPoll);
- normalPoll.options = poll.options.map(option => ({
+ normalPoll.options = poll.options.map((option, index) => ({
...option,
+ voted: poll.own_votes && poll.own_votes.includes(index),
title_emojified: emojify(escapeTextContentForBrowser(option.title), emojiMap),
}));
--
cgit
From 74af56b9cd269ce431b9fbfa85901e5bfe773161 Mon Sep 17 00:00:00 2001
From: ThibG
Date: Fri, 27 Sep 2019 02:16:11 +0200
Subject: [Glitch] Use blob URL for Tesseract to avoid CORS issues
Port 7baedcb61e15200478f3ad6deb96d452cd63499a to glitch-soc
Signed-off-by: Thibaut Girka
---
app/javascript/flavours/glitch/actions/compose.js | 5 +++--
.../glitch/features/ui/components/focal_point_modal.js | 12 +++++++++++-
app/javascript/flavours/glitch/reducers/compose.js | 6 +++---
3 files changed, 17 insertions(+), 6 deletions(-)
(limited to 'app/javascript/flavours/glitch/actions')
diff --git a/app/javascript/flavours/glitch/actions/compose.js b/app/javascript/flavours/glitch/actions/compose.js
index e1da03745..69cf65b5a 100644
--- a/app/javascript/flavours/glitch/actions/compose.js
+++ b/app/javascript/flavours/glitch/actions/compose.js
@@ -261,7 +261,7 @@ export function uploadCompose(files) {
progress[i] = loaded;
dispatch(uploadComposeProgress(progress.reduce((a, v) => a + v, 0), total));
},
- }).then(({ data }) => dispatch(uploadComposeSuccess(data)));
+ }).then(({ data }) => dispatch(uploadComposeSuccess(data, f)));
}).catch(error => dispatch(uploadComposeFail(error)));
};
};
@@ -316,10 +316,11 @@ export function uploadComposeProgress(loaded, total) {
};
};
-export function uploadComposeSuccess(media) {
+export function uploadComposeSuccess(media, file) {
return {
type: COMPOSE_UPLOAD_SUCCESS,
media: media,
+ file: file,
skipLoading: true,
};
};
diff --git a/app/javascript/flavours/glitch/features/ui/components/focal_point_modal.js b/app/javascript/flavours/glitch/features/ui/components/focal_point_modal.js
index 8bded391a..d5c9e66ae 100644
--- a/app/javascript/flavours/glitch/features/ui/components/focal_point_modal.js
+++ b/app/javascript/flavours/glitch/features/ui/components/focal_point_modal.js
@@ -173,7 +173,17 @@ class FocalPointModal extends ImmutablePureComponent {
langPath: `${assetHost}/ocr/lang-data`,
});
- worker.recognize(media.get('url'))
+ let media_url = media.get('file');
+
+ if (window.URL && URL.createObjectURL) {
+ try {
+ media_url = URL.createObjectURL(media.get('file'));
+ } catch (error) {
+ console.error(error);
+ }
+ }
+
+ worker.recognize(media_url)
.progress(({ progress }) => this.setState({ progress }))
.finally(() => worker.terminate())
.then(({ text }) => this.setState({ description: removeExtraLineBreaks(text), dirty: true, detecting: false }))
diff --git a/app/javascript/flavours/glitch/reducers/compose.js b/app/javascript/flavours/glitch/reducers/compose.js
index adad205c0..3699ec1ad 100644
--- a/app/javascript/flavours/glitch/reducers/compose.js
+++ b/app/javascript/flavours/glitch/reducers/compose.js
@@ -190,11 +190,11 @@ function continueThread (state, status) {
});
}
-function appendMedia(state, media) {
+function appendMedia(state, media, file) {
const prevSize = state.get('media_attachments').size;
return state.withMutations(map => {
- map.update('media_attachments', list => list.push(media));
+ map.update('media_attachments', list => list.push(media.set('file', file)));
map.set('is_uploading', false);
map.set('resetFileKey', Math.floor((Math.random() * 0x10000)));
map.set('idempotencyKey', uuid());
@@ -422,7 +422,7 @@ export default function compose(state = initialState, action) {
case COMPOSE_UPLOAD_REQUEST:
return state.set('is_uploading', true);
case COMPOSE_UPLOAD_SUCCESS:
- return appendMedia(state, fromJS(action.media));
+ return appendMedia(state, fromJS(action.media), action.file);
case COMPOSE_UPLOAD_FAIL:
return state.set('is_uploading', false);
case COMPOSE_UPLOAD_UNDO:
--
cgit
From 88481c965334e28615b353253380255973f4aaa5 Mon Sep 17 00:00:00 2001
From: ThibG
Date: Sun, 29 Sep 2019 21:46:05 +0200
Subject: [Glitch] Add explanation to mute dialog, refactor and clean up
mute/block UI
Port 9027bfff0c25a6da1bcef7ce880e5d8211062d1d to glitch-soc
Signed-off-by: Thibaut Girka
---
app/javascript/flavours/glitch/actions/blocks.js | 14 +++
.../flavours/glitch/containers/status_container.js | 16 +---
.../containers/header_container.js | 15 +--
.../status/containers/detailed_status_container.js | 18 +---
.../flavours/glitch/features/status/index.js | 20 +---
.../glitch/features/ui/components/block_modal.js | 103 +++++++++++++++++++++
.../glitch/features/ui/components/modal_root.js | 2 +
.../glitch/features/ui/components/mute_modal.js | 15 +--
app/javascript/flavours/glitch/reducers/blocks.js | 22 +++++
app/javascript/flavours/glitch/reducers/index.js | 2 +
app/javascript/flavours/glitch/reducers/mutes.js | 2 -
.../flavours/glitch/styles/components/modal.scss | 73 ++++++++++-----
.../glitch/styles/mastodon-light/diff.scss | 2 +
.../flavours/glitch/util/async-components.js | 4 +
14 files changed, 221 insertions(+), 87 deletions(-)
create mode 100644 app/javascript/flavours/glitch/features/ui/components/block_modal.js
create mode 100644 app/javascript/flavours/glitch/reducers/blocks.js
(limited to 'app/javascript/flavours/glitch/actions')
diff --git a/app/javascript/flavours/glitch/actions/blocks.js b/app/javascript/flavours/glitch/actions/blocks.js
index 498ce519f..adae9d83c 100644
--- a/app/javascript/flavours/glitch/actions/blocks.js
+++ b/app/javascript/flavours/glitch/actions/blocks.js
@@ -1,6 +1,7 @@
import api, { getLinks } from 'flavours/glitch/util/api';
import { fetchRelationships } from './accounts';
import { importFetchedAccounts } from './importer';
+import { openModal } from './modal';
export const BLOCKS_FETCH_REQUEST = 'BLOCKS_FETCH_REQUEST';
export const BLOCKS_FETCH_SUCCESS = 'BLOCKS_FETCH_SUCCESS';
@@ -10,6 +11,8 @@ export const BLOCKS_EXPAND_REQUEST = 'BLOCKS_EXPAND_REQUEST';
export const BLOCKS_EXPAND_SUCCESS = 'BLOCKS_EXPAND_SUCCESS';
export const BLOCKS_EXPAND_FAIL = 'BLOCKS_EXPAND_FAIL';
+export const BLOCKS_INIT_MODAL = 'BLOCKS_INIT_MODAL';
+
export function fetchBlocks() {
return (dispatch, getState) => {
dispatch(fetchBlocksRequest());
@@ -83,3 +86,14 @@ export function expandBlocksFail(error) {
error,
};
};
+
+export function initBlockModal(account) {
+ return dispatch => {
+ dispatch({
+ type: BLOCKS_INIT_MODAL,
+ account,
+ });
+
+ dispatch(openModal('BLOCK'));
+ };
+}
diff --git a/app/javascript/flavours/glitch/containers/status_container.js b/app/javascript/flavours/glitch/containers/status_container.js
index 15eb4f85f..647ddf276 100644
--- a/app/javascript/flavours/glitch/containers/status_container.js
+++ b/app/javascript/flavours/glitch/containers/status_container.js
@@ -1,4 +1,3 @@
-import React from 'react';
import { connect } from 'react-redux';
import Status from 'flavours/glitch/components/status';
import { List as ImmutableList } from 'immutable';
@@ -18,9 +17,9 @@ import {
pin,
unpin,
} from 'flavours/glitch/actions/interactions';
-import { blockAccount } from 'flavours/glitch/actions/accounts';
import { muteStatus, unmuteStatus, deleteStatus } from 'flavours/glitch/actions/statuses';
import { initMuteModal } from 'flavours/glitch/actions/mutes';
+import { initBlockModal } from 'flavours/glitch/actions/blocks';
import { initReport } from 'flavours/glitch/actions/reports';
import { openModal } from 'flavours/glitch/actions/modal';
import { changeLocalSetting } from 'flavours/glitch/actions/local_settings';
@@ -37,10 +36,8 @@ const messages = defineMessages({
deleteMessage: { id: 'confirmations.delete.message', defaultMessage: 'Are you sure you want to delete this status?' },
redraftConfirm: { id: 'confirmations.redraft.confirm', defaultMessage: 'Delete & redraft' },
redraftMessage: { id: 'confirmations.redraft.message', defaultMessage: 'Are you sure you want to delete this status and re-draft it? You will lose all replies, boosts and favourites to it.' },
- blockConfirm: { id: 'confirmations.block.confirm', defaultMessage: 'Block' },
replyConfirm: { id: 'confirmations.reply.confirm', defaultMessage: 'Reply' },
replyMessage: { id: 'confirmations.reply.message', defaultMessage: 'Replying now will overwrite the message you are currently composing. Are you sure you want to proceed?' },
- blockAndReport: { id: 'confirmations.block.block_and_report', defaultMessage: 'Block & Report' },
unfilterConfirm: { id: 'confirmations.unfilter.confirm', defaultMessage: 'Show' },
author: { id: 'confirmations.unfilter.author', defaultMessage: 'Author' },
matchingFilters: { id: 'confirmations.unfilter.filters', defaultMessage: 'Matching {count, plural, one {filter} other {filters}}' },
@@ -186,16 +183,7 @@ const mapDispatchToProps = (dispatch, { intl, contextType }) => ({
onBlock (status) {
const account = status.get('account');
- dispatch(openModal('CONFIRM', {
- message: @{account.get('acct')} }} />,
- confirm: intl.formatMessage(messages.blockConfirm),
- onConfirm: () => dispatch(blockAccount(account.get('id'))),
- secondary: intl.formatMessage(messages.blockAndReport),
- onSecondary: () => {
- dispatch(blockAccount(account.get('id')));
- dispatch(initReport(account, status));
- },
- }));
+ dispatch(initBlockModal(account));
},
onUnfilter (status, onConfirm) {
diff --git a/app/javascript/flavours/glitch/features/account_timeline/containers/header_container.js b/app/javascript/flavours/glitch/features/account_timeline/containers/header_container.js
index 787a36658..fff5e097f 100644
--- a/app/javascript/flavours/glitch/features/account_timeline/containers/header_container.js
+++ b/app/javascript/flavours/glitch/features/account_timeline/containers/header_container.js
@@ -5,7 +5,6 @@ import Header from '../components/header';
import {
followAccount,
unfollowAccount,
- blockAccount,
unblockAccount,
unmuteAccount,
pinAccount,
@@ -16,6 +15,7 @@ import {
directCompose
} from 'flavours/glitch/actions/compose';
import { initMuteModal } from 'flavours/glitch/actions/mutes';
+import { initBlockModal } from 'flavours/glitch/actions/blocks';
import { initReport } from 'flavours/glitch/actions/reports';
import { openModal } from 'flavours/glitch/actions/modal';
import { blockDomain, unblockDomain } from 'flavours/glitch/actions/domain_blocks';
@@ -25,9 +25,7 @@ import { List as ImmutableList } from 'immutable';
const messages = defineMessages({
unfollowConfirm: { id: 'confirmations.unfollow.confirm', defaultMessage: 'Unfollow' },
- blockConfirm: { id: 'confirmations.block.confirm', defaultMessage: 'Block' },
blockDomainConfirm: { id: 'confirmations.domain_block.confirm', defaultMessage: 'Hide entire domain' },
- blockAndReport: { id: 'confirmations.block.block_and_report', defaultMessage: 'Block & Report' },
});
const makeMapStateToProps = () => {
@@ -64,16 +62,7 @@ const mapDispatchToProps = (dispatch, { intl }) => ({
if (account.getIn(['relationship', 'blocking'])) {
dispatch(unblockAccount(account.get('id')));
} else {
- dispatch(openModal('CONFIRM', {
- message: @{account.get('acct')} }} />,
- confirm: intl.formatMessage(messages.blockConfirm),
- onConfirm: () => dispatch(blockAccount(account.get('id'))),
- secondary: intl.formatMessage(messages.blockAndReport),
- onSecondary: () => {
- dispatch(blockAccount(account.get('id')));
- dispatch(initReport(account));
- },
- }));
+ dispatch(initBlockModal(account));
}
},
diff --git a/app/javascript/flavours/glitch/features/status/containers/detailed_status_container.js b/app/javascript/flavours/glitch/features/status/containers/detailed_status_container.js
index e6c390537..e71803328 100644
--- a/app/javascript/flavours/glitch/features/status/containers/detailed_status_container.js
+++ b/app/javascript/flavours/glitch/features/status/containers/detailed_status_container.js
@@ -1,4 +1,3 @@
-import React from 'react';
import { connect } from 'react-redux';
import DetailedStatus from '../components/detailed_status';
import { makeGetStatus } from 'flavours/glitch/selectors';
@@ -15,7 +14,6 @@ import {
pin,
unpin,
} from 'flavours/glitch/actions/interactions';
-import { blockAccount } from 'flavours/glitch/actions/accounts';
import {
muteStatus,
unmuteStatus,
@@ -24,9 +22,10 @@ import {
revealStatus,
} from 'flavours/glitch/actions/statuses';
import { initMuteModal } from 'flavours/glitch/actions/mutes';
+import { initBlockModal } from 'flavours/glitch/actions/blocks';
import { initReport } from 'flavours/glitch/actions/reports';
import { openModal } from 'flavours/glitch/actions/modal';
-import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
+import { defineMessages, injectIntl } from 'react-intl';
import { boostModal, deleteModal } from 'flavours/glitch/util/initial_state';
import { showAlertForError } from 'flavours/glitch/actions/alerts';
@@ -35,10 +34,8 @@ const messages = defineMessages({
deleteMessage: { id: 'confirmations.delete.message', defaultMessage: 'Are you sure you want to delete this status?' },
redraftConfirm: { id: 'confirmations.redraft.confirm', defaultMessage: 'Delete & redraft' },
redraftMessage: { id: 'confirmations.redraft.message', defaultMessage: 'Are you sure you want to delete this status and re-draft it? Favourites and boosts will be lost, and replies to the original post will be orphaned.' },
- blockConfirm: { id: 'confirmations.block.confirm', defaultMessage: 'Block' },
replyConfirm: { id: 'confirmations.reply.confirm', defaultMessage: 'Reply' },
replyMessage: { id: 'confirmations.reply.message', defaultMessage: 'Replying now will overwrite the message you are currently composing. Are you sure you want to proceed?' },
- blockAndReport: { id: 'confirmations.block.block_and_report', defaultMessage: 'Block & Report' },
});
const makeMapStateToProps = () => {
@@ -139,16 +136,7 @@ const mapDispatchToProps = (dispatch, { intl }) => ({
onBlock (status) {
const account = status.get('account');
- dispatch(openModal('CONFIRM', {
- message: @{account.get('acct')} }} />,
- confirm: intl.formatMessage(messages.blockConfirm),
- onConfirm: () => dispatch(blockAccount(account.get('id'))),
- secondary: intl.formatMessage(messages.blockAndReport),
- onSecondary: () => {
- dispatch(blockAccount(account.get('id')));
- dispatch(initReport(account, status));
- },
- }));
+ dispatch(initBlockModal(account));
},
onReport (status) {
diff --git a/app/javascript/flavours/glitch/features/status/index.js b/app/javascript/flavours/glitch/features/status/index.js
index e91ab5f3a..dd17823ad 100644
--- a/app/javascript/flavours/glitch/features/status/index.js
+++ b/app/javascript/flavours/glitch/features/status/index.js
@@ -26,9 +26,9 @@ import {
directCompose,
} from 'flavours/glitch/actions/compose';
import { changeLocalSetting } from 'flavours/glitch/actions/local_settings';
-import { blockAccount } from 'flavours/glitch/actions/accounts';
import { muteStatus, unmuteStatus, deleteStatus } from 'flavours/glitch/actions/statuses';
import { initMuteModal } from 'flavours/glitch/actions/mutes';
+import { initBlockModal } from 'flavours/glitch/actions/blocks';
import { initReport } from 'flavours/glitch/actions/reports';
import { makeGetStatus } from 'flavours/glitch/selectors';
import { ScrollContainer } from 'react-router-scroll-4';
@@ -36,7 +36,7 @@ import ColumnBackButton from 'flavours/glitch/components/column_back_button';
import ColumnHeader from '../../components/column_header';
import StatusContainer from 'flavours/glitch/containers/status_container';
import { openModal } from 'flavours/glitch/actions/modal';
-import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
+import { defineMessages, injectIntl } from 'react-intl';
import ImmutablePureComponent from 'react-immutable-pure-component';
import { HotKeys } from 'react-hotkeys';
import { boostModal, favouriteModal, deleteModal } from 'flavours/glitch/util/initial_state';
@@ -50,13 +50,11 @@ const messages = defineMessages({
deleteMessage: { id: 'confirmations.delete.message', defaultMessage: 'Are you sure you want to delete this status?' },
redraftConfirm: { id: 'confirmations.redraft.confirm', defaultMessage: 'Delete & redraft' },
redraftMessage: { id: 'confirmations.redraft.message', defaultMessage: 'Are you sure you want to delete this status and re-draft it? You will lose all replies, boosts and favourites to it.' },
- blockConfirm: { id: 'confirmations.block.confirm', defaultMessage: 'Block' },
revealAll: { id: 'status.show_more_all', defaultMessage: 'Show more for all' },
hideAll: { id: 'status.show_less_all', defaultMessage: 'Show less for all' },
detailedStatus: { id: 'status.detailed_status', defaultMessage: 'Detailed conversation view' },
replyConfirm: { id: 'confirmations.reply.confirm', defaultMessage: 'Reply' },
replyMessage: { id: 'confirmations.reply.message', defaultMessage: 'Replying now will overwrite the message you are currently composing. Are you sure you want to proceed?' },
- blockAndReport: { id: 'confirmations.block.block_and_report', defaultMessage: 'Block & Report' },
tootHeading: { id: 'column.toot', defaultMessage: 'Toots and replies' },
});
@@ -339,19 +337,9 @@ class Status extends ImmutablePureComponent {
}
handleBlockClick = (status) => {
- const { dispatch, intl } = this.props;
+ const { dispatch } = this.props;
const account = status.get('account');
-
- dispatch(openModal('CONFIRM', {
- message: @{account.get('acct')} }} />,
- confirm: intl.formatMessage(messages.blockConfirm),
- onConfirm: () => dispatch(blockAccount(account.get('id'))),
- secondary: intl.formatMessage(messages.blockAndReport),
- onSecondary: () => {
- dispatch(blockAccount(account.get('id')));
- dispatch(initReport(account, status));
- },
- }));
+ dispatch(initBlockModal(account));
}
handleReport = (status) => {
diff --git a/app/javascript/flavours/glitch/features/ui/components/block_modal.js b/app/javascript/flavours/glitch/features/ui/components/block_modal.js
new file mode 100644
index 000000000..a07baeaa6
--- /dev/null
+++ b/app/javascript/flavours/glitch/features/ui/components/block_modal.js
@@ -0,0 +1,103 @@
+import React from 'react';
+import { connect } from 'react-redux';
+import PropTypes from 'prop-types';
+import { injectIntl, FormattedMessage } from 'react-intl';
+import { makeGetAccount } from '../../../selectors';
+import Button from '../../../components/button';
+import { closeModal } from '../../../actions/modal';
+import { blockAccount } from '../../../actions/accounts';
+import { initReport } from '../../../actions/reports';
+
+
+const makeMapStateToProps = () => {
+ const getAccount = makeGetAccount();
+
+ const mapStateToProps = state => ({
+ account: getAccount(state, state.getIn(['blocks', 'new', 'account_id'])),
+ });
+
+ return mapStateToProps;
+};
+
+const mapDispatchToProps = dispatch => {
+ return {
+ onConfirm(account) {
+ dispatch(blockAccount(account.get('id')));
+ },
+
+ onBlockAndReport(account) {
+ dispatch(blockAccount(account.get('id')));
+ dispatch(initReport(account));
+ },
+
+ onClose() {
+ dispatch(closeModal());
+ },
+ };
+};
+
+export default @connect(makeMapStateToProps, mapDispatchToProps)
+@injectIntl
+class BlockModal extends React.PureComponent {
+
+ static propTypes = {
+ account: PropTypes.object.isRequired,
+ onClose: PropTypes.func.isRequired,
+ onBlockAndReport: PropTypes.func.isRequired,
+ onConfirm: PropTypes.func.isRequired,
+ intl: PropTypes.object.isRequired,
+ };
+
+ componentDidMount() {
+ this.button.focus();
+ }
+
+ handleClick = () => {
+ this.props.onClose();
+ this.props.onConfirm(this.props.account);
+ }
+
+ handleSecondary = () => {
+ this.props.onClose();
+ this.props.onBlockAndReport(this.props.account);
+ }
+
+ handleCancel = () => {
+ this.props.onClose();
+ }
+
+ setRef = (c) => {
+ this.button = c;
+ }
+
+ render () {
+ const { account } = this.props;
+
+ return (
+
+
+
+ @{account.get('acct')} }}
+ />
+
+
+
+
+
+
+
+
+
+ );
+ }
+
+}
diff --git a/app/javascript/flavours/glitch/features/ui/components/modal_root.js b/app/javascript/flavours/glitch/features/ui/components/modal_root.js
index 303e05db6..0941ce9c8 100644
--- a/app/javascript/flavours/glitch/features/ui/components/modal_root.js
+++ b/app/javascript/flavours/glitch/features/ui/components/modal_root.js
@@ -15,6 +15,7 @@ import FocalPointModal from './focal_point_modal';
import {
OnboardingModal,
MuteModal,
+ BlockModal,
ReportModal,
SettingsModal,
EmbedModal,
@@ -32,6 +33,7 @@ const MODAL_COMPONENTS = {
'DOODLE': () => Promise.resolve({ default: DoodleModal }),
'CONFIRM': () => Promise.resolve({ default: ConfirmationModal }),
'MUTE': MuteModal,
+ 'BLOCK': BlockModal,
'REPORT': ReportModal,
'SETTINGS': SettingsModal,
'ACTIONS': () => Promise.resolve({ default: ActionsModal }),
diff --git a/app/javascript/flavours/glitch/features/ui/components/mute_modal.js b/app/javascript/flavours/glitch/features/ui/components/mute_modal.js
index 3492eca69..dec6413c3 100644
--- a/app/javascript/flavours/glitch/features/ui/components/mute_modal.js
+++ b/app/javascript/flavours/glitch/features/ui/components/mute_modal.js
@@ -11,7 +11,6 @@ import { toggleHideNotifications } from 'flavours/glitch/actions/mutes';
const mapStateToProps = state => {
return {
- isSubmitting: state.getIn(['reports', 'new', 'isSubmitting']),
account: state.getIn(['mutes', 'new', 'account']),
notifications: state.getIn(['mutes', 'new', 'notifications']),
};
@@ -38,7 +37,6 @@ export default @connect(mapStateToProps, mapDispatchToProps)
class MuteModal extends React.PureComponent {
static propTypes = {
- isSubmitting: PropTypes.bool.isRequired,
account: PropTypes.object.isRequired,
notifications: PropTypes.bool.isRequired,
onClose: PropTypes.func.isRequired,
@@ -81,11 +79,16 @@ class MuteModal extends React.PureComponent {
values={{ name: @{account.get('acct')} }}
/>
-
diff --git a/app/javascript/flavours/glitch/reducers/blocks.js b/app/javascript/flavours/glitch/reducers/blocks.js
new file mode 100644
index 000000000..1b6507163
--- /dev/null
+++ b/app/javascript/flavours/glitch/reducers/blocks.js
@@ -0,0 +1,22 @@
+import Immutable from 'immutable';
+
+import {
+ BLOCKS_INIT_MODAL,
+} from '../actions/blocks';
+
+const initialState = Immutable.Map({
+ new: Immutable.Map({
+ account_id: null,
+ }),
+});
+
+export default function mutes(state = initialState, action) {
+ switch (action.type) {
+ case BLOCKS_INIT_MODAL:
+ return state.withMutations((state) => {
+ state.setIn(['new', 'account_id'], action.account.get('id'));
+ });
+ default:
+ return state;
+ }
+}
diff --git a/app/javascript/flavours/glitch/reducers/index.js b/app/javascript/flavours/glitch/reducers/index.js
index b03590194..7dbca3a29 100644
--- a/app/javascript/flavours/glitch/reducers/index.js
+++ b/app/javascript/flavours/glitch/reducers/index.js
@@ -16,6 +16,7 @@ import local_settings from './local_settings';
import push_notifications from './push_notifications';
import status_lists from './status_lists';
import mutes from './mutes';
+import blocks from './blocks';
import reports from './reports';
import contexts from './contexts';
import compose from './compose';
@@ -53,6 +54,7 @@ const reducers = {
local_settings,
push_notifications,
mutes,
+ blocks,
reports,
contexts,
compose,
diff --git a/app/javascript/flavours/glitch/reducers/mutes.js b/app/javascript/flavours/glitch/reducers/mutes.js
index 8f52a7704..7111bb710 100644
--- a/app/javascript/flavours/glitch/reducers/mutes.js
+++ b/app/javascript/flavours/glitch/reducers/mutes.js
@@ -7,7 +7,6 @@ import {
const initialState = Immutable.Map({
new: Immutable.Map({
- isSubmitting: false,
account: null,
notifications: true,
}),
@@ -17,7 +16,6 @@ export default function mutes(state = initialState, action) {
switch (action.type) {
case MUTES_INIT_MODAL:
return state.withMutations((state) => {
- state.setIn(['new', 'isSubmitting'], false);
state.setIn(['new', 'account'], action.account);
state.setIn(['new', 'notifications'], true);
});
diff --git a/app/javascript/flavours/glitch/styles/components/modal.scss b/app/javascript/flavours/glitch/styles/components/modal.scss
index ec32c9114..4f3e5babf 100644
--- a/app/javascript/flavours/glitch/styles/components/modal.scss
+++ b/app/javascript/flavours/glitch/styles/components/modal.scss
@@ -405,7 +405,8 @@
.confirmation-modal,
.report-modal,
.actions-modal,
-.mute-modal {
+.mute-modal,
+.block-modal {
background: lighten($ui-secondary-color, 8%);
color: $inverted-text-color;
border-radius: 8px;
@@ -465,7 +466,8 @@
.boost-modal__action-bar,
.favourite-modal__action-bar,
.confirmation-modal__action-bar,
-.mute-modal__action-bar {
+.mute-modal__action-bar,
+.block-modal__action-bar {
display: flex;
justify-content: space-between;
background: $ui-secondary-color;
@@ -495,11 +497,13 @@
font-size: 14px;
}
-.mute-modal {
+.mute-modal,
+.block-modal {
line-height: 24px;
}
-.mute-modal .react-toggle {
+.mute-modal .react-toggle,
+.block-modal .react-toggle {
vertical-align: middle;
}
@@ -712,27 +716,29 @@
}
.confirmation-modal__action-bar,
-.mute-modal__action-bar {
- .confirmation-modal__secondary-button,
- .confirmation-modal__cancel-button,
- .mute-modal__cancel-button {
- background-color: transparent;
- color: $lighter-text-color;
- font-size: 14px;
- font-weight: 500;
-
- &:hover,
- &:focus,
- &:active {
- color: darken($lighter-text-color, 4%);
- }
- }
-
+.mute-modal__action-bar,
+.block-modal__action-bar {
.confirmation-modal__secondary-button {
flex-shrink: 1;
}
}
+.confirmation-modal__secondary-button,
+.confirmation-modal__cancel-button,
+.mute-modal__cancel-button,
+.block-modal__cancel-button {
+ background-color: transparent;
+ color: $lighter-text-color;
+ font-size: 14px;
+ font-weight: 500;
+
+ &:hover,
+ &:focus,
+ &:active {
+ color: darken($lighter-text-color, 4%);
+ }
+}
+
.confirmation-modal__do_not_ask_again {
padding-left: 20px;
padding-right: 20px;
@@ -747,10 +753,10 @@
.confirmation-modal__container,
.mute-modal__container,
+.block-modal__container,
.report-modal__target {
padding: 30px;
font-size: 16px;
- text-align: center;
strong {
font-weight: 500;
@@ -763,6 +769,31 @@
}
}
+.confirmation-modal__container,
+.report-modal__target {
+ text-align: center;
+}
+
+.block-modal,
+.mute-modal {
+ &__explanation {
+ margin-top: 20px;
+ }
+
+ .setting-toggle {
+ margin-top: 20px;
+ margin-bottom: 24px;
+ display: flex;
+ align-items: center;
+
+ &__label {
+ color: $inverted-text-color;
+ margin: 0;
+ margin-left: 8px;
+ }
+ }
+}
+
.report-modal__target {
padding: 15px;
diff --git a/app/javascript/flavours/glitch/styles/mastodon-light/diff.scss b/app/javascript/flavours/glitch/styles/mastodon-light/diff.scss
index 4c2b76a21..5c7fa87da 100644
--- a/app/javascript/flavours/glitch/styles/mastodon-light/diff.scss
+++ b/app/javascript/flavours/glitch/styles/mastodon-light/diff.scss
@@ -226,6 +226,7 @@
.boost-modal,
.confirmation-modal,
.mute-modal,
+.block-modal,
.report-modal,
.embed-modal,
.error-modal,
@@ -236,6 +237,7 @@
.boost-modal__action-bar,
.confirmation-modal__action-bar,
.mute-modal__action-bar,
+.block-modal__action-bar,
.onboarding-modal__paginator,
.error-modal__footer {
background: darken($ui-base-color, 6%);
diff --git a/app/javascript/flavours/glitch/util/async-components.js b/app/javascript/flavours/glitch/util/async-components.js
index 6c0acdb27..26255bbb7 100644
--- a/app/javascript/flavours/glitch/util/async-components.js
+++ b/app/javascript/flavours/glitch/util/async-components.js
@@ -122,6 +122,10 @@ export function MuteModal () {
return import(/* webpackChunkName: "flavours/glitch/async/mute_modal" */'flavours/glitch/features/ui/components/mute_modal');
}
+export function BlockModal () {
+ return import(/* webpackChunkName: "flavours/glitch/async/block_modal" */'flavours/glitch/features/ui/components/block_modal');
+}
+
export function ReportModal () {
return import(/* webpackChunkName: "flavours/glitch/async/report_modal" */'flavours/glitch/features/ui/components/report_modal');
}
--
cgit
From 13bc2cd4afb3928a5a4380b4c3b035298f595bf7 Mon Sep 17 00:00:00 2001
From: Eugen Rochko
Date: Sat, 21 Sep 2019 20:01:16 +0200
Subject: [Glitch] Change conversations UI
Port bc5678d0151dd96e0ec5f3d4084ac6356c1d02f5 to glitch-soc
Signed-off-by: Thibaut Girka
---
.../flavours/glitch/actions/conversations.js | 28 ++++
.../flavours/glitch/components/avatar_composite.js | 28 ++--
.../flavours/glitch/containers/status_container.js | 1 +
.../direct_timeline/components/conversation.js | 157 +++++++++++++++++++--
.../containers/conversation_container.js | 75 ++++++++--
.../glitch/styles/components/accounts.scss | 14 ++
.../flavours/glitch/styles/components/index.scss | 73 +++++-----
7 files changed, 308 insertions(+), 68 deletions(-)
(limited to 'app/javascript/flavours/glitch/actions')
diff --git a/app/javascript/flavours/glitch/actions/conversations.js b/app/javascript/flavours/glitch/actions/conversations.js
index 856f8f10f..e5c85c65d 100644
--- a/app/javascript/flavours/glitch/actions/conversations.js
+++ b/app/javascript/flavours/glitch/actions/conversations.js
@@ -15,6 +15,10 @@ export const CONVERSATIONS_UPDATE = 'CONVERSATIONS_UPDATE';
export const CONVERSATIONS_READ = 'CONVERSATIONS_READ';
+export const CONVERSATIONS_DELETE_REQUEST = 'CONVERSATIONS_DELETE_REQUEST';
+export const CONVERSATIONS_DELETE_SUCCESS = 'CONVERSATIONS_DELETE_SUCCESS';
+export const CONVERSATIONS_DELETE_FAIL = 'CONVERSATIONS_DELETE_FAIL';
+
export const mountConversations = () => ({
type: CONVERSATIONS_MOUNT,
});
@@ -82,3 +86,27 @@ export const updateConversations = conversation => dispatch => {
conversation,
});
};
+
+export const deleteConversation = conversationId => (dispatch, getState) => {
+ dispatch(deleteConversationRequest(conversationId));
+
+ api(getState).delete(`/api/v1/conversations/${conversationId}`)
+ .then(() => dispatch(deleteConversationSuccess(conversationId)))
+ .catch(error => dispatch(deleteConversationFail(conversationId, error)));
+};
+
+export const deleteConversationRequest = id => ({
+ type: CONVERSATIONS_DELETE_REQUEST,
+ id,
+});
+
+export const deleteConversationSuccess = id => ({
+ type: CONVERSATIONS_DELETE_SUCCESS,
+ id,
+});
+
+export const deleteConversationFail = (id, error) => ({
+ type: CONVERSATIONS_DELETE_FAIL,
+ id,
+ error,
+});
diff --git a/app/javascript/flavours/glitch/components/avatar_composite.js b/app/javascript/flavours/glitch/components/avatar_composite.js
index c52df043a..125b51c44 100644
--- a/app/javascript/flavours/glitch/components/avatar_composite.js
+++ b/app/javascript/flavours/glitch/components/avatar_composite.js
@@ -35,35 +35,35 @@ export default class AvatarComposite extends React.PureComponent {
if (size === 2) {
if (index === 0) {
- right = '2px';
+ right = '1px';
} else {
- left = '2px';
+ left = '1px';
}
} else if (size === 3) {
if (index === 0) {
- right = '2px';
+ right = '1px';
} else if (index > 0) {
- left = '2px';
+ left = '1px';
}
if (index === 1) {
- bottom = '2px';
+ bottom = '1px';
} else if (index > 1) {
- top = '2px';
+ top = '1px';
}
} else if (size === 4) {
if (index === 0 || index === 2) {
- right = '2px';
+ right = '1px';
}
if (index === 1 || index === 3) {
- left = '2px';
+ left = '1px';
}
if (index < 2) {
- bottom = '2px';
+ bottom = '1px';
} else {
- top = '2px';
+ top = '1px';
}
}
@@ -96,7 +96,13 @@ export default class AvatarComposite extends React.PureComponent {
return (
- {accounts.take(4).map((account, i) => this.renderItem(account, accounts.size, i))}
+ {accounts.take(4).map((account, i) => this.renderItem(account, Math.min(accounts.size, 4), i))}
+
+ {accounts.size > 4 && (
+
+ +{accounts.size - 4}
+
+ )}
);
}
diff --git a/app/javascript/flavours/glitch/containers/status_container.js b/app/javascript/flavours/glitch/containers/status_container.js
index 647ddf276..4c3555dea 100644
--- a/app/javascript/flavours/glitch/containers/status_container.js
+++ b/app/javascript/flavours/glitch/containers/status_container.js
@@ -80,6 +80,7 @@ const mapDispatchToProps = (dispatch, { intl, contextType }) => ({
onReply (status, router) {
dispatch((_, getState) => {
let state = getState();
+
if (state.getIn(['local_settings', 'confirm_before_clearing_draft']) && state.getIn(['compose', 'text']).trim().length !== 0) {
dispatch(openModal('CONFIRM', {
message: intl.formatMessage(messages.replyMessage),
diff --git a/app/javascript/flavours/glitch/features/direct_timeline/components/conversation.js b/app/javascript/flavours/glitch/features/direct_timeline/components/conversation.js
index 9ddeabe75..17487b202 100644
--- a/app/javascript/flavours/glitch/features/direct_timeline/components/conversation.js
+++ b/app/javascript/flavours/glitch/features/direct_timeline/components/conversation.js
@@ -2,9 +2,28 @@ import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
-import StatusContainer from 'flavours/glitch/containers/status_container';
+import StatusContent from 'flavours/glitch/components/status_content';
+import AttachmentList from 'flavours/glitch/components/attachment_list';
+import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
+import DropdownMenuContainer from 'flavours/glitch/containers/dropdown_menu_container';
+import AvatarComposite from 'flavours/glitch/components/avatar_composite';
+import Permalink from 'flavours/glitch/components/permalink';
+import IconButton from 'flavours/glitch/components/icon_button';
+import RelativeTimestamp from 'flavours/glitch/components/relative_timestamp';
+import { HotKeys } from 'react-hotkeys';
-export default class Conversation extends ImmutablePureComponent {
+const messages = defineMessages({
+ more: { id: 'status.more', defaultMessage: 'More' },
+ open: { id: 'conversation.open', defaultMessage: 'View conversation' },
+ reply: { id: 'status.reply', defaultMessage: 'Reply' },
+ markAsRead: { id: 'conversation.mark_as_read', defaultMessage: 'Mark as read' },
+ delete: { id: 'conversation.delete', defaultMessage: 'Delete conversation' },
+ muteConversation: { id: 'status.mute_conversation', defaultMessage: 'Mute conversation' },
+ unmuteConversation: { id: 'status.unmute_conversation', defaultMessage: 'Unmute conversation' },
+});
+
+export default @injectIntl
+class Conversation extends ImmutablePureComponent {
static contextTypes = {
router: PropTypes.object,
@@ -13,25 +32,61 @@ export default class Conversation extends ImmutablePureComponent {
static propTypes = {
conversationId: PropTypes.string.isRequired,
accounts: ImmutablePropTypes.list.isRequired,
- lastStatusId: PropTypes.string,
+ lastStatus: ImmutablePropTypes.map,
unread:PropTypes.bool.isRequired,
onMoveUp: PropTypes.func,
onMoveDown: PropTypes.func,
markRead: PropTypes.func.isRequired,
+ intl: PropTypes.object.isRequired,
+ };
+
+ state = {
+ isExpanded: undefined,
};
+ parseClick = (e, destination) => {
+ const { router } = this.context;
+ const { lastStatus, unread, markRead } = this.props;
+ if (!router) return;
+
+ if (e.button === 0 && !(e.ctrlKey || e.altKey || e.metaKey)) {
+ if (destination === undefined) {
+ if (unread) {
+ markRead();
+ }
+ destination = `/statuses/${lastStatus.get('id')}`;
+ }
+ let state = {...router.history.location.state};
+ state.mastodonBackSteps = (state.mastodonBackSteps || 0) + 1;
+ router.history.push(destination, state);
+ e.preventDefault();
+ }
+ }
+
handleClick = () => {
if (!this.context.router) {
return;
}
- const { lastStatusId, unread, markRead } = this.props;
+ const { lastStatus, unread, markRead } = this.props;
if (unread) {
markRead();
}
- this.context.router.history.push(`/statuses/${lastStatusId}`);
+ this.context.router.history.push(`/statuses/${lastStatus.get('id')}`);
+ }
+
+ handleMarkAsRead = () => {
+ this.props.markRead();
+ }
+
+ handleReply = () => {
+ this.props.reply(this.props.lastStatus, this.context.router.history);
+ }
+
+ handleDelete = () => {
+ this.props.delete();
}
handleHotkeyMoveUp = () => {
@@ -42,22 +97,94 @@ export default class Conversation extends ImmutablePureComponent {
this.props.onMoveDown(this.props.conversationId);
}
+ handleConversationMute = () => {
+ this.props.onMute(this.props.lastStatus);
+ }
+
+ handleShowMore = () => {
+ if (this.props.lastStatus.get('spoiler_text')) {
+ this.setExpansion(!this.state.isExpanded);
+ }
+ };
+
+ setExpansion = value => {
+ this.setState({ isExpanded: value });
+ }
+
render () {
- const { accounts, lastStatusId, unread } = this.props;
+ const { accounts, lastStatus, unread, intl } = this.props;
+ const { isExpanded } = this.state;
- if (lastStatusId === null) {
+ if (lastStatus === null) {
return null;
}
+ const menu = [
+ { text: intl.formatMessage(messages.open), action: this.handleClick },
+ null,
+ ];
+
+ menu.push({ text: intl.formatMessage(lastStatus.get('muted') ? messages.unmuteConversation : messages.muteConversation), action: this.handleConversationMute });
+
+ if (unread) {
+ menu.push({ text: intl.formatMessage(messages.markAsRead), action: this.handleMarkAsRead });
+ menu.push(null);
+ }
+
+ menu.push({ text: intl.formatMessage(messages.delete), action: this.handleDelete });
+
+ const names = accounts.map(a => ).reduce((prev, cur) => [prev, ', ', cur]);
+
+ const handlers = {
+ reply: this.handleReply,
+ open: this.handleClick,
+ moveUp: this.handleHotkeyMoveUp,
+ moveDown: this.handleHotkeyMoveDown,
+ toggleHidden: this.handleShowMore,
+ };
+
+ let media = null;
+ if (lastStatus.get('media_attachments').size > 0) {
+ media = ;
+ }
+
return (
-
+
+
+
+
+
+
+
+
+
+
+
+ {names} }} />
+
+
+
+
+
+
+
+
+
);
}
diff --git a/app/javascript/flavours/glitch/features/direct_timeline/containers/conversation_container.js b/app/javascript/flavours/glitch/features/direct_timeline/containers/conversation_container.js
index bd6f6bfb0..b15ce9f0f 100644
--- a/app/javascript/flavours/glitch/features/direct_timeline/containers/conversation_container.js
+++ b/app/javascript/flavours/glitch/features/direct_timeline/containers/conversation_container.js
@@ -1,19 +1,74 @@
import { connect } from 'react-redux';
import Conversation from '../components/conversation';
-import { markConversationRead } from '../../../actions/conversations';
+import { markConversationRead, deleteConversation } from 'flavours/glitch/actions/conversations';
+import { makeGetStatus } from 'flavours/glitch/selectors';
+import { replyCompose } from 'flavours/glitch/actions/compose';
+import { openModal } from 'flavours/glitch/actions/modal';
+import { muteStatus, unmuteStatus, hideStatus, revealStatus } from 'flavours/glitch/actions/statuses';
+import { defineMessages, injectIntl } from 'react-intl';
-const mapStateToProps = (state, { conversationId }) => {
- const conversation = state.getIn(['conversations', 'items']).find(x => x.get('id') === conversationId);
+const messages = defineMessages({
+ replyConfirm: { id: 'confirmations.reply.confirm', defaultMessage: 'Reply' },
+ replyMessage: { id: 'confirmations.reply.message', defaultMessage: 'Replying now will overwrite the message you are currently composing. Are you sure you want to proceed?' },
+});
+
+const mapStateToProps = () => {
+ const getStatus = makeGetStatus();
+
+ return (state, { conversationId }) => {
+ const conversation = state.getIn(['conversations', 'items']).find(x => x.get('id') === conversationId);
+ const lastStatusId = conversation.get('last_status', null);
- return {
- accounts: conversation.get('accounts').map(accountId => state.getIn(['accounts', accountId], null)),
- unread: conversation.get('unread'),
- lastStatusId: conversation.get('last_status', null),
+ return {
+ accounts: conversation.get('accounts').map(accountId => state.getIn(['accounts', accountId], null)),
+ unread: conversation.get('unread'),
+ lastStatus: lastStatusId && getStatus(state, { id: lastStatusId }),
+ };
};
};
-const mapDispatchToProps = (dispatch, { conversationId }) => ({
- markRead: () => dispatch(markConversationRead(conversationId)),
+const mapDispatchToProps = (dispatch, { intl, conversationId }) => ({
+
+ markRead () {
+ dispatch(markConversationRead(conversationId));
+ },
+
+ reply (status, router) {
+ dispatch((_, getState) => {
+ let state = getState();
+
+ if (state.getIn(['compose', 'text']).trim().length !== 0) {
+ dispatch(openModal('CONFIRM', {
+ message: intl.formatMessage(messages.replyMessage),
+ confirm: intl.formatMessage(messages.replyConfirm),
+ onConfirm: () => dispatch(replyCompose(status, router)),
+ }));
+ } else {
+ dispatch(replyCompose(status, router));
+ }
+ });
+ },
+
+ delete () {
+ dispatch(deleteConversation(conversationId));
+ },
+
+ onMute (status) {
+ if (status.get('muted')) {
+ dispatch(unmuteStatus(status.get('id')));
+ } else {
+ dispatch(muteStatus(status.get('id')));
+ }
+ },
+
+ onToggleHidden (status) {
+ if (status.get('hidden')) {
+ dispatch(revealStatus(status.get('id')));
+ } else {
+ dispatch(hideStatus(status.get('id')));
+ }
+ },
+
});
-export default connect(mapStateToProps, mapDispatchToProps)(Conversation);
+export default injectIntl(connect(mapStateToProps, mapDispatchToProps)(Conversation));
diff --git a/app/javascript/flavours/glitch/styles/components/accounts.scss b/app/javascript/flavours/glitch/styles/components/accounts.scss
index b5a07239f..5be4da48a 100644
--- a/app/javascript/flavours/glitch/styles/components/accounts.scss
+++ b/app/javascript/flavours/glitch/styles/components/accounts.scss
@@ -50,6 +50,8 @@
&-composite {
@include avatar-radius;
overflow: hidden;
+ position: relative;
+ cursor: default;
& div {
@include avatar-radius;
@@ -57,6 +59,18 @@
position: relative;
box-sizing: border-box;
}
+
+ &__label {
+ display: block;
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+ color: $primary-text-color;
+ text-shadow: 1px 1px 2px $base-shadow-color;
+ font-weight: 700;
+ font-size: 15px;
+ }
}
}
diff --git a/app/javascript/flavours/glitch/styles/components/index.scss b/app/javascript/flavours/glitch/styles/components/index.scss
index 97c525565..8ebcde5ef 100644
--- a/app/javascript/flavours/glitch/styles/components/index.scss
+++ b/app/javascript/flavours/glitch/styles/components/index.scss
@@ -1433,49 +1433,58 @@
height: 1em;
}
-.layout-toggle {
+.conversation {
display: flex;
+ border-bottom: 1px solid lighten($ui-base-color, 8%);
padding: 5px;
+ padding-bottom: 0;
- button {
- box-sizing: border-box;
- flex: 0 0 50%;
- background: transparent;
- padding: 5px;
- border: 0;
- position: relative;
+ &:focus {
+ background: lighten($ui-base-color, 2%);
+ outline: 0;
+ }
- &:hover,
- &:focus,
- &:active {
- svg path:first-child {
- fill: lighten($ui-base-color, 16%);
- }
- }
+ &__avatar {
+ flex: 0 0 auto;
+ padding: 10px;
+ padding-top: 12px;
}
- svg {
- width: 100%;
- height: auto;
+ &__content {
+ flex: 1 1 auto;
+ padding: 10px 5px;
+ padding-right: 15px;
- path:first-child {
- fill: lighten($ui-base-color, 12%);
+ &__info {
+ overflow: hidden;
}
- path:last-child {
- fill: darken($ui-base-color, 14%);
+ &__relative-time {
+ float: right;
+ font-size: 15px;
+ color: $darker-text-color;
+ padding-left: 15px;
}
- }
- &__active {
- color: $ui-highlight-color;
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- background: lighten($ui-base-color, 12%);
- border-radius: 50%;
- padding: 0.35rem;
+ &__names {
+ color: $darker-text-color;
+ font-size: 15px;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ margin-bottom: 4px;
+
+ a {
+ color: $primary-text-color;
+ text-decoration: none;
+
+ &:hover,
+ &:focus,
+ &:active {
+ text-decoration: underline;
+ }
+ }
+ }
}
}
--
cgit