More consistent text size

This commit is contained in:
Uku Taht 2021-07-22 09:12:33 +03:00
parent 1bdc27d9cb
commit fc518af8c5
2 changed files with 8 additions and 16 deletions

View File

@ -92,7 +92,7 @@ function renderDropdownFilter(site, history, [key, value], query) {
if (key === 'props') {
return (
<Menu.Item key={key}>
<div className="px-4 sm:py-2 py-3 md:text-sm leading-tight flex items-center justify-between" key={key + value}>
<div className="px-4 sm:py-2 py-3 text-sm leading-tight flex items-center justify-between" key={key + value}>
<span className="inline-block w-full truncate">{filterText(key, value, query)}</span>
<b title={`Remove filter: ${formattedFilters[key]}`} className="ml-2 cursor-pointer hover:text-indigo-700 dark:hover:text-indigo-500" onClick={() => removeFilter(key, history, query)}>
<XIcon className="w-4 h-4" />
@ -104,7 +104,7 @@ function renderDropdownFilter(site, history, [key, value], query) {
return (
<Menu.Item key={key}>
<div className="px-3 md:px-4 sm:py-2 py-3 md:text-sm leading-tight flex items-center justify-between" key={key + value}>
<div className="px-3 md:px-4 sm:py-2 py-3 text-sm leading-tight flex items-center justify-between" key={key + value}>
<Link
title={`Edit filter: ${formattedFilters[key]}`}
to={{ pathname: `/${encodeURIComponent(site.domain)}/filter/${filterGroupForFilter(key)}`, search: window.location.search }}
@ -149,11 +149,11 @@ function DropdownContent({history, site, query, wrapped}) {
return (
<>
<div className="border-b border-gray-200 dark:border-gray-500 px-4 sm:py-2 py-3 md:text-sm leading-tight hover:text-indigo-700 dark:hover:text-indigo-500 hover:cursor-pointer" onClick={() => setAddingFilter(true)}>
<div className="border-b border-gray-200 dark:border-gray-500 px-4 sm:py-2 py-3 text-sm leading-tight hover:text-indigo-700 dark:hover:text-indigo-500 hover:cursor-pointer" onClick={() => setAddingFilter(true)}>
+ Add filter
</div>
{appliedFilters(query).map((filter) => renderDropdownFilter(site, history, filter, query))}
<div className="border-t border-gray-200 dark:border-gray-500 px-4 sm:py-2 py-3 md:text-sm leading-tight hover:text-indigo-700 dark:hover:text-indigo-500 hover:cursor-pointer" onClick={() => clearAllFilters(history, query)}>
<div className="border-t border-gray-200 dark:border-gray-500 px-4 sm:py-2 py-3 text-sm leading-tight hover:text-indigo-700 dark:hover:text-indigo-500 hover:cursor-pointer" onClick={() => clearAllFilters(history, query)}>
Clear All Filters
</div>
</>

View File

@ -7,23 +7,13 @@ import Filters from './filters'
import CurrentVisitors from './stats/current-visitors'
import VisitorGraph from './stats/visitor-graph'
import Sources from './stats/sources'
import Pages from './stats/pages/'
import Pages from './stats/pages'
import Countries from './stats/countries'
import Devices from './stats/devices'
import Conversions from './stats/conversions'
import { withPinnedHeader } from './pinned-header-hoc';
class Historical extends React.Component {
constructor(props) {
super(props)
this.state = {mobileFiltersOpen: false}
this.toggleMobileFilters = this.toggleMobileFilters.bind(this)
}
toggleMobileFilters() {
this.setState({mobileFiltersOpen: !this.state.mobileFiltersOpen})
}
renderConversions() {
if (this.props.site.hasGoals) {
return (
@ -32,6 +22,8 @@ class Historical extends React.Component {
</div>
)
}
return null
}
render() {
@ -45,7 +37,7 @@ class Historical extends React.Component {
<div className="flex items-center w-full">
<SiteSwitcher site={this.props.site} loggedIn={this.props.loggedIn} currentUserRole={this.props.currentUserRole} />
<CurrentVisitors timer={this.props.timer} site={this.props.site} query={this.props.query} />
<Filters className="flex" site={this.props.site} query={this.props.query} history={this.props.history} mobileFiltersOpen={this.state.mobileFiltersOpen} />
<Filters className="flex" site={this.props.site} query={this.props.query} history={this.props.history} />
</div>
<div className="flex ml-auto pl-2">
<DatepickerArrows site={this.props.site} query={this.props.query} />