mirror of
https://github.com/Spythere/station-manager-2.0.git
synced 2026-05-04 05:58:13 +00:00
feature: vmax i dł. szlaków
This commit is contained in:
+26
-22
@@ -1,22 +1,26 @@
|
||||
import { defineComponent } from 'vue';
|
||||
import { SceneryRowItem } from '../types/types';
|
||||
|
||||
export default defineComponent({
|
||||
methods: {
|
||||
getRouteNames(routes: SceneryRowItem['routes']) {
|
||||
return routes
|
||||
.split(';')
|
||||
.map((route) => {
|
||||
// !Oc_2EPB
|
||||
const props1 = route.split('_')[0];
|
||||
const props2 = route.split('_')[1];
|
||||
const isInternal = props1.startsWith('!');
|
||||
const name = isInternal ? props1.replace('!', '') : props1;
|
||||
return `${isInternal ? '<u>' + name + '</u>' : name} <span style='color: #aaa'>(${props2[0]}/${props2[1]}/${
|
||||
props2[2]
|
||||
}${props2[3] ? '/B' : ''})</span>`;
|
||||
})
|
||||
.join(', ');
|
||||
},
|
||||
},
|
||||
});
|
||||
import { defineComponent } from 'vue';
|
||||
import { SceneryRowItem } from '../types/types';
|
||||
|
||||
export default defineComponent({
|
||||
methods: {
|
||||
getRouteNames(routes: SceneryRowItem['routes'], showAdditional = false) {
|
||||
return routes
|
||||
.split(';')
|
||||
.map((route) => {
|
||||
// !Oc_2EPB
|
||||
const [_, speed, length] = route.split(':');
|
||||
|
||||
const props1 = route.split('_')[0];
|
||||
const props2 = route.split('_')[1];
|
||||
const isInternal = props1.startsWith('!');
|
||||
const name = isInternal ? props1.replace('!', '') : props1;
|
||||
return `<span ${speed != '0' && length != '0' ? 'class="text--accent"' : ''}>${
|
||||
isInternal ? '<u>' + name + '</u>' : name
|
||||
}</span> <span style='color: #aaa'>(${props2[0]}/${props2[1]}/${props2[2]}${props2[3] == 'B' ? '/B' : ''}${
|
||||
speed && showAdditional ? '/' + speed : ''
|
||||
}${length && showAdditional ? '/' + length : ''})</span>`;
|
||||
})
|
||||
.join(', ');
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user