From 7444da87646a65b75413213701e56fc3a33650bd Mon Sep 17 00:00:00 2001 From: dskvr Date: Sat, 17 Dec 2022 23:04:58 +0100 Subject: [PATCH] fix refresh & update workflow --- .github/workflows/deploy.yml | 7 +++++-- nginx/conf.d/default.conf | 1 - src/components/RefreshComponent.vue | 9 ++------- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index b7327f3..728a965 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -31,9 +31,12 @@ jobs: run: yarn docker:push - name: Pull new image and restart - uses: appleboy/ssh-action@v0.1.2 + uses: appleboy/ssh-action@v0.1.6 with: host: ${{secrets.SSH_DEPLOY_HOST}} key: ${{secrets.SSH_DEPLOY_KEY}} username: deploy - script: docker pull registry.digitalocean.com/sandwich-farm/nostr-relay-status:latest && docker-compose stop && docker-compose up -d \ No newline at end of file + script: | + docker pull registry.digitalocean.com/sandwich-farm/nostr-relay-status:latest + docker-compose stop + docker-compose up -d \ No newline at end of file diff --git a/nginx/conf.d/default.conf b/nginx/conf.d/default.conf index 48f2dbf..1e7499d 100644 --- a/nginx/conf.d/default.conf +++ b/nginx/conf.d/default.conf @@ -9,7 +9,6 @@ server { } location ~ /?(.*)$ { - index index.html; } } diff --git a/src/components/RefreshComponent.vue b/src/components/RefreshComponent.vue index 0044050..b0eb15c 100644 --- a/src/components/RefreshComponent.vue +++ b/src/components/RefreshComponent.vue @@ -27,13 +27,12 @@ const localMethods = { }, setRefreshInterval: function(){ this.interval = setInterval(() => { - if(!this.preferences.refresh) return false this.preferences = this.getState('preferences') || this.preferences this.refreshData.untilNext = this.timeUntilRefresh() this.refreshData.sinceLast = this.timeSinceRefresh() - if(this.isExpired()) + if(this.isExpired() && this.preferences.refresh) this.invalidate() }, 1000) @@ -53,8 +52,7 @@ export default defineComponent({ sinceLast: this.timeSinceRefresh() }) - if(this.preferences.refresh) - this.setRefreshInterval() + this.setRefreshInterval() }, updated(){ this.saveState('preferences') @@ -66,9 +64,6 @@ export default defineComponent({ this.refreshData.untilNext = this.timeUntilRefresh() this.refreshData.sinceLast = this.timeSinceRefresh() - - if(this.preferences.refresh) - this.setRefreshInterval() }, computed: {}, methods: Object.assign(localMethods, sharedMethods),