Skip to content
This repository has been archived by the owner on Nov 14, 2022. It is now read-only.

Refactor backend and frontend #7

Merged
merged 12 commits into from
Mar 11, 2019
Merged
Prev Previous commit
🎨 Format frontend code
  • Loading branch information
tiangolo committed Mar 11, 2019
commit 3a8db5082211a3f7e482d551397fb8f789201ae5
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,8 @@
<template>
<div class="my-3">
<div class="subheading secondary--text text--lighten-2">Username</div>
<div
class="title primary--text text--darken-2"
v-if="user"
>{{user.username}}</div>
<div
class="title primary--text text--darken-2"
v-else
>-----</div>
<div class="title primary--text text--darken-2" v-if="user">{{user.username}}</div>
<div class="title primary--text text--darken-2" v-else>-----</div>
</div>
<v-form
v-model="valid"
Expand All @@ -37,17 +31,9 @@
required
></v-text-field>
<div class="subheading secondary--text text--lighten-2">Roles</div>
<v-checkbox
v-for="(value, role) in selectedRoles"
:key="role"
:label="role"
v-model="selectedRoles[role]"
></v-checkbox>
<v-checkbox v-for="(value, role) in selectedRoles" :key="role" :label="role" v-model="selectedRoles[role]"></v-checkbox>
<div class="subheading secondary--text text--lighten-2">Disable User <span v-if="userDisabled">(currently disabled)</span><span v-else>(currently enabled)</span></div>
<v-checkbox
:label="'Disabled'"
v-model="userDisabled"
></v-checkbox>
<v-checkbox :label="'Disabled'" v-model="userDisabled"></v-checkbox>
<v-layout align-center>
<v-flex shrink>
<v-checkbox
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,18 @@
<v-card-text>
<div class="my-4">
<div class="subheading secondary--text text--lighten-3">Full Name</div>
<div
class="title primary--text text--darken-2"
v-if="userProfile && userProfile.full_name"
>{{userProfile.full_name}}</div>
<div
class="title primary--text text--darken-2"
v-else
>-----</div>
<div class="title primary--text text--darken-2" v-if="userProfile && userProfile.full_name">{{userProfile.full_name}}</div>
<div class="title primary--text text--darken-2" v-else>-----</div>
</div>
<div class="my-3">
<div class="subheading secondary--text text--lighten-3">Username</div>
<div
class="title primary--text text--darken-2"
v-if="userProfile && userProfile.username"
>{{userProfile.username}}</div>
<div
class="title primary--text text--darken-2"
v-else
>-----</div>
<div class="title primary--text text--darken-2" v-if="userProfile && userProfile.username">{{userProfile.username}}</div>
<div class="title primary--text text--darken-2" v-else>-----</div>
</div>
<div class="my-3">
<div class="subheading secondary--text text--lighten-3">Email</div>
<div
class="title primary--text text--darken-2"
v-if="userProfile && userProfile.email"
>{{userProfile.email}}</div>
<div
class="title primary--text text--darken-2"
v-else
>-----</div>
<div class="title primary--text text--darken-2" v-if="userProfile && userProfile.email">{{userProfile.email}}</div>
<div class="title primary--text text--darken-2" v-else>-----</div>
</div>
</v-card-text>
<v-card-actions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,8 @@
<template>
<div class="my-3">
<div class="subheading secondary--text text--lighten-2">Username</div>
<div
class="title primary--text text--darken-2"
v-if="userProfile.username"
>{{userProfile.username}}</div>
<div
class="title primary--text text--darken-2"
v-else
>-----</div>
<div class="title primary--text text--darken-2" v-if="userProfile.username">{{userProfile.username}}</div>
<div class="title primary--text text--darken-2" v-else>-----</div>
</div>
<v-form
v-model="valid"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,11 @@
<template>
<div class="my-3">
<div class="subheading secondary--text text--lighten-2">Username</div>
<div
class="title primary--text text--darken-2"
v-if="userProfile.username"
>{{userProfile.username}}</div>
<div
class="title primary--text text--darken-2"
v-else
>-----</div>
<div class="title primary--text text--darken-2" v-if="userProfile.username">{{userProfile.username}}</div>
<div class="title primary--text text--darken-2" v-else>-----</div>
</div>
<v-form ref="form">
<v-text-field
<v-text-field
type="password"
ref="password"
label="Password"
Expand All @@ -27,8 +21,7 @@
data-vv-rules="required"
v-validate="'required'"
v-model="password1"
:error-messages="errors.first('password')"
>
:error-messages="errors.first('password')">
</v-text-field>
<v-text-field
type="password"
Expand All @@ -39,8 +32,7 @@
data-vv-as="password"
v-validate="'required|confirmed:password'"
v-model="password2"
:error-messages="errors.first('password_confirmation')"
>
:error-messages="errors.first('password_confirmation')">
</v-text-field>
</v-form>
</template>
Expand All @@ -49,10 +41,7 @@
<v-spacer></v-spacer>
<v-btn @click="cancel">Cancel</v-btn>
<v-btn @click="reset">Reset</v-btn>
<v-btn
@click="submit"
:disabled="!valid"
>Save</v-btn>
<v-btn @click="submit" :disabled="!valid">Save</v-btn>
</v-card-actions>
</v-card>
</v-container>
Expand Down