hide desktop features when desktop is disabled
parent
b215cf8e0d
commit
f8a0410282
|
@ -494,6 +494,7 @@ pub async fn get_info(state: web::Data<State>) -> Result<HttpResponse, Error> {
|
||||||
Ok(HttpResponse::Ok().json(json!({
|
Ok(HttpResponse::Ok().json(json!({
|
||||||
"name": state.vault_name,
|
"name": state.vault_name,
|
||||||
"location": &*state.upend.vault_path,
|
"location": &*state.upend.vault_path,
|
||||||
"version": crate::common::PKG_VERSION
|
"version": crate::common::PKG_VERSION,
|
||||||
|
"desktop": state.desktop_enabled
|
||||||
})))
|
})))
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,4 +50,5 @@ export interface VaultInfo {
|
||||||
name: string | null;
|
name: string | null;
|
||||||
location: string;
|
location: string;
|
||||||
version: string;
|
version: string;
|
||||||
|
desktop: boolean;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
import { notify, UpNotification } from "../../notifications";
|
import { notify, UpNotification } from "../../notifications";
|
||||||
import IconButton from "../utils/IconButton.svelte";
|
import IconButton from "../utils/IconButton.svelte";
|
||||||
import { useParams } from "svelte-navigator";
|
import { useParams } from "svelte-navigator";
|
||||||
|
import { vaultInfo } from "../../util/info";
|
||||||
const dispatch = createEventDispatcher();
|
const dispatch = createEventDispatcher();
|
||||||
const params = useParams();
|
const params = useParams();
|
||||||
|
|
||||||
|
@ -99,14 +100,16 @@
|
||||||
<Ellipsis value={displayLabel} />
|
<Ellipsis value={displayLabel} />
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
{#if banner && isFile}
|
{#if $vaultInfo?.desktop}
|
||||||
<div class="icon">
|
{#if banner && isFile}
|
||||||
<IconButton
|
<div class="icon">
|
||||||
name="window-open"
|
<IconButton
|
||||||
on:click={nativeOpen}
|
name="window-open"
|
||||||
title="Open in default application..."
|
on:click={nativeOpen}
|
||||||
/>
|
title="Open in default application..."
|
||||||
</div>
|
/>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -4008,8 +4008,8 @@ __metadata:
|
||||||
|
|
||||||
"upend@file:../tools/upend_js::locator=svelte-app%40workspace%3A.":
|
"upend@file:../tools/upend_js::locator=svelte-app%40workspace%3A.":
|
||||||
version: 0.0.1
|
version: 0.0.1
|
||||||
resolution: "upend@file:../tools/upend_js#../tools/upend_js::hash=08bbf6&locator=svelte-app%40workspace%3A."
|
resolution: "upend@file:../tools/upend_js#../tools/upend_js::hash=065315&locator=svelte-app%40workspace%3A."
|
||||||
checksum: 1f19933b85edf9ade3a2b2bab296f70c0eb844fbfaa797d283cac269c040454e96443917f58432a4cea02f180acbbc46c5b3b63511ece5174bf1f993b28fba00
|
checksum: d60e8503f734a109f51f817dcefa33d9650e282358e411c69b2457ee93fe8173e596277feb02b805a4489975a2fca2dc9892d343343cb1368152ab6deb3f93ff
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue