Merge branch 'post-toast' into 'develop'

Compose: preliminary toast upon submission

See merge request soapbox-pub/soapbox-fe!797
merge-requests/798/merge
Alex Gleason 2021-10-19 17:44:20 +00:00
commit 5d77f65535
3 zmienionych plików z 8 dodań i 1 usunięć

Wyświetl plik

@ -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 => {

Wyświetl plik

@ -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,
};

Wyświetl plik

@ -32,6 +32,10 @@
}
}
&--post {
background-color: #0482d8 !important;
}
&--success {
background-color: #199e5a !important;