diff --git a/app/javascript/components/Board/PostStatusFilter.tsx b/app/javascript/components/Board/PostStatusFilter.tsx index 3a598abd..3830a41e 100644 --- a/app/javascript/components/Board/PostStatusFilter.tsx +++ b/app/javascript/components/Board/PostStatusFilter.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import PostStatusListItem from './PostStatusListItem'; import Spinner from '../shared/Spinner'; -import { TitleText, DangerText } from '../shared/CustomTexts'; +import { BoxTitleText, DangerText } from '../shared/CustomTexts'; import IPostStatus from '../../interfaces/IPostStatus'; @@ -24,7 +24,7 @@ const PostStatusFilter = ({ currentFilter, }: Props) => (
- Filter by post status + Filter by status { postStatuses.map((postStatus, i) => ( (
- Search + Search + handleSubmit(body, parentId)} className="submitCommentButton"> - { isSubmitting ? : 'Submit' } + { isSubmitting ? : 'Submit' } : diff --git a/app/javascript/components/Post/LikeList.tsx b/app/javascript/components/Post/LikeList.tsx index 2529f920..7b315dca 100644 --- a/app/javascript/components/Post/LikeList.tsx +++ b/app/javascript/components/Post/LikeList.tsx @@ -4,7 +4,7 @@ import Gravatar from 'react-gravatar'; import ILike from '../../interfaces/ILike'; import Spinner from '../shared/Spinner'; import { - TitleText, + BoxTitleText, DangerText, CenteredMutedText } from '../shared/CustomTexts'; @@ -17,7 +17,7 @@ interface Props { const LikeList = ({ likes, areLoading, error}: Props) => (
- People who liked + Likes { areLoading ? : null } { error ? {error} : null }
diff --git a/app/javascript/components/Post/PostUpdateList.tsx b/app/javascript/components/Post/PostUpdateList.tsx index b3e2abc6..c01064ae 100644 --- a/app/javascript/components/Post/PostUpdateList.tsx +++ b/app/javascript/components/Post/PostUpdateList.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import Gravatar from 'react-gravatar'; -import { TitleText, DangerText, CenteredMutedText, MutedText } from '../shared/CustomTexts'; +import { BoxTitleText, DangerText, CenteredMutedText, MutedText } from '../shared/CustomTexts'; import Spinner from '../shared/Spinner'; import IComment from '../../interfaces/IComment'; @@ -20,11 +20,11 @@ const PostUpdateList = ({ error, }: Props) => (
- Post updates + Updates { areLoading ? : null } { error ? {error} : null }
- { postUpdates.length === 0 ? There are no post updates yet. : null } + { postUpdates.length === 0 ? There are no updates yet. : null } { postUpdates.map((postUpdate, i) => (
diff --git a/app/javascript/components/shared/CustomTexts.tsx b/app/javascript/components/shared/CustomTexts.tsx index 2f3fdf47..181d1a56 100644 --- a/app/javascript/components/shared/CustomTexts.tsx +++ b/app/javascript/components/shared/CustomTexts.tsx @@ -13,6 +13,10 @@ export const TitleText = ({ children }: Props) => ( {children} ); +export const BoxTitleText = ({ children }: Props) => ( + {children} +); + export const MutedText = ({ children }: Props) => ( {children} ); diff --git a/app/javascript/components/shared/PostBoardLabel.tsx b/app/javascript/components/shared/PostBoardLabel.tsx index b4cf0081..c417e736 100644 --- a/app/javascript/components/shared/PostBoardLabel.tsx +++ b/app/javascript/components/shared/PostBoardLabel.tsx @@ -3,7 +3,7 @@ import * as React from 'react'; import IBoard from '../../interfaces/IBoard'; const PostBoardLabel = ({ name }: IBoard) => ( - {name} + {name?.toUpperCase()} ); export default PostBoardLabel; \ No newline at end of file diff --git a/app/javascript/components/shared/PostStatusLabel.tsx b/app/javascript/components/shared/PostStatusLabel.tsx index 831e4947..d9e33bb3 100644 --- a/app/javascript/components/shared/PostStatusLabel.tsx +++ b/app/javascript/components/shared/PostStatusLabel.tsx @@ -9,7 +9,9 @@ const PostStatusLabel = ({ name, color, }: Props) => ( - {name} + + {name?.toUpperCase()} + ); export default PostStatusLabel; \ No newline at end of file diff --git a/app/javascript/components/shared/Spinner.tsx b/app/javascript/components/shared/Spinner.tsx index a21164ca..e515bda4 100644 --- a/app/javascript/components/shared/Spinner.tsx +++ b/app/javascript/components/shared/Spinner.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; -const Spinner = () => ( -
+const Spinner = ({ color = 'dark' }) => ( +
Loading...
); diff --git a/app/javascript/stylesheets/components/Board.scss b/app/javascript/stylesheets/components/Board.scss index 22eab0b7..5b0680d0 100644 --- a/app/javascript/stylesheets/components/Board.scss +++ b/app/javascript/stylesheets/components/Board.scss @@ -124,5 +124,4 @@ .postTitle { color: white; } - } \ No newline at end of file diff --git a/app/javascript/stylesheets/components/Comments.scss b/app/javascript/stylesheets/components/Comments.scss index 15c29eaa..46110a7b 100644 --- a/app/javascript/stylesheets/components/Comments.scss +++ b/app/javascript/stylesheets/components/Comments.scss @@ -30,6 +30,8 @@ @extend .align-self-end; + box-sizing: border-box; + width: 120px; height: 40px; } } @@ -90,5 +92,4 @@ .commentList .comment .commentFooter .commentLink { color: white; } - } \ No newline at end of file diff --git a/app/javascript/stylesheets/components/Post.scss b/app/javascript/stylesheets/components/Post.scss index e1b4d59b..0a93cac7 100644 --- a/app/javascript/stylesheets/components/Post.scss +++ b/app/javascript/stylesheets/components/Post.scss @@ -121,7 +121,6 @@ } @media (prefers-color-scheme: dark) { - .postDescription { color: white !important; } @@ -138,6 +137,4 @@ .postAndCommentsContainer .postHeader a { color: white; } - - } \ No newline at end of file diff --git a/app/javascript/stylesheets/general/_components.scss b/app/javascript/stylesheets/general/_components.scss index 1c85633e..f3e29f90 100644 --- a/app/javascript/stylesheets/general/_components.scss +++ b/app/javascript/stylesheets/general/_components.scss @@ -88,5 +88,4 @@ a { background-color: #E74C3C; border-color: #fff; } - } \ No newline at end of file diff --git a/app/javascript/stylesheets/general/_custom_texts.scss b/app/javascript/stylesheets/general/_custom_texts.scss index 0c0c303a..e3d89ec0 100644 --- a/app/javascript/stylesheets/general/_custom_texts.scss +++ b/app/javascript/stylesheets/general/_custom_texts.scss @@ -8,6 +8,15 @@ .font-weight-bolder; } +.boxTitleText { + @extend + .font-weight-bolder, + .text-uppercase, + .mb-2; + + font-size: 16px; +} + .centeredText { @extend .text-center, diff --git a/app/javascript/stylesheets/general/_form.scss b/app/javascript/stylesheets/general/_form.scss index ac6168c1..a7892bc2 100644 --- a/app/javascript/stylesheets/general/_form.scss +++ b/app/javascript/stylesheets/general/_form.scss @@ -36,6 +36,11 @@ a { color: $astuto-black; } } +.switch { + @extend + .custom-control-input; +} + @media (prefers-color-scheme: dark) { .deviseLinks { a { color: white; } diff --git a/app/views/devise/registrations/edit.html.erb b/app/views/devise/registrations/edit.html.erb index d1b3557d..3090dbfd 100644 --- a/app/views/devise/registrations/edit.html.erb +++ b/app/views/devise/registrations/edit.html.erb @@ -17,8 +17,11 @@
- <%= f.label :notifications_enabled %> - <%= f.check_box :notifications_enabled %> + <%= f.label :notifications_enabled %>
+ <%= f.check_box :notifications_enabled, style: "transform: scale(1.5)" %> + + if disabled, you won't receive any notification +
<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %> diff --git a/app/views/devise/registrations/new.html.erb b/app/views/devise/registrations/new.html.erb index 87d74f36..5fab4059 100644 --- a/app/views/devise/registrations/new.html.erb +++ b/app/views/devise/registrations/new.html.erb @@ -23,11 +23,6 @@ <%= f.password_field :password_confirmation, placeholder: "Password confirmation", required: true, class: "form-control" %>
-
- <%= f.label :notifications_enabled %> - <%= f.check_box :notifications_enabled %> -
-
<%= f.submit "Sign up", class: "btn btn-block" %>