From e58963410ec6a82dfb5718ba982a347951825c10 Mon Sep 17 00:00:00 2001 From: Redblueflame Date: Tue, 30 Mar 2021 17:41:20 +0200 Subject: [PATCH] Added illustration & mezssage when a page doe not contain any mod / projects (#133) * Added new messages with illustration displaying that this page does not contain any elements Fixed 404 error after deleting mod * Fixed typo --- .../illustrations/follow_illustration.svg | 78 +++++++++ assets/images/illustrations/security.svg | 109 +++++++++++++ assets/images/illustrations/up_to_date.svg | 49 ++++++ pages/dashboard/follows.vue | 92 +++++++---- pages/dashboard/moderation.vue | 154 +++++++++++------- pages/dashboard/notifications.vue | 100 ++++++++---- pages/dashboard/projects.vue | 87 +++++++--- pages/mod/_id/settings.vue | 1 + 8 files changed, 521 insertions(+), 149 deletions(-) create mode 100644 assets/images/illustrations/follow_illustration.svg create mode 100644 assets/images/illustrations/security.svg create mode 100644 assets/images/illustrations/up_to_date.svg diff --git a/assets/images/illustrations/follow_illustration.svg b/assets/images/illustrations/follow_illustration.svg new file mode 100644 index 00000000..1abdf323 --- /dev/null +++ b/assets/images/illustrations/follow_illustration.svg @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + diff --git a/assets/images/illustrations/security.svg b/assets/images/illustrations/security.svg new file mode 100644 index 00000000..1c5eda5f --- /dev/null +++ b/assets/images/illustrations/security.svg @@ -0,0 +1,109 @@ + + + + + + + + + Security on + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/illustrations/up_to_date.svg b/assets/images/illustrations/up_to_date.svg new file mode 100644 index 00000000..fc4effc9 --- /dev/null +++ b/assets/images/illustrations/up_to_date.svg @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/pages/dashboard/follows.vue b/pages/dashboard/follows.vue index d2741ba9..2543e335 100644 --- a/pages/dashboard/follows.vue +++ b/pages/dashboard/follows.vue @@ -3,34 +3,44 @@

Followed mods

- -
- -
-
+
+ +
+ +
+
+
+
+
+ You don't have any followed mods.
+ Why don't you search for + new ones?
+
@@ -40,12 +50,14 @@ import axios from 'axios' import ModCard from '@/components/ProjectCard' import DashboardPage from '@/components/DashboardPage' import FollowIcon from '~/assets/images/utils/heart.svg?inline' +import FollowIllustration from '~/assets/images/illustrations/follow_illustration.svg?inline' export default { components: { DashboardPage, ModCard, FollowIcon, + FollowIllustration, }, async asyncData(data) { const res = await axios.get( @@ -58,7 +70,6 @@ export default { `https://api.modrinth.com/api/v1/mods?ids=${JSON.stringify(res.data)}` ) ).data - return { mods, } @@ -100,4 +111,27 @@ export default { margin-left: auto; padding: 0.5rem; } +.error { + display: flex; + flex-direction: column; + width: 100%; + justify-content: center; + align-items: center; + + .icon { + width: 8rem; + height: 8rem; + margin: 1.5rem 0; + } + + .text { + margin-bottom: 2rem; + font-size: 1.25rem; + text-align: center; + } + + .link { + text-decoration: underline; + } +} diff --git a/pages/dashboard/moderation.vue b/pages/dashboard/moderation.vue index 210f1aa1..b0740733 100644 --- a/pages/dashboard/moderation.vue +++ b/pages/dashboard/moderation.vue @@ -3,71 +3,84 @@

Mods

- -
- - -
-
+
+ +
+ + +
+
+
+
+ +
+ You are up-to-date! +

Reports

-
-
-
- Report for {{ report.item_type }} - {{ report.item_id }} +
+
+
+ Report for {{ report.item_type }} + {{ report.item_id }} + +
+

-

-

- Created {{ $dayjs(report.created).fromNow() }} -

- + Created {{ $dayjs(report.created).fromNow() }} +

+ +
+
-
+ +
+
+ You are up-to-date!
@@ -77,11 +90,13 @@ import axios from 'axios' import ModCard from '@/components/ProjectCard' import DashboardPage from '@/components/DashboardPage' +import Security from '~/assets/images/illustrations/security.svg?inline' export default { components: { DashboardPage, ModCard, + Security, }, async asyncData(data) { const mods = ( @@ -159,4 +174,23 @@ export default { } } } + +.error { + display: flex; + flex-direction: column; + width: 100%; + justify-content: center; + align-items: center; + + .icon { + width: 8rem; + height: 8rem; + margin: 1.5rem 0; + } + + .text { + margin-bottom: 2rem; + font-size: 1.25rem; + } +} diff --git a/pages/dashboard/notifications.vue b/pages/dashboard/notifications.vue index 66162a52..e3b1b305 100644 --- a/pages/dashboard/notifications.vue +++ b/pages/dashboard/notifications.vue @@ -3,54 +3,62 @@

My notifications

-
-
- -

- {{ notification.title }} -

-

- Notified {{ $dayjs(notification.created).fromNow() }} +

+
+
+ +

+ {{ notification.title }} +

+

+ Notified {{ $dayjs(notification.created).fromNow() }} +

+
+

+ {{ notification.text }}

- -

- {{ notification.text }} -

-
-
- -
-
- +
+
+ +
+
+ +
+
+
+ You are up-to-date! +