Skip to content

Commit

Permalink
feat: add message tip for the first sync
Browse files Browse the repository at this point in the history
  • Loading branch information
saltbo committed Aug 3, 2022
1 parent aee7abd commit 45c620e
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ jobs:
go-version: 1.17

- name: Build
run: yarn && yarn build && go build
run: go generate && go build
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
with:
go-version: 1.17
- name: Build
run: yarn && yarn build && go build -o build/${{ matrix.target }}/
run: go generate && go build -o build/${{ matrix.target }}/
- name: Extract git tag
shell: bash
run: echo "##[set-output name=tag;]$(echo ${GITHUB_REF#refs/tags/})"
Expand Down
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,17 @@ Routes

## Installation

### Recommand
```go
### Homebrew (Recommanded)

```bash
brew install saltbo/bin/seenvoy
```

### GoDeveloper
```go
go install github.com/saltbo/seenvoy
```

### Manually
Navigate to [release](https://github.com/saltbo/seenvoy/releases) download

Expand Down
2 changes: 2 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import (
"github.com/urfave/cli/v2"
)

//go:generate yarn
//go:generate yarn build
//go:embed dist/*
var embedFs embed.FS

Expand Down
12 changes: 11 additions & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
<script>
import { message } from 'ant-design-vue';
import { defineComponent, watch, ref, onMounted } from 'vue';
import { useRoute, useRouter } from 'vue-router';
import { sync_config_dump } from './libs/envoy';
message.config({
top: '80px',
duration: 2,
maxCount: 3,
});
export default defineComponent({
setup() {
const route = useRoute();
Expand All @@ -17,16 +25,18 @@ export default defineComponent({
console.log(e);
loading.value = true;
sync_config_dump(true).then(() => {
console.log('sync success');
message.success('ConfigDump Sync Done.')
lastSync.value = new Date().toLocaleString()
localStorage.setItem("lastSync", lastSync.value);
loading.value = false;
spinning.value = false
location.reload();
});
};
onMounted(() => {
if (!lastSync.value) {
message.info('ConfigDump Syncing...')
spinning.value = true
onSync()
}
Expand Down

0 comments on commit 45c620e

Please sign in to comment.