Skip to content

Commit

Permalink
fix: 🐛 部分界面细节调整
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaohuohumax committed Oct 1, 2024
1 parent fd81ee6 commit 1abb77a
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 9 deletions.
6 changes: 6 additions & 0 deletions app/web/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @xiaohuohumax/miaoji-web

## 1.1.1

### Patch Changes

- 部分界面细节调整

## 1.1.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion app/web/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@xiaohuohumax/miaoji-web",
"type": "module",
"version": "1.1.0",
"version": "1.1.1",
"private": true,
"description": "MiaoJi web client",
"author": {
Expand Down
2 changes: 2 additions & 0 deletions app/web/src/icons/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
export { default as IAperture } from './svg/aperture.svg?component'
export { default as IBrightnessDown } from './svg/brightness-down.svg?component'
export { default as IBugF } from './svg/bug-f.svg?component'
export { default as IDocument } from './svg/document.svg?component'
export { default as IGithubCircle } from './svg/github-circle.svg?component'
export { default as IMenu } from './svg/menu.svg?component'
export { default as IMinusCircle } from './svg/minus-circle.svg?component'
export { default as IMoonF } from './svg/moon-f.svg?component'
export { default as IPicture } from './svg/picture.svg?component'
export { default as ISearch } from './svg/search.svg?component'
Expand Down
1 change: 1 addition & 0 deletions app/web/src/icons/svg/bug-f.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions app/web/src/icons/svg/minus-circle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions app/web/src/views/VHome.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ onBeforeRouteLeave(() => {
<template #default="{ datas }">
<NSpace :vertical="true">
<CDocCard v-for="issue in datas" :key="issue.number" :issue="issue" />
<div class="mt-4" />
</NSpace>
</template>
</CLoadPages>
Expand Down
11 changes: 9 additions & 2 deletions app/web/src/views/components/CAlbumCard.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<script setup lang='ts'>
import type { markdown } from '@xiaohuohumax/miaoji-util'
import { NCard, NIcon, NImage, NSpace } from 'naive-ui'
import CLink from '@/CLink.vue'
import { NCard, NIcon, NImage, NSpace, NTime } from 'naive-ui'
import type { Issue } from '~/api/module/issue'
import { IAperture } from '~/icons'
import { RouteName } from '~/router/routes'
Expand All @@ -26,10 +27,16 @@ defineProps<Album>()
</div>
</template>
</NImage>
<NSpace vertical>
<NSpace vertical size="small">
<div class="text-lg">
{{ issue.title }}
</div>
<NSpace>
<CLink :href="issue.user?.html_url" target="_blank">
{{ issue.user?.login }}
</CLink>
<NTime :time="new Date(issue.updated_at)" type="relative" />
</NSpace>
<CReactions :reaction="issue.reactions" :issue-url="issue.html_url" />
</NSpace>
</NCard>
Expand Down
2 changes: 1 addition & 1 deletion app/web/src/views/components/CComment.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ watch(() => props.issue, () => {
</template>
<template #description>
<NSpace align="center">
<NTime :time="new Date(comment.created_at)" />
<NTime :time="new Date(comment.created_at)" type="relative" />
<CReactions :reaction="comment.reactions" :issue-url="comment.issue_url" />
</NSpace>
<CMarkdown :id="comment.id" :content="comment.body" />
Expand Down
12 changes: 8 additions & 4 deletions app/web/src/views/components/CLoadPages.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { NButton, NEmpty, NIcon, NSpace } from 'naive-ui'
import { ref } from 'vue'
import appConfig from '~/app.config'
import { useI18n } from '~/i18n'
import { IAperture } from '~/icons'
import { IAperture, IMinusCircle } from '~/icons'
export type State = 'init' | 'loading' | 'error' | 'more' | 'over' | 'empty'
export interface QueryFuncRes<D> {
Expand Down Expand Up @@ -88,9 +88,13 @@ defineExpose({
</slot>
</div>
<slot v-else-if="s === 'over'" name="over">
<p class="text-center">
{{ t('component.loadPages.over') }}
</p>
<NEmpty :description="t('component.loadPages.over')">
<template #icon>
<NIcon>
<IMinusCircle />
</NIcon>
</template>
</NEmpty>
</slot>
<slot v-else-if="s === 'empty'" name="empty">
<NEmpty class="p-4" />
Expand Down
2 changes: 1 addition & 1 deletion app/web/src/views/components/CReactions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const reactions = Object.entries(props.reaction || {}).map(([key, value]) => {

<template>
<NSpace>
<CLink v-for="r in reactions" :key="r.count" :href="issueUrl" @click.stop>
<CLink v-for="r in reactions" :key="r.count" :href="issueUrl" target="_blank" @click.stop>
<NTag :bordered="false" :checkable="true" class="bg-transparent">
{{ r.icon }} {{ r.count }}
</NTag>
Expand Down

0 comments on commit 1abb77a

Please sign in to comment.