mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-02 18:39:05 +01:00
default file to ~
This commit is contained in:
parent
a0734a3bbe
commit
f535c5c1ab
@ -190,7 +190,11 @@ export class PreviewModel implements ViewModel {
|
||||
});
|
||||
this.fileName = jotai.atom<string, [string], void>(
|
||||
(get) => {
|
||||
return get(this.blockAtom)?.meta?.file;
|
||||
const file = get(this.blockAtom)?.meta?.file;
|
||||
if (util.isBlank(file)) {
|
||||
return "~";
|
||||
}
|
||||
return file;
|
||||
},
|
||||
(get, set, update) => {
|
||||
services.ObjectService.UpdateObjectMeta(`block:${blockId}`, { file: update });
|
||||
|
Loading…
Reference in New Issue
Block a user