Skip to content

Commit

Permalink
fix(app): fix problems caused when packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
codeacme17 authored Nov 18, 2023
2 parents f7de81c + 80f2807 commit 452bb75
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 17 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.DS_Store
node_modules
dist


# local env files
Expand Down
1 change: 1 addition & 0 deletions app/src/assets/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
);

@import url('./markdown.scss');
@import 'tdesign-vue-next/es/style/index.css';

:root {
--td-brand-color: #000 !important;
Expand Down
2 changes: 1 addition & 1 deletion app/src/hooks/useTodayListCache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ref, type Ref } from 'vue'
import { useNow, useDateFormat, useLocalStorage } from '@vueuse/core'
import { useFetch } from './useFetch'
import type { ResponseBody } from '@/plugins/axios'
import type { TableItem } from '@/components/QuestionTable.vue'
import type { TableItem } from '@/components/tables/QuestionTable.vue'

const today = useDateFormat(useNow(), 'YYYY-MM-DD')

Expand Down
34 changes: 20 additions & 14 deletions app/src/layouts/SideBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,27 @@
}"
>
<template #prepend>
<div>
<div
:style="{
width: rail ? '38px' : '50px',
height: rail ? '38px' : '50px',
}"
class="mr-5"
>
<v-img
:src="
isDark
? '/src/assets/images/logo-dark.svg'
: '/src/assets/images/logo.svg'
"
:lazy-src="
isDark
? '/src/assets/images/logo-dark.svg'
: '/src/assets/images/logo.svg'
"
:width="rail ? 38 : 50"
class="mr-5"
style="transition: width 0.15s ease-in-out"
v-show="isDark"
src="/src/assets/images/logo-dark.svg"
lazy-src="/src/assets/images/logo-dark.svg"
alt="logo-dark"
width="100%"
/>

<v-img
v-show="!isDark"
src="/src/assets/images/logo.svg"
lazy-src="/src/assets/images/logo.svg"
alt="logo-light"
width="100%"
/>
</div>
</template>
Expand Down
1 change: 1 addition & 0 deletions app/src/store/note.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export const useNoteStore = defineStore('noteStore', {
actions: {
async getNotes() {
const [_getNotes, loading] = useFetch(NOTE_API.getNotes)
// @ts-ignore
this.$state.getNotesLoading = loading
const { data } = await _getNotes()
this.$state.notes = data
Expand Down
3 changes: 2 additions & 1 deletion app/src/store/profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ const state: ProfileState = {
},

confirmLoading: false,
} as const
}

export const useProfileStore = defineStore('profileStore', {
state: () => state,
Expand All @@ -138,6 +138,7 @@ export const useProfileStore = defineStore('profileStore', {

async setProfile() {
const [_setKeys, loading] = useFetch(PROFILE_API.setProfile)
// @ts-ignore
this.$state.confirmLoading = loading

const data: any = {}
Expand Down
2 changes: 1 addition & 1 deletion app/src/views/Notes.vue
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
>
<v-list-item
:title="$t('title.createDate')"
:subtitle="handleDatetime(currentNote.upload_date)"
:subtitle="handleDatetime(currentNote.upload_date!)"
/>
<!-- Dont delete
<v-list-item :title="$t('title.finishedAmount')" subtitle="10" />
Expand Down

0 comments on commit 452bb75

Please sign in to comment.