Removing all login/logout functionality from apps.

This commit is contained in:
mike12345567 2021-05-20 13:05:58 +01:00
parent 0c3bc2e4f7
commit d301ea48a9
6 changed files with 1 additions and 140 deletions

View File

@ -1,40 +0,0 @@
<script>
import { Label } from "@budibase/bbui"
import { getBindableProperties } from "builderStore/dataBinding"
import { currentAsset, store } from "builderStore"
import DrawerBindableInput from "components/common/bindings/DrawerBindableInput.svelte"
export let parameters
let bindingDrawer
$: bindings = getBindableProperties($currentAsset, $store.selectedComponentId)
</script>
<div class="root">
<Label small>Email</Label>
<DrawerBindableInput
title="Email"
value={parameters.email}
on:change={value => (parameters.email = value.detail)}
{bindings}
/>
<Label small>Password</Label>
<DrawerBindableInput
title="Password"
value={parameters.password}
on:change={value => (parameters.password = value.detail)}
{bindings}
/>
</div>
<style>
.root {
display: grid;
column-gap: var(--spacing-l);
row-gap: var(--spacing-s);
grid-template-columns: auto 1fr;
align-items: baseline;
max-width: 800px;
margin: 0 auto;
}
</style>

View File

@ -1,14 +0,0 @@
<script>
import { Body } from "@budibase/bbui"
</script>
<div class="root">
<Body size="S">This action doesn't require any additional settings.</Body>
</div>
<style>
.root {
max-width: 800px;
margin: 0 auto;
}
</style>

View File

@ -4,8 +4,6 @@ import DeleteRow from "./DeleteRow.svelte"
import ExecuteQuery from "./ExecuteQuery.svelte" import ExecuteQuery from "./ExecuteQuery.svelte"
import TriggerAutomation from "./TriggerAutomation.svelte" import TriggerAutomation from "./TriggerAutomation.svelte"
import ValidateForm from "./ValidateForm.svelte" import ValidateForm from "./ValidateForm.svelte"
import LogIn from "./LogIn.svelte"
import LogOut from "./LogOut.svelte"
// defines what actions are available, when adding a new one // defines what actions are available, when adding a new one
// the component is the setup panel for the action // the component is the setup panel for the action
@ -37,12 +35,4 @@ export default [
name: "Validate Form", name: "Validate Form",
component: ValidateForm, component: ValidateForm,
}, },
{
name: "Log In",
component: LogIn,
},
{
name: "Log Out",
component: LogOut,
},
] ]

View File

@ -22,10 +22,7 @@ const {
} = require("../../db/utils") } = require("../../db/utils")
const { BUILTIN_ROLE_IDS, AccessController } = require("@budibase/auth/roles") const { BUILTIN_ROLE_IDS, AccessController } = require("@budibase/auth/roles")
const { BASE_LAYOUTS } = require("../../constants/layouts") const { BASE_LAYOUTS } = require("../../constants/layouts")
const { const { createHomeScreen } = require("../../constants/screens")
createHomeScreen,
createLoginScreen,
} = require("../../constants/screens")
const { cloneDeep } = require("lodash/fp") const { cloneDeep } = require("lodash/fp")
const { processObject } = require("@budibase/string-templates") const { processObject } = require("@budibase/string-templates")
const { getAllApps } = require("../../utilities") const { getAllApps } = require("../../utilities")
@ -260,9 +257,5 @@ const createEmptyAppPackage = async (ctx, app) => {
homeScreen._id = generateScreenID() homeScreen._id = generateScreenID()
screensAndLayouts.push(homeScreen) screensAndLayouts.push(homeScreen)
const loginScreen = createLoginScreen(app)
loginScreen._id = generateScreenID()
screensAndLayouts.push(loginScreen)
await db.bulkDocs(screensAndLayouts) await db.bulkDocs(screensAndLayouts)
} }

View File

@ -1,6 +1,5 @@
const { BUILTIN_ROLE_IDS } = require("@budibase/auth/roles") const { BUILTIN_ROLE_IDS } = require("@budibase/auth/roles")
const { BASE_LAYOUT_PROP_IDS } = require("./layouts") const { BASE_LAYOUT_PROP_IDS } = require("./layouts")
const { LOGO_URL } = require("../constants")
exports.createHomeScreen = () => ({ exports.createHomeScreen = () => ({
description: "", description: "",
@ -49,60 +48,3 @@ exports.createHomeScreen = () => ({
}, },
name: "home-screen", name: "home-screen",
}) })
exports.createLoginScreen = app => ({
description: "",
url: "",
layoutId: BASE_LAYOUT_PROP_IDS.PUBLIC,
props: {
_instanceName: "LoginScreenContainer",
_id: "5beb4c7b-3c8b-49b2-b8b3-d447dc76dda7",
_component: "@budibase/standard-components/container",
_styles: {
normal: {
flex: "1 1 auto",
display: "flex",
"flex-direction": "column",
"justify-content": "center",
"align-items": "center",
},
hover: {},
active: {},
selected: {},
},
_transition: "fade",
type: "div",
_children: [
{
_id: "781e497e-2e7c-11eb-adc1-0242ac120002",
_component: "@budibase/standard-components/login",
_styles: {
normal: {
padding: "64px",
background: "rgba(255, 255, 255, 0.4)",
"border-radius": "0.5rem",
"margin-top": "0px",
"box-shadow":
"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)",
"font-size": "16px",
"font-family": "Inter",
flex: "0 1 auto",
},
hover: {},
active: {},
selected: {},
},
logo: LOGO_URL,
title: `Log in to ${app.name}`,
buttonText: "Log In",
_children: [],
_instanceName: "Login",
},
],
},
routing: {
route: "/",
roleId: BUILTIN_ROLE_IDS.PUBLIC,
},
name: "login-screen",
})

View File

@ -5,13 +5,6 @@
const component = getContext("component") const component = getContext("component")
export let logoUrl export let logoUrl
const logOut = async () => {
if ($builderStore.inBuilder) {
return
}
await authStore.actions.logOut()
}
</script> </script>
<div class="nav" use:styleable={$component.styles}> <div class="nav" use:styleable={$component.styles}>
@ -21,9 +14,6 @@
<img class="logo" alt="logo" src={logoUrl} height="48" /> <img class="logo" alt="logo" src={logoUrl} height="48" />
{/if} {/if}
</a> </a>
<div class="nav__controls">
<div on:click={logOut}>Log out</div>
</div>
</div> </div>
<div class="nav__menu"> <div class="nav__menu">
<slot /> <slot />