Skip to content

Commit

Permalink
RocketChat#755 [FIX] Правки | Добавлена иконка "плюс в круге"
Browse files Browse the repository at this point in the history
  • Loading branch information
Scarvis committed Nov 3, 2020
1 parent fbd9d68 commit 889a134
Show file tree
Hide file tree
Showing 10 changed files with 98 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
</div>
</form>
<div class="rc-input">
<button form="create-discussion" class="rc-button rc-button--primary js-save-discussion {{createIsDisabled}}" {{createIsDisabled}}>{{_ " Create "}}</button>
<button form="create-discussion" class="rc-button rc-button--primary js-save-discussion {{createIsDisabled}}" {{createIsDisabled}}>{{_ "Create"}}</button>
</div>
</div>
</section>
Expand Down
14 changes: 7 additions & 7 deletions app/lib/server/functions/saveUserIdentity.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ import { updateGroupDMsName } from './updateGroupDMsName';
* @param {string} userId user performing the action
* @param {object} changes changes to the user
*/
export function saveUserIdentity(userId, { _id, name: rawName, username: rawUsername, surname: rawSurname, patronymic: rawPatronymc }) {
export function saveUserIdentity(userId, { _id, name: rawName, username: rawUsername, surname: rawSurname, patronymic: rawPatronymic }) {
if (!_id) {
return false;
}

const name = String(rawName).trim();
const username = String(rawUsername).trim();
const surname = String(rawSurname).trim();
const patronymic = String(rawPatronymc).trim();
const patronymic = String(rawPatronymic).trim();

const user = Users.findOneById(_id);

Expand Down Expand Up @@ -51,11 +51,11 @@ export function saveUserIdentity(userId, { _id, name: rawName, username: rawUser
}
}

// if (typeof rawPatronymc !== 'undefined' && patronymicChanged) {
// if (!setPatronymic(_id, patronymic, user)) {
// return false;
// }
// }
if (typeof rawPatronymic !== 'undefined' && patronymicChanged) {
if (!setPatronymic(_id, patronymic, user)) {
return false;
}
}

// if coming from old username, update all references
if (previousUsername && usernameChanged) {
Expand Down
2 changes: 1 addition & 1 deletion app/reactions/client/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ Meteor.startup(function() {

return true;
},
order: 3,
order: 2,
group: ['menu'],
});
});
36 changes: 36 additions & 0 deletions app/ui-master/public/icons.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 41 additions & 0 deletions app/ui-master/public/icons/plus_in_circle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion app/ui/client/views/app/CreateDirectMessage.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</div>
</form>
<div class="rc-input">
<button form="create-dm" class="rc-button rc-button--primary js-save-dm {{createIsDisabled}}" {{createIsDisabled}}>{{_ " Create "}}</button>
<button form="create-dm" class="rc-button rc-button--primary js-save-dm {{createIsDisabled}}" {{createIsDisabled}}>{{_ "Create"}}</button>
</div>
</div>
</section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ export function WorkingGroupMeetingPage() {
console.log('!fileupload_enabled');
return null;
}
console.log('fileuploadenabled');
const $input = $(document.createElement('input'));
$input.css('display', 'none');
$input.attr({
Expand Down
2 changes: 1 addition & 1 deletion app/working-group/client/views/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export function WorkingGroupPage() {
const onHeaderClick = (id) => {
const [sortBy, sortDirection] = sort;
if (sortBy === id) {
setSort([id, sortDirection === 'asc' ? 'workingGroupType' : 'asc']);
setSort([id, sortDirection === 'asc' ? 'workingGroup' : 'asc']);
return;
}
setSort([id, 'asc']);
Expand Down
2 changes: 1 addition & 1 deletion client/components/GenericTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import flattenChildren from 'react-keyed-flatten-children';
import { useTranslation } from '../contexts/TranslationContext';

function SortIcon({ direction }) {
return <Box is='svg' width='x16' height='x16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'>
return <Box is='svg' width='x24' height='x24' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'>
<path d='M5.33337 5.99999L8.00004 3.33333L10.6667 5.99999' stroke={direction === 'desc' ? '#9EA2A8' : '#E4E7EA' } strokeWidth='1.33333' strokeLinecap='round' strokeLinejoin='round'/>
<path d='M5.33337 10L8.00004 12.6667L10.6667 10' stroke={ direction === 'asc' ? '#9EA2A8' : '#E4E7EA'} strokeWidth='1.33333' strokeLinecap='round' strokeLinejoin='round'/>
</Box>;
Expand Down
21 changes: 9 additions & 12 deletions client/components/basic/UserInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,15 @@ export const UserInfo = React.memo(function UserInfo({
{actions}

<Margins block='x4'>
<UserCard.Username name={(showRealNames && name) || username || name} status={status} />
<Info>{customStatus}</Info>
{shortFio && <>
<Label>{t('Full_Name')}</Label>
<Info>{shortFio}</Info>
</>}
{username && <>
<Label>{ t('Username') }</Label>
<UserCard.Username name={ username } status={ status } />
<Info>{ customStatus }</Info>
</>}

{!!roles && <>
<Label>{t('Roles')}</Label>
Expand All @@ -67,19 +74,9 @@ export const UserInfo = React.memo(function UserInfo({
<Info><UTCClock utcOffset={utcOffset}/></Info>
</>}

{username && username !== name && <>
<Label>{t('Username')}</Label>
<Info>{username}</Info>
</>}

<Label>{t('Last_login')}</Label>
<Info>{lastLogin ? timeAgo(lastLogin) : t('Never')}</Info>

{shortFio && <>
<Label>{t('Full_Name')}</Label>
<Info>{shortFio}</Info>
</>}

{nickname && <>
<Label>{t('Nickname')}</Label>
<Info>{nickname}</Info>
Expand Down

0 comments on commit 889a134

Please sign in to comment.