mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-06 03:20:13 +08:00
* refactor: put all session ref into one reactive store * fix relogin duplicate signal * fix: put quest data into store, fix hint reactivity * fix: duplicate after relogin * only register listener once
23 lines
537 B
Vue
23 lines
537 B
Vue
<template>
|
|
<font-awesome-icon :icon="['fas', 'terminal']" class="text-text p-1" />
|
|
<button class="text-text h-[5%]">Terminal</button>
|
|
<div
|
|
id="terminal"
|
|
ref="terminal"
|
|
class="bg-bg-secondary h-[calc(100%-5%)] p-0.5"
|
|
></div>
|
|
</template>
|
|
|
|
<script setup>
|
|
import { onMounted, ref } from 'vue'
|
|
import { useTerminal } from '../store/session'
|
|
|
|
const terminal = ref(null)
|
|
|
|
onMounted(() => {
|
|
const term = useTerminal()
|
|
term.mount(terminal.value)
|
|
window.addEventListener('resize', () => term.resizeScreen())
|
|
})
|
|
</script>
|