kopia lustrzana https://gitlab.com/soapbox-pub/soapbox
Merge branch 'post-toast' into 'develop'
Compose: preliminary toast upon submission See merge request soapbox-pub/soapbox-fe!797merge-requests/798/merge
commit
5d77f65535
|
@ -72,6 +72,7 @@ const messages = defineMessages({
|
|||
uploadErrorLimit: { id: 'upload_error.limit', defaultMessage: 'File upload limit exceeded.' },
|
||||
uploadErrorPoll: { id: 'upload_error.poll', defaultMessage: 'File upload not allowed with polls.' },
|
||||
scheduleError: { id: 'compose.invalid_schedule', defaultMessage: 'You must schedule a post at least 5 minutes out.' },
|
||||
success: { id: 'compose.submit_success', defaultMessage: 'Your post was sent' },
|
||||
});
|
||||
|
||||
const COMPOSE_PANEL_BREAKPOINT = 600 + (285 * 1) + (10 * 1);
|
||||
|
@ -154,6 +155,7 @@ export function handleComposeSubmit(dispatch, getState, data, status) {
|
|||
|
||||
dispatch(insertIntoTagHistory(data.tags || [], status));
|
||||
dispatch(submitComposeSuccess({ ...data }));
|
||||
dispatch(snackbar.show('post', messages.success));
|
||||
}
|
||||
|
||||
const needsDescriptions = state => {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { ALERT_SHOW } from './alerts';
|
||||
|
||||
const show = (severity, message) => ({
|
||||
export const show = (severity, message) => ({
|
||||
type: ALERT_SHOW,
|
||||
message,
|
||||
severity,
|
||||
|
@ -22,4 +22,5 @@ export default {
|
|||
info,
|
||||
success,
|
||||
error,
|
||||
show,
|
||||
};
|
||||
|
|
|
@ -32,6 +32,10 @@
|
|||
}
|
||||
}
|
||||
|
||||
&--post {
|
||||
background-color: #0482d8 !important;
|
||||
}
|
||||
|
||||
&--success {
|
||||
background-color: #199e5a !important;
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue