Основные стили обновлены

This commit is contained in:
goodmice 2022-12-28 17:06:22 +05:00
parent cf87354cd1
commit 842e1773b4
No known key found for this signature in database
GPG Key ID: EA4AA16454AC96C8
15 changed files with 83 additions and 180 deletions

View File

@ -7,7 +7,7 @@ import { downloadFile } from './factory'
import { getLinkToFile } from '@pages/FileDownload'
import '@styles/index.css'
import '@styles/components/download_link.less'
export type DownloadLinkProps = LinkProps & {
file?: FileInfoDto

View File

@ -1,4 +1,6 @@
import React, { HTMLAttributes, memo } from 'react'
import { HTMLAttributes, memo } from 'react'
import '@styles/components/grid.less'
export type ComponentProps = HTMLAttributes<HTMLDivElement>
@ -36,7 +38,7 @@ export const GridItem = memo<GridItemProps>(({ children, row, col, rowSpan, colS
}
return (
<div className={`asb-grid-item ${className || ''}`} style={gridItemStyle} {...other}>
<div className={`dd-grid-item ${className || ''}`} style={gridItemStyle} {...other}>
{children}
</div>
)

View File

@ -8,7 +8,7 @@ import TableSettingsChanger from './TableSettingsChanger'
import type { OmitExtends } from '@utils/types'
import { applyTableSettings, getTableSettings, setTableSettings, TableColumnSettings, TableSettings } from '@utils'
import '@styles/index.css'
import '@styles/components/table.less'
export type BaseTableColumn<T> = ColumnGroupType<T> | ColumnType<T>
export type TableColumn<T> = OmitExtends<BaseTableColumn<T>, TableColumnSettings>

View File

@ -8,9 +8,7 @@ import { OpenAPI } from '@api'
import App from './App'
import '@styles/include/antd_theme.less'
import '@styles/fonts.less'
import '@styles/index.css'
import '@styles/index.less'
// OpenAPI.BASE = 'http://localhost:3000'
// TODO: Удалить взятие из 'token' в следующем релизе, вставлено для совместимости

View File

@ -9,7 +9,6 @@ import { makeGroupColumn, makeNumericColumn, makeNumericRender, makeTextColumn,
import { OperationStatService, WellOperationService } from '@api'
import { arrayOrDefault, withPermissions } from '@utils'
import '@styles/index.css'
import '@styles/pages/statistics.less'
const { Text } = Typography

View File

@ -17,7 +17,6 @@ import { MeasureService } from '@api'
import { View } from './View'
import '@styles/index.css'
import '@styles/pages/measure.css'
const createEditingColumns = (cols, renderDelegate) =>

View File

@ -3,7 +3,6 @@ import { Empty, Form } from 'antd'
import { Grid, GridItem } from '@components/Grid'
import '@styles/index.css'
import '@styles/pages/measure.css'
export const View = memo(({ columns, item }) => !item || !columns?.length ? (

View File

@ -4,8 +4,6 @@ import { memo, useMemo } from 'react'
import { RootPathContext, useRootPath } from '@asb/context'
import { withPermissions } from '@utils'
import '@styles/index.css'
const Telemetry = memo(() => {
const root = useRootPath()
const rootPath = useMemo(() => `${root}/telemetry`, [root])

View File

@ -17,7 +17,6 @@ import StatExport from './StatExport'
import NetGraphExport from './NetGraphExport'
import AdditionalTables from './AdditionalTables'
import '@styles/index.css'
import '@styles/pages/tvd.less'
const operationsColors = [

View File

@ -10,8 +10,6 @@ import { WellService } from '@api'
import { WellNavigationMenu, menuItems } from './WellNavigationMenu'
import '@styles/index.css'
const Measure = lazy(() => import('./Measure'))
const Reports = lazy(() => import('./Reports'))
const WellCase = lazy(() => import('./WellCase'))

View File

@ -0,0 +1,4 @@
.download-link {
height: 32px;
padding: 4px 15px;
}

View File

@ -0,0 +1,3 @@
.dd-grid-item {
padding: 4px;
}

View File

@ -0,0 +1,13 @@
.first-column-title {
display: flex;
flex-direction: column;
align-items: stretch;
justify-content: space-between;
position: relative;
padding: 16px 0;
}
.text-align-r-container {
width: 100%;
text-align: right;
}

View File

@ -1,165 +0,0 @@
body {
margin: 0;
font-family: 'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
background: #232323;
}
.d-flex {
display: flex;
}
.flex-direction-column {
flex-direction: column;
}
.d-inline {
display: inline;
}
.d-none {
display: none;
}
.flex-1 {
flex: 1;
}
.w-15 {
width: 15%
}
.w-33 {
width: 33%
}
.w-50 {
width: 50%
}
.w-100 {
width: 100%
}
.m-0 {
margin: 0;
}
.mt-8px {
margin-top: 8px;
}
.mt-20px {
margin-top: 20px;
}
.mb-20px {
margin-bottom: 20px;
}
.ml-5px {
margin-left: 5px;
}
.ml-10px {
margin-left: 10px;
}
.ml-30px {
margin-left: 30px;
}
.h-100vh {
height: 100vh;
}
.p-10 {
padding: 10px;
}
.vertical-align-center {
vertical-align: center;
}
.text-align-center {
text-align: center;
}
.text-align-r-container {
width: 100%;
text-align: right;
}
code {
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
monospace;
}
.linkDocuments {
color: #000;
}
.linkDocuments:hover {
color: #c32828;
}
.container{
width: 100%;
}
.login-button {
width: 20%;
margin: auto;
}
.register-button {
width: 50%;
margin: auto;
}
.first-column-title {
display: flex;
flex-direction: column;
align-items: stretch;
justify-content: space-between;
position: relative;
padding: 16px 0;
}
.noselect {
-webkit-touch-callout: none; /* iOS Safari */
-webkit-user-select: none; /* Safari */
-khtml-user-select: none; /* Konqueror HTML */
-moz-user-select: none; /* Old versions of Firefox */
-ms-user-select: none; /* Internet Explorer/Edge */
user-select: none; /* Non-prefixed version, currently
supported by Chrome, Edge, Opera and Firefox */
}
.download-link {
height: 32px;
padding: 4px 15px;
}
.ant-table-cell:has(.color-pale-green) {
background-color: #98fb98;
}
.ant-table-tbody > tr > td.ant-table-cell-row-hover:has( > div.color-pale-green) {
background: #98fb98;
}
.color-pale-green {
background-color: #98fb98;
}
.asb-grid-item {
padding: 4px;
}
.pointer {
cursor: pointer;
}

56
src/styles/index.less Normal file
View File

@ -0,0 +1,56 @@
@import 'include/antd_theme.less';
@import 'fonts.less';
body {
margin: 0;
font-family: 'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
background: #232323;
}
.d-none { display: none }
.d-flex { display: flex }
.d-inline { display: inline }
.flex-direction-column { flex-direction: column }
.flex-1 { flex: 1 }
.w-15 { width: 15% }
.w-33 { width: 33% }
.w-50 { width: 50% }
.w-100 { width: 100% }
.h-100vh { height: 100vh }
.m-0 { margin: 0 }
.mt-8px { margin-top: 8px }
.mt-20px { margin-top: 20px }
.mb-20px { margin-bottom: 20px }
.ml-5px { margin-left: 5px }
.ml-10px { margin-left: 10px }
.ml-30px { margin-left: 30px }
.p-10 { padding: 10px }
.text-align-center {
text-align: center;
}
.container {
width: 100%;
}
.noselect {
-webkit-touch-callout: none; /* iOS Safari */
-webkit-user-select: none; /* Safari */
-khtml-user-select: none; /* Konqueror HTML */
-moz-user-select: none; /* Old versions of Firefox */
-ms-user-select: none; /* Internet Explorer/Edge */
user-select: none; /* Non-prefixed version, currently
supported by Chrome, Edge, Opera and Firefox */
}
.pointer { cursor: pointer }