mirror of
https://github.com/Bubka/2FAuth.git
synced 2024-11-25 01:34:15 +01:00
Create and Edit update with icon field
This commit is contained in:
parent
a5858093b0
commit
20a2d40a85
@ -32,7 +32,8 @@ public function store(Request $request)
|
||||
$twofaccount = TwoFAccount::create([
|
||||
'name' => $request->name,
|
||||
'email' => $request->email,
|
||||
'uri' => $request->uri
|
||||
'uri' => $request->uri,
|
||||
'icon' => $request->icon
|
||||
]);
|
||||
|
||||
return response()->json($twofaccount, 201);
|
||||
|
@ -1,42 +1,49 @@
|
||||
<template>
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-8">
|
||||
<div class="card card-default">
|
||||
<div class="card-header">Register</div>
|
||||
<div class="card-body">
|
||||
<form @submit.prevent="createAccount">
|
||||
<div class="field">
|
||||
<label class="label">Name</label>
|
||||
<div class="control">
|
||||
<input class="input" type="text" placeholder="Text input" v-model="twofaccount.name" required autofocus>
|
||||
<div class="modal modal-otp is-active">
|
||||
<div class="modal-background"></div>
|
||||
<div class="modal-content">
|
||||
<section class="section">
|
||||
<div class="columns is-centered">
|
||||
<div class="column is-three-quarters">
|
||||
<div class="box has-background-black-ter ">
|
||||
<form @submit.prevent="createAccount">
|
||||
<div class="field">
|
||||
<label class="label">Name</label>
|
||||
<div class="control">
|
||||
<input class="input" type="text" placeholder="Name" v-model="twofaccount.name" required autofocus />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="label">Email</label>
|
||||
<div class="control">
|
||||
<input class="input" type="email" placeholder="Text input" v-model="twofaccount.email" required>
|
||||
<div class="field">
|
||||
<label class="label">Email</label>
|
||||
<div class="control">
|
||||
<input class="input" type="text" placeholder="Email" v-model="twofaccount.email" required />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="label">Uri</label>
|
||||
<div class="control">
|
||||
<input class="input" type="text" placeholder="Text input" v-model="twofaccount.uri" required>
|
||||
<div class="field">
|
||||
<label class="label">Uri</label>
|
||||
<div class="control">
|
||||
<input class="input" type="text" placeholder="Uri" v-model="twofaccount.uri" required />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="field is-grouped">
|
||||
<div class="control">
|
||||
<button class="button is-link">Submit</button>
|
||||
<div class="field">
|
||||
<label class="label">Icon</label>
|
||||
<div class="control">
|
||||
<input class="input" type="text" placeholder="Icon" v-model="twofaccount.icon" required />
|
||||
</div>
|
||||
</div>
|
||||
<div class="control">
|
||||
<router-link :to="{ name: 'accounts' }" class="button is-text">Cancel</router-link>
|
||||
<div class="field is-grouped">
|
||||
<div class="control">
|
||||
<router-link :to="{ name: 'accounts' }" class="button is-light">Cancel</router-link>
|
||||
</div>
|
||||
<div class="control">
|
||||
<button type="submit" class="button is-link">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -1,27 +1,45 @@
|
||||
<template>
|
||||
<form @submit.prevent="updateAccount">
|
||||
<div class="field">
|
||||
<label class="label">Name</label>
|
||||
<div class="control">
|
||||
<input class="input" type="text" placeholder="Text input" v-model="twofaccount.name" required autofocus />
|
||||
</div>
|
||||
<div class="modal modal-otp is-active">
|
||||
<div class="modal-background"></div>
|
||||
<div class="modal-content">
|
||||
<section class="section">
|
||||
<div class="columns is-centered">
|
||||
<div class="column is-three-quarters">
|
||||
<div class="box has-background-black-ter ">
|
||||
<form @submit.prevent="updateAccount">
|
||||
<div class="field">
|
||||
<label class="label">Name</label>
|
||||
<div class="control">
|
||||
<input class="input" type="text" placeholder="Account name" v-model="twofaccount.name" required autofocus />
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="label">Email</label>
|
||||
<div class="control">
|
||||
<input class="input" type="email" placeholder="account email" v-model="twofaccount.email" required />
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="label">Icon</label>
|
||||
<div class="control">
|
||||
<input class="input" type="text" placeholder="account icon" v-model="twofaccount.icon" required />
|
||||
</div>
|
||||
</div>
|
||||
<div class="field is-grouped">
|
||||
<div class="control">
|
||||
<router-link :to="{ name: 'accounts' }" class="button is-light">Cancel</router-link>
|
||||
</div>
|
||||
<div class="control">
|
||||
<button type="submit" class="button is-link">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="label">Email</label>
|
||||
<div class="control">
|
||||
<input class="input" type="email" placeholder="Text input" v-model="twofaccount.email" required />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="field is-grouped">
|
||||
<div class="control">
|
||||
<button class="button is-link">Submit</button>
|
||||
</div>
|
||||
<div class="control">
|
||||
<router-link :to="{ name: 'accounts' }" class="button is-text">Cancel</router-link>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
26
resources/sass/app.scss
vendored
26
resources/sass/app.scss
vendored
@ -68,4 +68,30 @@ nav.level {
|
||||
.dots li:last-child() {
|
||||
// background-color: black;
|
||||
//display:none;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.input, .select select, .textarea {
|
||||
background-color: hsl(0, 0%, 21%);
|
||||
border-color: hsl(0, 0%, 29%);
|
||||
color: hsl(0, 0%, 71%);
|
||||
}
|
||||
|
||||
.label {
|
||||
color: hsl(0, 0%, 48%);
|
||||
}
|
||||
|
||||
.modal .field.is-grouped:last-child {
|
||||
justify-content: flex-end;
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
.modal-action-links {
|
||||
position: absolute;
|
||||
display: block;
|
||||
bottom: 0px;
|
||||
left: 0px;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
Loading…
Reference in New Issue
Block a user