Skip to content

Commit 04ab633

Browse files
committed
获取配置函数不再需要异步
1 parent 220d16f commit 04ab633

29 files changed

+61
-60
lines changed

src/components/AppHeader.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,9 +425,9 @@ export default {
425425
LoginDialog,
426426
},
427427
async mounted() {
428-
this.s3BucketUrl = await get('s3.staticurl');
428+
this.s3BucketUrl = get('s3.staticurl');
429429
// 获取scratchproxy.enabled配置
430-
this.proxyEnabled = await get('scratchproxy.enabled');
430+
this.proxyEnabled = get('scratchproxy.enabled');
431431
},
432432
setup() {
433433
const notificationsCard = ref(null);

src/components/Comment.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ const handleDelete = (id) => deleteComment(id)
179179
180180
// Lifecycle
181181
onMounted(async () => {
182-
s3BucketUrl.value = await get('s3.staticurl')
182+
s3BucketUrl.value = get('s3.staticurl')
183183
loadComments()
184184
})
185185

src/components/NotificationsCardContent.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ export default {
203203
// Initialize s3BucketUrl
204204
onMounted(async () => {
205205
try {
206-
s3BucketUrl.value = await get('s3.staticurl');
206+
s3BucketUrl.value = get('s3.staticurl');
207207
} catch (err) {
208208
console.error('Failed to get s3BucketUrl:', err);
209209
s3BucketUrl.value = '';

src/components/Recaptcha.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export default {
3232
};
3333
},
3434
async mounted() {
35-
this.geeId = await get('captcha.GEE_CAPTCHA_ID');
35+
this.geeId = get('captcha.GEE_CAPTCHA_ID');
3636
console.log(this.geeId);
3737
if (this.showNormal) {
3838
this.initRecaptcha();

src/components/admin/UserEditor.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ export default {
594594
console.error("Error loading region options:", error);
595595
this.regionOptions = [];
596596
}
597-
this.s3BucketUrl = await get("s3.staticurl");
597+
this.s3BucketUrl = get("s3.staticurl");
598598
},
599599
600600
watch: {

src/components/proxy/ProxyShowProjects.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ export default {
146146
if (this.autoload == true) this.fetchProjects();
147147
},
148148
async mounted() {
149-
this.scratch_proxy = await get('scratchproxy.url');
149+
this.scratch_proxy = get('scratchproxy.url');
150150
},
151151
};
152152
</script>

src/components/proxy/ProxyShowUsers.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export default {
5959
},
6060
},
6161
async mounted() {
62-
this.scratch_proxy = await get('scratchproxy.url');
62+
this.scratch_proxy = get('scratchproxy.url');
6363
this.fetchUsers();
6464
},
6565
};

src/components/shared/ProjectSelector.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,7 @@ watch(
738738
739739
onMounted(async () => {
740740
initializeSelection();
741-
s3BucketUrl.value = await get("s3.staticurl");
741+
s3BucketUrl.value = get("s3.staticurl");
742742
localuser.value = localuser;
743743
});
744744
</script>

src/components/timeline/Timeline.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ export default {
374374
};
375375
},
376376
async mounted() {
377-
this.s3BucketUrl = await get("s3.staticurl");
377+
this.s3BucketUrl = get("s3.staticurl");
378378
// 初始加载时获取项目信息
379379
if (this.timeline.events.length > 0) {
380380
await this.fetchProjectInfoForEvents(this.timeline.events);

src/pages/app/account/index.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,15 +172,15 @@ export default {
172172
const s3BucketUrl = ref(null);
173173
174174
onMounted(async () => {
175-
s3BucketUrl.value = await get('s3.staticurl');
175+
s3BucketUrl.value = get('s3.staticurl');
176176
});
177177
178178
return {
179179
s3BucketUrl,
180180
};
181181
},
182182
async mounted() {
183-
this.s3BucketUrl = await get('s3.staticurl');
183+
this.s3BucketUrl = get('s3.staticurl');
184184
},
185185
async created() {
186186
if (!localuser.isLogin.value) {

0 commit comments

Comments
 (0)