mirror of
https://github.com/headporter81/specialsource-homepage-frontend.git
synced 2026-08-08 15:21:11 +09:00
This commit is contained in:
+17
-5
@@ -6,7 +6,7 @@
|
||||
<span class="brand">SPECIALSOURCE.SYSTEM</span>
|
||||
|
||||
<select v-model="activeTheme" class="theme-selector">
|
||||
<option value="green">P3_GREEN (기본)</option>
|
||||
<option value="green">P3_GREEN (녹색)</option>
|
||||
<option value="amber">HERCULES (호박)</option>
|
||||
<option value="vga">VGA_GRAY (회색)</option>
|
||||
<option value="ega">EGA_CYAN (청록)</option>
|
||||
@@ -144,7 +144,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted, computed } from 'vue';
|
||||
import { ref, onMounted, computed, watch } from 'vue'
|
||||
import axios from 'axios';
|
||||
import TuiProgressBar from '@/components/TuiProgressBar.vue';
|
||||
|
||||
@@ -157,7 +157,7 @@ const loginPw = ref('');
|
||||
|
||||
const activeMenu = ref('main');
|
||||
const authToken = ref(localStorage.getItem('token'));
|
||||
const activeTheme = ref('green');
|
||||
const activeTheme = ref(localStorage.getItem('theme') || 'green');
|
||||
|
||||
const isProcessing = ref(false);
|
||||
const overlayProgress = ref(0);
|
||||
@@ -171,7 +171,7 @@ const menuItems = [
|
||||
{ id: 'contact', name: 'CONTACT' }
|
||||
];
|
||||
|
||||
const isLoggedIn = computed(() => !!authToken.value);
|
||||
const loggedInUser = ref(localStorage.getItem('username') || 'anonymous');
|
||||
|
||||
const rawAscii = `
|
||||
███████╗██████╗ ███████╗ ██████╗██╗ █████╗ ██╗
|
||||
@@ -344,6 +344,12 @@ const handleLoginSubmit = async () => {
|
||||
});
|
||||
|
||||
if (response.data && response.data.token) {
|
||||
|
||||
localStorage.setItem('token', response.data.token);
|
||||
// 🟢 [NEW] 로컬 스토리지와 변수에 로그인한 ID 세이브
|
||||
localStorage.setItem('username', loginId.value);
|
||||
loggedInUser.value = loginId.value;
|
||||
|
||||
overlayProgress.value = 85;
|
||||
overlayStatus.value = 'Access Granted. Generating JWT Session token...';
|
||||
|
||||
@@ -352,6 +358,8 @@ const handleLoginSubmit = async () => {
|
||||
|
||||
if (termInstance.value) {
|
||||
termInstance.value.echo(`[[b;var(--tui-color);][SUCCESS]] ACCESS GRANTED. CREDENTIALS VERIFIED.`);
|
||||
// 🟢 [NEW] 하단 CRT 터미널 프롬프트도 내 아이디로 동적 변경!
|
||||
termInstance.value.set_prompt(`${loginId.value}@specialsource:~$ `);
|
||||
}
|
||||
|
||||
overlayProgress.value = 100;
|
||||
@@ -389,10 +397,14 @@ onMounted(() => {
|
||||
'email': function () { this.echo('specialsource.company@gmail.com'); },
|
||||
}, {
|
||||
greetings: `[SYSTEM V3.2] INTERFACE ONLINE. TYPE 'help' FOR COMMANDS.`,
|
||||
prompt: 'admin@specialsource:~$ '
|
||||
prompt: `${loggedInUser.value}@specialsource:~$ `
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
watch(activeTheme, (newTheme) => {
|
||||
localStorage.setItem('theme', newTheme);
|
||||
});
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
Reference in New Issue
Block a user