created logout ui on sidebar

This commit is contained in:
u-e 2018-12-13 18:01:52 +03:00
parent f77bea5d29
commit 927dcd62aa
6 changed files with 20 additions and 5 deletions

View File

@ -88,7 +88,8 @@
"schedules": "Schedules",
"gallery": "Gallery",
"settings": "Settings",
"add_account": "Add Account"
"add_account": "Add Account",
"logout": "Logout"
},
"header": {
"title": "Login to customize your feed",

View File

@ -88,7 +88,8 @@
"schedules": "Yapılacaklar",
"gallery": "Galeri",
"settings": "Ayarlar",
"add_account": "Hesap Ekle"
"add_account": "Hesap Ekle",
"logout": "Cıkış"
},
"header": {
"title": "Giriş yap ve akışını özelleştir.",

View File

@ -1,6 +1,7 @@
const SCREEN_SUFFIX = 'Screen';
const DRAWER_SUFFIX = 'Drawer';
const TABBAR_SUFFIX = 'Tabbar';
const MODAL_SUFFIX = 'Modal';
export default {
SCREENS: {
@ -25,4 +26,7 @@ export default {
MESSAGES: `Messages${TABBAR_SUFFIX}`,
PROFILE: `Profile${TABBAR_SUFFIX}`,
},
MODAL: {
LOGOUT: `Logout${MODAL_SUFFIX}`,
},
};

View File

@ -43,6 +43,12 @@ const authMenuItems = [
icon: 'gear',
id: 'settings',
},
{
name: 'Logout',
route: ROUTES.MODAL.LOGOUT,
icon: 'sign-out',
id: 'logout',
},
];
const noAuthMenuItems = [

View File

@ -110,7 +110,7 @@ class ApplicationContainer extends Component {
dispatch(login());
const realmObject = realmData.filter(data => data.username === currentUsername);
accountData.local = realmObject;
accountData.local = realmObject[0];
dispatch(updateCurrentAccount(accountData));
// If in dev mode pin code does not show

View File

@ -8,7 +8,10 @@ import { setUserDataWithPinCode, verifyPinCode } from '../../../providers/steem/
// Actions & Services
import { closePinCodeModal } from '../../../redux/actions/applicationActions';
import {
getExistUser, setExistUser, getUserData, getUserDataWithUsername,
getExistUser,
setExistUser,
getUserData,
getUserDataWithUsername,
} from '../../../realm/realm';
import { updateCurrentAccount } from '../../../redux/actions/accountAction';
import { formatAccount } from '../../../utils/user';
@ -113,7 +116,7 @@ class PinCodeContainer extends Component {
};
setUserDataWithPinCode(pinData).then((response) => {
const _currentAccount = currentAccount;
_currentAccount.local = response;
_currentAccount.local = response[0];
dispatch(updateCurrentAccount({ ..._currentAccount }));