fix private properties.

This commit is contained in:
Miroslav Šedivý 2024-02-21 18:10:18 +01:00
parent 09acada1af
commit 37f93eae6b
4 changed files with 46 additions and 46 deletions

View File

@ -30,33 +30,33 @@
})
export default class extends Vue {
@Ref('overlay') readonly _overlay!: HTMLCanvasElement
private _ctx!: CanvasRenderingContext2D
_ctx!: CanvasRenderingContext2D
private canvasScale = window.devicePixelRatio
canvasScale = window.devicePixelRatio
@Prop()
private readonly sessions!: Record<string, Session>
readonly sessions!: Record<string, Session>
@Prop()
private readonly sessionId!: string
readonly sessionId!: string
@Prop()
private readonly hostId!: string | null
readonly hostId!: string | null
@Prop()
private readonly screenSize!: Dimension
readonly screenSize!: Dimension
@Prop()
private readonly canvasSize!: Dimension
readonly canvasSize!: Dimension
@Prop()
private readonly cursors!: SessionCursors[]
readonly cursors!: SessionCursors[]
@Prop()
private readonly cursorDraw!: InactiveCursorDrawFunction | null
readonly cursorDraw!: InactiveCursorDrawFunction | null
@Prop()
private readonly fps!: number
readonly fps!: number
mounted() {
// get canvas overlay context

View File

@ -10,7 +10,7 @@
@imageReady="screencastReady = $event"
/>
<neko-cursors
v-if="state.settings.inactive_cursors && session.profile.can_see_inactive_cursors"
v-if="state.settings.inactive_cursors && session && session.profile.can_see_inactive_cursors"
:sessions="state.sessions"
:sessionId="state.session_id"
:hostId="state.control.host_id"
@ -33,8 +33,8 @@
:canvasSize="canvasSize"
:isControling="controlling"
:cursorDraw="cursorDrawFunction"
:implicitControl="state.settings.implicit_hosting && session.profile.can_host"
:inactiveCursors="state.settings.inactive_cursors && session.profile.sends_inactive_cursor"
:implicitControl="state.settings.implicit_hosting && session && session.profile.can_host"
:inactiveCursors="state.settings.inactive_cursors && session && session.profile.sends_inactive_cursor"
:fps="fps"
:hasMobileKeyboard="is_touch_device"
@updateKeyboardModifiers="updateKeyboardModifiers($event)"
@ -126,24 +126,24 @@
inactiveCursorDrawFunction: InactiveCursorDrawFunction | null = null
@Prop({ type: String })
private readonly server!: string
readonly server!: string
@Prop({ type: Boolean })
private readonly autologin!: boolean
readonly autologin!: boolean
@Prop({ type: Boolean })
private readonly autoconnect!: boolean
readonly autoconnect!: boolean
@Prop({ type: Boolean })
private readonly autoplay!: boolean
readonly autoplay!: boolean
// fps for cursor rendering, 0 for no cap
@Prop({ type: Number, default: 0 })
private readonly fps!: number
readonly fps!: number
// auto / touch / mouse
@Prop({ type: String, default: 'auto' })
private readonly inputMode!: String
readonly inputMode!: String
/////////////////////////////
// Public state
@ -235,9 +235,9 @@
} as NekoState
/////////////////////////////
// Public connection manager
// Connection manager
/////////////////////////////
public connection = new NekoConnection(this.state.connection)
connection = new NekoConnection(this.state.connection)
public get connected() {
return this.state.connection.status == 'connected'

View File

@ -75,54 +75,54 @@
export default class extends Vue {
@Ref('overlay') readonly _overlay!: HTMLCanvasElement
@Ref('textarea') readonly _textarea!: HTMLTextAreaElement
private _ctx!: CanvasRenderingContext2D
_ctx!: CanvasRenderingContext2D
private canvasScale = window.devicePixelRatio
canvasScale = window.devicePixelRatio
private keyboard!: KeyboardInterface
private gestureHandler!: GestureHandler
private textInput = ''
keyboard!: KeyboardInterface
gestureHandler!: GestureHandler
textInput = ''
private focused = false
focused = false
@Prop()
private readonly control!: NekoControl
readonly control!: NekoControl
@Prop()
private readonly sessions!: Record<string, Session>
readonly sessions!: Record<string, Session>
@Prop()
private readonly hostId!: string
readonly hostId!: string
@Prop()
private readonly webrtc!: NekoWebRTC
readonly webrtc!: NekoWebRTC
@Prop()
private readonly scroll!: Scroll
readonly scroll!: Scroll
@Prop()
private readonly screenSize!: Dimension
readonly screenSize!: Dimension
@Prop()
private readonly canvasSize!: Dimension
readonly canvasSize!: Dimension
@Prop()
private readonly cursorDraw!: CursorDrawFunction | null
readonly cursorDraw!: CursorDrawFunction | null
@Prop()
private readonly isControling!: boolean
readonly isControling!: boolean
@Prop()
private readonly implicitControl!: boolean
readonly implicitControl!: boolean
@Prop()
private readonly inactiveCursors!: boolean
readonly inactiveCursors!: boolean
@Prop()
private readonly fps!: number
readonly fps!: number
@Prop()
private readonly hasMobileKeyboard!: boolean
readonly hasMobileKeyboard!: boolean
get cursor(): string {
if (!this.isControling || !this.cursorImage) {

View File

@ -13,12 +13,12 @@
name: 'neko-screencast',
})
export default class extends Vue {
private imageSrc = ''
private running = false
private continue = false
imageSrc = ''
running = false
continue = false
@Prop()
private readonly image!: string
readonly image!: string
@Watch('image')
setImage(image: string) {
@ -26,10 +26,10 @@
}
@Prop()
private readonly enabled!: boolean
readonly enabled!: boolean
@Prop()
private readonly api!: RoomApi
readonly api!: RoomApi
async loop() {
if (this.running) return