aboutsummaryrefslogtreecommitdiff
path: root/packages/client/src/components
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2021-06-09 17:37:43 +0200
committerHampusM <hampus@hampusmat.com>2021-06-09 17:37:43 +0200
commit75e8ae6ebd9df23275fb14eea88da0b56d006313 (patch)
treecd8a261f856e2177626272e7018041be3102304b /packages/client/src/components
parentdae7377188242e8dbc18f029bc97b7def9acb13c (diff)
Frontend has proper error handling & api fetching is in it's own file
Diffstat (limited to 'packages/client/src/components')
-rw-r--r--packages/client/src/components/BaseErrorMessage.vue27
-rw-r--r--packages/client/src/components/RepositoryTreeTree.vue2
2 files changed, 28 insertions, 1 deletions
diff --git a/packages/client/src/components/BaseErrorMessage.vue b/packages/client/src/components/BaseErrorMessage.vue
new file mode 100644
index 0000000..7f193ce
--- /dev/null
+++ b/packages/client/src/components/BaseErrorMessage.vue
@@ -0,0 +1,27 @@
+<template>
+ <div v-if="fetchFailed" class="fs-5">
+ <span class="fetch-error-title">Error</span>
+ <p>{{ fetchFailed }}</p>
+ </div>
+</template>
+
+<script>
+export default {
+ name: "BaseErrorMessage",
+ props: {
+ fetchFailed: {
+ type: String,
+ required: true
+ }
+ }
+};
+</script>
+
+<style lang="scss" scoped>
+@use "../scss/colors";
+
+.fetch-error-title {
+ color: colors.$danger;
+ font-weight: 700;
+}
+</style>
diff --git a/packages/client/src/components/RepositoryTreeTree.vue b/packages/client/src/components/RepositoryTreeTree.vue
index 89ffb81..376cafc 100644
--- a/packages/client/src/components/RepositoryTreeTree.vue
+++ b/packages/client/src/components/RepositoryTreeTree.vue
@@ -38,7 +38,7 @@
</a>
</td>
<td>
- {{ getPrettyLastUpdated(entry.last_commit.time) }}
+ {{ getPrettyLastUpdated(entry.last_commit.date) }}
</td>
</tr>
</tbody>