Compare commits
4 Commits
cfe07d0dde
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| b75099ddd6 | |||
| c194ad2c97 | |||
| c146229699 | |||
| a8960f71c4 |
@@ -12,7 +12,6 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@quasar/extras": "^1.0.0",
|
"@quasar/extras": "^1.0.0",
|
||||||
"axios": "^1.2.1",
|
|
||||||
"quasar": "^2.6.0",
|
"quasar": "^2.6.0",
|
||||||
"vue": "^3.0.0",
|
"vue": "^3.0.0",
|
||||||
"vue-router": "^4.0.0"
|
"vue-router": "^4.0.0"
|
||||||
|
|||||||
@@ -8,9 +8,7 @@
|
|||||||
// Configuration for your app
|
// Configuration for your app
|
||||||
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-js
|
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-js
|
||||||
|
|
||||||
|
const { configure } = require("quasar/wrappers");
|
||||||
const { configure } = require('quasar/wrappers');
|
|
||||||
|
|
||||||
|
|
||||||
module.exports = configure(function (/* ctx */) {
|
module.exports = configure(function (/* ctx */) {
|
||||||
return {
|
return {
|
||||||
@@ -20,7 +18,7 @@ module.exports = configure(function (/* ctx */) {
|
|||||||
// exclude = [],
|
// exclude = [],
|
||||||
// rawOptions = {},
|
// rawOptions = {},
|
||||||
warnings: true,
|
warnings: true,
|
||||||
errors: true
|
errors: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
// https://v2.quasar.dev/quasar-cli/prefetch-feature
|
// https://v2.quasar.dev/quasar-cli/prefetch-feature
|
||||||
@@ -29,15 +27,10 @@ module.exports = configure(function (/* ctx */) {
|
|||||||
// app boot file (/src/boot)
|
// app boot file (/src/boot)
|
||||||
// --> boot files are part of "main.js"
|
// --> boot files are part of "main.js"
|
||||||
// https://v2.quasar.dev/quasar-cli/boot-files
|
// https://v2.quasar.dev/quasar-cli/boot-files
|
||||||
boot: [
|
boot: [],
|
||||||
|
|
||||||
'axios',
|
|
||||||
],
|
|
||||||
|
|
||||||
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#css
|
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#css
|
||||||
css: [
|
css: ["app.css"],
|
||||||
'app.css'
|
|
||||||
],
|
|
||||||
|
|
||||||
// https://github.com/quasarframework/quasar/tree/dev/extras
|
// https://github.com/quasarframework/quasar/tree/dev/extras
|
||||||
extras: [
|
extras: [
|
||||||
@@ -49,18 +42,18 @@ module.exports = configure(function (/* ctx */) {
|
|||||||
// 'line-awesome',
|
// 'line-awesome',
|
||||||
// 'roboto-font-latin-ext', // this or either 'roboto-font', NEVER both!
|
// 'roboto-font-latin-ext', // this or either 'roboto-font', NEVER both!
|
||||||
|
|
||||||
'roboto-font', // optional, you are not bound to it
|
"roboto-font", // optional, you are not bound to it
|
||||||
'material-icons', // optional, you are not bound to it
|
"material-icons", // optional, you are not bound to it
|
||||||
],
|
],
|
||||||
|
|
||||||
// Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#build
|
// Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#build
|
||||||
build: {
|
build: {
|
||||||
target: {
|
target: {
|
||||||
browser: [ 'es2019', 'edge88', 'firefox78', 'chrome87', 'safari13.1' ],
|
browser: ["es2019", "edge88", "firefox78", "chrome87", "safari13.1"],
|
||||||
node: 'node16'
|
node: "node16",
|
||||||
},
|
},
|
||||||
|
|
||||||
vueRouterMode: 'hash', // available values: 'hash', 'history'
|
vueRouterMode: "hash", // available values: 'hash', 'history'
|
||||||
// vueRouterBase,
|
// vueRouterBase,
|
||||||
// vueDevtools,
|
// vueDevtools,
|
||||||
// vueOptionsAPI: false,
|
// vueOptionsAPI: false,
|
||||||
@@ -79,7 +72,6 @@ module.exports = configure(function (/* ctx */) {
|
|||||||
// extendViteConf (viteConf) {},
|
// extendViteConf (viteConf) {},
|
||||||
// viteVuePluginOptions: {},
|
// viteVuePluginOptions: {},
|
||||||
|
|
||||||
|
|
||||||
// vitePlugins: [
|
// vitePlugins: [
|
||||||
// [ 'package-name', { ..options.. } ]
|
// [ 'package-name', { ..options.. } ]
|
||||||
// ]
|
// ]
|
||||||
@@ -88,7 +80,7 @@ module.exports = configure(function (/* ctx */) {
|
|||||||
// Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#devServer
|
// Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#devServer
|
||||||
devServer: {
|
devServer: {
|
||||||
// https: true
|
// https: true
|
||||||
open: true // opens browser window automatically
|
open: true, // opens browser window automatically
|
||||||
},
|
},
|
||||||
|
|
||||||
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#framework
|
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#framework
|
||||||
@@ -106,7 +98,7 @@ module.exports = configure(function (/* ctx */) {
|
|||||||
// directives: [],
|
// directives: [],
|
||||||
|
|
||||||
// Quasar plugins
|
// Quasar plugins
|
||||||
plugins: []
|
plugins: ["Loading"],
|
||||||
},
|
},
|
||||||
|
|
||||||
// animations: 'all', // --- includes all animations
|
// animations: 'all', // --- includes all animations
|
||||||
@@ -128,7 +120,7 @@ module.exports = configure(function (/* ctx */) {
|
|||||||
// https://v2.quasar.dev/quasar-cli/developing-ssr/configuring-ssr
|
// https://v2.quasar.dev/quasar-cli/developing-ssr/configuring-ssr
|
||||||
ssr: {
|
ssr: {
|
||||||
// ssrPwaHtmlFilename: 'offline.html', // do NOT use index.html as name!
|
// ssrPwaHtmlFilename: 'offline.html', // do NOT use index.html as name!
|
||||||
// will mess up SSR
|
// will mess up SSR
|
||||||
|
|
||||||
// extendSSRWebserverConf (esbuildConf) {},
|
// extendSSRWebserverConf (esbuildConf) {},
|
||||||
// extendPackageJson (json) {},
|
// extendPackageJson (json) {},
|
||||||
@@ -139,19 +131,19 @@ module.exports = configure(function (/* ctx */) {
|
|||||||
// manualPostHydrationTrigger: true,
|
// manualPostHydrationTrigger: true,
|
||||||
|
|
||||||
prodPort: 3000, // The default port that the production server should use
|
prodPort: 3000, // The default port that the production server should use
|
||||||
// (gets superseded if process.env.PORT is specified at runtime)
|
// (gets superseded if process.env.PORT is specified at runtime)
|
||||||
|
|
||||||
middlewares: [
|
middlewares: [
|
||||||
'render' // keep this as last one
|
"render", // keep this as last one
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
|
|
||||||
// https://v2.quasar.dev/quasar-cli/developing-pwa/configuring-pwa
|
// https://v2.quasar.dev/quasar-cli/developing-pwa/configuring-pwa
|
||||||
pwa: {
|
pwa: {
|
||||||
workboxMode: 'generateSW', // or 'injectManifest'
|
workboxMode: "generateSW", // or 'injectManifest'
|
||||||
injectPwaMetaTags: true,
|
injectPwaMetaTags: true,
|
||||||
swFilename: 'sw.js',
|
swFilename: "sw.js",
|
||||||
manifestFilename: 'manifest.json',
|
manifestFilename: "manifest.json",
|
||||||
useCredentialsForManifestTag: false,
|
useCredentialsForManifestTag: false,
|
||||||
// useFilenameHashes: true,
|
// useFilenameHashes: true,
|
||||||
// extendGenerateSWOptions (cfg) {}
|
// extendGenerateSWOptions (cfg) {}
|
||||||
@@ -167,7 +159,7 @@ module.exports = configure(function (/* ctx */) {
|
|||||||
|
|
||||||
// Full list of options: https://v2.quasar.dev/quasar-cli/developing-capacitor-apps/configuring-capacitor
|
// Full list of options: https://v2.quasar.dev/quasar-cli/developing-capacitor-apps/configuring-capacitor
|
||||||
capacitor: {
|
capacitor: {
|
||||||
hideSplashscreen: true
|
hideSplashscreen: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
// Full list of options: https://v2.quasar.dev/quasar-cli/developing-electron-apps/configuring-electron
|
// Full list of options: https://v2.quasar.dev/quasar-cli/developing-electron-apps/configuring-electron
|
||||||
@@ -177,17 +169,15 @@ module.exports = configure(function (/* ctx */) {
|
|||||||
|
|
||||||
inspectPort: 5858,
|
inspectPort: 5858,
|
||||||
|
|
||||||
bundler: 'packager', // 'packager' or 'builder'
|
bundler: "packager", // 'packager' or 'builder'
|
||||||
|
|
||||||
packager: {
|
packager: {
|
||||||
// https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#options
|
// https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#options
|
||||||
|
|
||||||
// OS X / Mac App Store
|
// OS X / Mac App Store
|
||||||
// appBundleId: '',
|
// appBundleId: '',
|
||||||
// appCategoryType: '',
|
// appCategoryType: '',
|
||||||
// osxSign: '',
|
// osxSign: '',
|
||||||
// protocol: 'myapp://path',
|
// protocol: 'myapp://path',
|
||||||
|
|
||||||
// Windows only
|
// Windows only
|
||||||
// win32metadata: { ... }
|
// win32metadata: { ... }
|
||||||
},
|
},
|
||||||
@@ -195,18 +185,16 @@ module.exports = configure(function (/* ctx */) {
|
|||||||
builder: {
|
builder: {
|
||||||
// https://www.electron.build/configuration/configuration
|
// https://www.electron.build/configuration/configuration
|
||||||
|
|
||||||
appId: 'plantas'
|
appId: "plantas",
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
// Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-browser-extensions/configuring-bex
|
// Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-browser-extensions/configuring-bex
|
||||||
bex: {
|
bex: {
|
||||||
contentScripts: [
|
contentScripts: ["my-content-script"],
|
||||||
'my-content-script'
|
|
||||||
],
|
|
||||||
|
|
||||||
// extendBexScriptsConf (esbuildConf) {}
|
// extendBexScriptsConf (esbuildConf) {}
|
||||||
// extendBexManifestJson (json) {}
|
// extendBexManifestJson (json) {}
|
||||||
}
|
},
|
||||||
}
|
};
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="flex flex-center">
|
<div class="flex flex-center">
|
||||||
<h5 class="q-py-xl">{{ fecha }}</h5>
|
<h6 v-if="fecha == '' && !presionado" class="q-py-xl q-px-md">
|
||||||
|
Cálculo de los días de riego
|
||||||
|
</h6>
|
||||||
|
<h6 v-else-if="presionado" class="q-py-xl q-px-md">Loading...</h6>
|
||||||
|
<h6 v-else class="q-py-xl q-px-md">{{ fecha }}</h6>
|
||||||
<q-btn
|
<q-btn
|
||||||
class="fixed-center"
|
class="fixed-center"
|
||||||
color="deep-orange"
|
color="deep-orange"
|
||||||
@@ -13,13 +17,18 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import { date } from "quasar";
|
import { date, useQuasar } from "quasar";
|
||||||
|
|
||||||
const data = ref([]);
|
const data = ref([]);
|
||||||
const fecha = ref("");
|
const fecha = ref("");
|
||||||
const days = ref(0);
|
const days = ref(0);
|
||||||
|
const presionado = ref(false);
|
||||||
|
const $q = useQuasar();
|
||||||
const calcular = async () => {
|
const calcular = async () => {
|
||||||
|
$q.loading.show({
|
||||||
|
message: "Se está descargando la información, espere...",
|
||||||
|
});
|
||||||
|
presionado.value = true;
|
||||||
const result = fetch(
|
const result = fetch(
|
||||||
"https://api.openweathermap.org/data/2.5/forecast?lat=39.55&lon=-0.5667&units=metric&appid=1ce95ef35a6852cecee421a923fe4400"
|
"https://api.openweathermap.org/data/2.5/forecast?lat=39.55&lon=-0.5667&units=metric&appid=1ce95ef35a6852cecee421a923fe4400"
|
||||||
)
|
)
|
||||||
@@ -29,6 +38,10 @@ const calcular = async () => {
|
|||||||
})
|
})
|
||||||
.catch((err) => console.error(err));
|
.catch((err) => console.error(err));
|
||||||
data.value = await result;
|
data.value = await result;
|
||||||
|
if (data.value != []) {
|
||||||
|
$q.loading.hide();
|
||||||
|
presionado.value = false;
|
||||||
|
}
|
||||||
console.log(data.value.list);
|
console.log(data.value.list);
|
||||||
let temp = 0;
|
let temp = 0;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user