mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
client linter fix.
This commit is contained in:
parent
0e5e1faf35
commit
15edc0f73e
@ -1,14 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<div class="clipboard" v-if="opened" @click="$event.stopPropagation()">
|
||||||
class="clipboard"
|
<textarea ref="textarea" v-model="clipboard" @focus="$event.target.select()" />
|
||||||
v-if="opened"
|
|
||||||
@click="$event.stopPropagation()"
|
|
||||||
>
|
|
||||||
<textarea
|
|
||||||
ref="textarea"
|
|
||||||
v-model="clipboard"
|
|
||||||
@focus="$event.target.select()"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -23,7 +15,8 @@
|
|||||||
bottom: 10px;
|
bottom: 10px;
|
||||||
right: 10px;
|
right: 10px;
|
||||||
|
|
||||||
&, textarea {
|
&,
|
||||||
|
textarea {
|
||||||
max-width: 320px;
|
max-width: 320px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-height: 120px;
|
max-height: 120px;
|
||||||
|
@ -39,10 +39,10 @@
|
|||||||
<template v-if="admin && !child.data.member.admin">
|
<template v-if="admin && !child.data.member.admin">
|
||||||
<li class="seperator" />
|
<li class="seperator" />
|
||||||
<li>
|
<li>
|
||||||
<span @click="kick(child.data.member)" style="color: #f04747;">{{ $t('context.kick') }}</span>
|
<span @click="kick(child.data.member)" style="color: #f04747">{{ $t('context.kick') }}</span>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<span @click="ban(child.data.member)" style="color: #f04747;">{{ $t('context.ban') }}</span>
|
<span @click="ban(child.data.member)" style="color: #f04747">{{ $t('context.ban') }}</span>
|
||||||
</li>
|
</li>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
|
@ -54,7 +54,7 @@
|
|||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<span>{{ $t('setting.broadcast_url') }}</span>
|
<span>{{ $t('setting.broadcast_url') }}</span>
|
||||||
<input v-model="broadcast_url" :disabled="broadcast_is_active" class="input">
|
<input v-model="broadcast_url" :disabled="broadcast_is_active" class="input" />
|
||||||
</li>
|
</li>
|
||||||
</template>
|
</template>
|
||||||
<li v-if="connected">
|
<li v-if="connected">
|
||||||
@ -276,7 +276,7 @@
|
|||||||
|
|
||||||
@Component({ name: 'neko-settings' })
|
@Component({ name: 'neko-settings' })
|
||||||
export default class extends Vue {
|
export default class extends Vue {
|
||||||
private broadcast_url: string = '';
|
private broadcast_url: string = ''
|
||||||
|
|
||||||
get admin() {
|
get admin() {
|
||||||
return this.$accessor.user.admin
|
return this.$accessor.user.admin
|
||||||
|
@ -40,9 +40,9 @@ export const EVENT = {
|
|||||||
SET: 'screen/set',
|
SET: 'screen/set',
|
||||||
},
|
},
|
||||||
BROADCAST: {
|
BROADCAST: {
|
||||||
STATUS: "broadcast/status",
|
STATUS: 'broadcast/status',
|
||||||
CREATE: "broadcast/create",
|
CREATE: 'broadcast/create',
|
||||||
DESTROY: "broadcast/destroy",
|
DESTROY: 'broadcast/destroy',
|
||||||
},
|
},
|
||||||
ADMIN: {
|
ADMIN: {
|
||||||
BAN: 'admin/ban',
|
BAN: 'admin/ban',
|
||||||
|
@ -3,9 +3,8 @@ import { Member } from '~/neko/types'
|
|||||||
import { EVENT } from '~/neko/events'
|
import { EVENT } from '~/neko/events'
|
||||||
import { accessor } from '~/store'
|
import { accessor } from '~/store'
|
||||||
|
|
||||||
const keyboardModifierState =
|
const keyboardModifierState = (capsLock: boolean, numLock: boolean, scrollLock: boolean) =>
|
||||||
(capsLock: boolean, numLock: boolean, scrollLock: boolean) =>
|
Number(capsLock) + 2 * Number(numLock) + 4 * Number(scrollLock)
|
||||||
Number(capsLock) + 2*Number(numLock) + 4*Number(scrollLock)
|
|
||||||
|
|
||||||
export const namespaced = true
|
export const namespaced = true
|
||||||
|
|
||||||
@ -155,11 +154,11 @@ export const actions = actionTree(
|
|||||||
|
|
||||||
syncKeyboardModifierState({ state, getters }, { capsLock, numLock, scrollLock }) {
|
syncKeyboardModifierState({ state, getters }, { capsLock, numLock, scrollLock }) {
|
||||||
if (state.keyboardModifierState === keyboardModifierState(capsLock, numLock, scrollLock)) {
|
if (state.keyboardModifierState === keyboardModifierState(capsLock, numLock, scrollLock)) {
|
||||||
return ;
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
accessor.remote.setKeyboardModifierState({ capsLock, numLock, scrollLock })
|
accessor.remote.setKeyboardModifierState({ capsLock, numLock, scrollLock })
|
||||||
$client.sendMessage(EVENT.CONTROL.KEYBOARD, { capsLock, numLock, scrollLock })
|
$client.sendMessage(EVENT.CONTROL.KEYBOARD, { capsLock, numLock, scrollLock })
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
@ -19,9 +19,9 @@ export const state = () => {
|
|||||||
keyboard_layout: get<string>('keyboard_layout', 'us'),
|
keyboard_layout: get<string>('keyboard_layout', 'us'),
|
||||||
|
|
||||||
keyboard_layouts_list: {} as KeyboardLayouts,
|
keyboard_layouts_list: {} as KeyboardLayouts,
|
||||||
|
|
||||||
broadcast_is_active: false,
|
broadcast_is_active: false,
|
||||||
broadcast_url: "",
|
broadcast_url: '',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -62,7 +62,7 @@ export const mutations = mutationTree(state, {
|
|||||||
state.keyboard_layouts_list = value
|
state.keyboard_layouts_list = value
|
||||||
},
|
},
|
||||||
setBroadcastStatus(state, { url, isActive }) {
|
setBroadcastStatus(state, { url, isActive }) {
|
||||||
state.broadcast_url = url,
|
state.broadcast_url = url
|
||||||
state.broadcast_is_active = isActive
|
state.broadcast_is_active = isActive
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable */
|
||||||
/*
|
/*
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
* or more contributor license agreements. See the NOTICE file
|
* or more contributor license agreements. See the NOTICE file
|
||||||
|
@ -4,41 +4,41 @@ export interface GuacamoleKeyboardInterface {
|
|||||||
/**
|
/**
|
||||||
* Fired whenever the user presses a key with the element associated
|
* Fired whenever the user presses a key with the element associated
|
||||||
* with this Guacamole.Keyboard in focus.
|
* with this Guacamole.Keyboard in focus.
|
||||||
*
|
*
|
||||||
* @event
|
* @event
|
||||||
* @param {Number} keysym The keysym of the key being pressed.
|
* @param {Number} keysym The keysym of the key being pressed.
|
||||||
* @return {Boolean} true if the key event should be allowed through to the
|
* @return {Boolean} true if the key event should be allowed through to the
|
||||||
* browser, false otherwise.
|
* browser, false otherwise.
|
||||||
*/
|
*/
|
||||||
onkeydown?: (keysym: number) => boolean;
|
onkeydown?: (keysym: number) => boolean
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fired whenever the user releases a key with the element associated
|
* Fired whenever the user releases a key with the element associated
|
||||||
* with this Guacamole.Keyboard in focus.
|
* with this Guacamole.Keyboard in focus.
|
||||||
*
|
*
|
||||||
* @event
|
* @event
|
||||||
* @param {Number} keysym The keysym of the key being released.
|
* @param {Number} keysym The keysym of the key being released.
|
||||||
*/
|
*/
|
||||||
onkeyup?: (keysym: number) => void;
|
onkeyup?: (keysym: number) => void
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Marks a key as pressed, firing the keydown event if registered. Key
|
* Marks a key as pressed, firing the keydown event if registered. Key
|
||||||
* repeat for the pressed key will start after a delay if that key is
|
* repeat for the pressed key will start after a delay if that key is
|
||||||
* not a modifier. The return value of this function depends on the
|
* not a modifier. The return value of this function depends on the
|
||||||
* return value of the keydown event handler, if any.
|
* return value of the keydown event handler, if any.
|
||||||
*
|
*
|
||||||
* @param {Number} keysym The keysym of the key to press.
|
* @param {Number} keysym The keysym of the key to press.
|
||||||
* @return {Boolean} true if event should NOT be canceled, false otherwise.
|
* @return {Boolean} true if event should NOT be canceled, false otherwise.
|
||||||
*/
|
*/
|
||||||
press: (keysym: number) => boolean;
|
press: (keysym: number) => boolean
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Marks a key as released, firing the keyup event if registered.
|
* Marks a key as released, firing the keyup event if registered.
|
||||||
*
|
*
|
||||||
* @param {Number} keysym The keysym of the key to release.
|
* @param {Number} keysym The keysym of the key to release.
|
||||||
*/
|
*/
|
||||||
release: (keysym: number) => void;
|
release: (keysym: number) => void
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Presses and releases the keys necessary to type the given string of
|
* Presses and releases the keys necessary to type the given string of
|
||||||
* text.
|
* text.
|
||||||
@ -46,14 +46,14 @@ export interface GuacamoleKeyboardInterface {
|
|||||||
* @param {String} str
|
* @param {String} str
|
||||||
* The string to type.
|
* The string to type.
|
||||||
*/
|
*/
|
||||||
type: (str: string) => void;
|
type: (str: string) => void
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resets the state of this keyboard, releasing all keys, and firing keyup
|
* Resets the state of this keyboard, releasing all keys, and firing keyup
|
||||||
* events for each released key.
|
* events for each released key.
|
||||||
*/
|
*/
|
||||||
reset: () => void;
|
reset: () => void
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Attaches event listeners to the given Element, automatically translating
|
* Attaches event listeners to the given Element, automatically translating
|
||||||
* received key, input, and composition events into simple keydown/keyup
|
* received key, input, and composition events into simple keydown/keyup
|
||||||
@ -64,13 +64,13 @@ export interface GuacamoleKeyboardInterface {
|
|||||||
* The Element to attach event listeners to for the sake of handling
|
* The Element to attach event listeners to for the sake of handling
|
||||||
* key or input events.
|
* key or input events.
|
||||||
*/
|
*/
|
||||||
listenTo: (element: Element | Document) => void;
|
listenTo: (element: Element | Document) => void
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function(element?: Element): GuacamoleKeyboardInterface {
|
export default function (element?: Element): GuacamoleKeyboardInterface {
|
||||||
var Keyboard = {};
|
var Keyboard = {}
|
||||||
|
|
||||||
GuacamoleKeyboard.bind(Keyboard, element)();
|
GuacamoleKeyboard.bind(Keyboard, element)()
|
||||||
|
|
||||||
return Keyboard as GuacamoleKeyboardInterface;
|
return Keyboard as GuacamoleKeyboardInterface
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user