소스 검색

refactor: Renamed canRequest require login parameter

Owen Diffey 3 년 전
부모
커밋
bdf9608991
2개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 2 2
      frontend/src/pages/Home.vue
  2. 2 2
      frontend/src/pages/Station/Sidebar/index.vue

+ 2 - 2
frontend/src/pages/Home.vue

@@ -784,10 +784,10 @@ export default {
 		isOwnerOrAdmin(station) {
 			return this.isOwner(station) || this.isAdmin();
 		},
-		canRequest(station, loggedIn = true) {
+		canRequest(station, requireLogin = true) {
 			return (
 				station &&
-				(!loggedIn || this.loggedIn) &&
+				(!requireLogin || this.loggedIn) &&
 				station.requests &&
 				station.requests.enabled &&
 				(station.requests.access === "user" ||

+ 2 - 2
frontend/src/pages/Station/Sidebar/index.vue

@@ -96,10 +96,10 @@ export default {
 		isOwnerOrAdmin() {
 			return this.isOwner() || this.isAdmin();
 		},
-		canRequest(loggedIn = true) {
+		canRequest(requireLogin = true) {
 			return (
 				this.station &&
-				(!loggedIn || this.loggedIn) &&
+				(!requireLogin || this.loggedIn) &&
 				this.station.requests &&
 				this.station.requests.enabled &&
 				(this.station.requests.access === "user" ||