From 4a4e4ed40428f86f30e321faabe4a1736bde6e13 Mon Sep 17 00:00:00 2001 From: mauve Date: Mon, 4 May 2020 14:54:13 -0400 Subject: [PATCH] Fixed up loader screen --- app/Routes.js | 2 ++ app/components/Account.js | 6 +++--- app/components/Loader.js | 2 +- app/components/LoaderPage.js | 8 +++++++- app/core/Account.js | 5 +++-- 5 files changed, 16 insertions(+), 7 deletions(-) diff --git a/app/Routes.js b/app/Routes.js index 74b558e..dec18fc 100644 --- a/app/Routes.js +++ b/app/Routes.js @@ -10,6 +10,7 @@ import LoginPage from './containers/LoginPage'; import AccountPage from './containers/AccountPage'; import ProjectViewPage from './containers/ProjectViewPage'; import NewProjectContainer from './containers/NewProjectContainer'; +import LoaderPage from './components/LoaderPage'; export default () => ( @@ -18,6 +19,7 @@ export default () => ( + diff --git a/app/components/Account.js b/app/components/Account.js index f395cff..e401acd 100644 --- a/app/components/Account.js +++ b/app/components/Account.js @@ -19,7 +19,7 @@ export default function Account({ onGoCreate, onGoAccount }) { - const { name, image } = accountInfo; + const { name, image, writable } = accountInfo; const gossipedAccounts = gossiped.map(({ key, name: foundName }) => ( - ); + ) : null; const headerContent = (
{newProjectButton} diff --git a/app/components/Loader.js b/app/components/Loader.js index f48e8d7..9814d12 100644 --- a/app/components/Loader.js +++ b/app/components/Loader.js @@ -1,5 +1,5 @@ import React from 'react'; export default function Loader() { - return ; + return ; } diff --git a/app/components/LoaderPage.js b/app/components/LoaderPage.js index c43ff5a..147e6fd 100644 --- a/app/components/LoaderPage.js +++ b/app/components/LoaderPage.js @@ -3,9 +3,15 @@ import React from 'react'; import Loader from './Loader'; import PageContainer from './PageContainer'; +import styles from './LoaderPage.css'; + export default function LoaderPage(props) { return ( - + ); diff --git a/app/core/Account.js b/app/core/Account.js index 7f21681..a00be03 100644 --- a/app/core/Account.js +++ b/app/core/Account.js @@ -112,13 +112,14 @@ export default class Account { async getInfo() { const key = this.key.toString('hex'); + const { writable } = this; try { const raw = await this.archive.readFile(ACCOUNT_INFO_FILE, 'utf8'); const parsed = JSON.parse(raw); - return { name: key, ...parsed, key }; + return { name: key, ...parsed, key, writable }; } catch (e) { console.error(e); - return { name: key, key }; + return { name: key, key, writable }; } }