Skip to content

Commit c60df32

Browse files
authored
Merge pull request #6 from Carifio24/composition-api
Composition API and Capacitor geolocation
2 parents c319277 + 34abc7d commit c60df32

21 files changed

+1229
-1106
lines changed

.github/workflows/build.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Build
2+
3+
on:
4+
pull_request_target:
5+
branches:
6+
main
7+
8+
permissions: read-all
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
with:
17+
persist-credentials: false
18+
ref: ${{ github.event.pull_request.head.sha }}
19+
20+
- name: Set up Node.js
21+
uses: actions/setup-node@v3
22+
with:
23+
node-version: '20.x'
24+
25+
- name: Set up yarn
26+
run: corepack enable && yarn set version 3.3.0
27+
28+
- name: Install
29+
run: yarn install
30+
31+
- name: Lint
32+
run: yarn lint
33+
34+
- name: Build
35+
run: yarn build

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
"version": "0.2.0",
44
"browser": "dist/index.umd.js",
55
"dependencies": {
6+
"@capacitor/core": "^5.7.4",
7+
"@capacitor/geolocation": "^5.0.7",
68
"@fortawesome/fontawesome-svg-core": "^6.5.1",
79
"@fortawesome/free-solid-svg-icons": "^6.5.1",
810
"@fortawesome/vue-fontawesome": "^3.0.6",
@@ -15,7 +17,7 @@
1517
"vuetify": "^3.3.3"
1618
},
1719
"devDependencies": {
18-
"@types/leaflet": "^1.9.3",
20+
"@types/leaflet": "^1.9.11",
1921
"@typescript-eslint/eslint-plugin": "^6.19.0",
2022
"@typescript-eslint/parser": "^6.19.0",
2123
"@vue/cli-plugin-eslint": "^5.0.8",

src/components/CreditLogos.vue

Lines changed: 18 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -17,38 +17,29 @@
1717
</div>
1818
</template>
1919

20-
<script lang="ts">
21-
import { defineComponent } from "vue";
20+
<script setup lang="ts">
21+
import { computed } from "vue";
2222
23-
export default defineComponent({
23+
import { CreditLogosProps } from "../types";
2424
25-
props: {
26-
visible: {
27-
type: Boolean,
28-
default: true
29-
},
30-
logoSize: {
31-
type: String,
32-
default: "5vmin"
33-
}
34-
},
35-
36-
computed: {
37-
isMobile() {
38-
return (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
39-
},
40-
cssVars() {
41-
return {
42-
"--logo-size": this.logoSize,
43-
};
44-
}
45-
},
25+
const props = withDefaults(defineProps<CreditLogosProps>(), {
26+
visible: true,
27+
logoSize: "5vmin"
28+
});
4629
30+
const cssVars = computed(() => {
31+
return {
32+
"--logo-size": props.logoSize,
33+
};
4734
});
4835
</script>
4936

50-
<style>
51-
#logo-credits img {
52-
height: var(--logo-size);
37+
<style lang="less">
38+
#icons-container {
39+
pointer-events: auto;
40+
41+
img {
42+
height: var(--logo-size);
43+
}
5344
}
5445
</style>

src/components/DefaultMiniCredits.vue

Lines changed: 0 additions & 110 deletions
This file was deleted.
Lines changed: 19 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,34 @@
11
<template>
2-
<div id="funding-acknowledgment">
2+
<div
3+
id="funding-acknowledgment"
4+
:style="cssVars"
5+
>
36
The material contained in this product is based upon work supported by NASA under cooperative agreement award No. 80NSSC21M0002. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the National Aeronautics and Space Administration.
47
</div>
58
</template>
69

10+
<script setup lang="ts">
11+
import { computed } from "vue";
712
8-
<script lang="ts">
9-
import { defineComponent, } from "vue";
13+
import { FundingAcknowledgementProps } from "../types";
1014
11-
export default defineComponent({
12-
13-
14-
props: {
15-
visible: {
16-
type: Boolean,
17-
default: true
18-
},
19-
},
20-
21-
data() {
22-
return { };
23-
},
24-
25-
created() {
26-
return;
27-
},
28-
29-
methods: {
30-
31-
},
32-
33-
computed: {
34-
35-
},
15+
const props = withDefaults(defineProps<FundingAcknowledgementProps>(), {
16+
color: "#E0E0E0",
17+
backgroundColor: "#0C3D91",
18+
});
3619
37-
watch: {
38-
}
20+
const cssVars = computed(() => {
21+
return {
22+
"--color": props.color,
23+
"--background-color": props.backgroundColor,
24+
};
3925
});
4026
</script>
4127

42-
4328
<style lang="less">
44-
4529
#funding-acknowledgment {
46-
color: #E0E0E0;
47-
background-color: #0c3d91;
30+
color: var(--color);
31+
background-color: var(--background-color);
4832
font-size: calc(0.8em + 0.1vw + 0.1vh);
4933
line-height: calc(1em + 0.3vw + 0.3vh);
5034
padding-inline: 1em;
@@ -55,7 +39,5 @@ export default defineComponent({
5539
justify-content: center;
5640
align-items: center;
5741
border-radius: 5px;
58-
5942
}
60-
61-
</style>
43+
</style>

0 commit comments

Comments
 (0)