fix: no voice in speech page; custom personal page redirect notworking. feat: sync sroll bar between question display page an obs component

This commit is contained in:
2024-11-23 18:46:37 +08:00
parent 14267bab3a
commit 47ade4a965
33 changed files with 838 additions and 1119 deletions

View File

@@ -0,0 +1,37 @@
<script setup lang="ts">
import { NFlex, NInput } from 'naive-ui';
import DanmujiOBS from '../obs/DanmujiOBS.vue';
import { useAccount } from '@/api/account';
import MonacoEditorComponent from '@/components/MonacoEditorComponent.vue';
import { ref } from 'vue';
import { CURRENT_HOST } from '@/data/constants';
const accountInfo = useAccount()
const css = ref('')
</script>
<template>
<NFlex wrap style="height: 100%">
<NFlex style="flex: 1;" vertical>
<NInput :allowInput="() => false" :value="`${CURRENT_HOST}obs/danmuji?token=${accountInfo.token}`" />
<MonacoEditorComponent language="css" :height="500" v-model:value="css" />
</NFlex>
<div class="danmuji-obs" style="width: 300px; height: calc(100% - 2px); min-height: 500px;border: 1px solid #adadad;border-radius: 8px;
overflow: hidden;">
<DanmujiOBS :isOBS="false" style="height: 100%; width: 100%;" :customCss="css" />
</div>
</NFlex>
</template>
<style scoped>
.danmuji-obs {
--danmuji-bg: #333;
background-color: #222;
background-image: linear-gradient(45deg, var(--danmuji-bg) 25%, transparent 25%),
linear-gradient(-45deg, var(--danmuji-bg) 25%, transparent 25%),
linear-gradient(45deg, transparent 75%, var(--danmuji-bg) 75%),
linear-gradient(-45deg, transparent 75%, var(--danmuji-bg) 75%);
background-size: 20px 20px;
background-position: 0 0, 0 10px, 10px -10px, -10px 0;
}
</style>