@necrolab/dashboard 0.4.39 → 0.4.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,11 @@
1
1
  <template>
2
- <div class="flex flex-col justify-center mt-20" v-once>
3
- <div class="mx-auto flex w-auto rounded-xl mb-8">
4
- <img src="@/assets/img/logo_trans.png" class="h-14 mr-4 z-30 object-cover" alt="Logo: Necro" />
5
- </div>
6
- <h2 class="text-3xl text-white text-center font-bold mb-4">Login</h2>
2
+ <div class="login-container" v-once>
3
+ <div class="login-card">
4
+ <div class="flex justify-center mb-8">
5
+ <img src="@/assets/img/logo_trans.png" class="h-16 object-cover" alt="Logo: Necro" />
6
+ </div>
7
+ <h2 class="text-l text-white text-center font-bold mb-6">Please login to proceed</h2>
7
8
 
8
- <div class="login">
9
9
  <LoginForm />
10
10
  </div>
11
11
  </div>
@@ -14,14 +14,136 @@
14
14
  import LoginForm from "@/components/Auth/LoginForm.vue";
15
15
  </script>
16
16
  <style lang="scss" scoped>
17
- .login {
18
- // @apply m-auto;
19
- @media (min-width: 900px) {
20
- width: 400px;
21
- @apply m-auto;
17
+ .login-container {
18
+ @apply flex flex-col items-center justify-center min-h-screen px-4;
19
+ padding-top: 5vh;
20
+ padding-bottom: 20vh;
21
+
22
+ // Portrait mobile devices
23
+ @media (max-width: 480px) and (orientation: portrait) {
24
+ padding-top: 7vh;
25
+ padding-bottom: 10vh;
26
+ @apply px-4;
22
27
  }
23
- @media (max-width: 899px) {
28
+
29
+ // Landscape mobile devices
30
+ @media (max-width: 896px) and (orientation: landscape) and (max-height: 500px) {
31
+ padding-top: 5vh;
32
+ padding-bottom: 5vh;
24
33
  @apply px-6;
25
34
  }
35
+
36
+ // Tablets portrait
37
+ @media (min-width: 481px) and (max-width: 768px) and (orientation: portrait) {
38
+ padding-top: 8vh;
39
+ padding-bottom: 15vh;
40
+ @apply px-8;
41
+ }
42
+
43
+ // Tablets landscape
44
+ @media (min-width: 481px) and (max-width: 1024px) and (orientation: landscape) {
45
+ padding-top: 4vh;
46
+ padding-bottom: 10vh;
47
+ @apply px-12;
48
+ }
49
+
50
+ // Desktop
51
+ @media (min-width: 1025px) {
52
+ padding-top: 8vh;
53
+ padding-bottom: 22vh;
54
+ }
55
+
56
+ // Very short screens (landscape phones, short laptops)
57
+ @media (max-height: 600px) {
58
+ padding-top: 3vh;
59
+ padding-bottom: 3vh;
60
+ }
61
+
62
+ // Very tall screens
63
+ @media (min-height: 900px) {
64
+ padding-top: 10vh;
65
+ padding-bottom: 30vh;
66
+ }
67
+ }
68
+
69
+ .login-card {
70
+ @apply bg-dark-400 border border-dark-650 rounded-lg shadow-xl;
71
+ backdrop-filter: blur(10px);
72
+ box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
73
+ width: 100%;
74
+ max-width: 420px;
75
+ padding: 2rem;
76
+
77
+ // Small mobile devices
78
+ @media (max-width: 380px) {
79
+ max-width: 340px;
80
+ padding: 1.5rem;
81
+ @apply rounded-md;
82
+ }
83
+
84
+ // Large mobile devices
85
+ @media (min-width: 381px) and (max-width: 480px) {
86
+ max-width: 380px;
87
+ padding: 1.75rem;
88
+ }
89
+
90
+ // Tablets and up
91
+ @media (min-width: 481px) {
92
+ max-width: 420px;
93
+ padding: 2rem;
94
+ }
95
+
96
+ // Landscape mobile - make card more compact
97
+ @media (max-height: 500px) and (orientation: landscape) {
98
+ padding: 1.25rem;
99
+
100
+ h2 {
101
+ @apply text-xl mb-4;
102
+ }
103
+
104
+ .flex.justify-center {
105
+ @apply mb-4;
106
+
107
+ img {
108
+ @apply h-12;
109
+ }
110
+ }
111
+ }
112
+
113
+ // Very small screens (iPhone SE, etc.)
114
+ @media (max-width: 320px) {
115
+ max-width: 300px;
116
+ padding: 1.25rem;
117
+
118
+ h2 {
119
+ @apply text-lg;
120
+ }
121
+
122
+ img {
123
+ @apply h-12;
124
+ }
125
+ }
126
+ }
127
+
128
+ // Logo responsive sizing
129
+ .login-card img {
130
+ @media (max-width: 480px) {
131
+ @apply h-14;
132
+ }
133
+
134
+ @media (max-height: 500px) and (orientation: landscape) {
135
+ @apply h-10;
136
+ }
137
+ }
138
+
139
+ // Title responsive sizing
140
+ .login-card h2 {
141
+ @media (max-width: 480px) {
142
+ @apply text-xl mb-4;
143
+ }
144
+
145
+ @media (max-height: 500px) and (orientation: landscape) {
146
+ @apply text-lg mb-3;
147
+ }
26
148
  }
27
149
  </style>
@@ -67,7 +67,7 @@ export default {
67
67
  900: "#111827"
68
68
  },
69
69
  accent: {
70
- blue: "#5d7cc0",
70
+ blue: "#6b7a9a",
71
71
  purple: "#b794c0",
72
72
  pink: "#d16d9e",
73
73
  orange: "#d4976e",
package/vite.config.js CHANGED
@@ -7,6 +7,7 @@ const pkg = JSON.parse(readFileSync("./package.json", "utf-8"));
7
7
 
8
8
  // https://vitejs.dev/config/
9
9
  export default defineConfig({
10
+ cacheDir: './node_modules/.vite',
10
11
  build: {
11
12
  rollupOptions: {
12
13
  output: {
@@ -66,6 +67,31 @@ export default defineConfig({
66
67
  watch: {
67
68
  usePolling: false,
68
69
  interval: 1000
70
+ },
71
+ proxy: {
72
+ "/api": {
73
+ target: "http://localhost:8081",
74
+ changeOrigin: true,
75
+ secure: false,
76
+ configure: (proxy) => {
77
+ proxy.on("error", (err, req, res) => {
78
+ res.writeHead(503, {
79
+ "Content-Type": "application/json"
80
+ });
81
+ res.end(JSON.stringify({ error: "Backend starting up, please wait..." }));
82
+ });
83
+ }
84
+ },
85
+ "/ws": {
86
+ target: "ws://localhost:8081",
87
+ ws: true,
88
+ changeOrigin: true,
89
+ configure: (proxy) => {
90
+ proxy.on("error", () => {
91
+ // Silently handle WebSocket connection errors
92
+ });
93
+ }
94
+ }
69
95
  }
70
96
  }
71
97
  });