Jelajahi Sumber

minor visual changes

iwa23-4 2 tahun lalu
induk
melakukan
87e4321bea

+ 1 - 4
frontend/src/app/home/home.component.css

@@ -7,22 +7,19 @@
   display: flex;
   flex-direction: column;
   gap: 10px;
-  text-transform: uppercase;
 }
 
 .logout-container {
   display: flex;
   flex-direction: column;
   gap: 10px;
-  text-transform: uppercase;
   align-items: center;
   height: 100vh;
 }
 
 .info-heading {
-  font-size: 24px;
+  font-size: 36px;
   font-weight: bold;
-  text-transform: uppercase;
 }
 
 .info-text {

+ 10 - 0
frontend/src/app/home/home.component.ts

@@ -16,5 +16,15 @@ export class HomeComponent implements OnInit {
       username: this.token.getUsername(),
       authorities: this.token.getAuthorities()
     };
+    this.mapAuthorities();
+  }
+
+  mapAuthorities(){
+    if(Array.isArray(this.info.authorities)){
+      this.info.authorities = this.info.authorities.map((authority: string) => {
+        const trimmedAuthority = authority.replace('ROLE_', '').toLowerCase();
+        return trimmedAuthority.charAt(0).toUpperCase() + trimmedAuthority.slice(1);
+      });
+    }
   }
 }

+ 1 - 0
frontend/src/app/register/register.component.css

@@ -4,6 +4,7 @@
   align-items: center;
   justify-content: center;
   padding: 6px;
+  background-color: #eee;
 }
 
 .card {

+ 10 - 10
frontend/src/index.html

@@ -1,13 +1,13 @@
 <!doctype html>
 <html lang="en">
-<head>
-  <meta charset="utf-8">
-  <title>IWA FINAL</title>
-  <base href="/">
-  <meta name="viewport" content="width=device-width, initial-scale=1">
-  <link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🙏</text></svg>">
-</head>
-<body>
-  <app-root></app-root>
-</body>
+  <head>
+    <meta charset="utf-8">
+    <title>IWA</title>
+    <base href="/">
+    <meta name="viewport" content="width=device-width, initial-scale=1">
+    <link rel="icon" type="image/x-icon" href="favicon.ico">
+  </head>
+  <body>
+    <app-root></app-root>
+  </body>
 </html>

+ 1 - 0
frontend/src/styles.css

@@ -1,3 +1,4 @@
 @tailwind base;
 @tailwind components;
 @tailwind utilities;
+