Compare commits
2 Commits
main
...
e42293df3f
Author | SHA1 | Date | |
---|---|---|---|
e42293df3f | |||
0e7dd90646 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -28,7 +28,6 @@ dist-ssr
|
|||||||
*.db
|
*.db
|
||||||
uploads/
|
uploads/
|
||||||
.env
|
.env
|
||||||
poem_pic/
|
|
||||||
|
|
||||||
poem_pic/
|
poem_pic/
|
||||||
|
|
||||||
|
@ -11,7 +11,6 @@ from . import auth_utils, orm_models, pydantic_schemas
|
|||||||
|
|
||||||
# Загружаем стихи
|
# Загружаем стихи
|
||||||
async def add_poems_to_db(async_db: AsyncSession):
|
async def add_poems_to_db(async_db: AsyncSession):
|
||||||
poems = []
|
|
||||||
f1 = open('poems.txt', encoding='utf-8', mode='r')#открыть фаил для чтения на русском
|
f1 = open('poems.txt', encoding='utf-8', mode='r')#открыть фаил для чтения на русском
|
||||||
for a in range(1, 110):
|
for a in range(1, 110):
|
||||||
f1.seek(0)#перейти к началу
|
f1.seek(0)#перейти к началу
|
||||||
@ -36,11 +35,8 @@ async def add_poems_to_db(async_db: AsyncSession):
|
|||||||
author += str1
|
author += str1
|
||||||
poem = orm_models.Poems(title=name, text=stixi, author=author)
|
poem = orm_models.Poems(title=name, text=stixi, author=author)
|
||||||
# В конце каждой итерации добавляем в базу данных
|
# В конце каждой итерации добавляем в базу данных
|
||||||
poems.append(poem)
|
async_db.add(poem)
|
||||||
|
async_db.commit()
|
||||||
async_db.add_all(poems)
|
|
||||||
|
|
||||||
await async_db.commit()
|
|
||||||
|
|
||||||
# close the file
|
# close the file
|
||||||
f1.close()
|
f1.close()
|
||||||
|
21
back/api.py
21
back/api.py
@ -200,6 +200,21 @@ def read_users_me(current_user: Annotated[pydantic_schemas.User, Depends(auth_ut
|
|||||||
return current_user
|
return current_user
|
||||||
|
|
||||||
|
|
||||||
|
# ендпоинт для генерации refresh token. Генерируется при каждом входе юзера
|
||||||
|
# на сайт
|
||||||
|
@app.post("/api/token/refresh", response_model=pydantic_schemas.Token)
|
||||||
|
async def generate_refresh_token(
|
||||||
|
current_user: Annotated[pydantic_schemas.User, Depends(auth_utils.get_current_active_user)]
|
||||||
|
):
|
||||||
|
# задаем временной интервал, в течение которого токен можно использовать
|
||||||
|
access_token_expires = auth_utils.timedelta(minutes=auth_utils.ACCESS_TOKEN_EXPIRE_MINUTES)
|
||||||
|
# создаем новый токен токен
|
||||||
|
access_token = auth_utils.create_access_token(
|
||||||
|
data={"user_id": current_user.id}, expires_delta=access_token_expires
|
||||||
|
)
|
||||||
|
return {"access_token":access_token}
|
||||||
|
|
||||||
|
|
||||||
# изменяем рейтинг пользователя
|
# изменяем рейтинг пользователя
|
||||||
@app.post("/api/user/rating")
|
@app.post("/api/user/rating")
|
||||||
async def add_points(data: pydantic_schemas.AddRating, current_user: Annotated[pydantic_schemas.User, Depends(auth_utils.get_current_user)], db: Annotated[Session, Depends(auth_utils.get_session)]):
|
async def add_points(data: pydantic_schemas.AddRating, current_user: Annotated[pydantic_schemas.User, Depends(auth_utils.get_current_user)], db: Annotated[Session, Depends(auth_utils.get_session)]):
|
||||||
@ -267,18 +282,12 @@ async def get_trashboxes(data: pydantic_schemas.TrashboxRequest = Depends()): #
|
|||||||
'limit' : '1'
|
'limit' : '1'
|
||||||
}
|
}
|
||||||
# Перевод категории с фронта на категорию с сайта
|
# Перевод категории с фронта на категорию с сайта
|
||||||
try:
|
|
||||||
list_of_category = trashboxes_category[data.Category]
|
list_of_category = trashboxes_category[data.Category]
|
||||||
except:
|
|
||||||
list_of_category = trashboxes_category['other_things']
|
|
||||||
|
|
||||||
# Получение ответа от стороннего апи
|
# Получение ответа от стороннего апи
|
||||||
response = requests.post(TRASHBOXES_BASE_URL + "/nearest_recycling/get", headers=head, data=my_data, timeout=10)
|
response = requests.post(TRASHBOXES_BASE_URL + "/nearest_recycling/get", headers=head, data=my_data, timeout=10)
|
||||||
infos = response.json()
|
infos = response.json()
|
||||||
|
|
||||||
if 'error' in infos and infos['error_description'] == 'Invalid bearer token':
|
|
||||||
raise HTTPException(status_code=502, detail="Invalid trashboxes token")
|
|
||||||
|
|
||||||
# Чтение ответа
|
# Чтение ответа
|
||||||
trashboxes = []
|
trashboxes = []
|
||||||
for trashbox in infos["results"]:
|
for trashbox in infos["results"]:
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 17 KiB |
Binary file not shown.
Before Width: | Height: | Size: 11 KiB |
Binary file not shown.
Before Width: | Height: | Size: 25 KiB |
@ -105,7 +105,5 @@ const lineByName = (name: string) => (
|
|||||||
lines.find(line => stations[line].has(name))
|
lines.find(line => stations[line].has(name))
|
||||||
)
|
)
|
||||||
|
|
||||||
const DEFAULT_LINE = 'Петроградская'
|
|
||||||
|
|
||||||
export type { Lines }
|
export type { Lines }
|
||||||
export { lines, stations, colors, lineNames, lineByName, DEFAULT_LINE }
|
export { lines, stations, colors, lineNames, lineByName }
|
||||||
|
@ -1,73 +0,0 @@
|
|||||||
import { iconDormitory, iconITMO, iconLETI } from '../utils/markerIcons'
|
|
||||||
|
|
||||||
type LocationType = 'dormitory' | 'leti' | 'itmo'
|
|
||||||
|
|
||||||
const studentLocations: {
|
|
||||||
name: string,
|
|
||||||
position: [number, number],
|
|
||||||
type: LocationType
|
|
||||||
}[] = [
|
|
||||||
{
|
|
||||||
name: 'Первое, второе, третье общежития',
|
|
||||||
position: [59.987299, 30.330672],
|
|
||||||
type: 'dormitory',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Четвертое общежитие',
|
|
||||||
position: [59.985620, 30.331319],
|
|
||||||
type: 'dormitory',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Шестое общежитие',
|
|
||||||
position: [59.969713, 30.299851],
|
|
||||||
type: 'dormitory',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Седьмое общежитие',
|
|
||||||
position: [60.003723, 30.287616],
|
|
||||||
type: 'dormitory',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Восьмое общежитие',
|
|
||||||
position: [59.991115, 30.318752],
|
|
||||||
type: 'dormitory',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Общежития Межвузовского студенческого городка',
|
|
||||||
position: [59.871053, 30.307154],
|
|
||||||
type: 'dormitory',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Одиннадцатое общежитие',
|
|
||||||
position: [59.877962, 30.242889],
|
|
||||||
type: 'dormitory',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Общежитие Академии транспортных технологий',
|
|
||||||
position: [59.870375, 30.308646],
|
|
||||||
type: 'dormitory',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'ЛЭТИ шестой корпус',
|
|
||||||
position: [59.971578, 30.296653],
|
|
||||||
type: 'leti',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'ЛЭТИ Первый и другие корпуса',
|
|
||||||
position: [59.971947, 30.324303],
|
|
||||||
type: 'leti',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'ИТМО',
|
|
||||||
position: [59.956363, 30.310029],
|
|
||||||
type: 'itmo',
|
|
||||||
},
|
|
||||||
]
|
|
||||||
|
|
||||||
const locationsIcons: Record<LocationType, L.Icon> = {
|
|
||||||
dormitory: iconDormitory,
|
|
||||||
itmo: iconITMO,
|
|
||||||
leti: iconLETI,
|
|
||||||
}
|
|
||||||
|
|
||||||
export { studentLocations, locationsIcons }
|
|
@ -11,7 +11,6 @@ import { iconItem } from '../utils/markerIcons'
|
|||||||
import { useId } from '../hooks'
|
import { useId } from '../hooks'
|
||||||
import SelectDisposalTrashbox from './SelectDisposalTrashbox'
|
import SelectDisposalTrashbox from './SelectDisposalTrashbox'
|
||||||
import StarRating from './StarRating'
|
import StarRating from './StarRating'
|
||||||
import StudentLocations from './StudentLocations'
|
|
||||||
|
|
||||||
const styles = {
|
const styles = {
|
||||||
container: {
|
container: {
|
||||||
@ -53,8 +52,6 @@ const View = ({
|
|||||||
url='https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'
|
url='https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<StudentLocations />
|
|
||||||
|
|
||||||
<Marker icon={iconItem} position={[lat, lng]}>
|
<Marker icon={iconItem} position={[lat, lng]}>
|
||||||
<Popup>
|
<Popup>
|
||||||
{address}
|
{address}
|
||||||
|
@ -47,13 +47,18 @@ const AuthForm = ({ goBack }: AuthFormProps) => {
|
|||||||
<Form.Control placeholder='Пароль' name='password' type='password' required />
|
<Form.Control placeholder='Пароль' name='password' type='password' required />
|
||||||
</Form.Group>
|
</Form.Group>
|
||||||
|
|
||||||
<p>
|
<Form.Group className='mb-3' controlId='privacyPolicyConsent'>
|
||||||
Нажимая на кнопку, я даю своё согласие на обработку персональных данных и соглашаюсь с{' '}
|
<Form.Check>
|
||||||
|
<Form.Check.Input type='checkbox' required />
|
||||||
|
<Form.Check.Label>
|
||||||
|
Я согласен с{' '}
|
||||||
<a
|
<a
|
||||||
href={`${document.location.origin}/privacy_policy.pdf`}
|
href={`${document.location.origin}/privacy_policy.pdf`}
|
||||||
target='_blank'
|
target='_blank'
|
||||||
>условиями политики конфиденциальности</a>
|
>условиями обработки персональных данных</a>
|
||||||
</p>
|
</Form.Check.Label>
|
||||||
|
</Form.Check>
|
||||||
|
</Form.Group>
|
||||||
|
|
||||||
<ButtonGroup className='d-flex'>
|
<ButtonGroup className='d-flex'>
|
||||||
<Button
|
<Button
|
||||||
|
@ -77,7 +77,7 @@ function Filters({ filter, setFilter, filterShown, setFilterShown }: FiltersProp
|
|||||||
</Form.Group>
|
</Form.Group>
|
||||||
|
|
||||||
<Button variant='success' type='submit'>
|
<Button variant='success' type='submit'>
|
||||||
Выбрать
|
Отправить
|
||||||
</Button>
|
</Button>
|
||||||
</Form>
|
</Form>
|
||||||
</Modal.Body>
|
</Modal.Body>
|
||||||
|
@ -24,10 +24,9 @@ function LocationMarker({ address, position, setPosition }: LocationMarkerProps)
|
|||||||
})
|
})
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Marker icon={iconItem} position={position} zIndexOffset={1000}>
|
<Marker icon={iconItem} position={position}>
|
||||||
<Popup>
|
<Popup>
|
||||||
{address}
|
{address}
|
||||||
<br />
|
|
||||||
{position.lat.toFixed(4)}, {position.lng.toFixed(4)}
|
{position.lat.toFixed(4)}, {position.lng.toFixed(4)}
|
||||||
</Popup>
|
</Popup>
|
||||||
</Marker>
|
</Marker>
|
||||||
|
@ -26,7 +26,7 @@ function Poetry() {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<p><em>{poetry.data.author}</em></p>
|
<p><em>{poetry.data.author}</em></p>
|
||||||
<img className={styles.image} src={`/poem_pic/${poetry.data.id}.jpg`} alt='Иллюстрация' />
|
<img src={`/poem_pic/${poetry.data.id}.jpg`} alt='Иллюстрация' />
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
) : (
|
) : (
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import { Link } from 'react-router-dom'
|
import { Link } from 'react-router-dom'
|
||||||
import { useEffect, useLayoutEffect, useRef, useState } from 'react'
|
import { useEffect, useLayoutEffect, useRef, useState } from 'react'
|
||||||
|
import { Button } from 'react-bootstrap'
|
||||||
|
|
||||||
import { UserCategory, composeUserCategoriesFilters, userCategoriesInfos } from '../assets/userCategories'
|
import { UserCategory, composeUserCategoriesFilters, userCategoriesInfos } from '../assets/userCategories'
|
||||||
import { Announcement } from '../api/announcement/types'
|
import { Announcement } from '../api/announcement/types'
|
||||||
@ -95,9 +96,9 @@ function StoriesPreviewCarousel({ announcements, category }: StoriesPreviewProps
|
|||||||
|
|
||||||
return <div className={styles.container}>
|
return <div className={styles.container}>
|
||||||
{showScrollButtons.left &&
|
{showScrollButtons.left &&
|
||||||
<button onClick={doScroll(false)} className={`${styles.scrollButton} ${styles.leftScrollButton}`}>
|
<Button onClick={doScroll(false)} className={`${styles.scrollButton} ${styles.leftScrollButton}`}>
|
||||||
<img src={rightAngleIcon} alt='Показать ещё' />
|
<img src={rightAngleIcon} alt='Показать ещё' />
|
||||||
</button>
|
</Button>
|
||||||
}
|
}
|
||||||
|
|
||||||
<ul className={styles.list} ref={ulElement}>
|
<ul className={styles.list} ref={ulElement}>
|
||||||
@ -105,9 +106,9 @@ function StoriesPreviewCarousel({ announcements, category }: StoriesPreviewProps
|
|||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
{showScrollButtons.right &&
|
{showScrollButtons.right &&
|
||||||
<button onClick={doScroll(true)} className={`${styles.scrollButton} ${styles.rightScrollButton}`}>
|
<Button onClick={doScroll(true)} className={`${styles.scrollButton} ${styles.rightScrollButton}`}>
|
||||||
<img src={rightAngleIcon} alt='Показать ещё' />
|
<img src={rightAngleIcon} alt='Показать ещё' />
|
||||||
</button>
|
</Button>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
@ -1,36 +0,0 @@
|
|||||||
import { Marker, Tooltip, useMap } from 'react-leaflet'
|
|
||||||
import { LatLng } from 'leaflet'
|
|
||||||
|
|
||||||
import { locationsIcons, studentLocations } from '../assets/studentLocations'
|
|
||||||
|
|
||||||
type StudentLocationsProps = {
|
|
||||||
setPosition?: (pos: LatLng) => void
|
|
||||||
}
|
|
||||||
|
|
||||||
function StudentLocations({ setPosition }: StudentLocationsProps) {
|
|
||||||
const map = useMap()
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>{
|
|
||||||
studentLocations.map((el) =>
|
|
||||||
<Marker
|
|
||||||
icon={locationsIcons[el.type]}
|
|
||||||
position={el.position}
|
|
||||||
eventHandlers={{
|
|
||||||
click: setPosition && (() => {
|
|
||||||
setPosition(new LatLng(...el.position))
|
|
||||||
map.setView(el.position)
|
|
||||||
}),
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Tooltip>
|
|
||||||
{el.name}
|
|
||||||
</Tooltip>
|
|
||||||
</Marker>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
</>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
export default StudentLocations
|
|
@ -17,4 +17,3 @@ export { default as SelectDisposalTrashbox } from './SelectDisposalTrashbox'
|
|||||||
export { default as StarRating } from './StarRating'
|
export { default as StarRating } from './StarRating'
|
||||||
export { default as CardLayout } from './CardLayout'
|
export { default as CardLayout } from './CardLayout'
|
||||||
export { default as LocateButton } from './LocateButton'
|
export { default as LocateButton } from './LocateButton'
|
||||||
export { default as StudentLocations } from './StudentLocations'
|
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
import { CSSProperties, FormEventHandler, useEffect, useMemo, useState } from 'react'
|
import { CSSProperties, FormEventHandler, useEffect, useState } from 'react'
|
||||||
import { Form, Button } from 'react-bootstrap'
|
import { Form, Button } from 'react-bootstrap'
|
||||||
import { MapContainer, TileLayer } from 'react-leaflet'
|
import { MapContainer, TileLayer } from 'react-leaflet'
|
||||||
import { latLng } from 'leaflet'
|
import { latLng } from 'leaflet'
|
||||||
import { useNavigate } from 'react-router-dom'
|
import { useNavigate } from 'react-router-dom'
|
||||||
|
|
||||||
import { MapClickHandler, LocationMarker, CardLayout, LocateButton, StudentLocations } from '../components'
|
import { MapClickHandler, LocationMarker, CardLayout, LocateButton } from '../components'
|
||||||
import { useAddAnnouncement } from '../hooks/api'
|
import { useAddAnnouncement } from '../hooks/api'
|
||||||
import { categories, categoryNames } from '../assets/category'
|
import { categories, categoryNames } from '../assets/category'
|
||||||
import { stations, lines, lineNames, DEFAULT_LINE } from '../assets/metro'
|
import { stations, lines, lineNames } from '../assets/metro'
|
||||||
import { fallbackError, gotResponse } from '../hooks/useFetch'
|
import { fallbackError, gotResponse } from '../hooks/useFetch'
|
||||||
import { useOsmAddresses } from '../hooks/api'
|
import { useOsmAddresses } from '../hooks/api'
|
||||||
|
|
||||||
@ -38,7 +38,7 @@ function AddPage() {
|
|||||||
formData.append('address', address.data || '') // if address.error
|
formData.append('address', address.data || '') // if address.error
|
||||||
formData.set('bestBy', new Date((formData.get('bestBy') as number | null) || 0).getTime().toString())
|
formData.set('bestBy', new Date((formData.get('bestBy') as number | null) || 0).getTime().toString())
|
||||||
|
|
||||||
void handleAdd(formData)
|
handleAdd(formData)
|
||||||
}
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@ -51,15 +51,15 @@ function AddPage() {
|
|||||||
<CardLayout text='Опубликовать объявление'>
|
<CardLayout text='Опубликовать объявление'>
|
||||||
<Form onSubmit={handleSubmit}>
|
<Form onSubmit={handleSubmit}>
|
||||||
<Form.Group className='mb-3' controlId='name'>
|
<Form.Group className='mb-3' controlId='name'>
|
||||||
<Form.Label>Как ошляпите объявление?</Form.Label>
|
<Form.Label>Заголовок объявления</Form.Label>
|
||||||
<Form.Control type='text' required name='name' />
|
<Form.Control type='text' required name='name' />
|
||||||
</Form.Group>
|
</Form.Group>
|
||||||
|
|
||||||
<Form.Group className='mb-3' controlId='category'>
|
<Form.Group className='mb-3' controlId='category'>
|
||||||
<Form.Label>Какая категория?</Form.Label>
|
<Form.Label>Категория</Form.Label>
|
||||||
<Form.Select required name='category'>
|
<Form.Select required name='category'>
|
||||||
<option value='' hidden>
|
<option value='' hidden>
|
||||||
Выберите категорию предмета
|
Выберите категорию
|
||||||
</option>
|
</option>
|
||||||
{categories.map(category =>
|
{categories.map(category =>
|
||||||
<option key={category} value={category}>{categoryNames[category]}</option>
|
<option key={category} value={category}>{categoryNames[category]}</option>
|
||||||
@ -68,12 +68,12 @@ function AddPage() {
|
|||||||
</Form.Group>
|
</Form.Group>
|
||||||
|
|
||||||
<Form.Group className='mb-3' controlId='bestBy'>
|
<Form.Group className='mb-3' controlId='bestBy'>
|
||||||
<Form.Label>Когда закрыть объявление?</Form.Label>
|
<Form.Label>Срок годности</Form.Label>
|
||||||
<Form.Control type='date' required name='bestBy' />
|
<Form.Control type='date' required name='bestBy' />
|
||||||
</Form.Group>
|
</Form.Group>
|
||||||
|
|
||||||
<Form.Group className='mb-3' controlId='address'>
|
<Form.Group className='mb-3' controlId='address'>
|
||||||
<Form.Label>Где забирать?</Form.Label>
|
<Form.Label>Адрес выдачи</Form.Label>
|
||||||
<div className='mb-3'>
|
<div className='mb-3'>
|
||||||
<MapContainer
|
<MapContainer
|
||||||
scrollWheelZoom={false}
|
scrollWheelZoom={false}
|
||||||
@ -86,8 +86,6 @@ function AddPage() {
|
|||||||
url='https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'
|
url='https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{useMemo(() => <StudentLocations setPosition={setAddressPosition} />, [])}
|
|
||||||
|
|
||||||
<LocationMarker
|
<LocationMarker
|
||||||
address={gotResponse(address) ? fallbackError(address) : 'Загрузка...'}
|
address={gotResponse(address) ? fallbackError(address) : 'Загрузка...'}
|
||||||
position={addressPosition}
|
position={addressPosition}
|
||||||
@ -105,7 +103,7 @@ function AddPage() {
|
|||||||
</Form.Group>
|
</Form.Group>
|
||||||
|
|
||||||
<Form.Group className='mb-3' controlId='description'>
|
<Form.Group className='mb-3' controlId='description'>
|
||||||
<Form.Label>Пару слов о вас и предмете?</Form.Label>
|
<Form.Label>Описание</Form.Label>
|
||||||
<Form.Control
|
<Form.Control
|
||||||
as='textarea'
|
as='textarea'
|
||||||
name='description'
|
name='description'
|
||||||
@ -115,7 +113,7 @@ function AddPage() {
|
|||||||
</Form.Group>
|
</Form.Group>
|
||||||
|
|
||||||
<Form.Group className='mb-3' controlId='src'>
|
<Form.Group className='mb-3' controlId='src'>
|
||||||
<Form.Label>Загрузите гляделки? (фото или видео)</Form.Label>
|
<Form.Label>Иллюстрация (фото или видео)</Form.Label>
|
||||||
<Form.Control
|
<Form.Control
|
||||||
type='file'
|
type='file'
|
||||||
name='src'
|
name='src'
|
||||||
@ -126,9 +124,12 @@ function AddPage() {
|
|||||||
|
|
||||||
<Form.Group className='mb-3' controlId='metro'>
|
<Form.Group className='mb-3' controlId='metro'>
|
||||||
<Form.Label>
|
<Form.Label>
|
||||||
Где метро поближе?
|
Станция метро
|
||||||
</Form.Label>
|
</Form.Label>
|
||||||
<Form.Select name='metro' defaultValue={DEFAULT_LINE}>
|
<Form.Select name='metro'>
|
||||||
|
<option value=''>
|
||||||
|
Укажите ближайщую станцию метро
|
||||||
|
</option>
|
||||||
{lines.map(
|
{lines.map(
|
||||||
line =>
|
line =>
|
||||||
<optgroup key={line} label={lineNames[line]}>
|
<optgroup key={line} label={lineNames[line]}>
|
||||||
|
@ -48,11 +48,6 @@ function UserPage() {
|
|||||||
<div className='mb-3'>
|
<div className='mb-3'>
|
||||||
<Poetry />
|
<Poetry />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className='mb-3'>
|
|
||||||
<h4>Связаться с разработчиками</h4>
|
|
||||||
Канал в телеграме: <a href='https://t.me/porridger'>Porridger</a>
|
|
||||||
</div>
|
|
||||||
</Container>
|
</Container>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -5,8 +5,3 @@
|
|||||||
.text {
|
.text {
|
||||||
white-space: pre-wrap;
|
white-space: pre-wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.image {
|
|
||||||
width: 100%;
|
|
||||||
border-radius: 12px;
|
|
||||||
}
|
|
@ -42,7 +42,6 @@
|
|||||||
top: 0;
|
top: 0;
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
background: linear-gradient(to right, rgba(17, 17, 17, 0) 0%, rgba(17, 17, 17, 255) 100%);
|
background: linear-gradient(to right, rgba(17, 17, 17, 0) 0%, rgba(17, 17, 17, 255) 100%);
|
||||||
background-color: transparent;
|
|
||||||
display: block;
|
display: block;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 10%;
|
width: 10%;
|
||||||
|
@ -2,10 +2,6 @@ import L from 'leaflet'
|
|||||||
|
|
||||||
import itemMarker from '../assets/itemMarker.png'
|
import itemMarker from '../assets/itemMarker.png'
|
||||||
import trashMarker from '../assets/trashMarker.png'
|
import trashMarker from '../assets/trashMarker.png'
|
||||||
import dormitoryMarker from '../assets/dormitoryMarker.png'
|
|
||||||
import letiMarker from '../assets/letiMarker.png'
|
|
||||||
import itmoMarker from '../assets/itmoMarker.png'
|
|
||||||
|
|
||||||
|
|
||||||
const iconItem = new L.Icon({
|
const iconItem = new L.Icon({
|
||||||
iconUrl: itemMarker,
|
iconUrl: itemMarker,
|
||||||
@ -21,25 +17,4 @@ const iconTrash = new L.Icon({
|
|||||||
iconSize: [34, 41],
|
iconSize: [34, 41],
|
||||||
})
|
})
|
||||||
|
|
||||||
const iconDormitory = new L.Icon({
|
export { iconItem, iconTrash }
|
||||||
iconUrl: dormitoryMarker,
|
|
||||||
iconRetinaUrl: dormitoryMarker,
|
|
||||||
popupAnchor: [0, 0],
|
|
||||||
iconSize: [41, 41],
|
|
||||||
})
|
|
||||||
|
|
||||||
const iconLETI = new L.Icon({
|
|
||||||
iconUrl: letiMarker,
|
|
||||||
iconRetinaUrl: letiMarker,
|
|
||||||
popupAnchor: [0, 0],
|
|
||||||
iconSize: [41, 41],
|
|
||||||
})
|
|
||||||
|
|
||||||
const iconITMO = new L.Icon({
|
|
||||||
iconUrl: itmoMarker,
|
|
||||||
iconRetinaUrl: itmoMarker,
|
|
||||||
popupAnchor: [0, 0],
|
|
||||||
iconSize: [41, 41],
|
|
||||||
})
|
|
||||||
|
|
||||||
export { iconItem, iconTrash, iconDormitory, iconLETI, iconITMO }
|
|
||||||
|
Reference in New Issue
Block a user