This commit is contained in:
polv committed 2021-10-25 11:05:38 +07:00
1 parent 7d5114953b
commit cbc36d19f5
7 files changed
+215 -194

No files matched your search

+4 -4
View File
@@ -149,11 +149,11 @@
<script lang="ts">
import { Vue, Component, Ref, Prop } from 'nuxt-property-decorator'
import { api, IEntry, IType } from '~/assets/api'
import { api, IDictionaryLookup, IType } from '~/assets/api'
import ContextMenu from '../ContextMenu.vue'
type ILibraryEntry = Pick<
IEntry,
IDictionaryLookup,
'list' | 'reading' | 'translation' | 'type'
> & {
entry: string
@@ -263,7 +263,7 @@ export default class LibraryCard extends Vue {
}
})
await Promise.all(
await Promise.allSettled(
[...listMap].map(([k, v]) =>
api
.all_getLookup({
@@ -288,7 +288,7 @@ export default class LibraryCard extends Vue {
await this.reload([...listMap].flatMap(([, { entry }]) => entry))
}
getTagClass(it: IEntry) {
getTagClass(it: IDictionaryLookup) {
const srsLevel = Math.min(
...it.list.map((el) => this.srsLevel[el] || -Infinity)
)