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!({
|
||||
"name": state.vault_name,
|
||||
"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;
|
||||
location: string;
|
||||
version: string;
|
||||
desktop: boolean;
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
import { notify, UpNotification } from "../../notifications";
|
||||
import IconButton from "../utils/IconButton.svelte";
|
||||
import { useParams } from "svelte-navigator";
|
||||
import { vaultInfo } from "../../util/info";
|
||||
const dispatch = createEventDispatcher();
|
||||
const params = useParams();
|
||||
|
||||
|
@ -99,14 +100,16 @@
|
|||
<Ellipsis value={displayLabel} />
|
||||
{/if}
|
||||
</div>
|
||||
{#if banner && isFile}
|
||||
<div class="icon">
|
||||
<IconButton
|
||||
name="window-open"
|
||||
on:click={nativeOpen}
|
||||
title="Open in default application..."
|
||||
/>
|
||||
</div>
|
||||
{#if $vaultInfo?.desktop}
|
||||
{#if banner && isFile}
|
||||
<div class="icon">
|
||||
<IconButton
|
||||
name="window-open"
|
||||
on:click={nativeOpen}
|
||||
title="Open in default application..."
|
||||
/>
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -4008,8 +4008,8 @@ __metadata:
|
|||
|
||||
"upend@file:../tools/upend_js::locator=svelte-app%40workspace%3A.":
|
||||
version: 0.0.1
|
||||
resolution: "upend@file:../tools/upend_js#../tools/upend_js::hash=08bbf6&locator=svelte-app%40workspace%3A."
|
||||
checksum: 1f19933b85edf9ade3a2b2bab296f70c0eb844fbfaa797d283cac269c040454e96443917f58432a4cea02f180acbbc46c5b3b63511ece5174bf1f993b28fba00
|
||||
resolution: "upend@file:../tools/upend_js#../tools/upend_js::hash=065315&locator=svelte-app%40workspace%3A."
|
||||
checksum: d60e8503f734a109f51f817dcefa33d9650e282358e411c69b2457ee93fe8173e596277feb02b805a4489975a2fca2dc9892d343343cb1368152ab6deb3f93ff
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
|
|
Loading…
Reference in New Issue