瀏覽代碼

style(frontend): used a helper class more often for 'router-link's for consistency

Signed-off-by: Jonathan <theflametrooper@gmail.com>
Jonathan 3 年之前
父節點
當前提交
2a33730268

+ 18 - 0
backend/package-lock.json

@@ -23,6 +23,7 @@
         "nodemailer": "^6.4.18",
         "oauth": "^0.9.15",
         "redis": "^2.8.0",
+        "retry-axios": "^2.4.0",
         "sha256": "^0.2.0",
         "underscore": "^1.10.2",
         "ws": "^7.4.3"
@@ -2867,6 +2868,17 @@
         "node": ">=0.10.0"
       }
     },
+    "node_modules/retry-axios": {
+      "version": "2.4.0",
+      "resolved": "https://registry.npmjs.org/retry-axios/-/retry-axios-2.4.0.tgz",
+      "integrity": "sha512-rK7UBYgbrNoVothbSmM0tEm9DIiXapmVUrnUYn+d9AuQvF0AY5RkJU2FQvlufe9hlFwrCdDhrJTwiyRtR7wUaA==",
+      "engines": {
+        "node": ">=10.0.0"
+      },
+      "peerDependencies": {
+        "axios": "*"
+      }
+    },
     "node_modules/rimraf": {
       "version": "2.7.1",
       "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
@@ -5786,6 +5798,12 @@
       "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz",
       "integrity": "sha1-lICrIOlP+h2egKgEx+oUdhGWa1c="
     },
+    "retry-axios": {
+      "version": "2.4.0",
+      "resolved": "https://registry.npmjs.org/retry-axios/-/retry-axios-2.4.0.tgz",
+      "integrity": "sha512-rK7UBYgbrNoVothbSmM0tEm9DIiXapmVUrnUYn+d9AuQvF0AY5RkJU2FQvlufe9hlFwrCdDhrJTwiyRtR7wUaA==",
+      "requires": {}
+    },
     "rimraf": {
       "version": "2.7.1",
       "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",

+ 1 - 1
backend/package.json

@@ -17,7 +17,6 @@
   "dependencies": {
     "async": "3.1.0",
     "axios": "^0.21.1",
-    "retry-axios": "^2.4.0",
     "bcrypt": "^5.0.0",
     "bluebird": "^3.5.5",
     "body-parser": "^1.19.0",
@@ -30,6 +29,7 @@
     "nodemailer": "^6.4.18",
     "oauth": "^0.9.15",
     "redis": "^2.8.0",
+    "retry-axios": "^2.4.0",
     "sha256": "^0.2.0",
     "underscore": "^1.10.2",
     "ws": "^7.4.3"

+ 32 - 28
frontend/src/App.vue

@@ -1018,45 +1018,49 @@ h4.section-title {
 		margin-top: 30px;
 		padding: 30px 20px;
 	}
+}
 
-	.content-box-title {
-		font-size: 25px;
-		color: var(--black);
-	}
-
-	.content-box-description {
-		font-size: 14px;
-		color: var(--dark-grey);
-	}
+.content-box-optional-helper {
+	margin-top: 15px;
+	color: var(--primary-color);
+	text-decoration: underline;
+	font-size: 16px;
 
-	.content-box-optional-helper {
-		margin-top: 15px;
+	a {
 		color: var(--primary-color);
-		text-decoration: underline;
-		font-size: 16px;
 	}
+}
+
+.content-box-title {
+	font-size: 25px;
+	color: var(--black);
+}
 
-	.content-box-inputs {
-		margin-top: 35px;
+.content-box-description {
+	font-size: 14px;
+	color: var(--dark-grey);
+}
 
-		.input-with-button {
-			.button {
-				width: 105px;
-			}
+.content-box-inputs {
+	margin-top: 35px;
 
-			@media screen and (max-width: 450px) {
-				flex-direction: column;
-			}
+	.input-with-button {
+		.button {
+			width: 105px;
 		}
 
-		label {
-			font-size: 11px;
+		@media screen and (max-width: 450px) {
+			flex-direction: column;
 		}
+	}
 
-		#change-password-button {
-			margin-top: 36px;
-			width: 175px;
-		}
+	label {
+		font-size: 11px;
+	}
+
+	#change-password-button {
+		margin-top: 36px;
+		width: 175px;
 	}
 }
 </style>

+ 10 - 4
frontend/src/components/modals/ConfirmAccountRemoval.vue

@@ -56,6 +56,16 @@
 					identity.
 				</p>
 
+				<p class="content-box-optional-helper">
+					<router-link
+						id="forgot-password"
+						href="#"
+						to="/reset_password"
+					>
+						Forgot password?
+					</router-link>
+				</p>
+
 				<div class="content-box-inputs">
 					<div class="control is-grouped input-with-button">
 						<div id="password-container">
@@ -87,10 +97,6 @@
 						</p>
 					</div>
 				</div>
-
-				<router-link id="forgot-password" href="#" to="/reset_password">
-					Forgot password?
-				</router-link>
 			</div>
 
 			<div

+ 23 - 18
frontend/src/components/modals/Login.vue

@@ -53,14 +53,16 @@
 							</a>
 						</div>
 
-						<router-link
-							id="forgot-password"
-							href="#"
-							to="/reset_password"
-							@click.native="closeLoginModal()"
-						>
-							Forgot password?
-						</router-link>
+						<p class="content-box-optional-helper">
+							<router-link
+								id="forgot-password"
+								href="#"
+								to="/reset_password"
+								@click.native="closeLoginModal()"
+							>
+								Forgot password?
+							</router-link>
+						</p>
 
 						<br />
 						<p>
@@ -104,12 +106,15 @@
 							&nbsp;&nbsp;Login with GitHub
 						</a>
 					</div>
-					<router-link to="/register" v-if="isPage">
-						Don't have an account?
-					</router-link>
-					<a v-else href="#" @click="changeToRegisterModal()">
-						Don't have an account?
-					</a>
+
+					<p class="content-box-optional-helper">
+						<router-link to="/register" v-if="isPage">
+							Don't have an account?
+						</router-link>
+						<a v-else href="#" @click="changeToRegisterModal()">
+							Don't have an account?
+						</a>
+					</p>
 				</footer>
 			</div>
 		</div>
@@ -211,6 +216,10 @@ export default {
 	display: flex;
 	justify-content: space-between;
 	flex-wrap: wrap;
+
+	.content-box-optional-helper {
+		margin-top: 0;
+	}
 }
 
 .button.is-github {
@@ -228,8 +237,4 @@ export default {
 .invert {
 	filter: brightness(5);
 }
-
-a {
-	color: var(--primary-color);
-}
 </style>

+ 13 - 6
frontend/src/components/modals/Register.vue

@@ -129,12 +129,15 @@
 							&nbsp;&nbsp;Register with GitHub
 						</a>
 					</div>
-					<router-link to="/login" v-if="isPage">
-						Already have an account?
-					</router-link>
-					<a v-else href="#" @click="changeToLoginModal()">
-						Already have an account?
-					</a>
+
+					<p class="content-box-optional-helper">
+						<router-link to="/login" v-if="isPage">
+							Already have an account?
+						</router-link>
+						<a v-else href="#" @click="changeToLoginModal()">
+							Already have an account?
+						</a>
+					</p>
 				</footer>
 			</div>
 		</div>
@@ -348,6 +351,10 @@ export default {
 	display: flex;
 	justify-content: space-between;
 	flex-wrap: wrap;
+
+	.content-box-optional-helper {
+		margin-top: 0;
+	}
 }
 
 .button.is-github {