mirror of
https://github.com/davegallant/rfd-fyi.git
synced 2026-03-03 09:36:35 +00:00
Remove deal from tooltip
This commit is contained in:
17
src/App.vue
17
src/App.vue
@@ -85,7 +85,7 @@ export default {
|
|||||||
this.$vuetify.theme.global.name = theme;
|
this.$vuetify.theme.global.name = theme;
|
||||||
this.currentTheme = theme;
|
this.currentTheme = theme;
|
||||||
localStorage.setItem('vuetify-theme', theme);
|
localStorage.setItem('vuetify-theme', theme);
|
||||||
|
|
||||||
// Also update data-bs-theme for any custom CSS that uses it
|
// Also update data-bs-theme for any custom CSS that uses it
|
||||||
document.documentElement.setAttribute('data-bs-theme', theme === 'dark' ? 'dark' : 'light');
|
document.documentElement.setAttribute('data-bs-theme', theme === 'dark' ? 'dark' : 'light');
|
||||||
},
|
},
|
||||||
@@ -247,22 +247,22 @@ export default {
|
|||||||
if (this.hoveredTopicId === null || !this.tooltipData[this.hoveredTopicId]) {
|
if (this.hoveredTopicId === null || !this.tooltipData[this.hoveredTopicId]) {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
let top = this.tooltipPosition.y + 10;
|
let top = this.tooltipPosition.y + 10;
|
||||||
let left = this.tooltipPosition.x + 10;
|
let left = this.tooltipPosition.x + 10;
|
||||||
|
|
||||||
// Check if tooltip would go off bottom of screen
|
// Check if tooltip would go off bottom of screen
|
||||||
if (top > window.innerHeight - 200) {
|
if (top > window.innerHeight - 200) {
|
||||||
// Position above the cursor instead
|
// Position above the cursor instead
|
||||||
top = this.tooltipPosition.y - 200;
|
top = this.tooltipPosition.y - 200;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if tooltip would go off right side of screen
|
// Check if tooltip would go off right side of screen
|
||||||
if (left > window.innerWidth - 420) {
|
if (left > window.innerWidth - 420) {
|
||||||
// Position to the left of cursor instead
|
// Position to the left of cursor instead
|
||||||
left = this.tooltipPosition.x - 420;
|
left = this.tooltipPosition.x - 420;
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
position: 'fixed',
|
position: 'fixed',
|
||||||
left: Math.max(10, left) + 'px',
|
left: Math.max(10, left) + 'px',
|
||||||
@@ -338,10 +338,6 @@ const sortBy = ref([{ key: "score", order: "desc" }]);
|
|||||||
:style="tooltipStyle"
|
:style="tooltipStyle"
|
||||||
>
|
>
|
||||||
<div class="tooltip-content">
|
<div class="tooltip-content">
|
||||||
<div class="tooltip-header">{{ tooltipData[hoveredTopicId].topic.title }}</div>
|
|
||||||
<div class="tooltip-dealer">
|
|
||||||
{{ tooltipData[hoveredTopicId].topic.Offer.dealer_name }}
|
|
||||||
</div>
|
|
||||||
<div class="tooltip-stats">
|
<div class="tooltip-stats">
|
||||||
<span class="stat-item">
|
<span class="stat-item">
|
||||||
<span class="material-symbols-outlined">visibility</span>
|
<span class="material-symbols-outlined">visibility</span>
|
||||||
@@ -356,6 +352,9 @@ const sortBy = ref([{ key: "score", order: "desc" }]);
|
|||||||
<strong>Description:</strong>
|
<strong>Description:</strong>
|
||||||
{{ tooltipData[hoveredTopicId].description }}
|
{{ tooltipData[hoveredTopicId].description }}
|
||||||
</div>
|
</div>
|
||||||
|
<div class="tooltip-dealer">
|
||||||
|
{{ tooltipData[hoveredTopicId].topic.Offer.dealer_name }}
|
||||||
|
</div>
|
||||||
<div v-if="tooltipData[hoveredTopicId].first_post" class="tooltip-first-post">
|
<div v-if="tooltipData[hoveredTopicId].first_post" class="tooltip-first-post">
|
||||||
<strong>First Post:</strong>
|
<strong>First Post:</strong>
|
||||||
{{ tooltipData[hoveredTopicId].first_post }}
|
{{ tooltipData[hoveredTopicId].first_post }}
|
||||||
|
|||||||
Reference in New Issue
Block a user