diff --git a/open-isle-cli/src/App.vue b/open-isle-cli/src/App.vue index d29f19b10..074af5061 100644 --- a/open-isle-cli/src/App.vue +++ b/open-isle-cli/src/App.vue @@ -26,7 +26,7 @@ export default { }, computed: { hideMenu() { - return ['/login', '/signup', '/404'].includes(this.$route.path) + return ['/login', '/signup', '/404', '/signup-reason'].includes(this.$route.path) } } } diff --git a/open-isle-cli/src/views/MessagePageView.vue b/open-isle-cli/src/views/MessagePageView.vue index 17ac717ee..85f9e3707 100644 --- a/open-isle-cli/src/views/MessagePageView.vue +++ b/open-isle-cli/src/views/MessagePageView.vue @@ -185,8 +185,10 @@ {{ item.fromUser.username }} 希望注册为会员,理由是:{{ item.content }} - 同意 - 拒绝 + + 同意 + 拒绝 + @@ -403,7 +405,7 @@ export default { } } }) - } else if (n.type === 'POST_REVIEW_REQUEST') { + } else if (n.type === 'POST_REVIEW_REQUEST') { notifications.value.push({ ...n, src: n.fromUser ? n.fromUser.avatar : null, @@ -419,7 +421,7 @@ export default { notifications.value.push({ ...n, icon: iconMap[n.type], - iconClick: () => {} + iconClick: () => { } }) } else { notifications.value.push({ @@ -605,6 +607,32 @@ export default { text-decoration: none !important; } +.optional-buttons { + display: flex; + flex-direction: row; + gap: 10px; +} + +.mark-approve-button-item { + color: green; + cursor: pointer; +} + +.mark-reject-button-item { + color: red; + cursor: pointer; +} + +.mark-approve-button-item:hover { + text-decoration: underline; +} + +.mark-reject-button-item:hover { + text-decoration: underline; +} + + + .notif-content-text:hover { color: var(--primary-color) !important; text-decoration: underline !important; diff --git a/open-isle-cli/src/views/SignupReasonPageView.vue b/open-isle-cli/src/views/SignupReasonPageView.vue index a78a74db5..36b915d79 100644 --- a/open-isle-cli/src/views/SignupReasonPageView.vue +++ b/open-isle-cli/src/views/SignupReasonPageView.vue @@ -1,9 +1,14 @@ + 注册理由 + + 为了我们社区的良性发展,请填写注册理由,我们将根据你的理由审核你的注册, 谢谢! + {{ error }} - 提交 + 提交 + 提交中... @@ -20,7 +25,8 @@ export default { return { reason: '', error: '', - isGoogle: false + isGoogle: false, + isWaitingForRegister: false } }, mounted() { @@ -42,6 +48,7 @@ export default { return } try { + this.isWaitingForRegister = true const res = await fetch(`${API_BASE_URL}/api/auth/register`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, @@ -61,6 +68,8 @@ export default { } } catch (e) { toast.error('发送失败') + } finally { + this.isWaitingForRegister = false } } } @@ -68,9 +77,54 @@ export default { diff --git a/src/main/java/com/openisle/config/SecurityConfig.java b/src/main/java/com/openisle/config/SecurityConfig.java index 0a769fc35..abbcef346 100644 --- a/src/main/java/com/openisle/config/SecurityConfig.java +++ b/src/main/java/com/openisle/config/SecurityConfig.java @@ -96,6 +96,7 @@ public class SecurityConfig { .requestMatchers(HttpMethod.GET, "/api/comments/**").permitAll() .requestMatchers(HttpMethod.GET, "/api/categories/**").permitAll() .requestMatchers(HttpMethod.GET, "/api/tags/**").permitAll() + .requestMatchers(HttpMethod.GET, "/api/config/**").permitAll() .requestMatchers(HttpMethod.GET, "/api/search/**").permitAll() .requestMatchers(HttpMethod.GET, "/api/users/**").permitAll() .requestMatchers(HttpMethod.GET, "/api/reaction-types").permitAll() @@ -128,7 +129,7 @@ public class SecurityConfig { (uri.startsWith("/api/posts") || uri.startsWith("/api/comments") || uri.startsWith("/api/categories") || uri.startsWith("/api/tags") || uri.startsWith("/api/search") || uri.startsWith("/api/users") || - uri.startsWith("/api/reaction-types")); + uri.startsWith("/api/reaction-types") || uri.startsWith("/api/config")); if (authHeader != null && authHeader.startsWith("Bearer ")) { String token = authHeader.substring(7);