Skip to content

Commit eb9a472

Browse files
authored
Merge branch 'main' into renovate/webpack-cli-6.x
2 parents 0d1f28e + 8c09e70 commit eb9a472

File tree

3 files changed

+28
-5
lines changed

3 files changed

+28
-5
lines changed

src/views/ASFConfig.vue

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,18 @@
100100
// if we got routed to asf-config with params, we propably
101101
// came from PasswordHash.vue and want to set ipc data from params
102102
if (Object.keys(this.$route.params).length !== 0) {
103-
this.model.IPCPassword = this.$route.params?.ipcPassword;
104-
this.model.IPCPasswordFormat = this.$route.params?.ipcPasswordFormat;
103+
// only set the values if they exist in the params
104+
if (typeof this.$route.params.ipcPassword !== 'undefined') {
105+
this.model.IPCPassword = this.$route.params.ipcPassword;
106+
}
107+
if (typeof this.$route.params.ipcPasswordFormat !== 'undefined') {
108+
this.model.IPCPasswordFormat = this.$route.params.ipcPasswordFormat;
109+
}
105110
}
106111
107112
const extendedFields = {
108113
IPCPassword: { placeholder: this.$t('keep-unchanged') },
114+
LicenseID: { placeholder: this.$t('keep-unchanged') },
109115
};
110116
111117
this.fields = Object.keys(fields).map(key => {

src/views/Commands.vue

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
@keydown.ctrl.65.prevent="jumpToStart"
2020
@keydown.ctrl.75.prevent="removeAfterCursor"
2121
@keydown.ctrl.76.prevent="clearTerminal"
22+
@keydown.ctrl.85.prevent="deleteBeforeCursorAndJumpToStart"
2223
>
2324
<input v-model="autocompleteSuggestion" type="text" spellcheck="false" class="terminal__input terminal__input--autocomplete">
2425
</div>
@@ -341,18 +342,29 @@
341342
this.log = [];
342343
},
343344
jumpToStart() {
344-
this.$refs['terminal-input'].setSelectionRange(0, 0);
345+
const el = this.$refs['terminal-input'];
346+
347+
if (el.setSelectionRange) setTimeout(() => el.setSelectionRange(0, 0), 0);
345348
},
346349
removeAfterCursor() {
347350
const pos = this.$refs['terminal-input'].selectionStart;
348351
this.command = this.command.substr(0, pos);
349352
},
353+
removeBeforeCursor() {
354+
const pos = this.$refs['terminal-input'].selectionStart;
355+
const inputLength = this.$refs['terminal-input'].value.length;
356+
this.command = this.command.substr(pos, inputLength);
357+
},
350358
moveCursorToEnd() {
351359
const el = this.$refs['terminal-input'];
352360
const len = this.command.length;
353361
354362
if (el.setSelectionRange) setTimeout(() => el.setSelectionRange(len, len), 0);
355363
},
364+
deleteBeforeCursorAndJumpToStart() {
365+
this.removeBeforeCursor();
366+
this.jumpToStart();
367+
},
356368
parseCommandsHTML(commandsWikiRaw) {
357369
const virtualDOM = createVirtualDOM(commandsWikiRaw);
358370
const commandsTableHTML = virtualDOM.querySelector('.markdown-heading > h2').parentElement.nextElementSibling;

src/views/modals/BotConfig.vue

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,13 @@
102102
// if we got routed to bot-config with params, we propably
103103
// came from PasswordEncrypt.vue and want to set password data from params
104104
if (Object.keys(this.$route.params).length !== 0) {
105-
this.model.SteamPassword = this.$route.params?.steamPassword;
106-
this.model.PasswordFormat = this.$route.params?.passwordFormat;
105+
// only set the values if they exist in the params
106+
if (typeof this.$route.params.steamPassword !== 'undefined') {
107+
this.model.SteamPassword = this.$route.params.steamPassword;
108+
}
109+
if (typeof this.$route.params.passwordFormat !== 'undefined') {
110+
this.model.PasswordFormat = this.$route.params.passwordFormat;
111+
}
107112
}
108113
109114
const extendedFields = {

0 commit comments

Comments
 (0)