diff --git a/scripthaus.md b/scripthaus.md index c4688e90..4c718aea 100644 --- a/scripthaus.md +++ b/scripthaus.md @@ -82,10 +82,10 @@ rm -rf build/ node_modules/.bin/webpack --config webpack.prod.js node_modules/.bin/webpack --config webpack.electron.prod.js GO_LDFLAGS="-s -w -X main.BuildTime=$(date +'%Y%m%d%H%M')" -(cd ../apishell; GOOS=darwin GOARCH=amd64 go build -ldflags="$GO_LDFLAGS" -o ../prompt-client/bin/mshell/mshell-v0.2-darwin.amd64 main-mshell.go) -(cd ../apishell; GOOS=darwin GOARCH=arm64 go build -ldflags="$GO_LDFLAGS" -o ../prompt-client/bin/mshell/mshell-v0.2-darwin.arm64 main-mshell.go) -(cd ../apishell; GOOS=linux GOARCH=amd64 go build -ldflags="$GO_LDFLAGS" -o ../prompt-client/bin/mshell/mshell-v0.2-linux.amd64 main-mshell.go) -(cd ../apishell; GOOS=linux GOARCH=arm64 go build -ldflags="$GO_LDFLAGS" -o ../prompt-client/bin/mshell/mshell-v0.2-linux.arm64 main-mshell.go) +(cd ../apishell; GOOS=darwin GOARCH=amd64 go build -ldflags="$GO_LDFLAGS" -o ../prompt-client/bin/mshell/mshell-v0.3-darwin.amd64 main-mshell.go) +(cd ../apishell; GOOS=darwin GOARCH=arm64 go build -ldflags="$GO_LDFLAGS" -o ../prompt-client/bin/mshell/mshell-v0.3-darwin.arm64 main-mshell.go) +(cd ../apishell; GOOS=linux GOARCH=amd64 go build -ldflags="$GO_LDFLAGS" -o ../prompt-client/bin/mshell/mshell-v0.3-linux.amd64 main-mshell.go) +(cd ../apishell; GOOS=linux GOARCH=arm64 go build -ldflags="$GO_LDFLAGS" -o ../prompt-client/bin/mshell/mshell-v0.3-linux.arm64 main-mshell.go) (cd ../prompt-server; GOOS=darwin GOARCH=amd64 go build -ldflags="$GO_LDFLAGS" -o ../prompt-client/build/prompt-local-server.amd64 ./cmd) (cd ../prompt-server; GOOS=darwin GOARCH=arm64 go build -ldflags="$GO_LDFLAGS" -o ../prompt-client/build/prompt-local-server.arm64 ./cmd) lipo -create -output bin/prompt-local-server build/prompt-local-server.amd64 build/prompt-local-server.arm64 diff --git a/src/linecomps.tsx b/src/linecomps.tsx index de2773c5..1610ff42 100644 --- a/src/linecomps.tsx +++ b/src/linecomps.tsx @@ -436,7 +436,9 @@ class LineCmd extends React.Component< @boundMethod clickMinimise() { - this.isMinimised.set(!this.isMinimised.get()); + mobx.action(() => { + this.isMinimised.set(!this.isMinimised.get()); + })(); } @boundMethod diff --git a/src/model.ts b/src/model.ts index 666d192d..b291c030 100644 --- a/src/model.ts +++ b/src/model.ts @@ -3642,6 +3642,7 @@ class Model { let file = new File([blob], fileInfo.name, { type: blob.type, lastModified: fileInfo.modts }); let isWriteable = (fileInfo.perm & 0o222) > 0; // checks for unix permission "w" bits (file as any).readOnly = !isWriteable; + (file as any).notFound = !!fileInfo.notfound; return file; } else { let textError: string = blobOrText; diff --git a/src/simplerenderer.tsx b/src/simplerenderer.tsx index 66c970da..13c5f031 100644 --- a/src/simplerenderer.tsx +++ b/src/simplerenderer.tsx @@ -43,6 +43,7 @@ class SimpleBlobRendererModel { ptyDataSource: (termContext: TermContextUnion) => Promise; dataBlob: Blob; readOnly: boolean; + notFound: boolean; initialize(params: RendererModelInitializeParams): void { this.loading = mobx.observable.box(true, { name: "renderer-loading" }); @@ -126,6 +127,7 @@ class SimpleBlobRendererModel { } let rtnp = GlobalModel.readRemoteFile(this.context.screenId, this.context.lineId, path); rtnp.then((file) => { + this.notFound = (file as any).notFound; this.readOnly = (file as any).readOnly; this.dataBlob = file; mobx.action(() => { @@ -269,6 +271,7 @@ class SimpleBlobRenderer extends React.Component< exitcode={exitcode} data={simpleModel.dataBlob} readOnly={simpleModel.readOnly} + notFound={simpleModel.notFound} lineState={simpleModel.lineState} context={simpleModel.context} opts={simpleModel.opts} diff --git a/src/types.ts b/src/types.ts index 2a1adc65..65803318 100644 --- a/src/types.ts +++ b/src/types.ts @@ -614,6 +614,7 @@ type FileInfoType = { modts: number; isdir: boolean; perm: number; + notfound: boolean; }; export type { diff --git a/src/view/code.tsx b/src/view/code.tsx index 0caaa4f2..e7a54d54 100644 --- a/src/view/code.tsx +++ b/src/view/code.tsx @@ -18,6 +18,8 @@ class SourceCodeRenderer extends React.Component< readOnly: boolean; cmdstr: string; cwd: string; + readOnly: boolean; + notFound: boolean; exitcode: number; context: RendererContext; opts: RendererOpts;