mirror of
https://github.com/davegallant/rfd-fyi.git
synced 2025-08-07 09:02:27 +00:00
Only show footer is device is not mobile
This commit is contained in:
44
src/App.vue
44
src/App.vue
@@ -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,14 +192,16 @@ export default {
|
|||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<footer class="fixed-bottom">
|
<div v-if="!isMobile()">
|
||||||
<small>Tip: Press '/' to search and 'r' to reload</small>
|
<footer class="fixed-bottom">
|
||||||
<div class="footer-right">
|
<small>Tip: Press '/' to search and 'r' to reload</small>
|
||||||
<github-button href="https://github.com/davegallant/rfd-fyi"
|
<div class="footer-right">
|
||||||
>Star</github-button
|
<github-button href="https://github.com/davegallant/rfd-fyi"
|
||||||
>
|
>Star</github-button
|
||||||
</div>
|
>
|
||||||
</footer>
|
</div>
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user