Skip to content
This repository has been archived by the owner on Nov 20, 2024. It is now read-only.

Commit

Permalink
chore: resolve merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Thaumy committed Aug 8, 2023
2 parents e9ac8c4 + d6de2c4 commit 6bb3ef6
Show file tree
Hide file tree
Showing 72 changed files with 2,821 additions and 2,408 deletions.
3 changes: 1 addition & 2 deletions app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,9 @@ import Menu from "@/components/Menu/Menu.vue"
import MenuBar from "@/components/MenuBar/MenuBar.vue"
import FSnackbar from "@/components/field/f-snackbar.vue"
import {onBeforeMount, onMounted, provide, ref} from 'vue'
import PageFoot from "@/components/common/PageFoot.vue"
import FixedBtnZone from "@/components/common/FixedBtnZone.vue"
import {useTheme} from "vuetify"
import {addRouteMiddleware, useAsyncData, useNuxtApp, useRoute, useRouter, useState} from "#app"
import {addRouteMiddleware, useNuxtApp, useRoute, useRouter, useState} from "#app"
import {Tab} from "~/components/field/type"
import build_meta from "~/field.meta"
Expand Down
9 changes: 5 additions & 4 deletions components/CommentZone/CommentCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
icon="mdi-reply"
size="1.1rem"
v-show="replyBtnAlwaysOn||replyBtnVisibility"
@click="$emit('replyClick')"
@click="emits('replyClick')"
/>
</transition>
</div>
Expand Down Expand Up @@ -63,9 +63,10 @@ import {onMounted, ref} from "vue"
import {formatToDateTime} from "@/scripts/util/time"
import FTextRender from "@/components/field/f-text-render.vue"
defineEmits<{
(e: 'replyClick'): void
}>()
const emits =
defineEmits<{
(e: 'replyClick'): void
}>()
withDefaults(
defineProps<{
Expand Down
9 changes: 5 additions & 4 deletions components/CommentZone/CommentEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
:disabled="!body"
:warning="isReply"
:text="isReply ? '回复' : '提交'"
@click="$emit('createComment',body)"
@click="emits('createComment',body)"
@disable-click="showGlobalSnackbar('mdi-tooltip-edit','填写评论内容是必要的','red')"
/>
</div>
Expand All @@ -99,9 +99,10 @@ const props =
isReply: boolean,
}>()
defineEmits<{
(e: 'createComment'): void
}>()
const emits =
defineEmits<{
(e: 'createComment'): void
}>()
const body = ref("")
const currentMode = ref(Mode.Edit)
Expand Down
2 changes: 1 addition & 1 deletion components/CommentZone/CommentZone.vue
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ import FCard from "@/components/field/f-card.vue"
import FSlider from "@/components/field/f-slider.vue"
import FDivider from "@/components/field/f-divider.vue"
import FTextRender from "@/components/field/f-text-render.vue"
import {Rsp as Comment} from "@/ws/client/api/comment/create/rsp"
import {Resp as Comment} from "@/ws/client/api/comment/create/resp"
import FData from "~/components/field/f-data.vue"
const props =
Expand Down
13 changes: 7 additions & 6 deletions components/MenuBar/Drawer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
<f-tab
class="menu-tab"
:title="tab.title"
@click="$emit('tabClick');router.push(tab.route)"
@click="emits('tabClick');router.push(tab.route)"
/>
</f-tabs>

<div class="info cursor-pointer" v-html="info" @click="$emit('infoClick')"/>
<div class="info cursor-pointer" v-html="info" @click="emits('infoClick')"/>

</div>

Expand All @@ -42,10 +42,11 @@ import {useRouter} from "#app"
const router = useRouter()
const emits = defineEmits<{
(e: 'tabClick'): void,
(e: 'infoClick'): void
}>()
const emits =
defineEmits<{
(e: 'tabClick'): void,
(e: 'infoClick'): void
}>()
const props = withDefaults(
defineProps<{
Expand Down
1 change: 1 addition & 0 deletions components/MenuBar/MenuBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
</template>

<script lang="ts" setup>
import {onMounted, ref} from 'vue'
import {makeDebounce} from "@/scripts/util/debounce"
import Drawer from "./Drawer.vue"
Expand Down
1 change: 0 additions & 1 deletion components/PostCard/Body.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

<script setup lang="ts">
import {onMounted, toRefs} from "vue"
import FTextRender from "@/components/field/f-text-render.vue"
const props =
Expand Down
2 changes: 1 addition & 1 deletion components/btn/GoUpBtn.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

<script lang="ts" setup>
import {onMounted, ref} from "vue";
import {onMounted, ref} from "vue"
import {makeThrottle} from "@/scripts/util/throttle"
const visibility = ref(false)
Expand Down
1 change: 0 additions & 1 deletion components/btn/ThemeToggleBtn.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
<script lang="ts" setup>
import {useTheme} from "vuetify"
import {inject} from "vue";
const theme = useTheme()
Expand Down
2 changes: 1 addition & 1 deletion components/chip/ArchiveChip.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<script setup lang="ts">
import {inject, ref} from "vue"
import {inject} from "vue"
const showGlobalSnackbar = inject('showGlobalSnackbar')
Expand Down
2 changes: 1 addition & 1 deletion components/chip/CreateTimeChip.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
variant="text"
:style="'color:'+genTimeColor()"
>
创建于 {{ genTimeText() }}
发表于 {{ genTimeText() }}
</v-chip>

</div>
Expand Down
2 changes: 1 addition & 1 deletion components/chip/ModifyTimeChip.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<script lang="ts" setup>
import {toRefs} from "vue"
import {formatToDate, formatToDateTime} from "@/scripts/util/time"
import {formatToDateTime} from "@/scripts/util/time"
const props = withDefaults(
defineProps<{
Expand Down
2 changes: 1 addition & 1 deletion components/chip/ScheduleChip.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<script setup lang="ts">
import {inject, ref} from "vue"
import {inject} from "vue"
const showGlobalSnackbar = inject('showGlobalSnackbar')
Expand Down
11 changes: 6 additions & 5 deletions components/common/PageFoot.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@

<script lang="ts" setup>
import {ref, onMounted} from "vue"
import {onMounted, ref} from "vue"
const emits = defineEmits<{
(e: 'fullyVisible'): void,
(e: 'fullyInvisible'): void,
}>()
const emits =
defineEmits<{
(e: 'fullyVisible'): void,
(e: 'fullyInvisible'): void,
}>()
const props =
defineProps<{
Expand Down
26 changes: 0 additions & 26 deletions components/common/PostZone.vue

This file was deleted.

16 changes: 8 additions & 8 deletions components/common/SwitchZone.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
<script lang="ts" setup>
import {removeHtmlTags} from "@/scripts/util/text"
import {useAsyncData, useRoute, useRouter, useState} from "#app"
import {Rsp} from "@/ws/client/api/post/get/rsp"
import {useRoute, useRouter, useState} from "#app"
import {Resp} from "@/ws/client/api/post/get_one/resp"
const props =
defineProps<{
Expand All @@ -65,16 +65,16 @@ const prev_post = await (async () => {
if (post_id === "-1")
return null
else {
const cache = <Rsp>useState(`post:${post_id}`).value
const cache = <Resp>useState(`post:${post_id}`).value
if (cache)
return cache
else
return useState(`post:${post_id}`, async () => {
const {handler: getPost} = await (async () => {
if (process.server)
return import("@/ws/server/api/post/get/handler")
return import("@/ws/server/api/post/get_one/handler")
else
return import("@/ws/client/api/post/get/handler")
return import("@/ws/client/api/post/get_one/handler")
})()
const post = await getPost({Id: post_id})
if (post.Ok) {
Expand All @@ -91,16 +91,16 @@ const next_post = await (async () => {
if (post_id === "-1")
return null
else {
const cache = <Rsp>useState(`post:${post_id}`).value
const cache = <Resp>useState(`post:${post_id}`).value
if (cache)
return cache
else
return useState(`post:${post_id}`, async () => {
const {handler: getPost} = await (async () => {
if (process.server)
return import("@/ws/server/api/post/get/handler")
return import("@/ws/server/api/post/get_one/handler")
else
return import("@/ws/client/api/post/get/handler")
return import("@/ws/client/api/post/get_one/handler")
})()
const post = await getPost({Id: post_id})
if (post.Ok) {
Expand Down
11 changes: 6 additions & 5 deletions components/field/f-btn.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
'reject':reject,
'light':!theme.global.current.value.dark,
'dark':theme.global.current.value.dark}"
@click="disabled?disableCLick():$emit('click')"
@click="disabled?disableCLick():emits('click')"
type="submit"
v-ripple
v-ripple.stop="!disabled"
Expand All @@ -25,10 +25,11 @@ import {useTheme} from "vuetify"
const theme = useTheme()
const emits = defineEmits<{
(e: 'click'): void,
(e: 'disableClick'): void
}>()
const emits =
defineEmits<{
(e: 'click'): void,
(e: 'disableClick'): void
}>()
withDefaults(
defineProps<{
Expand Down
2 changes: 1 addition & 1 deletion components/field/f-data.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<script lang="ts" setup>
import {onBeforeMount, onMounted, ref} from "vue"
import {onBeforeMount, ref} from "vue"
const props = withDefaults(
defineProps<{
Expand Down
1 change: 1 addition & 0 deletions components/field/f-slider.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
</template>

<script setup lang="ts">
import {ref} from "vue"
const props = withDefaults(
Expand Down
9 changes: 5 additions & 4 deletions components/field/f-tab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
:class="{'cursor-pointer':!disabled}"
v-ripple
v-ripple.stop="!disabled"
@click="disabled?()=>{}:$emit('click')"
@click="disabled?()=>{}:emits('click')"
>
<div
:style="{color:disabled?'grey':'',
Expand All @@ -21,9 +21,10 @@

<script lang="ts" setup>
const emits = defineEmits<{
(e: 'click'): void
}>()
const emits =
defineEmits<{
(e: 'click'): void
}>()
const props = withDefaults(
defineProps<{
Expand Down
2 changes: 1 addition & 1 deletion components/field/f-text-render.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<script lang="ts" setup>
import {queueTypeSet} from "@/scripts/mathjax/render"
import {onMounted, Ref, ref, watch} from "vue"
import {onMounted, ref} from "vue"
import {useTheme} from "vuetify"
import Prism from 'prismjs'
Expand Down
6 changes: 3 additions & 3 deletions components/field/f-textarea.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ const props =
const emits =
defineEmits<{
(e: 'update:modelValue', string): void
(e: 'update:modelValue', newValue: string): void
}>()
const value = computed({
get() {
return props.modelValue
},
set(value) {
emits('update:modelValue', value)
set(newValue) {
emits('update:modelValue', newValue)
}
})
Expand Down
Loading

0 comments on commit 6bb3ef6

Please sign in to comment.