mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-02-01 23:21:59 +01:00
bump mshell to v0.3, add readonly/notfound props. fix one mobx warning (#16)
This commit is contained in:
parent
7376ed2824
commit
e78ea62932
@ -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
|
||||
|
@ -436,7 +436,9 @@ class LineCmd extends React.Component<
|
||||
|
||||
@boundMethod
|
||||
clickMinimise() {
|
||||
mobx.action(() => {
|
||||
this.isMinimised.set(!this.isMinimised.get());
|
||||
})();
|
||||
}
|
||||
|
||||
@boundMethod
|
||||
|
@ -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;
|
||||
|
@ -43,6 +43,7 @@ class SimpleBlobRendererModel {
|
||||
ptyDataSource: (termContext: TermContextUnion) => Promise<PtyDataType>;
|
||||
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}
|
||||
|
@ -614,6 +614,7 @@ type FileInfoType = {
|
||||
modts: number;
|
||||
isdir: boolean;
|
||||
perm: number;
|
||||
notfound: boolean;
|
||||
};
|
||||
|
||||
export type {
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user