mirror of
https://github.com/Spythere/pojazdownik.git
synced 2026-05-04 12:08:12 +00:00
chore: minor stock naming improvements
This commit is contained in:
@@ -242,7 +242,7 @@ export default defineComponent({
|
|||||||
saveStockDataToStorage() {
|
saveStockDataToStorage() {
|
||||||
if (this.store.stockList.length == 0) return;
|
if (this.store.stockList.length == 0) return;
|
||||||
|
|
||||||
const defaultName = `${this.store.stockList[0].vehicleRef.type} ${(this.store.totalWeight / 1000).toFixed(1)}t; ${this.store.totalLength}m; vmax ${this.store.maxStockSpeed}`;
|
const defaultName = this.fileUtils.getCurrentStockFileName();
|
||||||
const entryName = prompt(this.$t('stocklist.prompt-bookmark'), defaultName);
|
const entryName = prompt(this.$t('stocklist.prompt-bookmark'), defaultName);
|
||||||
|
|
||||||
if (!entryName) return;
|
if (!entryName) return;
|
||||||
|
|||||||
@@ -10,9 +10,8 @@
|
|||||||
{{ store.chosenStorageStockName.slice(0, 40) }}
|
{{ store.chosenStorageStockName.slice(0, 40) }}
|
||||||
{{ store.chosenStorageStockName.length > 41 ? '...' : '' }}
|
{{ store.chosenStorageStockName.length > 41 ? '...' : '' }}
|
||||||
</span>
|
</span>
|
||||||
|
|
|
||||||
</b>
|
</b>
|
||||||
|
<span v-if="store.chosenStorageStockName && chosenRealComposition"> | </span>
|
||||||
<b class="real-stock-info" v-if="chosenRealComposition">
|
<b class="real-stock-info" v-if="chosenRealComposition">
|
||||||
<span class="text--accent">
|
<span class="text--accent">
|
||||||
<img :src="getIconURL(chosenRealComposition.type)" :alt="chosenRealComposition.type" />
|
<img :src="getIconURL(chosenRealComposition.type)" :alt="chosenRealComposition.type" />
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ export const useFileUtils = () => {
|
|||||||
|
|
||||||
// Append real composition to the name if chosen
|
// Append real composition to the name if chosen
|
||||||
if (currentRealComp != undefined) {
|
if (currentRealComp != undefined) {
|
||||||
fileName += currentRealComp.stockId;
|
fileName += `${currentRealComp.stockId} `;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Append default props
|
// Append default props
|
||||||
|
|||||||
Reference in New Issue
Block a user