Skip to content

Commit

Permalink
⚰️ remove unused file do to upgrade dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
JAGFx committed Jul 7, 2022
1 parent 305b761 commit 3b4e08c
Show file tree
Hide file tree
Showing 13 changed files with 107 additions and 120 deletions.
53 changes: 27 additions & 26 deletions src/components/header/HeaderGameInformation.vue
Expand Up @@ -139,11 +139,12 @@
</template>

<script>
import scsSDKData from 'ets2-dashboard-lib/sdk/scs_sdk_plugin_parsed_data.json';
import TelemetryMixin from '@/mixins/TelemetryMixin';
import { app, history } from '@/utils/utils';
import * as axios from 'axios';
import { mapGetters } from 'vuex';
import { isOnDevEnvironment, version } from "@/utils/_app";
import { HTY_LEVEL, HTY_ZONE } from "@/utils/_history";
import scsSDKData from 'ets2-dashboard-lib/sdk/scs_sdk_plugin_parsed_data.json';
import TelemetryMixin from '@/mixins/TelemetryMixin';
import * as axios from 'axios';
import { mapGetters } from 'vuex';
export default {
name: 'HeaderGameInformation',
Expand All @@ -168,27 +169,27 @@ export default {
)
.then((data) => {
const latestReleaseVersion = data.data.tag_name;
const appVersion = `v${app.version}`;
const appVersion = `v${version}`;
if (latestReleaseVersion !== appVersion)
this.newReleaseAvailable = true;
});
},
methods: {
getVersion() {
return app.version;
return version;
},
isOnDevEnvironment() {
return app.isOnDevEnvironment;
return isOnDevEnvironment;
},
onEventChange() {
const spitedEvent = this.event.split('.');
let rawData = scsSDKData.events[spitedEvent[0]][spitedEvent[1]];
this.$pushALog(
'Throw event ' + this.event,
history.HTY_ZONE.ZONE_GAME,
history.HTY_LEVEL.DEBUG
HTY_ZONE.ZONE_GAME,
HTY_LEVEL.DEBUG
);
this.$updateEvent({
Expand All @@ -199,8 +200,8 @@ export default {
onClickGear() {
this.$pushALog(
'Menu toggle',
history.HTY_ZONE.ZONE_GAME,
history.HTY_LEVEL.DEBUG
HTY_ZONE.ZONE_GAME,
HTY_LEVEL.DEBUG
);
this.$store.dispatch('menu/toggle');
Expand All @@ -218,8 +219,8 @@ export default {
this.$pushALog(
'Enable fullscreen',
history.HTY_ZONE.ZONE_GAME,
history.HTY_LEVEL.DEBUG
HTY_ZONE.ZONE_GAME,
HTY_LEVEL.DEBUG
);
} else {
// Disable fullscreen
Expand All @@ -231,8 +232,8 @@ export default {
this.$pushALog(
'Disable fullscreen',
history.HTY_ZONE.ZONE_GAME,
history.HTY_LEVEL.DEBUG
HTY_ZONE.ZONE_GAME,
HTY_LEVEL.DEBUG
);
}
Expand All @@ -243,13 +244,13 @@ export default {
switchAwakeScreen() {
this.$pushALog(
'Wake Lock API support: ' + ('wakeLock' in navigator),
history.HTY_ZONE.ZONE_GAME,
history.HTY_LEVEL.DEBUG
HTY_ZONE.ZONE_GAME,
HTY_LEVEL.DEBUG
);
this.$pushALog(
'Screen Keep awake support: ' + ('keepAwake' in screen),
history.HTY_ZONE.ZONE_GAME,
history.HTY_LEVEL.DEBUG
HTY_ZONE.ZONE_GAME,
HTY_LEVEL.DEBUG
);
if ('wakeLock' in navigator) this.useWakeLock();
Expand All @@ -259,8 +260,8 @@ export default {
useVueInsomnia() {
this.$pushALog(
'Awake screen - Use VueInsomnia',
history.HTY_ZONE.ZONE_GAME,
history.HTY_LEVEL.DEBUG
HTY_ZONE.ZONE_GAME,
HTY_LEVEL.DEBUG
);
if (!this.fullscreen) this.vueInsomnia().on();
Expand All @@ -269,8 +270,8 @@ export default {
useWakeLock() {
this.$pushALog(
'Awake screen - Use WakeLock API',
history.HTY_ZONE.ZONE_GAME,
history.HTY_LEVEL.DEBUG
HTY_ZONE.ZONE_GAME,
HTY_LEVEL.DEBUG
);
if (!this.fullscreen)
Expand All @@ -282,8 +283,8 @@ export default {
useScreenAwake() {
this.$pushALog(
'Awake screen - Use Screen Awake API',
history.HTY_ZONE.ZONE_GAME,
history.HTY_LEVEL.DEBUG
HTY_ZONE.ZONE_GAME,
HTY_LEVEL.DEBUG
);
screen.keepAwake = this.fullscreen;
}
Expand Down
10 changes: 5 additions & 5 deletions src/components/menu/Menu.vue
Expand Up @@ -17,10 +17,10 @@
</template>

<script>
import MenuTabAbout from '@/components/menu/MenuTabAbout';
import MenuTabAbout from '@/components/menu/MenuTabAbout';
import MenuTabConfig from '@/components/menu/MenuTabConfig';
import MenuTabSkins from '@/components/menu/MenuTabSkins';
import { history } from '@/utils/utils';
import MenuTabSkins from '@/components/menu/MenuTabSkins';
import { HTY_LEVEL, HTY_ZONE } from "@/utils/_history";
export default {
name: 'Menu',
Expand All @@ -44,8 +44,8 @@ export default {
onClickSwitchTab(tab) {
this.$pushALog(
'Switch tab to ' + tab,
history.HTY_ZONE.MENU,
history.HTY_LEVEL.DEBUG
HTY_ZONE.MENU,
HTY_LEVEL.DEBUG
);
this.currentTab = tab;
Expand Down
32 changes: 16 additions & 16 deletions src/components/menu/MenuTabConfig.vue
Expand Up @@ -83,15 +83,16 @@
</template>

<script>
import ConfigCategoryEvents from '@/components/menu/config-categories/ConfigCategoryEvents';
import ConfigCategoryGeneral from '@/components/menu/config-categories/ConfigCategoryGeneral';
import ConfigCategoryJagfx from '@/components/menu/config-categories/ConfigCategoryJagfx';
import ConfigCategoryMap from '@/components/menu/config-categories/ConfigCategoryMap';
import ConfigCategoryScania from '@/components/menu/config-categories/ConfigCategoryScania';
import ConfigCategoryUnits from '@/components/menu/config-categories/ConfigCategoryUnits';
import ConfigSection from '@/components/menu/ConfigSection';
import { config as uConfig, history } from '@/utils/utils';
import { mapGetters } from 'vuex';
import ConfigCategoryEvents from '@/components/menu/config-categories/ConfigCategoryEvents';
import ConfigCategoryGeneral from '@/components/menu/config-categories/ConfigCategoryGeneral';
import ConfigCategoryJagfx from '@/components/menu/config-categories/ConfigCategoryJagfx';
import ConfigCategoryMap from '@/components/menu/config-categories/ConfigCategoryMap';
import ConfigCategoryScania from '@/components/menu/config-categories/ConfigCategoryScania';
import ConfigCategoryUnits from '@/components/menu/config-categories/ConfigCategoryUnits';
import ConfigSection from '@/components/menu/ConfigSection';
import { HTY_LEVEL, HTY_ZONE } from "@/utils/_history";
import { download as configDownload, upload as configUpload } from '@/utils/_config';
import { mapGetters } from 'vuex';
export default {
name: 'MenuTabConfig',
Expand Down Expand Up @@ -119,19 +120,18 @@ export default {
download(target) {
this.$pushALog(
'Download config',
history.HTY_ZONE.MENU_CONFIG,
history.HTY_LEVEL.DEBUG
HTY_ZONE.MENU_CONFIG,
HTY_LEVEL.DEBUG
);
uConfig.download(target);
configDownload(target);
},
upload(input) {
this.$pushALog('Start config upload', history.HTY_ZONE.MENU_CONFIG);
this.$pushALog('Start config upload', HTY_ZONE.MENU_CONFIG);
uConfig
.upload(input.target.files[0], this.targetUpload)
configUpload(input.target.files[0], this.targetUpload)
.then((data) => {
this.$pushALog('Config upload done', history.HTY_ZONE.MENU_CONFIG);
this.$pushALog('Config upload done', HTY_ZONE.MENU_CONFIG);
const commitName =
this.targetUpload === 'game' ? 'config/setGame' : 'config/setApp';
Expand Down
24 changes: 12 additions & 12 deletions src/components/overlays/telemetry-event/TelemetryEventOverlay.vue
Expand Up @@ -10,18 +10,18 @@

<script>
import TelemetryEventDefaultOverlay from '@/components/overlays/telemetry-event/TelemetryEventDefaultOverlay';
import TelemetryEventGameFerryOverlay from '@/components/overlays/telemetry-event/TelemetryEventGameFerryOverlay';
import TelemetryEventGameFineOverlay from '@/components/overlays/telemetry-event/TelemetryEventGameFineOverlay';
import TelemetryEventGameTollgateOverlay from '@/components/overlays/telemetry-event/TelemetryEventGameTollgateOverlay';
import TelemetryEventGameTrainOverlay from '@/components/overlays/telemetry-event/TelemetryEventGameTrainOverlay';
import TelemetryEventJobDeliveredOverlay from '@/components/overlays/telemetry-event/TelemetryEventJobDeliveredOverlay';
import TelemetryEventNavigationSpeedLimitOverlay from '@/components/overlays/telemetry-event/TelemetryEventNavigationSpeedLimitOverlay';
import TelemetryEventTrailersDamageOverlay from '@/components/overlays/telemetry-event/TelemetryEventTrailersDamageOverlay';
import TelemetryEventGameFerryOverlay from '@/components/overlays/telemetry-event/TelemetryEventGameFerryOverlay';
import TelemetryEventGameFineOverlay from '@/components/overlays/telemetry-event/TelemetryEventGameFineOverlay';
import TelemetryEventGameTollgateOverlay from '@/components/overlays/telemetry-event/TelemetryEventGameTollgateOverlay';
import TelemetryEventGameTrainOverlay from '@/components/overlays/telemetry-event/TelemetryEventGameTrainOverlay';
import TelemetryEventJobDeliveredOverlay from '@/components/overlays/telemetry-event/TelemetryEventJobDeliveredOverlay';
import TelemetryEventNavigationSpeedLimitOverlay from '@/components/overlays/telemetry-event/TelemetryEventNavigationSpeedLimitOverlay';
import TelemetryEventTrailersDamageOverlay from '@/components/overlays/telemetry-event/TelemetryEventTrailersDamageOverlay';
import TelemetryEventTruckCruiseControlIncreaseOverlay from '@/components/overlays/telemetry-event/TelemetryEventTruckCruiseControlIncreaseOverlay';
import TelemetryEventTruckDamageOverlay from '@/components/overlays/telemetry-event/TelemetryEventTruckDamageOverlay';
import TelemetryEventTruckWarningOverlay from '@/components/overlays/telemetry-event/TelemetryEventTruckWarningOverlay';
import TelemetryEventOverlayMixin from '@/mixins/TelemetryEventOverlayMixin';
import { event } from '@/utils/utils';
import TelemetryEventTruckDamageOverlay from '@/components/overlays/telemetry-event/TelemetryEventTruckDamageOverlay';
import TelemetryEventTruckWarningOverlay from '@/components/overlays/telemetry-event/TelemetryEventTruckWarningOverlay';
import TelemetryEventOverlayMixin from '@/mixins/TelemetryEventOverlayMixin';
import { eventNameToComponent } from "@/utils/_event";
export default {
name: 'TelemetryEventOverlay',
Expand All @@ -41,7 +41,7 @@ export default {
mixins: [TelemetryEventOverlayMixin],
computed: {
currentRawDataComponent() {
const eventComponentName = event.eventNameToComponent(this.eventName);
const eventComponentName = eventNameToComponent(this.eventName);
try {
require(`./${eventComponentName}`);
Expand Down
8 changes: 4 additions & 4 deletions src/mixins/ConfigCategoryMixin.vue
@@ -1,13 +1,13 @@
<script>
import ConfigFieldChoice from '@/components/menu/config-fields/ConfigFieldChoice';
import ConfigFieldInput from '@/components/menu/config-fields/ConfigFieldInput';
import { config } from '@/utils/utils';
import ConfigFieldChoice from '@/components/menu/config-fields/ConfigFieldChoice';
import ConfigFieldInput from '@/components/menu/config-fields/ConfigFieldInput';
import { getFieldValues } from "@/utils/_config";
export default {
name: 'ConfigCategoryMixin',
components: { ConfigFieldInput, ConfigFieldChoice },
methods: {
fieldValues: (fieldId) => config.getFieldValues(fieldId),
fieldValues: (fieldId) => getFieldValues(fieldId),
configValue(name) {
return this.$store.getters['config/get'](name);
},
Expand Down
4 changes: 2 additions & 2 deletions src/mixins/SkinsMixin.vue
Expand Up @@ -7,7 +7,7 @@
* Time: 17:57
*/
import { history } from '@/utils/utils';
import { HTY_ZONE } from "@/utils/_history";
import { mapGetters } from 'vuex';
export default {
Expand Down Expand Up @@ -40,7 +40,7 @@ export default {
$setActive(skin) {
this.$pushALog(
'Set skin active ' + JSON.stringify(skin),
history.HTY_ZONE.MENU_SKIN
HTY_ZONE.MENU_SKIN
);
this.$store.commit('skins/setCurrent', skin);
Expand Down
15 changes: 8 additions & 7 deletions src/plugins/app.plugin.js
Expand Up @@ -6,19 +6,20 @@
* Time: 19:43
*/

import store from '@/store';
import { mutations } from '@/store/telemetry.store';
import { pushLog } from '@/utils/_app';
import { translate } from '@/utils/_i18n';
import { event, history } from '@/utils/utils';
import store from '@/store';
import { mutations } from '@/store/telemetry.store';
import { pushLog } from '@/utils/_app';
import { filterInputEvent } from "@/utils/_event";
import { HTY_ZONE } from "@/utils/_history";
import { translate } from '@/utils/_i18n';
import additionalTelemetryWatcher from '@/utils/telemetry/_additional-watcher.utils';

export default {
install(Vue) {
Vue.prototype.$pushALog = pushLog;

Vue.prototype.$updateEvent = (data) => {
const theEvent = event.filterInputEvent(data);
const theEvent = filterInputEvent(data);

if (theEvent !== false) {
const configName = `events_${theEvent.eventName}`;
Expand All @@ -27,7 +28,7 @@ export default {
if (isActive) {
Vue.prototype.$pushALog(
'New event ' + JSON.stringify(theEvent),
history.HTY_ZONE.MAIN
HTY_ZONE.MAIN
);

store.dispatch('event/displayAnEvent', {
Expand Down
6 changes: 3 additions & 3 deletions src/store/modules/_app.js
Expand Up @@ -6,8 +6,8 @@
* Time: 15:56
*/

import { history } from '@/utils/utils';
import Vue from 'vue';
import { HTY_ZONE } from "@/utils/_history";
import Vue from 'vue';

const defaultMessage = {
icon: null,
Expand Down Expand Up @@ -53,7 +53,7 @@ const actions = {
Vue.prototype.$pushALog(
'Error thrown',
JSON.stringify(payload),
history.HTY_ZONE.ERROR
HTY_ZONE.ERROR
);

commit('setProcessing', true);
Expand Down
5 changes: 2 additions & 3 deletions src/store/modules/_config.js
@@ -1,5 +1,4 @@
import { emptyData } from '@/utils/_config';
import { config } from '@/utils/utils';
import { emptyData, save } from "@/utils/_config";

// initial state
const state = () => emptyData();
Expand Down Expand Up @@ -43,7 +42,7 @@ const mutations = {
},
setElm(state, payload) {
state[payload.target][payload.id] = payload.value;
config.save(state, payload.target);
save(state, payload.target);
}
};

Expand Down
12 changes: 6 additions & 6 deletions src/utils/_app.js
Expand Up @@ -6,11 +6,11 @@
* Time: 18:36
*/

import store from '@/store';
import { history } from '@/utils/utils';
import countryList from 'country-list';
import emojiFlags from 'emoji-flags';
import { DateTime } from 'luxon';
import store from '@/store';
import { HTY_LEVEL } from "@/utils/_history";
import countryList from 'country-list';
import emojiFlags from 'emoji-flags';
import { DateTime } from 'luxon';

import packageJson from '../../package.json';

Expand Down Expand Up @@ -122,7 +122,7 @@ export const lessOrEqualThanFloat = (data, a) => {
return parseFloat(data) <= a;
};

export const pushLog = (message, zone, level = history.HTY_LEVEL.INFO) => {
export const pushLog = (message, zone, level = HTY_LEVEL.INFO) => {
store.dispatch('debug/addLog', {
message,
zone,
Expand Down

0 comments on commit 3b4e08c

Please sign in to comment.