mirror of
https://github.com/m1k1o/neko.git
synced 2025-06-06 04:42:47 +02:00
Merge pull request #92 from m1k1o/guacamole-kbd
Guacamole Keyboard support + choose layout
This commit is contained in:
commit
395e23a155
25 changed files with 1865 additions and 995 deletions
|
@ -35,6 +35,19 @@
|
|||
<span />
|
||||
</label>
|
||||
</li>
|
||||
<li>
|
||||
<span>{{ $t('setting.keyboard_layout') }}</span>
|
||||
<label class="select">
|
||||
<select v-model="keyboard_layout">
|
||||
<option
|
||||
v-for="(name, code) in keyboard_layouts_list"
|
||||
:key="code"
|
||||
:value="code"
|
||||
>{{ name }}</option>
|
||||
</select>
|
||||
<span />
|
||||
</label>
|
||||
</li>
|
||||
<li v-if="connected">
|
||||
<button @click.stop.prevent="logout">{{ $t('logout') }}</button>
|
||||
</li>
|
||||
|
@ -182,6 +195,31 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.select {
|
||||
max-width: 120px;
|
||||
|
||||
select {
|
||||
display: block;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
padding: 4px;
|
||||
margin: 0;
|
||||
line-height: 30px;
|
||||
font-weight: bold;
|
||||
border: 0;
|
||||
border-radius: 12px;
|
||||
|
||||
color: black;
|
||||
background-color: $style-primary;
|
||||
|
||||
option {
|
||||
font-weight: normal;
|
||||
color: $text-normal;
|
||||
background-color: $background-tertiary;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -236,6 +274,19 @@
|
|||
this.$accessor.settings.setSound(value)
|
||||
}
|
||||
|
||||
get keyboard_layouts_list() {
|
||||
return this.$accessor.settings.keyboard_layouts_list
|
||||
}
|
||||
|
||||
get keyboard_layout() {
|
||||
return this.$accessor.settings.keyboard_layout
|
||||
}
|
||||
|
||||
set keyboard_layout(value: string) {
|
||||
this.$accessor.settings.setKeyboardLayout(value)
|
||||
this.$accessor.remote.changeKeyboard()
|
||||
}
|
||||
|
||||
logout() {
|
||||
this.$accessor.logout()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue