mirror of
https://github.com/wassname/talk.git
synced 2026-07-28 11:27:05 +08:00
done - but translations
This commit is contained in:
@@ -1,9 +0,0 @@
|
||||
import * as actions from './constants';
|
||||
|
||||
export const showAddEmailDialog = () => ({
|
||||
type: actions.SHOW_ADD_EMAIL_DIALOG,
|
||||
});
|
||||
|
||||
export const hideAddEmailDialog = () => ({
|
||||
type: actions.HIDE_ADD_EMAIL_DIALOG,
|
||||
});
|
||||
@@ -1,4 +0,0 @@
|
||||
const prefix = 'TALK_AUTH_LOCAL';
|
||||
|
||||
export const SHOW_ADD_EMAIL_DIALOG = `${prefix}_SHOW_ADD_EMAIL_DIALOG`;
|
||||
export const HIDE_ADD_EMAIL_DIALOG = `${prefix}_HIDE_ADD_EMAIL_DIALOG`;
|
||||
@@ -1,6 +1,6 @@
|
||||
import { compose, gql } from 'react-apollo';
|
||||
import { bindActionCreators } from 'redux';
|
||||
import { connect, withFragments } from 'plugin-api/beta/client/hocs';
|
||||
import { connect, withFragments, excludeIf } from 'plugin-api/beta/client/hocs';
|
||||
import AddEmailAddressDialog from '../components/AddEmailAddressDialog';
|
||||
import { notify } from 'coral-framework/actions/notification';
|
||||
|
||||
@@ -22,12 +22,9 @@ const withData = withFragments({
|
||||
`,
|
||||
});
|
||||
|
||||
const mapStateToProps = ({ talkPluginLocalAuth: state }) => ({
|
||||
showAddEmailDialog: state.showAddEmailDialog,
|
||||
});
|
||||
|
||||
export default compose(
|
||||
connect(mapStateToProps, mapDispatchToProps),
|
||||
connect(null, mapDispatchToProps),
|
||||
withAttachLocalAuth,
|
||||
withData
|
||||
withData,
|
||||
excludeIf(({ root: { me } }) => !me || me.email)
|
||||
)(AddEmailAddressDialog);
|
||||
|
||||
@@ -2,10 +2,8 @@ import ChangePassword from './containers/ChangePassword';
|
||||
import AddEmailAddressDialog from './containers/AddEmailAddressDialog';
|
||||
import Profile from './containers/Profile';
|
||||
import translations from './translations.yml';
|
||||
import reducer from './reducer';
|
||||
|
||||
export default {
|
||||
reducer,
|
||||
translations,
|
||||
slots: {
|
||||
profileHeader: [Profile],
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
import * as actions from './constants';
|
||||
|
||||
const initialState = {
|
||||
showAddEmailDialog: true,
|
||||
};
|
||||
|
||||
export default function reducer(state = initialState, action) {
|
||||
switch (action.type) {
|
||||
case actions.SHOW_ADD_EMAIL_DIALOG:
|
||||
return {
|
||||
...state,
|
||||
showAddEmailDialog: true,
|
||||
};
|
||||
case actions.HIDE_ADD_EMAIL_DIALOG:
|
||||
return {
|
||||
...state,
|
||||
showAddEmailDialog: false,
|
||||
};
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user