diff --git a/src/components/elements/VerticalMenu.scss b/src/components/elements/VerticalMenu.scss index 9bdf1c161..d3aba6adc 100644 --- a/src/components/elements/VerticalMenu.scss +++ b/src/components/elements/VerticalMenu.scss @@ -55,6 +55,10 @@ padding: 0 1rem 0 3.8rem; line-height: 50px; + @media screen and (max-width: 39.9375em) { + padding: 0 20px; + } + .Icon { @include themify($themes) { fill: themed('textColorPrimary'); diff --git a/src/components/modules/CreateGroup.jsx b/src/components/modules/CreateGroup.jsx index f54791aa0..de050982c 100644 --- a/src/components/modules/CreateGroup.jsx +++ b/src/components/modules/CreateGroup.jsx @@ -20,13 +20,17 @@ import GroupMembers, { validateMembersStep } from 'app/components/modules/groups import GroupFinal from 'app/components/modules/groups/GroupFinal' import DialogManager from 'app/components/elements/common/DialogManager' import { showLoginDialog } from 'app/components/dialogs/LoginDialog' +import isScreenSmall from 'app/utils/isScreenSmall' -const STEPS = () => { return { - name: tt('create_group_jsx.step_name'), - logo: tt('create_group_jsx.step_logo'), - members: tt('create_group_jsx.step_members'), - final: tt('create_group_jsx.step_create') -} } +const STEPS = () => { + const isSmall = isScreenSmall() + return { + name: tt('create_group_jsx.step_name'), + logo: isSmall ? tt('create_group_jsx.step_logo_mobile') : tt('create_group_jsx.step_logo'), + members: isSmall ? tt('create_group_jsx.step_members_mobile') : tt('create_group_jsx.step_members'), + final: isSmall ? tt('create_group_jsx.step_create_mobile') : tt('create_group_jsx.step_create') + } +} class ActionOnUnmount extends React.Component { componentWillUnmount() { diff --git a/src/components/modules/groups/MyGroups.jsx b/src/components/modules/groups/MyGroups.jsx index f818bf340..4acc6b544 100644 --- a/src/components/modules/groups/MyGroups.jsx +++ b/src/components/modules/groups/MyGroups.jsx @@ -4,6 +4,7 @@ import { Link } from 'react-router-dom' import { Map } from 'immutable' import { api, formatter } from 'golos-lib-js' import tt from 'counterpart' +import cn from 'classnames' import DialogManager from 'app/components/elements/common/DialogManager' import g from 'app/redux/GlobalReducer' @@ -15,6 +16,7 @@ import LoadingIndicator from 'app/components/elements/LoadingIndicator' import MarkNotificationRead from 'app/components/elements/MarkNotificationRead' import { showLoginDialog } from 'app/components/dialogs/LoginDialog' import { getGroupLogo, getGroupMeta, getRoleInGroup } from 'app/utils/groups' +import isScreenSmall from 'app/utils/isScreenSmall' class MyGroups extends React.Component { constructor(props) { @@ -126,10 +128,13 @@ class MyGroups extends React.Component { const meta = getGroupMeta(json_metadata) + const isSmall = isScreenSmall() + + const maxLength = isSmall ? 15 : 20 let title = meta.title || name let titleShr = title - if (titleShr.length > 20) { - titleShr = titleShr.substring(0, 17) + '...' + if (titleShr.length > maxLength) { + titleShr = titleShr.substring(0, maxLength - 3) + '...' } const kebabItems = [] @@ -161,7 +166,9 @@ class MyGroups extends React.Component { e.preventDefault() e.stopPropagation() }}> - {amPending ? : null} - diff --git a/src/components/modules/groups/MyGroups.scss b/src/components/modules/groups/MyGroups.scss index b7634153f..d0cfc5749 100644 --- a/src/components/modules/groups/MyGroups.scss +++ b/src/components/modules/groups/MyGroups.scss @@ -39,4 +39,9 @@ margin-left: 5px; vertical-align: middle; } + .button.icon-only { + .btn-title { + display: none; + } + } } diff --git a/src/components/pages/Messages.jsx b/src/components/pages/Messages.jsx index aa6608a67..0fd4a97a3 100644 --- a/src/components/pages/Messages.jsx +++ b/src/components/pages/Messages.jsx @@ -78,7 +78,6 @@ class Messages extends React.Component { //alert('scrollToMention ' + messages.length) let nonce for (const msg of messages) { - console.log(msg.read_date) if (msg.to === username && msg.read_date && msg.read_date.startsWith('1970')) { nonce = msg.nonce break @@ -966,7 +965,7 @@ class Messages extends React.Component { return (} >
diff --git a/src/locales/en.json b/src/locales/en.json index 55d6d22e2..4a8abb8c8 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -156,8 +156,11 @@ "submit": "Create", "step_name": "Name", "step_logo": "Logo", + "step_logo_mobile": "Logo", "step_members": "Members", + "step_members_mobile": "Membs", "step_create": "Create!", + "step_create_mobile": "Go!", "group_already_exists": "Group already exists.", "group_min_length": "Min is 3 symbols.", "golos_power_too_low": "To create group you should have Golos Power at least ", @@ -374,6 +377,7 @@ "name": "Name", "night_mode": "Night Mode", "ok": "OK", + "or": "or", "refresh": "Refresh", "required": "Required", "replies": "Replies", diff --git a/src/locales/ru-RU.json b/src/locales/ru-RU.json index 950087b87..8e46fb997 100644 --- a/src/locales/ru-RU.json +++ b/src/locales/ru-RU.json @@ -162,8 +162,11 @@ "submit": "Создать", "step_name": "Имя", "step_logo": "Логотип", + "step_logo_mobile": "Лого", "step_members": "Участники", + "step_members_mobile": "Люди", "step_create": "Создать!", + "step_create_mobile": "Go!", "group_already_exists": "Такая группа уже существует.", "validating": "Проверка существования группы...", "group_min_length": "Минимум 3 символа.", diff --git a/src/utils/app/SplashUtils.js b/src/utils/app/SplashUtils.js index fdd8b6658..1e0c4f305 100644 --- a/src/utils/app/SplashUtils.js +++ b/src/utils/app/SplashUtils.js @@ -1,10 +1,13 @@ export function hideSplash() { - if (process.env.MOBILE_APP) { - try { + try { + if (process.env.MOBILE_APP) { navigator.splashscreen.hide() - } catch (err) { - console.error('hideSplash', err) + } else if (process.env.DESKTOP_APP) { + if (window.appSplash) + window.appSplash.contentLoaded() } + } catch (err) { + console.error('hideSplash', err) } }