Allow horizontal scroll on small devices

pull/1681/head
Pitou 2020-02-04 23:54:22 +01:00
parent 66962e1bdb
commit 9288757f97
3 changed files with 27 additions and 22 deletions

View File

@ -1058,6 +1058,9 @@ ul {
.fa-ban {
color: $medium_gray;
}
.table-responsive{
border: none;
}
}
.logs-settings-menu {

View File

@ -69,26 +69,28 @@ const LOG_TABLE_CLASS = [
/** All log messages with select data in table form for display in the app. */
export const LogsTable = (props: LogsTableProps) => {
return <table className={LOG_TABLE_CLASS}>
<thead>
<tr>
<th><label>{t("Type")}</label></th>
<th><label>{t("Message")}</label></th>
<th><label>{t("(x, y, z)")}</label></th>
<th><label>{t("Time")}</label></th>
</tr>
</thead>
<tbody>
{filterByVerbosity(getFilterLevel(props.state), props.logs)
.map((log: TaggedLog) =>
<LogsRow
key={log.uuid}
tlog={log}
dispatch={props.dispatch}
markdown={props.state.markdown}
timeSettings={props.timeSettings} />)}
</tbody>
</table>;
return <div className={"table-responsive"}>
<table className={LOG_TABLE_CLASS}>
<thead>
<tr>
<th><label>{t("Type")}</label></th>
<th><label>{t("Message")}</label></th>
<th><label>{t("(x, y, z)")}</label></th>
<th><label>{t("Time")}</label></th>
</tr>
</thead>
<tbody>
{filterByVerbosity(getFilterLevel(props.state), props.logs)
.map((log: TaggedLog) =>
<LogsRow
key={log.uuid}
tlog={log}
dispatch={props.dispatch}
markdown={props.state.markdown}
timeSettings={props.timeSettings} />)}
</tbody>
</table>
</div>;
};
/** Get current verbosity filter level for a message type from LogsState. */

View File

@ -37,7 +37,7 @@ export class RawLogs extends React.Component<LogsProps, Partial<LogsState>> {
} else {
return currentValue as number;
}
}
};
state: LogsState = {
autoscroll: false,
@ -61,7 +61,7 @@ export class RawLogs extends React.Component<LogsProps, Partial<LogsState>> {
this.props.dispatch(
setWebAppConfigValue(safeNumericSetting(name + "_log"), newSetting));
};
}
};
/** Set log type filter level. i.e., level 2 shows verbosity 2 and lower.*/
setFilterLevel = (name: keyof Filters) => {