mirror of https://github.com/jetkvm/kvm.git
Compare commits
3 Commits
8ace2a00f0
...
72f2c3a146
Author | SHA1 | Date |
---|---|---|
|
72f2c3a146 | |
|
21e30c60ea | |
|
25e30f6420 |
|
@ -4,6 +4,7 @@ linters:
|
||||||
- forbidigo
|
- forbidigo
|
||||||
- misspell
|
- misspell
|
||||||
- whitespace
|
- whitespace
|
||||||
|
- gochecknoinits
|
||||||
settings:
|
settings:
|
||||||
forbidigo:
|
forbidigo:
|
||||||
forbid:
|
forbid:
|
||||||
|
@ -22,6 +23,9 @@ linters:
|
||||||
- linters:
|
- linters:
|
||||||
- errcheck
|
- errcheck
|
||||||
path: _test.go
|
path: _test.go
|
||||||
|
- linters:
|
||||||
|
- gochecknoinits
|
||||||
|
path: internal/logging/sse.go
|
||||||
paths:
|
paths:
|
||||||
- third_party$
|
- third_party$
|
||||||
- builtin$
|
- builtin$
|
||||||
|
|
|
@ -370,9 +370,7 @@ func startBacklightTickers() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func initDisplay() {
|
||||||
ensureConfigLoaded()
|
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
waitCtrlClientConnected()
|
waitCtrlClientConnected()
|
||||||
displayLogger.Info().Msg("setting initial display contents")
|
displayLogger.Info().Msg("setting initial display contents")
|
||||||
|
|
|
@ -15,9 +15,7 @@ func rpcGetJigglerState() bool {
|
||||||
return jigglerEnabled
|
return jigglerEnabled
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func initJiggler() {
|
||||||
ensureConfigLoaded()
|
|
||||||
|
|
||||||
go runJiggler()
|
go runJiggler()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
6
main.go
6
main.go
|
@ -75,8 +75,8 @@ func Main() {
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
// initialize usb gadget
|
||||||
initUsbGadget()
|
initUsbGadget()
|
||||||
|
|
||||||
if err := setInitialVirtualMediaState(); err != nil {
|
if err := setInitialVirtualMediaState(); err != nil {
|
||||||
logger.Warn().Err(err).Msg("failed to set initial virtual media state")
|
logger.Warn().Err(err).Msg("failed to set initial virtual media state")
|
||||||
}
|
}
|
||||||
|
@ -84,6 +84,10 @@ func Main() {
|
||||||
if err := initImagesFolder(); err != nil {
|
if err := initImagesFolder(); err != nil {
|
||||||
logger.Warn().Err(err).Msg("failed to init images folder")
|
logger.Warn().Err(err).Msg("failed to init images folder")
|
||||||
}
|
}
|
||||||
|
initJiggler()
|
||||||
|
|
||||||
|
// initialize display
|
||||||
|
initDisplay()
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
time.Sleep(15 * time.Minute)
|
time.Sleep(15 * time.Minute)
|
||||||
|
|
|
@ -674,7 +674,6 @@ export default function WebRTCVideo() {
|
||||||
<div className="grid grow grid-rows-(--grid-bodyFooter) overflow-hidden">
|
<div className="grid grow grid-rows-(--grid-bodyFooter) overflow-hidden">
|
||||||
<div className="relative mx-4 my-2 flex items-center justify-center overflow-hidden">
|
<div className="relative mx-4 my-2 flex items-center justify-center overflow-hidden">
|
||||||
<div className="relative flex h-full w-full items-center justify-center">
|
<div className="relative flex h-full w-full items-center justify-center">
|
||||||
<div className="relative inline-block">
|
|
||||||
{/* In relative mouse mode and under https, we enable the pointer lock, and to do so we need a bar to show the user to click on the video to enable mouse control */}
|
{/* In relative mouse mode and under https, we enable the pointer lock, and to do so we need a bar to show the user to click on the video to enable mouse control */}
|
||||||
<PointerLockBar show={showPointerLockBar} />
|
<PointerLockBar show={showPointerLockBar} />
|
||||||
<video
|
<video
|
||||||
|
@ -688,7 +687,7 @@ export default function WebRTCVideo() {
|
||||||
disablePictureInPicture
|
disablePictureInPicture
|
||||||
controlsList="nofullscreen"
|
controlsList="nofullscreen"
|
||||||
className={cx(
|
className={cx(
|
||||||
"z-30 max-h-full min-h-[384px] max-w-full min-w-[512px] bg-black/50 object-contain transition-all duration-1000",
|
"max-h-full min-h-[384px] max-w-full min-w-[512px] bg-black/50 object-contain transition-all duration-1000",
|
||||||
{
|
{
|
||||||
"cursor-none": settings.isCursorHidden,
|
"cursor-none": settings.isCursorHidden,
|
||||||
"opacity-0":
|
"opacity-0":
|
||||||
|
@ -720,7 +719,6 @@ export default function WebRTCVideo() {
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<VirtualKeyboard />
|
<VirtualKeyboard />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue