Skip to content

Commit ab5723c

Browse files
committed
pre social-logins
1 parent 83dfd07 commit ab5723c

File tree

2 files changed

+38
-9
lines changed

2 files changed

+38
-9
lines changed

src/components/CommandLineInterface.vue

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,15 @@ const commands = {
1111
"help": () => createStdout("Available commands: hello, login, debug"),
1212
"login": () => {
1313
mainStore.toggleLogin();
14-
return createStdout("Login interface activated.");
15-
},
14+
const status = mainStore.showLogin ? "Activated" : "Disabled";
15+
return createStdout(`Login interface ${status}.`);
16+
},
1617
"hello": () => createStdout("Hello world! #wip"),
1718
"debug": () => {
1819
mainStore.toggleDebugPanel();
19-
return createStdout("Debug panel activated.");
20-
},
20+
const status = mainStore.showDebugPanel ? "Activated" : "Disabled";
21+
return createStdout(`Debug panel ${status}.`);
22+
},
2123
};
2224
</script>
2325

src/components/DebugPanel.vue

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
1-
<!-- src/components/DebugPanel.vue -->
21
<template>
32
<div class="debug-panel">
4-
<pre>{{ state }}</pre>
3+
<h3>🕵️ Secret Debuggin Panel</h3>
4+
<pre class="state-display">{{ formattedState }}</pre>
55
<button @click="resetCookieConsent">Reset Cookie Consent</button>
66
</div>
77
</template>
88

99
<script setup lang="ts">
10+
import { computed } from 'vue';
1011
import { useMainStore } from '../store';
1112
1213
const mainStore = useMainStore();
13-
const state = mainStore.$state;
14+
15+
const formattedState = computed(() => {
16+
return JSON.stringify(mainStore.$state, null, 2);
17+
});
1418
1519
const resetCookieConsent = () => {
1620
mainStore.resetCookieConsent();
@@ -19,7 +23,30 @@ const resetCookieConsent = () => {
1923

2024
<style scoped>
2125
.debug-panel {
22-
/* Add your styles for the debug panel here */
26+
background-color: #f8f8f8;
27+
border: 1px solid #ccc;
28+
padding: 15px;
29+
border-radius: 10px;
30+
margin-top: 15px;
31+
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
32+
color: #333; /* Default text color for the panel */
33+
}
34+
35+
.debug-panel h3 {
36+
margin-top: 0;
2337
}
24-
</style>
2538
39+
.debug-panel pre {
40+
white-space: pre-wrap;
41+
word-wrap: break-word;
42+
background-color: #eee; /* Light background for the text area */
43+
padding: 10px;
44+
border-radius: 5px;
45+
color: #333; /* Ensuring text color is readable against the light background */
46+
}
47+
48+
.debug-panel button {
49+
margin-top: 10px;
50+
/* Additional button styling */
51+
}
52+
</style>

0 commit comments

Comments
 (0)