-
+
+
-
-
- -
-
+
+ -
+
![]()
-
-
{{ rStock.name }}
+
{{ rStock.name }}
{{ rStock.number }}
-
-
+
+
+
+
![]()
(e.target as HTMLElement).style.opacity = '1'"
/>
-
+
+
+
+
+
+
+
@@ -56,7 +76,6 @@
@@ -144,20 +192,14 @@ export default defineComponent({
.exit-btn {
font-size: 1.2em;
- margin: 0.5em 0;
-}
-
-input {
- width: 100%;
- max-width: 250px;
-
- &::placeholder {
- font-size: 0.9em;
- text-align: center;
- }
+ margin: 0.25em 0;
}
.card_content {
+ display: grid;
+ grid-template-rows: auto 1fr auto;
+ gap: 0.5em;
+
background-color: #1c1c1c;
border-radius: 1em;
@@ -167,38 +209,30 @@ input {
padding: 0 1em;
- overflow-y: auto;
z-index: 100;
}
+.top-pane {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+
+ h1 {
+ color: #aaa;
+ }
+}
.top-sticky {
position: sticky;
top: 0;
background: #1c1c1c;
}
-.header {
- padding-bottom: 1.5em;
- padding-top: 0.5em;
+.filters {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 0.5em;
- text-align: center;
- font-size: 1.3em;
-
- h1 {
- line-height: 0.9em;
- margin: 0.5em 0;
-
- div {
- font-size: 0.65em;
- color: #ccc;
- }
- }
-
- p {
- margin: 1em 0;
- color: #999;
- font-size: 0.95em;
- }
+ padding: 0.5em 0;
}
ul {
@@ -206,32 +240,19 @@ ul {
flex-direction: column;
gap: 0.5em;
+ overflow: auto;
+
li {
display: grid;
grid-template-columns: 1fr 2fr;
+ background: #2b2b2b;
+ gap: 1rem;
.desc {
cursor: pointer;
padding: 0.5em;
}
- .thumbnails {
- display: flex;
- align-items: flex-end;
-
- overflow: auto;
- padding: 0.5em;
-
- img {
- // width: 150px;
- height: 100%;
- max-height: 20px;
- vertical-align: middle;
- }
- }
-
- background: #2b2b2b;
-
img {
height: 0.85em;
}
@@ -250,5 +271,36 @@ ul {
}
}
}
+
+.thumbnails {
+ display: flex;
+ align-items: flex-end;
+
+ width: 100%;
+
+ overflow: auto;
+ padding: 0.5em;
+
+ // img {
+ // // width: 150px;
+ // height: 100%;
+ // max-height: 20px;
+ // vertical-align: middle;
+ // }
+}
+
+.thumbnail_container {
+ // position: relative;
+ // width: 100%;
+ // height: 0;
+
+ img {
+ // position: absolute;
+ // top: 0;
+ // left: 0;
+ // width: 100%;
+ height: 30px;
+ }
+}
diff --git a/src/components/tabs/StockListTab.vue b/src/components/tabs/StockListTab.vue
index 82663ad..06e14c9 100644
--- a/src/components/tabs/StockListTab.vue
+++ b/src/components/tabs/StockListTab.vue
@@ -162,7 +162,8 @@ export default defineComponent({
setup() {
const store = useStore();
-
+
+
return {
store,
};
diff --git a/src/store.ts b/src/store.ts
index 36d26e4..c35932c 100644
--- a/src/store.ts
+++ b/src/store.ts
@@ -29,7 +29,7 @@ export const useStore = defineStore({
stockList: [],
cargoOptions: [],
- readyStockList: {},
+ readyStockList: [],
swapVehicles: false,
diff --git a/src/types.ts b/src/types.ts
index 9786c80..0b4151d 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -15,7 +15,7 @@ export interface IStore {
chosenCarUseType: string;
stockList: IStock[];
- readyStockList: IReadyStockList;
+ readyStockList: IReadyStockItem[];
cargoOptions: any[][];
chosenStockListIndex: number;
@@ -109,11 +109,10 @@ export interface IStock {
imgSrc?: string;
}
-export interface IReadyStockList {
- [key: string]: { stockString: string; type: string; number: string; name: string };
+export interface IReadyStockItem {
+ stockString: string;
+ type: string;
+ number: string;
+ name: string;
}
-
-
-
-
diff --git a/src/utils/vehicleUtils.ts b/src/utils/vehicleUtils.ts
index 602be1e..0588063 100644
--- a/src/utils/vehicleUtils.ts
+++ b/src/utils/vehicleUtils.ts
@@ -152,9 +152,7 @@ export function chosenRealStock(state: IStore) {
}, [] as string[])
.join(';');
- const realStockObj = Object.values(state.readyStockList).find(
- (readyStock) => readyStock.stockString == currentStockString
- );
+ const realStockObj = state.readyStockList.find((readyStock) => readyStock.stockString == currentStockString);
state.chosenRealStockName = realStockObj
? `${realStockObj.type} ${realStockObj.number} ${realStockObj.name}`
diff --git a/vite.config.ts b/vite.config.ts
index 904372e..95831bf 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -12,11 +12,13 @@ export default defineConfig({
vue(),
VitePWA({
registerType: 'autoUpdate',
+
workbox: {
- globPatterns: ['**/*.{js,css,html,png,svg,img}'],
+ // globPatterns: ['**/*.{js,css,html,png,svg,img}'],
+
runtimeCaching: [
{
- urlPattern: new RegExp(`^https://rj.td2.info.pl/dist/img/thumbnails/.*`),
+ urlPattern: /^https:\/\/rj.td2.info.pl\/dist\/img\/thumbnails\/.*/i,
handler: 'CacheFirst',
options: {
cacheName: 'swdr-images-cache',
@@ -31,10 +33,8 @@ export default defineConfig({
},
],
},
- devOptions: {
- enabled: true,
- },
}),
],
});
+