diff --git a/web/TODO.md b/web/TODO.md index 27c0714c..00d74b6b 100644 --- a/web/TODO.md +++ b/web/TODO.md @@ -1,7 +1,6 @@ major features: - improve design - - add true preloader - disable inputs for guests - hide reply links for guests - check mobile ui diff --git a/web/app/components/root/__auth-panel/root__auth-panel.scss b/web/app/components/root/__auth-panel/root__auth-panel.scss deleted file mode 100644 index 1bda3eb6..00000000 --- a/web/app/components/root/__auth-panel/root__auth-panel.scss +++ /dev/null @@ -1,3 +0,0 @@ -.root__auth-panel { - margin-bottom: 4px; -} diff --git a/web/app/components/root/__input/root__input.scss b/web/app/components/root/__input/root__input.scss index 2440c942..cfa788fd 100644 --- a/web/app/components/root/__input/root__input.scss +++ b/web/app/components/root/__input/root__input.scss @@ -1,3 +1,3 @@ .root__input { - margin-bottom: 24px; + margin-top: 4px; } diff --git a/web/app/components/root/__pinned-comments/root__pinned-comments.scss b/web/app/components/root/__pinned-comments/root__pinned-comments.scss index 7ffef917..547c776a 100644 --- a/web/app/components/root/__pinned-comments/root__pinned-comments.scss +++ b/web/app/components/root/__pinned-comments/root__pinned-comments.scss @@ -1,7 +1,7 @@ @import 'common/variables'; .root__pinned-comments { - margin-bottom: $offset * 2; + margin-top: 24px; padding: ($offset / 3) ($offset / 2); border: 2px solid #0aa; border-radius: 4px; diff --git a/web/app/components/root/__threads/root__threads.scss b/web/app/components/root/__threads/root__threads.scss new file mode 100644 index 00000000..b3e37227 --- /dev/null +++ b/web/app/components/root/__threads/root__threads.scss @@ -0,0 +1,3 @@ +.root__threads { + margin-top: 24px; +} diff --git a/web/app/components/root/index.js b/web/app/components/root/index.js index 4d0661ec..b2eef646 100644 --- a/web/app/components/root/index.js +++ b/web/app/components/root/index.js @@ -2,9 +2,9 @@ export { default } from './root'; require('./root.scss'); -require('./__auth-panel/root__auth-panel.scss'); require('./__input/root__input.scss'); require('./__preloader/root__preloader.scss'); require('./__pinned-comment/root__pinned-comment.scss'); require('./__pinned-comments/root__pinned-comments.scss'); require('./__thread/root__thread.scss'); +require('./__threads/root__threads.scss'); diff --git a/web/app/components/root/root.jsx b/web/app/components/root/root.jsx index cf254690..52a0f1a7 100644 --- a/web/app/components/root/root.jsx +++ b/web/app/components/root/root.jsx @@ -101,22 +101,26 @@ export default class Root extends Component { // TODO: i think we should do it on backend const pinnedComments = store.getPinnedComments(); + const isGuest = !Object.keys(user).length; return (
- + { + !isGuest && ( + + ) + } { !!pinnedComments.length && ( @@ -135,14 +139,20 @@ export default class Root extends Component { } { - comments.map(thread => ( - - )) + !!comments.length && ( +
+ { + comments.map(thread => ( + + )) + } +
+ ) }