Fix lint errors
All checks were successful
CI / Lint (pull_request) Successful in 21s
CI / Test (pull_request) Successful in 34s

This commit is contained in:
2026-03-13 13:51:29 +04:00
parent b2220b8310
commit 990f3afa88
4 changed files with 15 additions and 11 deletions

View File

@@ -60,7 +60,7 @@ export default class MapComponent extends Component {
// Create a vector source and layer for bookmarks // Create a vector source and layer for bookmarks
this.bookmarkSource = new VectorSource(); this.bookmarkSource = new VectorSource();
const bookmarkStyleFunction = (feature) => { const bookmarkStyleFunction = (feature) => {
const originalPlace = feature.get('originalPlace'); const originalPlace = feature.get('originalPlace');
let color = '#ffcc33'; // Default Yellow let color = '#ffcc33'; // Default Yellow
@@ -71,7 +71,7 @@ export default class MapComponent extends Component {
originalPlace._listIds.length > 0 originalPlace._listIds.length > 0
) { ) {
// Find the first list color // Find the first list color
// We need access to storage.lists. // We need access to storage.lists.
// Since this is inside setupMap, 'this' refers to the component instance. // Since this is inside setupMap, 'this' refers to the component instance.
const firstListId = originalPlace._listIds[0]; const firstListId = originalPlace._listIds[0];
const list = this.storage.lists.find((l) => l.id === firstListId); const list = this.storage.lists.find((l) => l.id === firstListId);

View File

@@ -1,5 +1,4 @@
import Component from '@glimmer/component'; import Component from '@glimmer/component';
import { fn } from '@ember/helper';
import { on } from '@ember/modifier'; import { on } from '@ember/modifier';
import { htmlSafe } from '@ember/template'; import { htmlSafe } from '@ember/template';
import { humanizeOsmTag } from '../utils/format-text'; import { humanizeOsmTag } from '../utils/format-text';

View File

@@ -3,7 +3,7 @@ import { service } from '@ember/service';
import { action } from '@ember/object'; import { action } from '@ember/object';
import { on } from '@ember/modifier'; import { on } from '@ember/modifier';
import { fn } from '@ember/helper'; import { fn } from '@ember/helper';
import Icon from './icon'; import { htmlSafe } from '@ember/template';
import onClickOutside from '../modifiers/on-click-outside'; import onClickOutside from '../modifiers/on-click-outside';
export default class PlaceListsManager extends Component { export default class PlaceListsManager extends Component {
@@ -17,6 +17,10 @@ export default class PlaceListsManager extends Component {
return this.args.place._listIds || []; return this.args.place._listIds || [];
} }
styleFor(color) {
return htmlSafe(`background-color: ${color}`);
}
@action @action
isInList(list) { isInList(list) {
if (!this.placeListIds) return false; if (!this.placeListIds) return false;
@@ -59,10 +63,7 @@ export default class PlaceListsManager extends Component {
} }
<template> <template>
<div <div class="place-lists-manager" {{onClickOutside @onClose}}>
class="place-lists-manager"
{{onClickOutside @onClose}}
>
<div class="list-item master-toggle"> <div class="list-item master-toggle">
<label> <label>
<input <input
@@ -86,7 +87,11 @@ export default class PlaceListsManager extends Component {
{{on "change" (fn this.toggleList list)}} {{on "change" (fn this.toggleList list)}}
disabled={{unless this.isSaved true}} disabled={{unless this.isSaved true}}
/> />
<span class="list-color" style="background-color: {{list.color}}"></span> {{! template-lint-disable no-inline-styles }}
<span
class="list-color"
style={{this.styleFor list.color}}
></span>
<span class="list-name">{{list.title}}</span> <span class="list-name">{{list.title}}</span>
</label> </label>
</div> </div>

View File

@@ -1021,7 +1021,7 @@ button.create-place {
color: #333; color: #333;
} }
.place-lists-manager input[type="checkbox"] { .place-lists-manager input[type='checkbox'] {
accent-color: #007bff; accent-color: #007bff;
width: 16px; width: 16px;
height: 16px; height: 16px;
@@ -1033,7 +1033,7 @@ button.create-place {
height: 12px; height: 12px;
border-radius: 50%; border-radius: 50%;
flex-shrink: 0; flex-shrink: 0;
border: 1px solid rgba(0,0,0,0.1); border: 1px solid rgb(0 0 0 / 10%);
} }
.place-lists-manager .divider { .place-lists-manager .divider {