mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 02:56:41 +07:00
stars at route-row-view
This commit is contained in:
parent
8dc3969906
commit
6714721adf
4 changed files with 15 additions and 58 deletions
|
@ -30,7 +30,7 @@
|
||||||
"prefer-promise-reject-errors": 0,
|
"prefer-promise-reject-errors": 0,
|
||||||
"jsx-a11y/mouse-events-have-key-events": 0,
|
"jsx-a11y/mouse-events-have-key-events": 0,
|
||||||
"camelcase": 0,
|
"camelcase": 0,
|
||||||
"no-trailing-spaces": 0,
|
"no-trailing-spaces": 0
|
||||||
},
|
},
|
||||||
"globals": {
|
"globals": {
|
||||||
"document": false,
|
"document": false,
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
"FormData": false,
|
"FormData": false,
|
||||||
"WebSocket": true,
|
"WebSocket": true,
|
||||||
"Element": true,
|
"Element": true,
|
||||||
"localStorage": true,
|
"localStorage": true
|
||||||
},
|
},
|
||||||
"env": {},
|
"env": {},
|
||||||
"settings": {
|
"settings": {
|
||||||
|
|
|
@ -37,8 +37,8 @@ export const RouteRowView = ({
|
||||||
<div className="route-row-fav" onClick={toggleStarred.bind(null, _id)}>
|
<div className="route-row-fav" onClick={toggleStarred.bind(null, _id)}>
|
||||||
{
|
{
|
||||||
is_starred
|
is_starred
|
||||||
? <Icon icon="icon-star-fill" size={24}/>
|
? <Icon icon="icon-star-fill" size={24} />
|
||||||
: <Icon icon="icon-star-blank" size={24}/>
|
: <Icon icon="icon-star-blank" size={24} />
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
@ -47,6 +47,10 @@ export const RouteRowView = ({
|
||||||
onClick={() => openRoute(_id)}
|
onClick={() => openRoute(_id)}
|
||||||
>
|
>
|
||||||
<div className="route-title">
|
<div className="route-title">
|
||||||
|
{
|
||||||
|
(tab === 'all' || tab === 'starred') && is_starred && !is_admin &&
|
||||||
|
<Icon icon="icon-star-fill" size={18} />
|
||||||
|
}
|
||||||
<span>{(title || _id)}</span>
|
<span>{(title || _id)}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -337,68 +337,21 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//.route-row-panel {
|
|
||||||
// position: absolute;
|
|
||||||
// top: 100%;
|
|
||||||
// height: 32px;
|
|
||||||
// width: 100%;
|
|
||||||
// left: 0;
|
|
||||||
// background: mix(@dialog_background, white, 80%);
|
|
||||||
// border-radius: 0 0 @panel_radius @panel_radius;
|
|
||||||
// z-index: 1;
|
|
||||||
// transform: scaleY(0);
|
|
||||||
// pointer-events: none;
|
|
||||||
// touch-action: none;
|
|
||||||
// transition: transform 250ms;
|
|
||||||
// transform-origin: 0 0;
|
|
||||||
// padding: 0 5px;
|
|
||||||
// box-sizing: border-box;
|
|
||||||
// // display: flex;
|
|
||||||
// align-items: center;
|
|
||||||
// fill: white;
|
|
||||||
//
|
|
||||||
// display: none;
|
|
||||||
//
|
|
||||||
// & > div {
|
|
||||||
// display: flex;
|
|
||||||
// align-items: center;
|
|
||||||
//
|
|
||||||
// svg {
|
|
||||||
// margin-right: 2px;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//.route-row-edit {
|
|
||||||
// fill: rgba(255, 255, 255, 0.3);
|
|
||||||
// right: -48px;
|
|
||||||
// padding-left: 0px;
|
|
||||||
// stroke: none;
|
|
||||||
// position: absolute;
|
|
||||||
// top: 0;
|
|
||||||
// width: 58px;
|
|
||||||
// height: 100%;
|
|
||||||
// transition: all 500ms;
|
|
||||||
// display: flex;
|
|
||||||
// align-items: center;
|
|
||||||
// justify-content: center;
|
|
||||||
// cursor: pointer;
|
|
||||||
//
|
|
||||||
// &:hover {
|
|
||||||
// fill: @green_secondary;
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
.route-title {
|
.route-title {
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
//white-space: nowrap;
|
|
||||||
position: relative;
|
position: relative;
|
||||||
max-height: 2.4em;
|
max-height: 2.4em;
|
||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
svg {
|
||||||
|
fill: fade(white, 50%);
|
||||||
|
margin-right: 2px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.route-description {
|
.route-description {
|
||||||
|
|
|
@ -28,6 +28,6 @@
|
||||||
"include": [
|
"include": [
|
||||||
"./src/**/*",
|
"./src/**/*",
|
||||||
"./backend/**/*",
|
"./backend/**/*",
|
||||||
"./custom.d.ts",
|
"./custom.d.ts"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue