mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-22 12:13:48 +01:00
自動更新
This commit is contained in:
parent
f82fffeb58
commit
e36c2ad892
@ -51,8 +51,18 @@ export default Vue.extend({
|
||||
},
|
||||
|
||||
created() {
|
||||
this.$root.api('admin/queue/stats').then(stats => {
|
||||
this.stats = stats;
|
||||
const fetchStats = () => {
|
||||
this.$root.api('admin/queue/stats', {}, true).then(stats => {
|
||||
this.stats = stats;
|
||||
});
|
||||
};
|
||||
|
||||
fetchStats();
|
||||
|
||||
const clock = setInterval(fetchStats, 1000);
|
||||
|
||||
this.$once('hook:beforeDestroy', () => {
|
||||
clearInterval(clock);
|
||||
});
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user