From ccaf637c6a5bcda187309e0a1b2e7fc03e1e8b08 Mon Sep 17 00:00:00 2001 From: JuliaSvinareva Date: Wed, 31 Mar 2021 22:23:53 +0300 Subject: [PATCH] [DE mobile] Fix open searchbar, add logo in navbar --- apps/common/mobile/resources/less/common-ios.less | 5 +++-- apps/common/mobile/resources/less/common.less | 14 ++++++++++++++ apps/common/mobile/resources/less/ios/icons.less | 5 +++++ .../mobile/resources/less/material/icons.less | 5 +++++ .../mobile/src/less/app-material.less | 4 ++++ apps/documenteditor/mobile/src/page/main.jsx | 10 ++++++++-- apps/documenteditor/mobile/src/view/Toolbar.jsx | 12 ++++-------- 7 files changed, 43 insertions(+), 12 deletions(-) diff --git a/apps/common/mobile/resources/less/common-ios.less b/apps/common/mobile/resources/less/common-ios.less index 9a487cd60..2dc225ede 100644 --- a/apps/common/mobile/resources/less/common-ios.less +++ b/apps/common/mobile/resources/less/common-ios.less @@ -6,6 +6,7 @@ @darkGreen: #40865c; --f7-navbar-link-color: @themeColor; + --f7-subnavbar-link-color: @themeColor; --f7-navbar-text-color: @black; --f7-navbar-title-line-height: 44px; --f7-navbar-link-line-height: 44px; @@ -30,7 +31,7 @@ margin-left: 0; } - .navbar { + .navbar, .subnavbar { a.btn-doc-back { width: 22px; } @@ -38,7 +39,7 @@ .title { font-weight: 600; } - .navbar-inner { + .navbar-inner, .subnavbar-inner { z-index: auto; } .sheet-close { diff --git a/apps/common/mobile/resources/less/common.less b/apps/common/mobile/resources/less/common.less index ad82957bc..f48ccfb8c 100644 --- a/apps/common/mobile/resources/less/common.less +++ b/apps/common/mobile/resources/less/common.less @@ -8,6 +8,20 @@ @red: #f00; @autoColor: @black; +.navbar.main-navbar { + height: 26px; + .navbar-inner { + display: flex; + justify-content: center; + padding-top: 8px; + } + .navbar-bg { + &:before, &:after { + content: none; + } + } +} + .popup, .popover, .sheet-modal { .list { &:first-child { diff --git a/apps/common/mobile/resources/less/ios/icons.less b/apps/common/mobile/resources/less/ios/icons.less index d10587d10..6022b7bf3 100644 --- a/apps/common/mobile/resources/less/ios/icons.less +++ b/apps/common/mobile/resources/less/ios/icons.less @@ -3,6 +3,11 @@ &.icon_mask { background-color: white; } + &.icon-logo { + width: 100px; + height: 14px; + background: url('../../img/header/logo-ios.svg') no-repeat center; + } &.icon-prev { width: 22px; height: 22px; diff --git a/apps/common/mobile/resources/less/material/icons.less b/apps/common/mobile/resources/less/material/icons.less index 7e9c08d45..c5ddd519b 100644 --- a/apps/common/mobile/resources/less/material/icons.less +++ b/apps/common/mobile/resources/less/material/icons.less @@ -3,6 +3,11 @@ &.icon_mask { background-color: black; } + &.icon-logo { + width: 100px; + height: 14px; + background: url('../../img/header/logo-android.svg') no-repeat center; + } &.icon-prev { width: 20px; height: 20px; diff --git a/apps/documenteditor/mobile/src/less/app-material.less b/apps/documenteditor/mobile/src/less/app-material.less index d9c78945a..4515f7854 100644 --- a/apps/documenteditor/mobile/src/less/app-material.less +++ b/apps/documenteditor/mobile/src/less/app-material.less @@ -9,6 +9,10 @@ --f7-navbar-link-color: @navBarIconColor; --f7-navbar-text-color: @navBarIconColor; + --f7-subnavbar-bg-color: @themeColor; + --f7-subnavbar-link-color: @navBarIconColor; + --f7-subnavbar-text-color: @navBarIconColor; + // Main Toolbar #editor-navbar.navbar .right { padding-right: 4px; diff --git a/apps/documenteditor/mobile/src/page/main.jsx b/apps/documenteditor/mobile/src/page/main.jsx index e23bec1b5..43a94710f 100644 --- a/apps/documenteditor/mobile/src/page/main.jsx +++ b/apps/documenteditor/mobile/src/page/main.jsx @@ -1,7 +1,7 @@ import React, { Component } from 'react'; import { f7 } from 'framework7-react'; -import { Page, View } from 'framework7-react'; +import { Page, View, Navbar, Subnavbar, Icon } from 'framework7-react'; import { inject } from "mobx-react"; import EditOptions from '../view/edit/Edit'; @@ -65,7 +65,13 @@ export default class MainPage extends Component { return ( {/* Top Navbar */} - + +
+ + + + +
{/* Page content */} diff --git a/apps/documenteditor/mobile/src/view/Toolbar.jsx b/apps/documenteditor/mobile/src/view/Toolbar.jsx index 21eeac4fe..782b1924c 100644 --- a/apps/documenteditor/mobile/src/view/Toolbar.jsx +++ b/apps/documenteditor/mobile/src/view/Toolbar.jsx @@ -1,13 +1,11 @@ -import React from 'react'; -import {Navbar, NavLeft, NavRight, NavTitle, Link, Icon} from 'framework7-react'; +import React, {Fragment} from 'react'; +import {NavLeft, NavRight, NavTitle, Link, Icon} from 'framework7-react'; import { Device } from '../../../../common/mobile/utils/device'; -import {Search} from "../controller/Search"; const ToolbarView = props => { const disableEditBtn = props.isObjectLocked || props.stateDisplayMode || props.disabledEditControls; return ( - -
+ {props.isShowBack && } @@ -21,9 +19,7 @@ const ToolbarView = props => { {props.displayCollaboration && props.openOptions('coauth')}>} props.openOptions('settings')}> - {/* { Device.phone ? null : } */} - -
+ ) };