diff --git a/frontend/package.json b/frontend/package.json index 62c0f9e..d5ce337 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -9,7 +9,8 @@ "lint": "eslint --ext .js,.vue ./", "dev/web": "quasar dev", "dev/electron": "quasar dev -m electron", - "build/web": "quasar build", + "build": "PRODUCTION=TRUE quasar build -m spa", + "build/dev": "DEV=TRUE quasar build -m spa", "build/electron": "quasar build -m electron", "compile-protofiles": "npx pbjs -t static-module -w es6 --no-comments --lint \"eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars, camelcase, default-case-last, no-mixed-operators\" -o src/flipper/protobuf/proto-compiled.js ./flipperzero-protobuf/*.proto && eslint --fix src/flipper-js/protobuf/protobufCompiled.js" }, @@ -60,4 +61,4 @@ "npm": ">= 6.13.4", "yarn": ">= 1.21.1" } -} +} \ No newline at end of file diff --git a/frontend/quasar.conf.js b/frontend/quasar.conf.js index 04e679d..548f348 100644 --- a/frontend/quasar.conf.js +++ b/frontend/quasar.conf.js @@ -48,6 +48,12 @@ module.exports = configure(function (ctx) { build: { vueRouterMode: 'history', // available values: 'hash', 'history' + env: { + ARCHIVARIUS_API_ENDPOINT: process.env.PRODUCTION + ? 'https://catalog.flipperzero.one/api/v0' + : 'https://catalog.flipp.dev/api/v0', + PRODUCTION: process.env.PRODUCTION + }, // transpile: false, // publicPath: '/', diff --git a/frontend/src/components/AppList.vue b/frontend/src/components/AppList.vue index db91cf3..9d6b71b 100644 --- a/frontend/src/components/AppList.vue +++ b/frontend/src/components/AppList.vue @@ -1,112 +1,124 @@ @@ -230,6 +242,7 @@ export default defineComponent({ .apps display: grid grid-template-columns: repeat(4, 1fr) + justify-items: center .card-container padding: 12px diff --git a/frontend/src/components/AppPage.vue b/frontend/src/components/AppPage.vue index 65056fb..57b24e7 100644 --- a/frontend/src/components/AppPage.vue +++ b/frontend/src/components/AppPage.vue @@ -6,7 +6,7 @@
{{ app.currentVersion.name }}
-
+
diff --git a/frontend/src/layouts/MainLayout.vue b/frontend/src/layouts/MainLayout.vue index 3ba8653..25aa1e2 100644 --- a/frontend/src/layouts/MainLayout.vue +++ b/frontend/src/layouts/MainLayout.vue @@ -188,6 +188,25 @@ @click="toggleInstallFromFile" label="Third-party FW" > + + +
e.link !== '/apps') if (location.pathname === '/apps') { this.$router.push('/') @@ -798,7 +829,7 @@ export default defineComponent({ await this.startRpc() await this.readInfo() await this.setTime() - }, 300) + }, 500) } else { this.flags.portSelectRequired = true if (manual) { @@ -809,7 +840,9 @@ export default defineComponent({ }, async mounted () { - this.checkConnectionRequirement() + if (this.$q.screen.width < 900) { + this.leftDrawer = false + } if ('serial' in navigator) { if (localStorage.getItem('connectOnStart') !== 'false') { this.flags.connectOnStart = true @@ -825,12 +858,23 @@ export default defineComponent({ if (localStorage.getItem('installFromFile') === 'true') { this.flags.installFromFile = true } + + if (localStorage.getItem('catalogEnabled') === 'true') { + this.flags.catalogEnabled = true + } + if (localStorage.getItem('catalogChannel') === 'production') { + this.flags.catalogChannelProduction = true + } + if (!process.env.PRODUCTION) { + this.flags.catalogCanSwitchChannel = true + } navigator.serial.addEventListener('disconnect', e => { this.autoReconnect() }) } else { this.flags.serialSupported = false } + this.checkConnectionRequirement() navigator.serial.addEventListener('disconnect', (e) => { if (!this.flags.updateInProgress) { diff --git a/frontend/src/pages/Apps.vue b/frontend/src/pages/Apps.vue index f59dedb..1eccb0a 100644 --- a/frontend/src/pages/Apps.vue +++ b/frontend/src/pages/Apps.vue @@ -24,7 +24,7 @@
@@ -190,6 +191,27 @@ + + + + + + +
Apps don't work in mobile browsers
+

Mobile browsers can't connect to Flipper, meaning you won't be able to install apps.

+

Get the official mobile app – it has the same features!

+
+ + + + +
+