Fix system specs (#206)

This commit is contained in:
Riccardo Graziosi
2023-03-19 19:57:53 +01:00
committed by GitHub
parent 756d6d9919
commit ce21d660d1
19 changed files with 193 additions and 202 deletions

View File

@@ -39,6 +39,7 @@ const CommentFooter = ({
<ActionLink
onClick={handleToggleCommentReply}
icon={replyForm.isOpen ? <CancelIcon /> : <ReplyIcon />}
customClass={replyForm.isOpen ? 'cancelAction' : 'replyAction'}
>
{
replyForm.isOpen ?

View File

@@ -38,13 +38,14 @@ const PostFooter = ({
{
isPowerUser || authorEmail === currentUserEmail ?
<div className="postFooterActions">
<ActionLink onClick={toggleEditMode} icon={<EditIcon />}>
<ActionLink onClick={toggleEditMode} icon={<EditIcon />} customClass='editAction'>
{I18n.t('common.buttons.edit')}
</ActionLink>
<ActionLink
onClick={() => confirm(I18n.t('common.confirmation')) && handleDeletePost()}
icon={<DeleteIcon />}
customClass='deleteAction'
>
{I18n.t('common.buttons.delete')}
</ActionLink>

View File

@@ -3,6 +3,8 @@ class User < ApplicationRecord
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :confirmable
validates_confirmation_of :password
has_many :posts, dependent: :destroy
has_many :likes, dependent: :destroy

View File

@@ -4,17 +4,18 @@
<%= render "devise/shared/error_messages", resource: resource %>
<div class="form-group">
<%= f.label t('common.forms.auth.full_name') %>
<%= f.label :full_name, t('common.forms.auth.full_name') %>
<%= f.text_field :full_name, autocomplete: "full-name", class: "form-control" %>
</div>
<div class="form-group">
<%= f.label t('common.forms.auth.email') %>
<%= f.label :email, t('common.forms.auth.email') %>
<%= f.email_field :email, autocomplete: "email", class: "form-control" %>
</div>
<div class="form-group">
<%= f.label t('common.forms.auth.notifications_enabled') %>&nbsp;
<%= f.label :notifications_enabled, t('common.forms.auth.notifications_enabled') %>
&nbsp;
<%= f.check_box :notifications_enabled, style: "transform: scale(1.5)" %>
<small id="notificationsHelp" class="form-text text-muted">
<%= t('common.forms.auth.notifications_enabled_help') %>
@@ -26,7 +27,7 @@
<% end %>
<div class="form-group">
<%= f.label t('common.forms.auth.password') %>
<%= f.label :password, t('common.forms.auth.password') %>
<%= f.password_field :password, autocomplete: "new-password", class: "form-control" %>
<small id="passwordEditHelp" class="form-text text-muted">
leave blank if you don't want to change your password
@@ -34,12 +35,12 @@
</div>
<div class="form-group">
<%= f.label t('common.forms.auth.password_confirmation') %>
<%= f.label :password_confirmation, t('common.forms.auth.password_confirmation') %>
<%= f.password_field :password_confirmation, autocomplete: "new-password", class: "form-control" %>
</div>
<div class="form-group">
<%= f.label t('common.forms.auth.current_password') %>
<%= f.label :current_password, t('common.forms.auth.current_password') %>
<%= f.password_field :current_password, autocomplete: "current-password", class: "form-control" %>
<small id="currentPasswordHelp" class="form-text text-muted">
we need your current password to confirm your changes

View File

@@ -41,7 +41,7 @@
<%= f.submit t('common.forms.auth.sign_up'), class: "btn btn-dark btn-block" %>
</div>
<% if not @o_auths.empty? %>
<% if not @o_auths.blank? %>
<hr />
<% @o_auths.each do |o_auth| %>
<p>