fix?: icon and defaultStore imports
This commit is contained in:
parent
d1bb6e02e9
commit
3e3cbb60c6
@ -18,11 +18,14 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from "vue";
|
||||
import icon from "@/scripts/icon";
|
||||
|
||||
defineProps<{
|
||||
const props = defineProps<{
|
||||
defaultOpen: boolean;
|
||||
}>();
|
||||
|
||||
const opened = ref(props.defaultOpen);
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
@ -1,12 +1,8 @@
|
||||
<template>
|
||||
<!--
|
||||
FIXME: defaultStore and icon are undefined for some reason
|
||||
<transition
|
||||
:name="defaultStore.state.animation ? 'fade' : ''"
|
||||
mode="out-in"
|
||||
>
|
||||
-->
|
||||
<transition name="" mode="out-in">
|
||||
<div v-if="pending">
|
||||
<MkLoading />
|
||||
</div>
|
||||
@ -16,13 +12,11 @@
|
||||
<div v-else>
|
||||
<div class="wszdbhzo">
|
||||
<div>
|
||||
<!-- <i :class="icon('ph-warning')"></i> -->
|
||||
<i class="ph-warning ph-bold ph-lg"></i>
|
||||
<i :class="icon('ph-warning')"></i>
|
||||
{{ i18n.ts.somethingHappened }}
|
||||
</div>
|
||||
<MkButton inline class="retry" @click="retry">
|
||||
<!-- <i :class="icon('ph-arrow-clockwise')"></i> -->
|
||||
<i class="ph-arrow-clockwise ph-bold ph-lg"></i>
|
||||
<i :class="icon('ph-arrow-clockwise')"></i>
|
||||
{{ i18n.ts.retry }}</MkButton
|
||||
>
|
||||
</div>
|
||||
@ -35,8 +29,8 @@ import type { PropType } from "vue";
|
||||
import { defineComponent, ref, watch } from "vue";
|
||||
import MkButton from "@/components/MkButton.vue";
|
||||
import { i18n } from "@/i18n";
|
||||
// import { defaultStore } from "@/store";
|
||||
// import icon from "@/scripts/icon";
|
||||
import { defaultStore } from "@/store";
|
||||
import icon from "@/scripts/icon";
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
@ -96,6 +90,8 @@ export default defineComponent({
|
||||
result,
|
||||
retry,
|
||||
i18n,
|
||||
defaultStore,
|
||||
icon,
|
||||
};
|
||||
},
|
||||
});
|
||||
|
@ -75,6 +75,7 @@ export default defineComponent({
|
||||
return {
|
||||
showBody: this.expanded,
|
||||
i18n,
|
||||
icon,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
@ -17,7 +17,7 @@
|
||||
>
|
||||
<template #func>
|
||||
<button class="_button" @click="changeType()">
|
||||
<i :class="icon('ph-pencil')"></i>
|
||||
<i :class="iconClass('ph-pencil')"></i>
|
||||
</button>
|
||||
</template>
|
||||
|
||||
@ -158,7 +158,7 @@ import * as os from "@/os";
|
||||
import { isLiteralValue } from "@/scripts/hpml/expr";
|
||||
import { funcDefs } from "@/scripts/hpml/lib";
|
||||
import { i18n } from "@/i18n";
|
||||
import icon from "@/scripts/icon";
|
||||
import iconClass from "@/scripts/icon";
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
@ -207,6 +207,7 @@ export default defineComponent({
|
||||
warn: null,
|
||||
slots: "",
|
||||
i18n,
|
||||
iconClass,
|
||||
};
|
||||
},
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { defaultStore } from "@/store";
|
||||
|
||||
export default function icon(name: string, large = true): string {
|
||||
export default function (name: string, large = true): string {
|
||||
return `${name} ${large ? "ph-lg" : ""} ${defaultStore.state.iconSet}`;
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ import * as mfm from "mfm-js";
|
||||
import { defaultStore } from "@/store";
|
||||
import { expandKaTeXMacro } from "@/scripts/katex-macro";
|
||||
|
||||
export default function preprocess(text: string): string {
|
||||
export default function (text: string): string {
|
||||
if (defaultStore.state.enableCustomKaTeXMacro) {
|
||||
const parsedKaTeXMacro =
|
||||
localStorage.getItem("customKaTeXMacroParsed") ?? "{}";
|
||||
|
Loading…
Reference in New Issue
Block a user