Skip to content

Commit

Permalink
style: lint code
Browse files Browse the repository at this point in the history
  • Loading branch information
cnouguier committed Nov 12, 2024
1 parent 5890528 commit 37c9712
Show file tree
Hide file tree
Showing 15 changed files with 34 additions and 40 deletions.
2 changes: 1 addition & 1 deletion core/client/components/collection/KCardSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const props = defineProps({
const filteredActions = computed(() => {
if (!props.actionsFilter) return props.actions
let filter = props.actionsFilter
if (_.isString(filter)) filter=[filter]
if (_.isString(filter)) filter = [filter]
return _.filter(props.actions, action => {
return _.indexOf(filter, action.id) >= 0
})
Expand Down
2 changes: 1 addition & 1 deletion core/client/components/collection/KGrid.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
<div v-else id="grid-initializing">
<slot name="initializing">
<div class="row justify-center">
<q-spinner
<q-spinner
color="primary"
size="2rem"
/>
Expand Down
8 changes: 4 additions & 4 deletions core/client/components/collection/KTable.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<!-- Content -->
<!-- Content -->
<div v-if="items && items.length > 0">
<q-table
:title="title"
Expand Down Expand Up @@ -53,7 +53,7 @@
</template>
</q-table>
</div>
<!-- Empty slot -->
<!-- Empty slot -->
<div v-else-if="items && items.length === 0"
id="table-empty"
>
Expand All @@ -73,7 +73,7 @@
<div v-else id="grid-initializing">
<slot name="initializing">
<div class="row justify-center">
<q-spinner
<q-spinner
color="primary"
size="2rem"
/>
Expand Down Expand Up @@ -289,4 +289,4 @@ defineExpose({
p {
margin: 0;
}
</style>
</style>
4 changes: 2 additions & 2 deletions core/client/components/collection/KTimeLine.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
</q-timeline>
</div>
<!-- Empty slot -->
<div v-else-if="items && items.length === 0"
<div v-else-if="items && items.length === 0"
id="timeline-content"
>
<slot name="empty">
Expand All @@ -115,7 +115,7 @@
<div v-else id="timeline-initializing">
<slot name="initializing">
<div class="row justify-center">
<q-spinner
<q-spinner
color="primary"
size="4rem"
class="absolute-center"
Expand Down
2 changes: 1 addition & 1 deletion core/client/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export const Layout = {
if (layout.header) this.setHeader(layout.header)
if (layout.footer) this.setFooter(layout.footer)
if (layout.page) this.setPage(layout.page)
if (layout.stickies) this.setStickies(layout.stickies)
if (layout.stickies) this.setStickies(layout.stickies)
if (layout.fab) this.setFab(layout.fab)
this.placements.forEach(placement => {
if (_.has(layout, `panes.${placement}`)) this.setPane(placement, _.get(layout, `panes.${placement}`))
Expand Down
4 changes: 2 additions & 2 deletions core/client/units.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ export const Units = {
if (!definition) {
// Check if that's a mathjs unit ? This will actually enforce a unit to be known by either our systelm or mathjs.
// We'd like to be able to mange unknown unit without braking the system just to perform unit display
//if (math.Unit.isValuelessUnit(unit)) definition = { name: unit, symbol: unit, label: unit }
// if (math.Unit.isValuelessUnit(unit)) definition = { name: unit, symbol: unit, label: unit }
// Create a fake unit definition for unknown units so tht it does not break others methods
definition = { name: unit, symbol: unit, label: unit }
}
Expand Down Expand Up @@ -345,7 +345,7 @@ export const Units = {
convert (value, sourceUnit, targetUnit) {
if (_.isNil(value) || !_.isFinite(value)) return value
if (value === Number.MIN_VALUE || value === Number.MAX_VALUE) return value
let sourceUnitDef = (typeof sourceUnit === 'string') ? this.getUnit(sourceUnit) : sourceUnit
const sourceUnitDef = (typeof sourceUnit === 'string') ? this.getUnit(sourceUnit) : sourceUnit
let targetUnitDef = (typeof targetUnit === 'string') ? this.getUnit(targetUnit) : targetUnit
// If target unit is not given use default one
if (!targetUnitDef && sourceUnitDef) targetUnitDef = this.getDefaultUnit(sourceUnitDef)
Expand Down
8 changes: 4 additions & 4 deletions map/client/components/KAttribution.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@
self="bottom right"
>
<div
id="attributions-banner"
id="attributions-banner"
class="bg-white text-primary text-center q-col-gutter-y-xs"
>
<!-- Header Content -->
<div v-if="header">
<KContent :content="header" :class="headerClass" />
</div>
<!-- Main Content -->
<div
<div
id="attributions-content"
v-html="sanitizedAttributions"
v-html="sanitizedAttributions"
class="text-caption q-py-none q-px-sm"
/>
<!-- Footer Content -->
Expand Down Expand Up @@ -94,7 +94,7 @@ watch(CurrentActivity, (newActivity, oldActivity) => {
// Functions
function onShowLayer (layer) {
if (layer.attribution) {
if (layer.attribution) {
logger.debug(`[KDK] Add ${layer.name} to attribution`)
_.set(attributions.value, _.kebabCase(layer.name), layer.attribution)
}
Expand Down
6 changes: 3 additions & 3 deletions map/client/components/catalog/KCreateOfflineView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
class="q-pa-sm"
/>
{{ $t('KCreateOfflineView.NUMBER_OF_TILES') + n }}

</template>

<script setup>
import SphericalMercator from '@mapbox/sphericalmercator'
import { ref, computed } from 'vue'
Expand Down Expand Up @@ -73,12 +73,12 @@ const schema = computed(() => {
function updateNumberOfTiles (minZoom, maxZoom) {
n.value = 0
for (let z = minZoom; z <= maxZoom; z++) {
let sm = new SphericalMercator()
const sm = new SphericalMercator()
const tilesBounds = sm.xyz([props.view.west, props.view.south, props.view.east, props.view.north], z)
n.value += (tilesBounds.maxX - tilesBounds.minX + 1) * (tilesBounds.maxY - tilesBounds.minY + 1)
}
}
function onFieldChanged() {
function onFieldChanged () {
const { minZoom, maxZoom } = form.value.values()
updateNumberOfTiles(minZoom, maxZoom)
}
Expand Down
4 changes: 2 additions & 2 deletions map/client/components/catalog/KProjectSelector.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div
<div
v-ripple:primary
class="k-project-selector"
>
Expand Down Expand Up @@ -47,4 +47,4 @@ export default {
.k-project-selector:hover {
background-color: #efefef
}
</style>
</style>
4 changes: 2 additions & 2 deletions map/client/components/catalog/KProjectsPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@ export default {
})
if (!result.ok) return false
const catalogService = this.$api.getService('catalog')
for (let viewId of project.views) {
for (const viewId of project.views) {
console.log(viewId)
let view = await catalogService.get(viewId._id)
const view = await catalogService.get(viewId._id)
uncacheView(view, project, this.kActivity)
}
await this.$api.getService('projects').remove(project._id)
Expand Down
4 changes: 2 additions & 2 deletions map/client/components/catalog/KViewSelector.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div
<div
v-ripple:primary
class="k-view-selector"
>
Expand Down Expand Up @@ -85,4 +85,4 @@ export default {
.k-view-selector:hover {
background-color: #efefef
}
</style>
</style>
4 changes: 2 additions & 2 deletions map/client/components/catalog/KViewsPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export default {
async onCollectionRefreshed (items) {
const cachedViews = await LocalForage.getItem('views')
if (!cachedViews) return
// Update
// Update
_.forEach(items, (item) => {
item.isCached = _.has(cachedViews, item._id)
})
Expand Down Expand Up @@ -170,7 +170,7 @@ export default {
message: i18n.t('KViewsPanel.UNCACHING_VIEW'),
color: 'primary',
timeout: 0,
spinner: true
spinner: true
})
await uncacheView(view, this.getProjectLayers(), {
contextId: this.kActivity.contextId
Expand Down
16 changes: 8 additions & 8 deletions map/client/components/location/KLocationTimeLineCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@
<div class="full-width ellipsis text-caption k-location-map-caption">
{{ item.location.properties.name }}
</div>
<KPanel
:content="locationActions"
class="k-location-actions"
<KPanel
:content="locationActions"
class="k-location-actions"
/>
</div>
<div v-else class="fit column k-location-map relative-position">
Expand All @@ -58,7 +58,7 @@
text="KLocationCardSection.NO_LOCATION"
/>
</div>
<KPanel
<KPanel
:content="locationActions"
class="k-location-actions"
/>
Expand Down Expand Up @@ -138,10 +138,10 @@ export default {
}
.k-location-actions {
position: absolute;
top: 2px;
right: 2px;
background-color: #ffffffaa;
top: 2px;
right: 2px;
background-color: #ffffffaa;
border-radius: 10px;
z-index: 401;
z-index: 401;
}
</style>
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@
"@kalisio/feathers-s3": "^1.4.0",
"@kalisio/feathers-webpush": "^1.0.1",
"@turf/bbox": "^6.0.1",
"@mapbox/sphericalmercator": "^1.2.0",
"@weacast/core": "^2.1.5",
"abort-controller": "^3.0.0",
"ajv": "^8.12.0",
Expand Down
5 changes: 0 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1340,11 +1340,6 @@
dependencies:
vary "^1.1.2"

"@mapbox/sphericalmercator@^1.2.0":
version "1.2.0"
resolved "https://registry.yarnpkg.com/@mapbox/sphericalmercator/-/sphericalmercator-1.2.0.tgz#55d4896be906bfff859e22a1d72267329a0fff90"
integrity sha512-ZTOuuwGuMOJN+HEmG/68bSEw15HHaMWmQ5gdTsWdWsjDe56K1kGvLOK6bOSC8gWgIvEO0w6un/2Gvv1q5hJSkQ==

"@nodelib/[email protected]":
version "2.1.5"
resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5"
Expand Down

0 comments on commit 37c9712

Please sign in to comment.