Only show footer is device is not mobile

This commit is contained in:
Dave Gallant
2023-01-15 16:41:21 -05:00
parent f7c076fcc5
commit 370631b65b

View File

@@ -67,6 +67,17 @@ export default {
return 0; return 0;
}); });
}, },
isMobile() {
if (
/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
navigator.userAgent
)
) {
return true;
} else {
return false;
}
},
}, },
props: ["date"], props: ["date"],
computed: { computed: {
@@ -85,7 +96,12 @@ export default {
}, },
filteredTopics() { filteredTopics() {
return this.topics.filter((row) => { return this.topics.filter((row) => {
const titles = (row.title.toString() + ' [' + row.Offer.dealer_name + ']').toLowerCase(); const titles = (
row.title.toString() +
" [" +
row.Offer.dealer_name +
"]"
).toLowerCase();
const searchTerm = this.filter.toLowerCase(); const searchTerm = this.filter.toLowerCase();
return titles.includes(searchTerm); return titles.includes(searchTerm);
@@ -115,7 +131,7 @@ export default {
<input <input
class="form-control bg-dark text-light mousetrap" class="form-control bg-dark text-light mousetrap"
type="text" type="text"
placeholder="Search" placeholder="Filter"
v-model="filter" v-model="filter"
v-on:keyup.enter="blurSearch()" v-on:keyup.enter="blurSearch()"
ref="search" ref="search"
@@ -155,7 +171,11 @@ export default {
<a <a
:href="`https://forums.redflagdeals.com${topic.web_path}`" :href="`https://forums.redflagdeals.com${topic.web_path}`"
target="_blank" target="_blank"
v-html="highlightMatches(topic.title + ' [' + topic.Offer.dealer_name + ']')" v-html="
highlightMatches(
topic.title + ' [' + topic.Offer.dealer_name + ']'
)
"
></a> ></a>
</td> </td>
<td v-if="topic.score > 0" scope="col" class="green-score"> <td v-if="topic.score > 0" scope="col" class="green-score">
@@ -172,6 +192,7 @@ export default {
</tr> </tr>
</tbody> </tbody>
</table> </table>
<div v-if="!isMobile()">
<footer class="fixed-bottom"> <footer class="fixed-bottom">
<small>Tip: Press '/' to search and 'r' to reload</small> <small>Tip: Press '/' to search and 'r' to reload</small>
<div class="footer-right"> <div class="footer-right">
@@ -180,6 +201,7 @@ export default {
> >
</div> </div>
</footer> </footer>
</div>
</body> </body>
</template> </template>