Improve place-create button

This commit is contained in:
Râu Cao 2026-01-27 13:37:59 +07:00
parent a73e5cda6a
commit 8e3187f38d
Signed by: raucao
GPG Key ID: 37036C356E56CC51
4 changed files with 10 additions and 25 deletions

View File

@ -15,6 +15,7 @@ import mapPin from 'feather-icons/dist/icons/map-pin.svg?raw';
import menu from 'feather-icons/dist/icons/menu.svg?raw';
import navigation from 'feather-icons/dist/icons/navigation.svg?raw';
import phone from 'feather-icons/dist/icons/phone.svg?raw';
import plus from 'feather-icons/dist/icons/plus.svg?raw';
import server from 'feather-icons/dist/icons/server.svg?raw';
import settings from 'feather-icons/dist/icons/settings.svg?raw';
import target from 'feather-icons/dist/icons/target.svg?raw';
@ -37,6 +38,7 @@ const ICONS = {
menu,
navigation,
phone,
plus,
server,
settings,
target,

View File

@ -202,10 +202,10 @@ export default class PlacesSidebar extends Component {
<button
type="button"
class="create-place-btn"
class="btn btn-outline create-place"
{{on "click" this.createNewPlace}}
>
<Icon @name="plus" @size={{18}} />
<Icon @name="plus" @size={{18}} @color="#007bff" />
Create new place
</button>
{{/if}}

View File

@ -244,7 +244,9 @@ export default class StorageService extends Service {
// Update both lists
this.savedPlaces = this.savedPlaces.filter((p) => p.id !== place.id);
this.placesInView = this.placesInView.filter((p) => p.id !== place.id);
if (this.placesInView.length > 0) {
this.placesInView = this.placesInView.filter((p) => p.id !== place.id);
}
}
@action

View File

@ -688,41 +688,22 @@ span.icon {
}
}
/* Helper Text */
.helper-text {
background: #eef4fc;
color: #1a5c9b;
padding: 0.75rem;
border-radius: 4px;
font-size: 0.9rem;
margin-top: 0;
margin-bottom: 1rem;
display: flex;
align-items: center;
gap: 0.5rem;
}
/* Create Place Button */
.create-place-btn {
button.create-place {
width: 100%;
padding: 1rem;
margin-top: 1rem;
background: white;
border: 1px dashed #ccc;
border-radius: 8px;
color: #666;
font-weight: 500;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
transition: all 0.2s;
}
.create-place-btn:hover {
background: #f8f9fa;
border-color: #999;
color: #333;
margin: 1.5rem auto;
}
@media (width <= 768px) {