Skip to content

Commit 7fd8723

Browse files
improve pagination
1 parent 5195cfb commit 7fd8723

File tree

5 files changed

+11
-5
lines changed

5 files changed

+11
-5
lines changed

public/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
<meta http-equiv="X-UA-Compatible" content="IE=edge">
66
<meta name="viewport" content="width=device-width,initial-scale=1.0">
77
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
8-
<title>Keep learning</title>
8+
<title>Tango</title>
99
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900">
1010
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@mdi/font@latest/css/materialdesignicons.min.css">
1111
</head>
1212
<body>
1313
<noscript>
14-
<strong>We're sorry but Keep learning doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
14+
<strong>We're sorry but Tango doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
1515
</noscript>
1616
<div id="app"></div>
1717
<!-- built files will be auto injected -->

src/layouts/LayoutDefault.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
:to="{ name: 'Home' }"
1111
class="d-flex align-center white--text"
1212
>
13-
Keep learning!
13+
Tango
1414
</router-link>
1515

1616
<v-spacer></v-spacer>

src/mixins/pagination-mixin.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ export class PaginationMixin extends Vue {
1212
return Math.ceil(this.pagination.count / PAGE_SIZE)
1313
}
1414

15+
get noPagination (): boolean {
16+
return this.pagination.next === null && this.pagination.previous === null
17+
}
18+
1519
getList (query?: PaginationQuery): void {
1620
throw Error('You must implement `getList` function when using `PaginationMixin`')
1721
}

src/views/classroom/ClassroomList.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
v-if="loading"
2222
indeterminate
2323
color="primary"
24+
class="mt-5"
2425
></v-progress-circular>
2526

2627
<p v-else-if="noClassrooms" v-text="'You don\'t have any classroom yet.'" />
@@ -68,7 +69,7 @@
6869
</v-row>
6970
</v-card-text>
7071

71-
<v-card-actions>
72+
<v-card-actions v-if="!noPagination">
7273
<v-spacer></v-spacer>
7374
<v-pagination
7475
v-model="page"

src/views/reading-exercise/ReadingExerciseList.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
v-if="loading"
2222
indeterminate
2323
color="primary"
24+
class="mt-5"
2425
></v-progress-circular>
2526

2627
<p v-else-if="noExercises" v-text="'You don\'t have any exercises yet.'" />
@@ -78,7 +79,7 @@
7879
</v-row>
7980
</v-card-text>
8081

81-
<v-card-actions>
82+
<v-card-actions v-if="!noPagination">
8283
<v-spacer></v-spacer>
8384
<v-pagination
8485
v-model="page"

0 commit comments

Comments
 (0)