Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
f51e616
Return last change upon fetching repo list
underscope Jul 12, 2019
103c235
Revamped catalog card
underscope Jul 12, 2019
dadfad9
Updated catalog container
underscope Jul 12, 2019
bae6eb8
Renamed default schema
underscope Jul 12, 2019
04f7093
Created simple sorting component
underscope Jul 14, 2019
26b1666
Added pinned attr to the courseUser model
underscope Jul 14, 2019
2414812
Added missing courseUser relationship :wrench:
underscope Jul 14, 2019
c00ec1b
Course ctrl updates
underscope Jul 14, 2019
2baa5a7
:lipstick:
underscope Jul 14, 2019
dacc08e
Updated repo creation modal
underscope Jul 14, 2019
afc508f
Store support for pinned courses
underscope Jul 14, 2019
33d5206
Added pin btn
underscope Jul 14, 2019
4dca4e6
Added show pinned filter & sorting
underscope Jul 14, 2019
4e93334
Updated create btn position
underscope Jul 14, 2019
00e1a69
:lipstick:
underscope Jul 15, 2019
95aa9f4
Cleanup :lipstick:
underscope Jul 15, 2019
9cb9867
Updated footer height :lipstick:
underscope Jul 15, 2019
55f2ee9
Added tooltip on pin btn
underscope Jul 15, 2019
0d70e22
Remove pinned filter after unpinning all repos
underscope Jul 15, 2019
a665610
Reset order & refetch upon repo creation
underscope Jul 15, 2019
7070c37
Tweaked logo pos
underscope Jul 15, 2019
8930e67
Updated change icon
underscope Jul 15, 2019
6d7384a
Match new catalog style
underscope Jul 15, 2019
7cd0986
Updated search component
underscope Jul 17, 2019
94428d7
Unified retrieval of pinned items
underscope Jul 17, 2019
858ed9c
Removed course stats
underscope Jul 17, 2019
3d1ce07
Tweaked sort options :wrench:
underscope Jul 17, 2019
559fb00
Fixed issue with validation errors upon reopen
underscope Jul 17, 2019
59da067
Fixed issue with ordering
underscope Jul 17, 2019
050e912
:wrench:
underscope Jul 17, 2019
572f18c
:wrench:
underscope Jul 18, 2019
fced098
Tweaked system settings UI
underscope Jul 18, 2019
69ac85d
Merge model upon update :wrench:
underscope Jul 19, 2019
30085a1
Tweaked catalog fetch
underscope Jul 22, 2019
dfbf3ca
UI tweaks :lipstick:
underscope Jul 22, 2019
db7a0f8
Fixed issue with search persistance :wrench:
underscope Jul 22, 2019
a8e768f
Merge branch 'develop' into feature/catalog-improvements
underscope Jul 23, 2019
89a57e7
Reset filters upon adding new repo
underscope Jul 23, 2019
e0f4bec
Fixed issue with unpinning a repo
underscope Jul 23, 2019
f91c5b2
Check validation before reseting pw
underscope Jul 23, 2019
392cb05
Tweaked reset pw flow :wrench:
underscope Jul 23, 2019
6363595
:lipstick:
underscope Jul 23, 2019
3072501
Tweaked user mgm filters
underscope Jul 23, 2019
6b6579d
Removed obsolete mutation
underscope Jul 23, 2019
77be439
:wrench:
underscope Jul 23, 2019
ac9ee02
Cleanup :lipstick:
underscope Jul 23, 2019
d352bf2
:lipstick:
underscope Jul 23, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 18 additions & 9 deletions client/components/auth/ForgotPassword.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
class="mb-4 body-2">
{{ error || 'Sending reset email...' }}
</v-alert>
<form @submit.prevent="submit">
<form v-if="!error" @submit.prevent="submit">
<v-text-field
v-validate="{ required: true, email: true }"
v-model="email"
Expand All @@ -15,13 +15,19 @@
type="email"
name="email"
label="Please enter your email"/>
<v-btn :disabled="!isValid" color="primary" outline block type="submit">
<v-btn
:disabled="!isValid || showMessage"
color="primary"
outline
block
type="submit">
Send reset email
</v-btn>
<div class="options">
<a @click="$router.go(-1)">Back</a>
</div>
</form>
<a v-else @click.stop="resetInput">Retry</a>
</div>
</template>

Expand All @@ -30,15 +36,15 @@ import { delay } from 'bluebird';
import { mapActions } from 'vuex';
import { withValidation } from 'utils/validation';

const getDefaultData = () => ({
email: '',
showMessage: false,
error: null
});

export default {
mixins: [withValidation()],
data() {
return {
email: '',
showMessage: false,
error: null
};
},
data: () => getDefaultData(),
computed: {
isValid: vm => vm.email && vm.vErrors.count() === 0
},
Expand All @@ -49,6 +55,9 @@ export default {
Promise.all([this.forgotPassword({ email: this.email }), delay(3000)])
.then(() => this.$router.push('/'))
.catch(() => (this.error = 'Something went wrong!'));
},
resetInput() {
Object.assign(this, getDefaultData());
}
}
};
Expand Down
3 changes: 2 additions & 1 deletion client/components/auth/ResetPassword.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ export default {
...mapActions(['resetPassword']),
submit() {
const { token } = this.$route.params;
this.$validator.validateAll().then(() => {
this.$validator.validateAll().then(isValid => {
if (!isValid) return;
return this.resetPassword({ password: this.password, token })
.then(() => this.$router.push('/'))
.catch(() => (this.error = 'An error has occurred!'));
Expand Down
103 changes: 103 additions & 0 deletions client/components/catalog/Card.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
<template>
<v-card @click="navigateTo" class="repository-card">
<div class="card-heading blue-grey darken-4">
<v-chip :color="repository.data.color" small label class="ml-3 mr-0"/>
<v-chip color="grey lighten-3" small label class="ml-0">
{{ schema }}
</v-chip>
<v-card-title class="headline grey--text text--lighten-4 pt-1">
{{ name }}
</v-card-title>
</div>
<div class="card-body">
<div class="pb-2 grey--text text--darken-2">
<v-icon color="primary" class="pr-1">mdi-history</v-icon>
<span>{{ userAction.createdAt | formatDate }}</span>
<div>{{ userAction.user.email }}</div>
</div>
<div class="desc grey--text text--darken-3">{{ description }}</div>
</div>
<v-card-actions class="px-2 py-1">
<v-btn @click.stop="pin({ id: repository.id, pin: !isPinned })" icon>
<v-icon
:color="isPinned ? 'pink': 'grey'"
:class="{ 'mdi-rotate-45': isPinned }">
mdi-pin
</v-icon>
</v-btn>
</v-card-actions>
</v-card>
</template>

<script>
import first from 'lodash/first';
import get from 'lodash/get';
import { getSchema } from 'shared/activities';
import { mapActions } from 'vuex';
import truncate from 'truncate';

export default {
props: {
repository: { type: Object, required: true }
},
computed: {
name: ({ repository }) => truncate(repository.name, 70),
description: ({ repository }) => truncate(repository.description, 100),
schema: ({ repository }) => getSchema(repository.schema).name,
userAction: ({ repository }) => first(repository.revisions),
isPinned: ({ repository }) => get(repository, 'courseUser.pinned', false)
},
methods: {
...mapActions('courses', ['pin']),
navigateTo() {
if (window.getSelection().toString()) return;
this.$router.push({
name: 'course',
params: { courseId: this.repository.id }
});
}
}
};
</script>

<style lang="scss" scoped>
.repository-card {
text-align: left;
transition: box-shadow 0.1s ease;
cursor: pointer;

&:hover {
box-shadow: 0 10px 20px rgba(0,0,0,0.2), 0 8px 8px rgba(0,0,0,0.18);
}
}

.card-heading {
height: 146px;
padding: 8px 0 0;
overflow: hidden;

.v-chip {
font-weight: 600;
text-transform: uppercase;
}

@media (max-width: 1263px) {
height: 180px;
}
}

.card-body {
margin-bottom: 10px;
padding: 14px 24px 0;

.desc {
height: 60px;
font-weight: 500;
overflow: hidden;

@media (max-width: 1263px) {
height: 85px;
}
}
}
</style>
27 changes: 0 additions & 27 deletions client/components/catalog/Card/Stat.vue

This file was deleted.

113 changes: 0 additions & 113 deletions client/components/catalog/Card/index.vue

This file was deleted.

Loading