mirror of
https://github.com/romancm/gamebrary
synced 2024-11-24 04:03:06 +00:00
notes page clean up
This commit is contained in:
parent
e8092d9ef7
commit
057f31de6c
1 changed files with 15 additions and 23 deletions
|
@ -2,8 +2,9 @@
|
||||||
<!-- TODO: open notes from game modal on click? -->
|
<!-- TODO: open notes from game modal on click? -->
|
||||||
<template lang="html">
|
<template lang="html">
|
||||||
<b-container>
|
<b-container>
|
||||||
<portal to="dock">
|
<page-title
|
||||||
<div class="d-flex">
|
title="Notes"
|
||||||
|
>
|
||||||
<b-form-input
|
<b-form-input
|
||||||
v-if="!showEmptyState"
|
v-if="!showEmptyState"
|
||||||
type="search"
|
type="search"
|
||||||
|
@ -12,15 +13,10 @@
|
||||||
v-model="search"
|
v-model="search"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- TODO: create add a note modal -->
|
<!-- <b-button>
|
||||||
<!-- <b-button variant="warning" class="ml-2" style="width: 120px;">
|
|
||||||
Add note
|
Add note
|
||||||
</b-button> -->
|
</b-button> -->
|
||||||
</div>
|
</page-title>
|
||||||
</portal>
|
|
||||||
<page-title
|
|
||||||
title="Notes"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<empty-state
|
<empty-state
|
||||||
v-if="showEmptyState"
|
v-if="showEmptyState"
|
||||||
|
@ -86,14 +82,10 @@ export default {
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
.filter(({ gameName, note }) => {
|
.filter(({ gameName, note }) => {
|
||||||
if (!this.search) {
|
if (!this.search) return true;
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
const noteIsMatch = note && note.toLowerCase().includes(this.search.toLowerCase());
|
const noteIsMatch = note && note.toLowerCase().includes(this.search.toLowerCase());
|
||||||
const titleIsMatch = gameName
|
const titleIsMatch = gameName && gameName.toLowerCase().includes(this.search.toLowerCase());
|
||||||
&& gameName.toLowerCase()
|
|
||||||
.includes(this.search.toLowerCase());
|
|
||||||
|
|
||||||
return noteIsMatch || titleIsMatch;
|
return noteIsMatch || titleIsMatch;
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue