mirror of
https://github.com/davegallant/rfd-fyi.git
synced 2026-03-03 09:36:35 +00:00
Compare commits
5 Commits
640feea592
...
c13bd92c2b
| Author | SHA1 | Date | |
|---|---|---|---|
| c13bd92c2b | |||
| ea871e3fb4 | |||
| d523c31953 | |||
| 928ee46b9d | |||
| ca58af6a57 |
@@ -19,8 +19,7 @@
|
|||||||
"dayjs": "^1.11.10",
|
"dayjs": "^1.11.10",
|
||||||
"vue": "^3.5.17",
|
"vue": "^3.5.17",
|
||||||
"vue-loading-overlay": "^6.0.3",
|
"vue-loading-overlay": "^6.0.3",
|
||||||
"vue-router": "^5.0.0",
|
"vue-router": "^5.0.0"
|
||||||
"vuetify": "^3.9.6"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.22.10",
|
"@babel/core": "^7.22.10",
|
||||||
@@ -34,8 +33,7 @@
|
|||||||
"postcss-cli": "^11.0.0",
|
"postcss-cli": "^11.0.0",
|
||||||
"sass-embedded": "^1.89.2",
|
"sass-embedded": "^1.89.2",
|
||||||
"unplugin-vue-components": "^31.0.0",
|
"unplugin-vue-components": "^31.0.0",
|
||||||
"vite": "^6.3.6",
|
"vite": "^6.3.6"
|
||||||
"vite-plugin-vuetify": "^2.1.1"
|
|
||||||
},
|
},
|
||||||
"eslintConfig": {
|
"eslintConfig": {
|
||||||
"root": true,
|
"root": true,
|
||||||
@@ -51,4 +49,4 @@
|
|||||||
},
|
},
|
||||||
"rules": {}
|
"rules": {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
492
src/App.vue
492
src/App.vue
@@ -2,9 +2,9 @@
|
|||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
import utc from "dayjs/plugin/utc";
|
import utc from "dayjs/plugin/utc";
|
||||||
import { ref } from "vue";
|
|
||||||
|
|
||||||
import "vue-loading-overlay/dist/css/index.css";
|
import "vue-loading-overlay/dist/css/index.css";
|
||||||
|
import "./theme.css";
|
||||||
|
|
||||||
// Configure day.js with UTC support
|
// Configure day.js with UTC support
|
||||||
dayjs.extend(utc);
|
dayjs.extend(utc);
|
||||||
@@ -16,12 +16,8 @@ export default {
|
|||||||
filter: window.location.href.split("filter=")[1] || "",
|
filter: window.location.href.split("filter=")[1] || "",
|
||||||
sortColumn: this.sortColumn,
|
sortColumn: this.sortColumn,
|
||||||
topics: [],
|
topics: [],
|
||||||
hoveredTopicId: null,
|
|
||||||
tooltipData: {},
|
|
||||||
loadingTooltip: {},
|
|
||||||
tooltipPosition: { x: 0, y: 0 },
|
|
||||||
isMobile: false,
|
isMobile: false,
|
||||||
currentTheme: 'dark',
|
currentTheme: 'auto',
|
||||||
mediaQueryListener: null,
|
mediaQueryListener: null,
|
||||||
vuetifyTheme: null,
|
vuetifyTheme: null,
|
||||||
darkModeQuery: null,
|
darkModeQuery: null,
|
||||||
@@ -32,7 +28,7 @@ export default {
|
|||||||
window.addEventListener("keydown", this.handleKeyDown);
|
window.addEventListener("keydown", this.handleKeyDown);
|
||||||
this.detectMobile();
|
this.detectMobile();
|
||||||
this.fetchDeals();
|
this.fetchDeals();
|
||||||
// Initialize theme on next tick to ensure Vuetify is ready
|
// Initialize theme on next tick
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.initializeTheme();
|
this.initializeTheme();
|
||||||
this.setupThemeListener();
|
this.setupThemeListener();
|
||||||
@@ -47,15 +43,15 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initializeTheme() {
|
initializeTheme() {
|
||||||
// If no saved preference, apply system preference now
|
// If no saved preference, default to auto
|
||||||
const savedTheme = localStorage.getItem('vuetify-theme');
|
const savedTheme = localStorage.getItem('theme');
|
||||||
if (!savedTheme) {
|
if (!savedTheme) {
|
||||||
const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
|
this.currentTheme = 'auto';
|
||||||
const theme = prefersDark ? 'dark' : 'light';
|
this.applyTheme('auto');
|
||||||
this.applyTheme(theme);
|
|
||||||
} else {
|
} else {
|
||||||
// Get current theme name from Vuetify
|
this.currentTheme = savedTheme;
|
||||||
this.currentTheme = this.$vuetify.theme.global.name;
|
// Apply saved theme
|
||||||
|
this.applyTheme(savedTheme);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
setupThemeListener() {
|
setupThemeListener() {
|
||||||
@@ -66,12 +62,12 @@ export default {
|
|||||||
|
|
||||||
// Use arrow function to preserve 'this' context
|
// Use arrow function to preserve 'this' context
|
||||||
const themeChangeHandler = (e) => {
|
const themeChangeHandler = (e) => {
|
||||||
// Only auto-update theme if user hasn't set a preference manually
|
// Only auto-update theme if set to 'auto'
|
||||||
const savedTheme = localStorage.getItem('vuetify-theme');
|
const savedTheme = localStorage.getItem('theme');
|
||||||
if (!savedTheme) {
|
if (savedTheme === 'auto' || !savedTheme) {
|
||||||
const newTheme = e.matches ? 'dark' : 'light';
|
const newTheme = e.matches ? 'dark' : 'light';
|
||||||
console.log('System theme changed to:', newTheme);
|
console.log('System theme changed to:', newTheme);
|
||||||
this.applyTheme(newTheme);
|
this.applyThemeActual(newTheme);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -80,17 +76,44 @@ export default {
|
|||||||
this.themeChangeHandler = themeChangeHandler;
|
this.themeChangeHandler = themeChangeHandler;
|
||||||
this.darkModeQuery = darkModeQuery;
|
this.darkModeQuery = darkModeQuery;
|
||||||
},
|
},
|
||||||
applyTheme(theme) {
|
applyTheme(theme, skipSave = false) {
|
||||||
// Apply theme using Vuetify's theme API
|
|
||||||
this.$vuetify.theme.global.name = theme;
|
|
||||||
this.currentTheme = theme;
|
this.currentTheme = theme;
|
||||||
localStorage.setItem('vuetify-theme', theme);
|
if (!skipSave) {
|
||||||
|
localStorage.setItem('theme', theme);
|
||||||
|
}
|
||||||
|
|
||||||
// Also update data-bs-theme for any custom CSS that uses it
|
// Determine actual theme to apply
|
||||||
document.documentElement.setAttribute('data-bs-theme', theme === 'dark' ? 'dark' : 'light');
|
let actualTheme = theme;
|
||||||
|
if (theme === 'auto') {
|
||||||
|
const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
|
||||||
|
actualTheme = prefersDark ? 'dark' : 'light';
|
||||||
|
}
|
||||||
|
|
||||||
|
this.applyThemeActual(actualTheme);
|
||||||
|
},
|
||||||
|
applyThemeActual(actualTheme) {
|
||||||
|
// Update data-bs-theme attribute for CSS variables to work
|
||||||
|
document.documentElement.setAttribute('data-bs-theme', actualTheme === 'dark' ? 'dark' : 'light');
|
||||||
|
|
||||||
|
// Update HTML class for theme-based CSS selectors
|
||||||
|
if (actualTheme === 'dark') {
|
||||||
|
document.documentElement.classList.add('dark-theme');
|
||||||
|
document.documentElement.classList.remove('light-theme');
|
||||||
|
} else {
|
||||||
|
document.documentElement.classList.add('light-theme');
|
||||||
|
document.documentElement.classList.remove('dark-theme');
|
||||||
|
}
|
||||||
},
|
},
|
||||||
toggleTheme() {
|
toggleTheme() {
|
||||||
const newTheme = this.currentTheme === 'dark' ? 'light' : 'dark';
|
// Cycle through: auto -> light -> dark -> auto
|
||||||
|
let newTheme;
|
||||||
|
if (this.currentTheme === 'auto') {
|
||||||
|
newTheme = 'light';
|
||||||
|
} else if (this.currentTheme === 'light') {
|
||||||
|
newTheme = 'dark';
|
||||||
|
} else {
|
||||||
|
newTheme = 'auto';
|
||||||
|
}
|
||||||
this.applyTheme(newTheme);
|
this.applyTheme(newTheme);
|
||||||
},
|
},
|
||||||
detectMobile() {
|
detectMobile() {
|
||||||
@@ -121,63 +144,7 @@ export default {
|
|||||||
this.$refs.filter.focus();
|
this.$refs.filter.focus();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleTitleHover(topic, event) {
|
|
||||||
// Don't load tooltips on mobile devices
|
|
||||||
if (this.isMobile) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.hoveredTopicId = topic.topic_id;
|
|
||||||
this.tooltipPosition = {
|
|
||||||
x: event.clientX,
|
|
||||||
y: event.clientY,
|
|
||||||
};
|
|
||||||
this.loadTopicDetails(topic.topic_id);
|
|
||||||
},
|
|
||||||
handleTitleLeave() {
|
|
||||||
if (this.isMobile) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.hoveredTopicId = null;
|
|
||||||
},
|
|
||||||
handleMouseMove(event) {
|
|
||||||
if (this.isMobile) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (this.hoveredTopicId !== null) {
|
|
||||||
this.tooltipPosition = {
|
|
||||||
x: event.clientX,
|
|
||||||
y: event.clientY,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
},
|
|
||||||
loadTopicDetails(topicId) {
|
|
||||||
if (!topicId) {
|
|
||||||
console.warn("Topic ID is undefined");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.tooltipData[topicId]) {
|
|
||||||
return; // Already loaded
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.loadingTooltip[topicId]) {
|
|
||||||
return; // Already loading
|
|
||||||
}
|
|
||||||
|
|
||||||
this.loadingTooltip[topicId] = true;
|
|
||||||
|
|
||||||
axios
|
|
||||||
.get(`api/v1/topics/${topicId}`)
|
|
||||||
.then((response) => {
|
|
||||||
this.tooltipData[topicId] = response.data;
|
|
||||||
})
|
|
||||||
.catch((err) => {
|
|
||||||
console.log("Error loading topic details:", err);
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
this.loadingTooltip[topicId] = false;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
createFilterRoute(params) {
|
createFilterRoute(params) {
|
||||||
this.$refs.filter.blur();
|
this.$refs.filter.blur();
|
||||||
history.pushState(
|
history.pushState(
|
||||||
@@ -205,16 +172,18 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
filteredTopics() {
|
filteredTopics() {
|
||||||
return this.topics.filter((row) => {
|
return this.topics
|
||||||
const titles = (
|
.filter((row) => {
|
||||||
row.title.toString() +
|
const titles = (
|
||||||
" [" +
|
row.title.toString() +
|
||||||
row.Offer.dealer_name +
|
" [" +
|
||||||
"]"
|
row.Offer.dealer_name +
|
||||||
).toLowerCase();
|
"]"
|
||||||
const filterTerm = this.filter.toLowerCase();
|
).toLowerCase();
|
||||||
return titles.includes(filterTerm);
|
const filterTerm = this.filter.toLowerCase();
|
||||||
});
|
return titles.includes(filterTerm);
|
||||||
|
})
|
||||||
|
.sort((a, b) => b.score - a.score); // Always sort by score descending
|
||||||
},
|
},
|
||||||
highlightMatches() {
|
highlightMatches() {
|
||||||
return (v) => {
|
return (v) => {
|
||||||
@@ -226,266 +195,113 @@ export default {
|
|||||||
return v.replace(re, (matchedText) => `<mark>${matchedText}</mark>`);
|
return v.replace(re, (matchedText) => `<mark>${matchedText}</mark>`);
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
visibleHeaders() {
|
highlightDealerName() {
|
||||||
const baseHeaders = [
|
return (dealerName) => {
|
||||||
{ title: "Deal", value: "title", align: "center" },
|
if (this.filter == "") return dealerName;
|
||||||
{ title: "Score", value: "score", align: "center" },
|
const matchExists = dealerName.toLowerCase().includes(this.filter.toLowerCase());
|
||||||
];
|
if (!matchExists) return dealerName;
|
||||||
|
|
||||||
// Only show Last Post column on desktop
|
const re = new RegExp(this.filter, "ig");
|
||||||
if (!this.isMobile) {
|
return dealerName.replace(re, (matchedText) => `<mark>${matchedText}</mark>`);
|
||||||
baseHeaders.push({
|
|
||||||
title: "Last Post",
|
|
||||||
value: "last_post_time",
|
|
||||||
align: "center",
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
return baseHeaders;
|
|
||||||
},
|
|
||||||
tooltipStyle() {
|
|
||||||
if (this.hoveredTopicId === null || !this.tooltipData[this.hoveredTopicId]) {
|
|
||||||
return {};
|
|
||||||
}
|
|
||||||
|
|
||||||
let top = this.tooltipPosition.y + 10;
|
|
||||||
let left = this.tooltipPosition.x + 10;
|
|
||||||
const tooltipWidth = 420;
|
|
||||||
|
|
||||||
// Check if tooltip would go off right side of screen
|
|
||||||
if (left + tooltipWidth > window.innerWidth) {
|
|
||||||
// Position to the left of cursor instead
|
|
||||||
left = Math.max(10, this.tooltipPosition.x - tooltipWidth - 10);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Keep tooltip within vertical bounds, allowing scrolling of content
|
|
||||||
top = Math.max(10, Math.min(top, window.innerHeight - 100));
|
|
||||||
|
|
||||||
return {
|
|
||||||
position: 'fixed',
|
|
||||||
left: Math.max(10, left) + 'px',
|
|
||||||
top: top + 'px',
|
|
||||||
zIndex: 9999,
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
getThemeIcon() {
|
||||||
|
if (this.currentTheme === 'auto') {
|
||||||
|
return 'brightness_auto';
|
||||||
|
} else if (this.currentTheme === 'dark') {
|
||||||
|
return 'light_mode';
|
||||||
|
} else {
|
||||||
|
return 'dark_mode';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getThemeTitle() {
|
||||||
|
if (this.currentTheme === 'auto') {
|
||||||
|
return 'Theme: Auto (click for Light)';
|
||||||
|
} else if (this.currentTheme === 'light') {
|
||||||
|
return 'Theme: Light (click for Dark)';
|
||||||
|
} else {
|
||||||
|
return 'Theme: Dark (click for Auto)';
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script setup>
|
|
||||||
const sortBy = ref([{ key: "score", order: "desc" }]);
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<v-app>
|
<div id="app">
|
||||||
<v-main>
|
<link rel="shortcut icon" type="image/png" href="/favicon.png" />
|
||||||
<link rel="shortcut icon" type="image/png" href="/favicon.png" />
|
<div class="container">
|
||||||
<body>
|
<div class="header">
|
||||||
<v-text-field
|
<div class="header-controls">
|
||||||
v-model="filter"
|
<input
|
||||||
label="Filter"
|
v-model="filter"
|
||||||
ref="filter"
|
type="text"
|
||||||
@keyup.enter="createFilterRoute(filter.toString())"
|
placeholder="Filter deals"
|
||||||
@keyup.esc="$refs.filter.blur()"
|
ref="filter"
|
||||||
hide-details="true"
|
@keyup.enter="createFilterRoute(filter.toString())"
|
||||||
/>
|
@keyup.esc="$refs.filter.blur()"
|
||||||
<v-data-table
|
class="search-input"
|
||||||
:headers="visibleHeaders"
|
/>
|
||||||
:items="filteredTopics"
|
<button @click="toggleTheme" class="theme-toggle" :title="getThemeTitle">
|
||||||
:sort-by="sortBy"
|
<span class="material-symbols-outlined">{{ getThemeIcon }}</span>
|
||||||
:items-per-page="50"
|
</button>
|
||||||
>
|
</div>
|
||||||
<template #item.title="{ item }">
|
</div>
|
||||||
<a
|
|
||||||
:href="`https://forums.redflagdeals.com${item.web_path}`"
|
|
||||||
target="_blank"
|
|
||||||
@mouseenter="handleTitleHover(item, $event)"
|
|
||||||
@mouseleave="handleTitleLeave"
|
|
||||||
@mousemove="handleMouseMove"
|
|
||||||
v-html="
|
|
||||||
highlightMatches(
|
|
||||||
item.title
|
|
||||||
)
|
|
||||||
"
|
|
||||||
></a>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<template #item.score="{ item }">
|
<div class="cards-grid">
|
||||||
<span v-if="item.score > 0" class="green-score"
|
<div
|
||||||
>+{{ item.score }}</span
|
v-for="topic in filteredTopics"
|
||||||
>
|
:key="topic.topic_id"
|
||||||
<span v-else-if="item.score < 0" class="red-score">{{
|
class="deal-card"
|
||||||
item.score
|
>
|
||||||
}}</span>
|
<div class="card-header">
|
||||||
<span v-else>{{ item.score }}</span>
|
<div class="title-with-link">
|
||||||
</template>
|
<a
|
||||||
|
:href="`https://forums.redflagdeals.com${topic.web_path}`"
|
||||||
<template #item.last_post_time="{ item }">
|
target="_blank"
|
||||||
{{ formatDate(item.last_post_time) }}
|
class="deal-title"
|
||||||
</template>
|
@click.stop
|
||||||
|
v-html="highlightMatches(topic.title)"
|
||||||
<template #loading>
|
></a>
|
||||||
<v-progress-linear indeterminate color="grey" />
|
<a
|
||||||
</template>
|
v-if="topic.Offer.url"
|
||||||
</v-data-table>
|
:href="topic.Offer.url"
|
||||||
|
target="_blank"
|
||||||
<!-- Tooltip for deal details -->
|
class="card-link"
|
||||||
<div
|
title="Open deal"
|
||||||
v-if="hoveredTopicId !== null && tooltipData[hoveredTopicId]"
|
>
|
||||||
class="deal-tooltip"
|
<span class="material-symbols-outlined">open_in_new</span>
|
||||||
:style="tooltipStyle"
|
</a>
|
||||||
>
|
</div>
|
||||||
<div class="tooltip-content">
|
<div class="score-bubble" :class="{ positive: topic.score > 0, negative: topic.score < 0, neutral: topic.score === 0 }">
|
||||||
<div class="tooltip-stats">
|
<span v-if="topic.score > 0">+{{ topic.score }}</span>
|
||||||
<span class="stat-item">
|
<span v-else>{{ topic.score }}</span>
|
||||||
<span class="material-symbols-outlined">visibility</span>
|
|
||||||
{{ tooltipData[hoveredTopicId].topic.total_views }} views
|
|
||||||
</span>
|
|
||||||
<span class="stat-item">
|
|
||||||
<span class="material-symbols-outlined">chat</span>
|
|
||||||
{{ tooltipData[hoveredTopicId].topic.total_replies }} replies
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div v-if="tooltipData[hoveredTopicId].description" class="tooltip-description">
|
|
||||||
<strong>Description:</strong>
|
|
||||||
{{ tooltipData[hoveredTopicId].description }}
|
|
||||||
</div>
|
</div>
|
||||||
<div class="tooltip-dealer">
|
|
||||||
{{ tooltipData[hoveredTopicId].topic.Offer.dealer_name }}
|
<div class="card-meta">
|
||||||
|
<span class="dealer-name" v-html="highlightDealerName(topic.Offer.dealer_name)"></span>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="tooltipData[hoveredTopicId].first_post" class="tooltip-first-post">
|
|
||||||
<strong>First Post:</strong>
|
<div class="card-details">
|
||||||
{{ tooltipData[hoveredTopicId].first_post }}
|
<div class="details-stats">
|
||||||
</div>
|
<div class="stat">
|
||||||
<div class="tooltip-times">
|
<span class="material-symbols-outlined">visibility</span>
|
||||||
<div>Posted: {{ formatDate(tooltipData[hoveredTopicId].topic.post_time) }}</div>
|
<span class="stat-value">{{ topic.total_views }} views</span>
|
||||||
<div>Last Post: {{ formatDate(tooltipData[hoveredTopicId].topic.last_post_time) }}</div>
|
</div>
|
||||||
|
<div class="stat">
|
||||||
|
<span class="material-symbols-outlined">chat</span>
|
||||||
|
<span class="stat-value">{{ topic.total_replies }} replies</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card-timestamp">
|
||||||
|
Last post: {{ formatDate(topic.last_post_time) }}
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</div>
|
||||||
</v-main>
|
</div>
|
||||||
</v-app>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
#app {
|
|
||||||
font-family: Avenir, Helvetica, Arial, sans-serif;
|
|
||||||
-webkit-font-smoothing: antialiased;
|
|
||||||
-moz-osx-font-smoothing: grayscale;
|
|
||||||
text-align: center;
|
|
||||||
color: #2c3e50;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fixed-bottom {
|
|
||||||
background: #ffc;
|
|
||||||
color: black;
|
|
||||||
}
|
|
||||||
|
|
||||||
.deal-tooltip {
|
|
||||||
pointer-events: none;
|
|
||||||
max-width: 400px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tooltip-content {
|
|
||||||
background: var(--tooltip-bg);
|
|
||||||
border: 2px solid var(--tooltip-border);
|
|
||||||
border-radius: 8px;
|
|
||||||
padding: 16px;
|
|
||||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
||||||
font-size: 13px;
|
|
||||||
color: var(--text-primary);
|
|
||||||
text-align: left;
|
|
||||||
transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tooltip-header {
|
|
||||||
font-weight: bold;
|
|
||||||
font-size: 14px;
|
|
||||||
color: var(--text-primary);
|
|
||||||
margin-bottom: 8px;
|
|
||||||
white-space: normal;
|
|
||||||
word-wrap: break-word;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tooltip-dealer {
|
|
||||||
font-size: 12px;
|
|
||||||
color: var(--text-secondary);
|
|
||||||
margin-bottom: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tooltip-stats {
|
|
||||||
display: flex;
|
|
||||||
gap: 12px;
|
|
||||||
margin-bottom: 8px;
|
|
||||||
font-size: 12px;
|
|
||||||
color: var(--text-secondary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.stat-item {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.stat-item .material-symbols-outlined {
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tooltip-description {
|
|
||||||
margin-bottom: 8px;
|
|
||||||
padding: 8px;
|
|
||||||
background: var(--bg-secondary);
|
|
||||||
border-left: 2px solid var(--tooltip-border);
|
|
||||||
border-radius: 2px;
|
|
||||||
font-size: 12px;
|
|
||||||
white-space: normal;
|
|
||||||
word-wrap: break-word;
|
|
||||||
max-height: 60px;
|
|
||||||
overflow-y: auto;
|
|
||||||
color: var(--text-primary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.tooltip-first-post {
|
|
||||||
margin-bottom: 8px;
|
|
||||||
padding: 8px;
|
|
||||||
background: var(--bg-secondary);
|
|
||||||
border-left: 2px solid var(--tooltip-border);
|
|
||||||
border-radius: 2px;
|
|
||||||
font-size: 12px;
|
|
||||||
white-space: normal;
|
|
||||||
word-wrap: break-word;
|
|
||||||
max-height: 60px;
|
|
||||||
overflow-y: auto;
|
|
||||||
color: var(--text-primary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.tooltip-times {
|
|
||||||
font-size: 11px;
|
|
||||||
color: var(--text-secondary);
|
|
||||||
border-top: 1px solid var(--border-color);
|
|
||||||
padding-top: 8px;
|
|
||||||
margin-top: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Filter input styling */
|
|
||||||
:deep(.v-text-field) {
|
|
||||||
--v-field-border-color: #cccccc;
|
|
||||||
}
|
|
||||||
|
|
||||||
html[data-bs-theme="light"] :deep(.v-text-field) {
|
|
||||||
--v-field-border-color: #e8e8e8;
|
|
||||||
}
|
|
||||||
|
|
||||||
html[data-bs-theme="light"] :deep(.v-field__input) {
|
|
||||||
background-color: #d0d0d0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
html[data-bs-theme="light"] :deep(.v-field--focused .v-field__input) {
|
|
||||||
background-color: #e8e8e8 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
html[data-bs-theme="dark"] :deep(.v-text-field) {
|
|
||||||
--v-field-border-color: #555555;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|||||||
@@ -4,8 +4,6 @@ import { createRouter, createWebHashHistory } from "vue-router";
|
|||||||
|
|
||||||
import "./theme.css";
|
import "./theme.css";
|
||||||
|
|
||||||
import { registerPlugins } from "@/plugins";
|
|
||||||
|
|
||||||
const routes = [
|
const routes = [
|
||||||
{
|
{
|
||||||
path: '/:pathMatch(.*)*',
|
path: '/:pathMatch(.*)*',
|
||||||
@@ -20,7 +18,5 @@ const router = createRouter({
|
|||||||
|
|
||||||
const app = createApp(App);
|
const app = createApp(App);
|
||||||
|
|
||||||
registerPlugins(app);
|
|
||||||
|
|
||||||
app.use(router);
|
app.use(router);
|
||||||
app.mount("#app");
|
app.mount("#app");
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
# Plugins
|
|
||||||
|
|
||||||
Plugins are a way to extend the functionality of your Vue application. Use this folder for registering plugins that you want to use globally.
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
/**
|
|
||||||
* plugins/index.js
|
|
||||||
*
|
|
||||||
* Automatically included in `./src/main.js`
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Plugins
|
|
||||||
import vuetify from './vuetify'
|
|
||||||
|
|
||||||
export function registerPlugins (app) {
|
|
||||||
app.use(vuetify)
|
|
||||||
}
|
|
||||||
@@ -1,68 +0,0 @@
|
|||||||
/**
|
|
||||||
* plugins/vuetify.js
|
|
||||||
*
|
|
||||||
* Framework documentation: https://vuetifyjs.com
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Styles
|
|
||||||
import "@mdi/font/css/materialdesignicons.css";
|
|
||||||
import "vuetify/styles";
|
|
||||||
|
|
||||||
// Composables
|
|
||||||
import { createVuetify } from "vuetify";
|
|
||||||
|
|
||||||
const lightTheme = {
|
|
||||||
dark: false,
|
|
||||||
colors: {
|
|
||||||
background: "#ffffff",
|
|
||||||
surface: "#f5f5f5",
|
|
||||||
primary: "#1976d2",
|
|
||||||
secondary: "#424242",
|
|
||||||
accent: "#82b1ff",
|
|
||||||
error: "#f44336",
|
|
||||||
info: "#2196f3",
|
|
||||||
success: "#4caf50",
|
|
||||||
warning: "#ff9800",
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
const darkTheme = {
|
|
||||||
dark: true,
|
|
||||||
colors: {
|
|
||||||
background: "#1a1a1a",
|
|
||||||
surface: "#2a2a2a",
|
|
||||||
primary: "#5b9cf5",
|
|
||||||
secondary: "#a0a0a0",
|
|
||||||
accent: "#7aa2f7",
|
|
||||||
error: "#f87171",
|
|
||||||
info: "#60a5fa",
|
|
||||||
success: "#4ade80",
|
|
||||||
warning: "#facc15",
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
function getDefaultTheme() {
|
|
||||||
// Check for saved theme preference
|
|
||||||
const savedTheme = localStorage.getItem('vuetify-theme');
|
|
||||||
if (savedTheme) {
|
|
||||||
return savedTheme;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check system preference
|
|
||||||
const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
|
|
||||||
return prefersDark ? 'dark' : 'light';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create vuetify instance
|
|
||||||
const vuetify = createVuetify({
|
|
||||||
theme: {
|
|
||||||
defaultTheme: getDefaultTheme(),
|
|
||||||
themes: {
|
|
||||||
light: lightTheme,
|
|
||||||
dark: darkTheme,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
// Export the vuetify instance so other parts of the app can access it
|
|
||||||
export { vuetify as default };
|
|
||||||
471
src/theme.css
471
src/theme.css
@@ -15,18 +15,12 @@
|
|||||||
/* Theme-aware CSS variables */
|
/* Theme-aware CSS variables */
|
||||||
:root {
|
:root {
|
||||||
/* Light theme (default) */
|
/* Light theme (default) */
|
||||||
--bg-primary: #ffffff;
|
--bg-primary: #dddddd;
|
||||||
--bg-secondary: #f5f5f5;
|
--bg-secondary: #e8e8e8;
|
||||||
--text-primary: #212529;
|
--text-primary: #212529;
|
||||||
--text-secondary: #6c757d;
|
--text-secondary: #6c757d;
|
||||||
--border-color: #dee2e6;
|
--border-color: #d0d0d0;
|
||||||
--tooltip-bg: #f8f9fa;
|
--link-color: #212529;
|
||||||
--tooltip-border: #dee2e6;
|
|
||||||
--tooltip-text: #212529;
|
|
||||||
--link-color: #0d6efd;
|
|
||||||
--link-visited: #990000;
|
|
||||||
--footer-bg: #f8f9fa;
|
|
||||||
--footer-text: #212529;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Dark theme */
|
/* Dark theme */
|
||||||
@@ -37,13 +31,7 @@
|
|||||||
--text-primary: #e0e0e0;
|
--text-primary: #e0e0e0;
|
||||||
--text-secondary: #a0a0a0;
|
--text-secondary: #a0a0a0;
|
||||||
--border-color: #3a3a3a;
|
--border-color: #3a3a3a;
|
||||||
--tooltip-bg: #2a2a2a;
|
--link-color: #212529;
|
||||||
--tooltip-border: #444444;
|
|
||||||
--tooltip-text: #e0e0e0;
|
|
||||||
--link-color: #5b9cf5;
|
|
||||||
--link-visited: #990000;
|
|
||||||
--footer-bg: #1a1a1a;
|
|
||||||
--footer-text: #e0e0e0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -54,35 +42,17 @@ html[data-bs-theme="dark"] {
|
|||||||
--text-primary: #e0e0e0;
|
--text-primary: #e0e0e0;
|
||||||
--text-secondary: #a0a0a0;
|
--text-secondary: #a0a0a0;
|
||||||
--border-color: #3a3a3a;
|
--border-color: #3a3a3a;
|
||||||
--tooltip-bg: #2a2a2a;
|
--link-color: #e0e0e0;
|
||||||
--tooltip-border: #444444;
|
|
||||||
--tooltip-text: #e0e0e0;
|
|
||||||
--link-color: #e8e8e8;
|
|
||||||
--link-visited: #990000;
|
|
||||||
--footer-bg: #1a1a1a;
|
|
||||||
--footer-text: #e0e0e0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
html[data-bs-theme="light"] {
|
html[data-bs-theme="light"],
|
||||||
--bg-primary: #ffffff;
|
html.light-theme {
|
||||||
--bg-secondary: #f5f5f5;
|
--bg-primary: #dddddd;
|
||||||
|
--bg-secondary: #e8e8e8;
|
||||||
--text-primary: #212529;
|
--text-primary: #212529;
|
||||||
--text-secondary: #6c757d;
|
--text-secondary: #6c757d;
|
||||||
--border-color: #dee2e6;
|
--border-color: #d0d0d0;
|
||||||
--tooltip-bg: #f8f9fa;
|
--link-color: #212529;
|
||||||
--tooltip-border: #dee2e6;
|
|
||||||
--tooltip-text: #212529;
|
|
||||||
--link-color: #333333;
|
|
||||||
--link-visited: #990000;
|
|
||||||
--footer-bg: #f8f9fa;
|
|
||||||
--footer-text: #212529;
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
|
||||||
max-width: 100%;
|
|
||||||
background-color: var(--bg-primary);
|
|
||||||
color: var(--text-primary);
|
|
||||||
transition: background-color 0.3s ease, color 0.3s ease;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
html {
|
html {
|
||||||
@@ -90,23 +60,17 @@ html {
|
|||||||
min-width: 100%;
|
min-width: 100%;
|
||||||
-webkit-text-size-adjust: 100%;
|
-webkit-text-size-adjust: 100%;
|
||||||
-ms-text-size-adjust: 100%;
|
-ms-text-size-adjust: 100%;
|
||||||
|
background-color: var(--bg-primary);
|
||||||
|
color: var(--text-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
footer {
|
body {
|
||||||
background: var(--footer-bg);
|
max-width: 100%;
|
||||||
color: var(--footer-text);
|
background-color: var(--bg-primary);
|
||||||
padding: 3px;
|
color: var(--text-primary);
|
||||||
padding-right: 10px;
|
transition: background-color 0.3s ease, color 0.3s ease;
|
||||||
padding-left: 10px;
|
margin: 0;
|
||||||
border-top: 1px solid var(--border-color);
|
padding: 0;
|
||||||
}
|
|
||||||
|
|
||||||
.footer-left {
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.footer-right {
|
|
||||||
float: right;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.green-score {
|
.green-score {
|
||||||
@@ -130,103 +94,318 @@ a {
|
|||||||
transition: color 0.2s ease;
|
transition: color 0.2s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
a:visited {
|
a:visited {
|
||||||
color: var(--link-visited);
|
color: var(--link-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: 769px) {
|
/* App styles */
|
||||||
.v-data-table-header th,
|
|
||||||
.v-data-table__td,
|
.container {
|
||||||
.v-data-footer {
|
max-width: 1200px;
|
||||||
font-size: 1.2rem;
|
margin: 0 auto;
|
||||||
|
padding: 20px;
|
||||||
|
background-color: var(--bg-primary);
|
||||||
|
color: var(--text-primary);
|
||||||
|
min-height: 100vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header {
|
||||||
|
margin-bottom: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-controls {
|
||||||
|
display: flex;
|
||||||
|
gap: 12px;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-input {
|
||||||
|
flex: 1;
|
||||||
|
max-width: 500px;
|
||||||
|
padding: 10px 12px;
|
||||||
|
font-size: 14px;
|
||||||
|
border: 1px solid #cccccc;
|
||||||
|
border-radius: 4px;
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
color: var(--text-primary);
|
||||||
|
transition: all 0.2s ease;
|
||||||
|
font-family: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-input:focus {
|
||||||
|
outline: none;
|
||||||
|
border-color: #999999;
|
||||||
|
background-color: #ffffff;
|
||||||
|
box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
|
||||||
|
}
|
||||||
|
|
||||||
|
html.dark-theme .search-input {
|
||||||
|
border-color: #555555;
|
||||||
|
background-color: #1a1a1a;
|
||||||
|
color: #e0e0e0;
|
||||||
|
}
|
||||||
|
|
||||||
|
html.dark-theme .search-input:focus {
|
||||||
|
background-color: #2a2a2a;
|
||||||
|
border-color: #777777;
|
||||||
|
box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-input::placeholder {
|
||||||
|
color: var(--text-secondary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.theme-toggle {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
border: 1px solid #cccccc;
|
||||||
|
border-radius: 4px;
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
color: var(--text-primary);
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.2s ease;
|
||||||
|
font-size: 18px;
|
||||||
|
padding: 0;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.theme-toggle:hover {
|
||||||
|
background-color: #e8e8e8;
|
||||||
|
border-color: #999999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.theme-toggle:active {
|
||||||
|
transform: scale(0.95);
|
||||||
|
}
|
||||||
|
|
||||||
|
html.dark-theme .theme-toggle {
|
||||||
|
border-color: #555555;
|
||||||
|
background-color: #1a1a1a;
|
||||||
|
color: #e0e0e0;
|
||||||
|
}
|
||||||
|
|
||||||
|
html.dark-theme .theme-toggle:hover {
|
||||||
|
background-color: #2a2a2a;
|
||||||
|
border-color: #777777;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cards-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
|
||||||
|
gap: 20px;
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.deal-card {
|
||||||
|
background-color: var(--bg-secondary);
|
||||||
|
border: 1.5px solid #aaaaaa;
|
||||||
|
border-radius: 12px;
|
||||||
|
padding: 16px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
transition: all 0.2s ease;
|
||||||
|
min-height: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.deal-card:hover {
|
||||||
|
background-color: #15151515;
|
||||||
|
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
||||||
|
border-color: #999999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-header {
|
||||||
|
display: flex;
|
||||||
|
gap: 12px;
|
||||||
|
align-items: flex-start;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title-with-link {
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-start;
|
||||||
|
gap: 6px;
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.deal-title {
|
||||||
|
color: var(--link-color);
|
||||||
|
text-decoration: none;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 15px;
|
||||||
|
line-height: 1.4;
|
||||||
|
flex: 1;
|
||||||
|
transition: color 0.2s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.deal-title:visited {
|
||||||
|
color: var(--link-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.deal-title:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-meta {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 6px;
|
||||||
|
font-size: 13px;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dealer-name {
|
||||||
|
color: var(--text-secondary);
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-timestamp {
|
||||||
|
color: var(--text-secondary);
|
||||||
|
font-size: 12px;
|
||||||
|
margin-top: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-link {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
color: var(--link-color);
|
||||||
|
text-decoration: none;
|
||||||
|
transition: all 0.2s ease;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-link:hover {
|
||||||
|
opacity: 0.7;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-link .material-symbols-outlined {
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.score-bubble {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
min-width: 50px;
|
||||||
|
height: 40px;
|
||||||
|
border-radius: 6px;
|
||||||
|
font-weight: 700;
|
||||||
|
font-size: 12px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
transition: all 0.2s ease;
|
||||||
|
padding: 0 8px;
|
||||||
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.score-bubble.positive {
|
||||||
|
background-color: rgb(34, 139, 34);
|
||||||
|
color: white;
|
||||||
|
box-shadow: 0 1px 3px rgba(34, 139, 34, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
html.light-theme .score-bubble.positive {
|
||||||
|
background-color: rgb(34, 139, 34);
|
||||||
|
color: white;
|
||||||
|
box-shadow: 0 1px 3px rgba(34, 139, 34, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
html.dark-theme .score-bubble.positive {
|
||||||
|
background-color: rgb(158, 206, 106);
|
||||||
|
color: #1a1a1a;
|
||||||
|
box-shadow: 0 1px 3px rgba(158, 206, 106, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.score-bubble.negative {
|
||||||
|
background-color: rgb(247, 118, 142);
|
||||||
|
color: white;
|
||||||
|
box-shadow: 0 1px 3px rgba(247, 118, 142, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.score-bubble.neutral {
|
||||||
|
background-color: var(--text-secondary);
|
||||||
|
color: var(--bg-primary);
|
||||||
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-details {
|
||||||
|
margin-top: 12px;
|
||||||
|
padding-top: 12px;
|
||||||
|
border-top: 1px solid var(--border-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.details-stats {
|
||||||
|
display: flex;
|
||||||
|
gap: 16px;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.stat {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 6px;
|
||||||
|
font-size: 13px;
|
||||||
|
color: var(--text-secondary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.stat .material-symbols-outlined {
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.stat-value {
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.details-section {
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.details-section strong {
|
||||||
|
display: block;
|
||||||
|
color: var(--text-primary);
|
||||||
|
margin-bottom: 4px;
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.details-section p {
|
||||||
|
margin: 0;
|
||||||
|
color: var(--text-secondary);
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: 1.4;
|
||||||
|
word-wrap: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Mobile responsive */
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.cards-grid {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
padding: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-input {
|
||||||
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Tooltip theme support */
|
/* Mark highlighting */
|
||||||
.deal-tooltip {
|
mark {
|
||||||
pointer-events: none;
|
background-color: rgba(255, 193, 7, 0.3);
|
||||||
max-width: 400px;
|
color: inherit;
|
||||||
}
|
font-weight: 600;
|
||||||
|
|
||||||
.tooltip-content {
|
|
||||||
background: var(--tooltip-bg);
|
|
||||||
border: 2px solid var(--tooltip-border);
|
|
||||||
border-radius: 8px;
|
|
||||||
padding: 16px;
|
|
||||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
||||||
font-size: 13px;
|
|
||||||
color: var(--tooltip-text);
|
|
||||||
text-align: left;
|
|
||||||
transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tooltip-header {
|
|
||||||
font-weight: bold;
|
|
||||||
font-size: 14px;
|
|
||||||
color: var(--text-primary);
|
|
||||||
margin-bottom: 8px;
|
|
||||||
white-space: normal;
|
|
||||||
word-wrap: break-word;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tooltip-dealer {
|
|
||||||
font-size: 12px;
|
|
||||||
color: var(--text-secondary);
|
|
||||||
margin-bottom: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tooltip-stats {
|
|
||||||
display: flex;
|
|
||||||
gap: 12px;
|
|
||||||
margin-bottom: 8px;
|
|
||||||
font-size: 12px;
|
|
||||||
color: var(--text-secondary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.stat-item {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.stat-item .material-symbols-outlined {
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tooltip-description {
|
|
||||||
margin-bottom: 8px;
|
|
||||||
padding: 8px;
|
|
||||||
background: var(--bg-secondary);
|
|
||||||
border-left: 2px solid var(--tooltip-border);
|
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
font-size: 12px;
|
|
||||||
white-space: normal;
|
|
||||||
word-wrap: break-word;
|
|
||||||
max-height: 60px;
|
|
||||||
overflow-y: auto;
|
|
||||||
color: var(--text-primary);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.tooltip-first-post {
|
html.dark-theme mark {
|
||||||
margin-bottom: 8px;
|
background-color: rgba(255, 193, 7, 0.4);
|
||||||
padding: 8px;
|
color: inherit;
|
||||||
background: var(--bg-secondary);
|
font-weight: 600;
|
||||||
border-left: 2px solid var(--tooltip-border);
|
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
font-size: 12px;
|
|
||||||
white-space: normal;
|
|
||||||
word-wrap: break-word;
|
|
||||||
max-height: 60px;
|
|
||||||
overflow-y: auto;
|
|
||||||
color: var(--text-primary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.tooltip-times {
|
|
||||||
font-size: 11px;
|
|
||||||
color: var(--text-secondary);
|
|
||||||
border-top: 1px solid var(--border-color);
|
|
||||||
padding-top: 8px;
|
|
||||||
margin-top: 8px;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
// Plugins
|
// Plugins
|
||||||
import Components from "unplugin-vue-components/vite";
|
import Components from "unplugin-vue-components/vite";
|
||||||
import Vue from "@vitejs/plugin-vue";
|
import Vue from "@vitejs/plugin-vue";
|
||||||
import Vuetify, { transformAssetUrls } from "vite-plugin-vuetify";
|
|
||||||
|
|
||||||
// Utilities
|
// Utilities
|
||||||
import { defineConfig } from "vite";
|
import { defineConfig } from "vite";
|
||||||
@@ -10,16 +9,9 @@ import { fileURLToPath, URL } from "node:url";
|
|||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [
|
plugins: [
|
||||||
Vue({
|
Vue(),
|
||||||
template: { transformAssetUrls },
|
|
||||||
}),
|
|
||||||
Vuetify(),
|
|
||||||
Components(),
|
Components(),
|
||||||
],
|
],
|
||||||
optimizeDeps: {
|
|
||||||
exclude: ["vuetify"],
|
|
||||||
include: ["axios", "vue-router", "vue-loading-overlay"],
|
|
||||||
},
|
|
||||||
define: { "process.env": {} },
|
define: { "process.env": {} },
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
@@ -54,7 +46,6 @@ export default defineConfig({
|
|||||||
rollupOptions: {
|
rollupOptions: {
|
||||||
output: {
|
output: {
|
||||||
manualChunks: {
|
manualChunks: {
|
||||||
"vuetify": ["vuetify"],
|
|
||||||
"vendor": ["axios", "dayjs", "vue-router", "vue-loading-overlay"],
|
"vendor": ["axios", "dayjs", "vue-router", "vue-loading-overlay"],
|
||||||
},
|
},
|
||||||
chunkFileNames: "js/[name].[hash].js",
|
chunkFileNames: "js/[name].[hash].js",
|
||||||
@@ -76,4 +67,4 @@ export default defineConfig({
|
|||||||
chunkSizeWarningLimit: 1000,
|
chunkSizeWarningLimit: 1000,
|
||||||
reportCompressedSize: true,
|
reportCompressedSize: true,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
Reference in New Issue
Block a user