This commit is contained in:
polv committed 2021-10-25 06:46:53 +07:00
1 parent ffbe5fed18
commit b32007acd1
6 files changed
+939 -55

No files matched your search

+6 -6
View File
@@ -154,9 +154,9 @@ import ContextMenu from '../ContextMenu.vue'
type ILibraryEntry = Pick<
IEntry,
'entry' | 'reading' | 'translation' | 'type'
'list' | 'reading' | 'translation' | 'type'
> & {
originalEntry: string
entry: string
}
@Component<LibraryCard>({
@@ -204,8 +204,8 @@ export default class LibraryCard extends Vue {
isList = false
list: ILibraryEntry[] = this.entries.map((el) => ({
originalEntry: el,
entry: [el],
entry: el,
list: [el],
reading: [],
translation: [],
type: this.type,
@@ -267,7 +267,7 @@ export default class LibraryCard extends Vue {
[...listMap].map(([k, v]) =>
api
.all_getLookup({
entry: v.originalEntry,
entry: v.entry,
type: this.type,
forced: true,
limit: 1,
@@ -290,7 +290,7 @@ export default class LibraryCard extends Vue {
getTagClass(it: IEntry) {
const srsLevel = Math.min(
...it.entry.map((el) => this.srsLevel[el] || -Infinity)
...it.list.map((el) => this.srsLevel[el] || -Infinity)
)
if (srsLevel === -Infinity) return 'is-light'