Fix for duplicate app, PR feedback. Update for View only UX in app row, ensure favourite is displayed
This commit is contained in:
parent
780e11af47
commit
c5753dab0a
|
@ -80,9 +80,9 @@
|
||||||
<Body size="S">{app.deployed ? "Published" : "Unpublished"}</Body>
|
<Body size="S">{app.deployed ? "Published" : "Unpublished"}</Body>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{#if isBuilder}
|
<div class="actions-wrap">
|
||||||
<div class="actions-wrap">
|
<div class="app-row-actions">
|
||||||
<div class="app-row-actions">
|
{#if isBuilder}
|
||||||
<div class="row-action">
|
<div class="row-action">
|
||||||
<Button size="S" secondary on:click={lockedAction || goToBuilder}>
|
<Button size="S" secondary on:click={lockedAction || goToBuilder}>
|
||||||
Edit
|
Edit
|
||||||
|
@ -99,17 +99,16 @@
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{:else}
|
||||||
<div class="favourite-icon">
|
<!-- this can happen if an app builder has app user access to an app -->
|
||||||
<FavouriteAppButton {app} noWrap />
|
<Button size="S" secondary>View</Button>
|
||||||
</div>
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
{:else if app.deployed}
|
|
||||||
<!-- this can happen if an app builder has app user access to an app -->
|
<div class="favourite-icon">
|
||||||
<div class="app-row-actions">
|
<FavouriteAppButton {app} noWrap />
|
||||||
<Button size="S" secondary>View</Button>
|
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|
|
@ -59,6 +59,7 @@ import sdk from "../../sdk"
|
||||||
import { builderSocket } from "../../websockets"
|
import { builderSocket } from "../../websockets"
|
||||||
import { sdk as sharedCoreSDK } from "@budibase/shared-core"
|
import { sdk as sharedCoreSDK } from "@budibase/shared-core"
|
||||||
import * as appMigrations from "../../appMigrations"
|
import * as appMigrations from "../../appMigrations"
|
||||||
|
import { cloneDeep } from "lodash"
|
||||||
|
|
||||||
// utility function, need to do away with this
|
// utility function, need to do away with this
|
||||||
async function getLayouts() {
|
async function getLayouts() {
|
||||||
|
@ -682,7 +683,10 @@ export async function duplicateApp(
|
||||||
// Build a new request
|
// Build a new request
|
||||||
const createRequest = {
|
const createRequest = {
|
||||||
roleId: ctx.roleId,
|
roleId: ctx.roleId,
|
||||||
user: ctx.user,
|
user: {
|
||||||
|
...cloneDeep(ctx.user),
|
||||||
|
_id: dbCore.getGlobalIDFromUserMetadataID(ctx.user._id || ""),
|
||||||
|
},
|
||||||
request: {
|
request: {
|
||||||
body: createRequestBody,
|
body: createRequestBody,
|
||||||
},
|
},
|
||||||
|
|
|
@ -199,12 +199,3 @@ export async function updateSelf(
|
||||||
_rev: user._rev!,
|
_rev: user._rev!,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// export default {
|
|
||||||
// generateAPIKey,
|
|
||||||
// fetchAPIKey,
|
|
||||||
// getSelf,
|
|
||||||
// syncAppFavourites,
|
|
||||||
// fetchAppsByIds,
|
|
||||||
// updateSelf,
|
|
||||||
// }
|
|
||||||
|
|
Loading…
Reference in New Issue