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>
|
||||
<div
|
||||
class="clipboard"
|
||||
v-if="opened"
|
||||
@click="$event.stopPropagation()"
|
||||
>
|
||||
<textarea
|
||||
ref="textarea"
|
||||
v-model="clipboard"
|
||||
@focus="$event.target.select()"
|
||||
/>
|
||||
<div class="clipboard" v-if="opened" @click="$event.stopPropagation()">
|
||||
<textarea ref="textarea" v-model="clipboard" @focus="$event.target.select()" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -23,7 +15,8 @@
|
||||
bottom: 10px;
|
||||
right: 10px;
|
||||
|
||||
&, textarea {
|
||||
&,
|
||||
textarea {
|
||||
max-width: 320px;
|
||||
width: 100%;
|
||||
max-height: 120px;
|
||||
|
@ -39,10 +39,10 @@
|
||||
<template v-if="admin && !child.data.member.admin">
|
||||
<li class="seperator" />
|
||||
<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>
|
||||
<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>
|
||||
</template>
|
||||
</template>
|
||||
|
@ -54,7 +54,7 @@
|
||||
</li>
|
||||
<li>
|
||||
<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>
|
||||
</template>
|
||||
<li v-if="connected">
|
||||
@ -276,7 +276,7 @@
|
||||
|
||||
@Component({ name: 'neko-settings' })
|
||||
export default class extends Vue {
|
||||
private broadcast_url: string = '';
|
||||
private broadcast_url: string = ''
|
||||
|
||||
get admin() {
|
||||
return this.$accessor.user.admin
|
||||
|
@ -40,9 +40,9 @@ export const EVENT = {
|
||||
SET: 'screen/set',
|
||||
},
|
||||
BROADCAST: {
|
||||
STATUS: "broadcast/status",
|
||||
CREATE: "broadcast/create",
|
||||
DESTROY: "broadcast/destroy",
|
||||
STATUS: 'broadcast/status',
|
||||
CREATE: 'broadcast/create',
|
||||
DESTROY: 'broadcast/destroy',
|
||||
},
|
||||
ADMIN: {
|
||||
BAN: 'admin/ban',
|
||||
|
@ -3,9 +3,8 @@ import { Member } from '~/neko/types'
|
||||
import { EVENT } from '~/neko/events'
|
||||
import { accessor } from '~/store'
|
||||
|
||||
const keyboardModifierState =
|
||||
(capsLock: boolean, numLock: boolean, scrollLock: boolean) =>
|
||||
Number(capsLock) + 2*Number(numLock) + 4*Number(scrollLock)
|
||||
const keyboardModifierState = (capsLock: boolean, numLock: boolean, scrollLock: boolean) =>
|
||||
Number(capsLock) + 2 * Number(numLock) + 4 * Number(scrollLock)
|
||||
|
||||
export const namespaced = true
|
||||
|
||||
@ -155,11 +154,11 @@ export const actions = actionTree(
|
||||
|
||||
syncKeyboardModifierState({ state, getters }, { capsLock, numLock, scrollLock }) {
|
||||
if (state.keyboardModifierState === keyboardModifierState(capsLock, numLock, scrollLock)) {
|
||||
return ;
|
||||
return
|
||||
}
|
||||
|
||||
accessor.remote.setKeyboardModifierState({ capsLock, numLock, scrollLock })
|
||||
$client.sendMessage(EVENT.CONTROL.KEYBOARD, { capsLock, numLock, scrollLock })
|
||||
}
|
||||
},
|
||||
},
|
||||
)
|
||||
|
@ -21,7 +21,7 @@ export const state = () => {
|
||||
keyboard_layouts_list: {} as KeyboardLayouts,
|
||||
|
||||
broadcast_is_active: false,
|
||||
broadcast_url: "",
|
||||
broadcast_url: '',
|
||||
}
|
||||
}
|
||||
|
||||
@ -62,7 +62,7 @@ export const mutations = mutationTree(state, {
|
||||
state.keyboard_layouts_list = value
|
||||
},
|
||||
setBroadcastStatus(state, { url, isActive }) {
|
||||
state.broadcast_url = url,
|
||||
state.broadcast_url = url
|
||||
state.broadcast_is_active = isActive
|
||||
},
|
||||
})
|
||||
|
@ -1,3 +1,4 @@
|
||||
/* eslint-disable */
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
|
@ -10,7 +10,7 @@ export interface GuacamoleKeyboardInterface {
|
||||
* @return {Boolean} true if the key event should be allowed through to the
|
||||
* browser, false otherwise.
|
||||
*/
|
||||
onkeydown?: (keysym: number) => boolean;
|
||||
onkeydown?: (keysym: number) => boolean
|
||||
|
||||
/**
|
||||
* Fired whenever the user releases a key with the element associated
|
||||
@ -19,7 +19,7 @@ export interface GuacamoleKeyboardInterface {
|
||||
* @event
|
||||
* @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
|
||||
@ -30,14 +30,14 @@ export interface GuacamoleKeyboardInterface {
|
||||
* @param {Number} keysym The keysym of the key to press.
|
||||
* @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.
|
||||
*
|
||||
* @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
|
||||
@ -46,13 +46,13 @@ export interface GuacamoleKeyboardInterface {
|
||||
* @param {String} str
|
||||
* The string to type.
|
||||
*/
|
||||
type: (str: string) => void;
|
||||
type: (str: string) => void
|
||||
|
||||
/**
|
||||
* Resets the state of this keyboard, releasing all keys, and firing keyup
|
||||
* events for each released key.
|
||||
*/
|
||||
reset: () => void;
|
||||
reset: () => void
|
||||
|
||||
/**
|
||||
* Attaches event listeners to the given Element, automatically translating
|
||||
@ -64,13 +64,13 @@ export interface GuacamoleKeyboardInterface {
|
||||
* The Element to attach event listeners to for the sake of handling
|
||||
* key or input events.
|
||||
*/
|
||||
listenTo: (element: Element | Document) => void;
|
||||
listenTo: (element: Element | Document) => void
|
||||
}
|
||||
|
||||
export default function(element?: Element): GuacamoleKeyboardInterface {
|
||||
var Keyboard = {};
|
||||
export default function (element?: Element): GuacamoleKeyboardInterface {
|
||||
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