mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-14 09:38:13 +08:00
🔊 完善基础页面的 log #83
This commit is contained in:
@@ -228,11 +228,12 @@
|
||||
<script lang="ts" setup>
|
||||
import { event, window as TauriWindow } from "@tauri-apps/api";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { computed, onMounted, ref } from "vue";
|
||||
import { computed, onMounted, ref, watch } from "vue";
|
||||
|
||||
import { useAppStore } from "../../store/modules/app";
|
||||
import { useUserStore } from "../../store/modules/user";
|
||||
import mhyClient from "../../utils/TGClient";
|
||||
import TGLogger from "../../utils/TGLogger";
|
||||
import showSnackbar from "../func/snackbar";
|
||||
|
||||
const appStore = useAppStore();
|
||||
@@ -262,6 +263,10 @@ const themeTitle = computed(() => {
|
||||
return themeGet.value === "default" ? "夜间模式" : "日间模式";
|
||||
});
|
||||
|
||||
watch(themeTitle, async (val) => {
|
||||
await TGLogger.Info(`[App][theme] 已切换到${val}`);
|
||||
});
|
||||
|
||||
function collapse(): void {
|
||||
rail.value = !rail.value;
|
||||
appStore.sidebar.collapse = rail.value;
|
||||
|
||||
@@ -162,7 +162,7 @@ async function openPath(type: "db" | "user" | "log"): Promise<void> {
|
||||
break;
|
||||
}
|
||||
await dialog.open({
|
||||
directory: type !== "db",
|
||||
directory: false,
|
||||
defaultPath: targetPath,
|
||||
multiple: false,
|
||||
});
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
// utils
|
||||
import TGLogger from "../../utils/TGLogger";
|
||||
import { generateShareImg } from "../../utils/TGShare";
|
||||
|
||||
interface TShareBtnProps {
|
||||
@@ -21,6 +22,7 @@ const props = defineProps<TShareBtnProps>();
|
||||
const emit = defineEmits<TShareBtnEmits>();
|
||||
|
||||
async function shareContent(): Promise<void> {
|
||||
await TGLogger.Info("[TShareBtn][shareContent] 开始生成分享图片");
|
||||
emit("update:loading", true);
|
||||
props.modelValue.querySelectorAll("details").forEach((item) => {
|
||||
if (item.open) {
|
||||
@@ -38,6 +40,7 @@ async function shareContent(): Promise<void> {
|
||||
}
|
||||
});
|
||||
emit("update:loading", false);
|
||||
await TGLogger.Info("[TShareBtn][shareContent] 生成分享图片完成");
|
||||
}
|
||||
</script>
|
||||
<style lang="css" scoped>
|
||||
|
||||
@@ -4,7 +4,9 @@
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { toRaw } from "vue";
|
||||
import { onMounted, toRaw } from "vue";
|
||||
|
||||
import TGLogger from "../../utils/TGLogger";
|
||||
|
||||
interface TpUnknownProps {
|
||||
data: TGApp.Plugins.Mys.SctPost.Empty;
|
||||
@@ -13,6 +15,12 @@ interface TpUnknownProps {
|
||||
const props = defineProps<TpUnknownProps>();
|
||||
|
||||
console.warn("tpUnknown", toRaw(props.data.insert));
|
||||
|
||||
onMounted(async () => {
|
||||
await TGLogger.Warn(
|
||||
`[tpUnknown][onMounted] 未知的插件数据 ${JSON.stringify(toRaw(props.data))}}`,
|
||||
);
|
||||
});
|
||||
</script>
|
||||
<style lang="css" scoped>
|
||||
.tp-unknown-box {
|
||||
|
||||
Reference in New Issue
Block a user