update
This commit is contained in:
@@ -1,13 +1,13 @@
|
|||||||
name: Deploy
|
name: Deploy
|
||||||
|
|
||||||
on:
|
# on:
|
||||||
push:
|
# push:
|
||||||
# tags:
|
# tags:
|
||||||
# - "v[0-9]+.[0-9]+.[0-9]+"
|
# - "v[0-9]+.[0-9]+.[0-9]+"
|
||||||
|
|
||||||
# paths:
|
# paths:
|
||||||
# - ".gitea/workflows/deploy-client.yml"
|
# - ".gitea/workflows/deploy-client.yml"
|
||||||
# - "client/**"
|
# - "client/**"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish-windows:
|
publish-windows:
|
||||||
|
|||||||
@@ -1,13 +1,15 @@
|
|||||||
export default defineNuxtRouteMiddleware(async (to, from) => {
|
export default defineNuxtRouteMiddleware(async (to, from) => {
|
||||||
if (import.meta.dev || import.meta.server)
|
// if (import.meta.dev || import.meta.server)
|
||||||
return
|
// return
|
||||||
|
|
||||||
const { isTauri } = useApp()
|
const { isTauri } = useApp()
|
||||||
|
|
||||||
if (!isTauri.value)
|
if (!isTauri.value)
|
||||||
return
|
return
|
||||||
|
|
||||||
if (from?.name)
|
console.log('pizda', to, from)
|
||||||
|
|
||||||
|
if (from?.name || !!to.redirectedFrom)
|
||||||
return
|
return
|
||||||
|
|
||||||
const { checkForUpdates } = useUpdater()
|
const { checkForUpdates } = useUpdater()
|
||||||
@@ -15,6 +17,6 @@ export default defineNuxtRouteMiddleware(async (to, from) => {
|
|||||||
const update = await checkForUpdates()
|
const update = await checkForUpdates()
|
||||||
|
|
||||||
if (update) {
|
if (update) {
|
||||||
return navigateTo({ name: 'Updating' })
|
return navigateTo({ name: 'Updater' })
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import chadApi from '#shared/chad-api'
|
import chadApi from '#shared/chad-api'
|
||||||
|
|
||||||
export default defineNuxtRouteMiddleware(async (to, from) => {
|
export default defineNuxtRouteMiddleware(async (to, from) => {
|
||||||
|
console.log('ya zdes')
|
||||||
const { me, setMe } = useAuth()
|
const { me, setMe } = useAuth()
|
||||||
|
|
||||||
if (!me.value && !from?.name) {
|
if (!me.value && !from?.name) {
|
||||||
|
|||||||
@@ -17,13 +17,15 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
console.log('jopa')
|
||||||
|
|
||||||
definePageMeta({
|
definePageMeta({
|
||||||
name: 'Updater',
|
name: 'Updater',
|
||||||
layout: 'blank',
|
layout: 'blank',
|
||||||
auth: false,
|
auth: false,
|
||||||
middleware: () => {
|
middleware: () => {
|
||||||
|
console.log('lastUpdate')
|
||||||
const { lastUpdate } = useUpdater()
|
const { lastUpdate } = useUpdater()
|
||||||
|
|
||||||
if (!lastUpdate.value)
|
if (!lastUpdate.value)
|
||||||
return navigateTo('/')
|
return navigateTo('/')
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
|
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
|
||||||
"productName": "chad",
|
"productName": "chad",
|
||||||
"version": "0.2.7",
|
"version": "0.2.8",
|
||||||
"identifier": "xyz.koptilnya.chad",
|
"identifier": "xyz.koptilnya.chad",
|
||||||
"build": {
|
"build": {
|
||||||
"frontendDist": "../.output/public",
|
"frontendDist": "../.output/public",
|
||||||
|
|||||||
Reference in New Issue
Block a user