mirror of
https://github.com/astuto/astuto.git
synced 2025-12-15 03:07:52 +01:00
Various improvements (#325)
* Fix missing translation in roadmap * Fix resizing of textareas * Increase line height for small muted texts * Improve collapsed board list style * Fix switch on top of header (z-index) * Fix margin inconsistencies in site settings * Add user count to site settings
This commit is contained in:
committed by
GitHub
parent
f41f9dd082
commit
a11157295d
@@ -33,7 +33,6 @@
|
|||||||
.m-0;
|
.m-0;
|
||||||
|
|
||||||
font-size: smaller;
|
font-size: smaller;
|
||||||
line-height: 95%;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.uppercaseText {
|
.uppercaseText {
|
||||||
|
|||||||
@@ -85,7 +85,15 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.boards-dropdown {
|
||||||
|
.dropdown-item {
|
||||||
|
padding-top: 0.75rem;
|
||||||
|
padding-bottom: 0.75rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.dropdown-item:active {
|
.dropdown-item:active {
|
||||||
|
color: white !important;
|
||||||
background-color: var(--primary-color);
|
background-color: var(--primary-color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -221,6 +221,8 @@ body {
|
|||||||
& > input:focus ~ label::before {
|
& > input:focus ~ label::before {
|
||||||
border-color: var(--primary-color-dark) !important;
|
border-color: var(--primary-color-dark) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
z-index: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.selectPicker {
|
.selectPicker {
|
||||||
|
|||||||
@@ -25,6 +25,12 @@
|
|||||||
|
|
||||||
.newPostForm {
|
.newPostForm {
|
||||||
@extend .my-2;
|
@extend .my-2;
|
||||||
|
|
||||||
|
#postDescription {
|
||||||
|
height: 100px;
|
||||||
|
min-height: 100px;
|
||||||
|
resize: vertical;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,11 +9,11 @@
|
|||||||
.mr-2;
|
.mr-2;
|
||||||
|
|
||||||
height: 80px;
|
height: 80px;
|
||||||
|
min-height: 80px;
|
||||||
|
resize: vertical;
|
||||||
|
|
||||||
border: thin solid grey;
|
border: thin solid grey;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
|
|
||||||
resize: none;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.newCommentForm {
|
.newCommentForm {
|
||||||
|
|||||||
@@ -149,6 +149,12 @@
|
|||||||
@extend .my-3;
|
@extend .my-3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.postDescription {
|
||||||
|
height: 150px;
|
||||||
|
min-height: 150px;
|
||||||
|
resize: vertical;
|
||||||
|
}
|
||||||
|
|
||||||
.postEditFormButtons {
|
.postEditFormButtons {
|
||||||
@extend .d-flex, .justify-content-end;
|
@extend .d-flex, .justify-content-end;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
#customCss {
|
#customCss {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 300px;
|
height: 300px;
|
||||||
|
min-height: 100px;
|
||||||
|
resize: vertical;
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,4 @@
|
|||||||
.authenticationIndexPage {
|
.authenticationIndexPage {
|
||||||
h2 { @extend .mb-3; }
|
|
||||||
|
|
||||||
.oauthProvidersTitle {
|
.oauthProvidersTitle {
|
||||||
@extend .d-flex;
|
@extend .d-flex;
|
||||||
|
|
||||||
|
|||||||
@@ -44,4 +44,10 @@
|
|||||||
|
|
||||||
column-gap: 8px;
|
column-gap: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.boardDescriptionTextArea {
|
||||||
|
height: 80px;
|
||||||
|
min-height: 80px;
|
||||||
|
resize: vertical;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,3 +1,7 @@
|
|||||||
|
.userCount {
|
||||||
|
text-transform: lowercase;
|
||||||
|
}
|
||||||
|
|
||||||
ul.usersList {
|
ul.usersList {
|
||||||
@extend
|
@extend
|
||||||
.pl-1;
|
.pl-1;
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ class UsersController < ApplicationController
|
|||||||
|
|
||||||
@users = User
|
@users = User
|
||||||
.all
|
.all
|
||||||
.order(role: :desc)
|
.order(role: :desc, created_at: :desc)
|
||||||
|
|
||||||
render json: @users
|
render json: @users
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ class CommentEditForm extends React.Component<Props, State> {
|
|||||||
<textarea
|
<textarea
|
||||||
value={body}
|
value={body}
|
||||||
onChange={e => this.handleCommentBodyChange(e.target.value)}
|
onChange={e => this.handleCommentBodyChange(e.target.value)}
|
||||||
|
rows={3}
|
||||||
className="commentForm"
|
className="commentForm"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
|
import I18n from 'i18n-js';
|
||||||
|
|
||||||
import PostListItem from './PostListItem';
|
import PostListItem from './PostListItem';
|
||||||
import { CenteredMutedText } from '../common/CustomTexts';
|
import { CenteredMutedText } from '../common/CustomTexts';
|
||||||
@@ -25,7 +26,7 @@ const PostList = ({ posts, boards }: Props) => (
|
|||||||
/>
|
/>
|
||||||
))
|
))
|
||||||
:
|
:
|
||||||
<CenteredMutedText>There are no posts that have this status.</CenteredMutedText>
|
<CenteredMutedText>{ I18n.t('board.posts_list.empty') }</CenteredMutedText>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ const BoardForm = ({
|
|||||||
<textarea
|
<textarea
|
||||||
{...register('description')}
|
{...register('description')}
|
||||||
placeholder={I18n.t('site_settings.boards.form.description')}
|
placeholder={I18n.t('site_settings.boards.form.description')}
|
||||||
className="formControl"
|
className="boardDescriptionTextArea formControl"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{mode === 'update' && (
|
{mode === 'update' && (
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import Box from '../../common/Box';
|
|||||||
import SiteSettingsInfoBox from '../../common/SiteSettingsInfoBox';
|
import SiteSettingsInfoBox from '../../common/SiteSettingsInfoBox';
|
||||||
|
|
||||||
import { UsersState } from '../../../reducers/usersReducer';
|
import { UsersState } from '../../../reducers/usersReducer';
|
||||||
import { UserRoles, USER_STATUS_ACTIVE, USER_STATUS_BLOCKED } from '../../../interfaces/IUser';
|
import { UserRoles, USER_STATUS_ACTIVE, USER_STATUS_BLOCKED, USER_STATUS_DELETED } from '../../../interfaces/IUser';
|
||||||
import HttpStatus from '../../../constants/http_status';
|
import HttpStatus from '../../../constants/http_status';
|
||||||
import Spinner from '../../common/Spinner';
|
import Spinner from '../../common/Spinner';
|
||||||
|
|
||||||
@@ -73,11 +73,24 @@ class UsersSiteSettingsP extends React.Component<Props> {
|
|||||||
currentUserEmail,
|
currentUserEmail,
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
|
const numberOfUsers = users.items.length;
|
||||||
|
const numberOfActiveUsers = users.items.filter(u => u.status === USER_STATUS_ACTIVE).length;
|
||||||
|
const numberOfBlockedUsers = users.items.filter(u => u.status === USER_STATUS_BLOCKED).length;
|
||||||
|
const numberOfDeletedUsers = users.items.filter(u => u.status === USER_STATUS_DELETED).length;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Box>
|
<Box>
|
||||||
<h2>{ I18n.t('site_settings.users.title') }</h2>
|
<h2>{ I18n.t('site_settings.users.title') }</h2>
|
||||||
|
|
||||||
|
<p className="userCount">
|
||||||
|
{numberOfUsers} {I18n.t('activerecord.models.user', {count: users.items.length})}
|
||||||
|
(
|
||||||
|
{numberOfActiveUsers} {I18n.t('site_settings.users.status_active')},
|
||||||
|
{numberOfBlockedUsers} {I18n.t('site_settings.users.status_blocked')},
|
||||||
|
{numberOfDeletedUsers} {I18n.t('site_settings.users.status_deleted')})
|
||||||
|
</p>
|
||||||
|
|
||||||
<ul className="usersList">
|
<ul className="usersList">
|
||||||
{
|
{
|
||||||
users.areLoading === false ?
|
users.areLoading === false ?
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||||
Boards
|
Boards
|
||||||
</a>
|
</a>
|
||||||
<ul class="dropdown-menu" aria-labelledby="navbarDropdown">
|
<ul class="dropdown-menu boards-dropdown" aria-labelledby="navbarDropdown">
|
||||||
<% boards.each do |board| %>
|
<% boards.each do |board| %>
|
||||||
<li>
|
<li>
|
||||||
<%= link_to board.name, board_path(board), class: 'dropdown-item py-2' %>
|
<%= link_to board.name, board_path(board), class: 'dropdown-item' %>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
Reference in New Issue
Block a user