Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit add3d4b

Browse files
committed
add AppImageLauncher warning
1 parent e611a36 commit add3d4b

6 files changed

Lines changed: 129 additions & 5 deletions

File tree

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
<template>
2+
<div class="hidden">
3+
<div :id="id" class="modal-demo">
4+
<button type="button" class="close" @click="cancel">
5+
<span>&times;</span><span class="sr-only">{{ $t('labels.close') }}</span>
6+
</button>
7+
<h4 class="custom-modal-title">
8+
{{ $t('app.warning') }}!
9+
</h4>
10+
<div class="custom-modal-text text-left">
11+
<template v-if="popup_opened">
12+
<form role="form">
13+
<div class="form-group m-b-30 text-center">
14+
<h4 class="m-t-20">
15+
<b v-html="$t('home.AppImageLauncher')"></b>
16+
</h4>
17+
18+
<div class="form-group text-center m-t-40">
19+
<button type="button" class="btn btn-danger waves-effect waves-light m-l-10"
20+
@click="cancel">
21+
{{ $t('labels.close') }}
22+
</button>
23+
</div>
24+
</div>
25+
</form>
26+
</template>
27+
</div>
28+
</div>
29+
</div>
30+
</template>
31+
32+
<script>
33+
import action from '../../store/action';
34+
import AbstractPopup from "../UI/AbstractPopup";
35+
36+
export default {
37+
mixins: [AbstractPopup],
38+
components: {},
39+
name: "PopupAppImageLauncher",
40+
props: {
41+
title: String,
42+
message: String,
43+
},
44+
data() {
45+
return {
46+
id: action.id,
47+
};
48+
},
49+
methods: {
50+
open() {
51+
new Custombox.modal({
52+
content: {
53+
effect: 'fadein',
54+
target: `#${this.id}`,
55+
},
56+
loader: {
57+
active: false,
58+
},
59+
}).open();
60+
},
61+
cancel() {
62+
return Custombox.modal.close();
63+
},
64+
},
65+
}
66+
</script>
67+
68+
<style lang="less" scoped>
69+
.modal-demo {
70+
width: 500px;
71+
}
72+
73+
.custom-modal-text {
74+
position: relative;
75+
76+
form {
77+
position: relative;
78+
}
79+
}
80+
</style>

src/src/locales/en.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export default {
66
'in-progress': 'In progress',
77
'error': 'Error',
88
'success': 'Success',
9+
'warning': 'Warning',
910
},
1011
labels: {
1112
'or': 'or',
@@ -218,6 +219,19 @@ export default {
218219
'label': 'label',
219220
'more': 'More',
220221
'info': 'info',
222+
'AppImageLauncher': `
223+
App detected:
224+
<br>
225+
<code>AppImageLauncher</code>
226+
<br>
227+
<br>
228+
This application interferes with the proper operation of
229+
<br>
230+
<code>AppImage</code> applications.
231+
<br>
232+
<br>
233+
Remove AppImageLauncher!
234+
`,
221235
},
222236
update: {
223237
'latest': 'Latest version installed',

src/src/locales/ru.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export default {
66
'in-progress': 'В процессе',
77
'error': 'Ошибка',
88
'success': 'Успешно',
9+
'warning': 'Предупреждение',
910
},
1011
labels: {
1112
'or': 'или',
@@ -218,6 +219,19 @@ export default {
218219
'label': 'ярлык',
219220
'more': 'Больше',
220221
'info': 'информации',
222+
'AppImageLauncher': `
223+
Обнаружено приложение:
224+
<br>
225+
<code>AppImageLauncher</code>
226+
<br>
227+
<br>
228+
Данное приложение мешает правильной работе
229+
<br>
230+
<code>AppImage</code> приложений.
231+
<br>
232+
<br>
233+
Удалите AppImageLauncher!
234+
`,
221235
},
222236
update: {
223237
'latest': 'Установлена последняя версия',

src/src/modules/system.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,13 @@ export default class System {
465465
return this.isTar() && this.values.xz;
466466
}
467467

468+
/**
469+
* @returns {boolean}
470+
*/
471+
isAppImageLauncher() {
472+
return this.existsCommand('AppImageLauncher');
473+
}
474+
468475
/**
469476
* @returns {number}
470477
*/

src/src/modules/update.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const child_process = require('child_process');
88

99
export default class Update {
1010

11-
version = '1.4.11';
11+
version = '1.4.12';
1212

1313
/**
1414
* @type {string}

src/src/views/Home.vue

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,30 @@
1212
* {{ $t('home.before-label') }}
1313
<router-link to="/games">{{ $t('home.label') }}</router-link>
1414
<br>
15-
* {{ $t('home.more') }} <router-link to="/help">{{ $t('home.info') }}</router-link>
15+
* {{ $t('home.more') }}
16+
<router-link to="/help">{{ $t('home.info') }}</router-link>
1617
</div>
1718
</div>
1819

20+
<PopupAppImageLauncher ref="AppImageLauncher"/>
1921
<ItemNewGame v-if="!games.configs.length"/>
2022
<ItemGame v-for="config in games.configs" :key="config.code" :config="config" :edit="false"/>
2123
</div>
2224
</div>
2325
</template>
2426

2527
<script>
26-
import action from "../store/action";
27-
import ItemGame from "../components/Home/ItemGame";
28-
import ItemNewGame from "../components/Prefix/ItemNewGame";
28+
import action from "../store/action";
29+
import ItemGame from "../components/Home/ItemGame";
30+
import ItemNewGame from "../components/Prefix/ItemNewGame";
31+
import PopupAppImageLauncher from "../components/Home/PopupAppImageLauncher";
2932
3033
export default {
3134
name: 'Home',
3235
components: {
3336
ItemGame,
3437
ItemNewGame,
38+
PopupAppImageLauncher,
3539
},
3640
data() {
3741
return {
@@ -41,6 +45,11 @@
4145
mounted() {
4246
this.$store.dispatch(action.get('games').LOAD);
4347
this.$store.dispatch(action.get('prefix').LOAD);
48+
49+
if (window.app.getSystem().isAppImageLauncher() && !window.AppImageLauncher) {
50+
window.AppImageLauncher = true;
51+
this.$refs.AppImageLauncher.open();
52+
}
4453
},
4554
methods: {},
4655
}

0 commit comments

Comments
 (0)