From 171f6f08943dd1d87120df3e4894ddcfd5e1d246 Mon Sep 17 00:00:00 2001
From: Alexander Tumin <iamtakingiteasy@eientei.org>
Date: Sat, 6 Aug 2022 17:26:43 +0300
Subject: Lists implementation

---
 src/components/lists_card/lists_card.vue | 51 ++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)
 create mode 100644 src/components/lists_card/lists_card.vue

(limited to 'src/components/lists_card/lists_card.vue')

diff --git a/src/components/lists_card/lists_card.vue b/src/components/lists_card/lists_card.vue
new file mode 100644
index 00000000..c0d58f18
--- /dev/null
+++ b/src/components/lists_card/lists_card.vue
@@ -0,0 +1,51 @@
+<template>
+  <div class="list-card">
+    <router-link
+      :to="{ name: 'list-timeline', params: { id: list.id } }"
+      class="list-name"
+    >
+      {{ list.title }}
+    </router-link>
+    <router-link
+      :to="{ name: 'list-edit', params: { id: list.id } }"
+      class="button-list-edit"
+    >
+      <FAIcon
+        class="fa-scale-110 fa-old-padding"
+        icon="ellipsis-h"
+      />
+    </router-link>
+  </div>
+</template>
+
+<script src="./lists_card.js"></script>
+
+<style lang="scss">
+@import '../../_variables.scss';
+
+.list-card {
+  display: flex;
+}
+
+.list-name,
+.button-list-edit {
+  margin: 0;
+  padding: 1em;
+  color: $fallback--link;
+  color: var(--link, $fallback--link);
+
+  &:hover {
+    background-color: $fallback--lightBg;
+    background-color: var(--selectedMenu, $fallback--lightBg);
+    color: $fallback--link;
+    color: var(--selectedMenuText, $fallback--link);
+    --faint: var(--selectedMenuFaintText, $fallback--faint);
+    --faintLink: var(--selectedMenuFaintLink, $fallback--faint);
+    --lightText: var(--selectedMenuLightText, $fallback--lightText);
+  }
+}
+
+.list-name {
+  flex-grow: 1;
+}
+</style>
-- 
cgit v1.2.3-70-g09d2


From 891fbf996d7ddd415d99ea9065d54b0f493b5422 Mon Sep 17 00:00:00 2001
From: Alexander Tumin <iamtakingiteasy@eientei.org>
Date: Sat, 6 Aug 2022 21:39:08 +0300
Subject: Lists implementation: make route naming consistent

---
 src/boot/routes.js                               | 4 ++--
 src/components/lists_card/lists_card.vue         | 4 ++--
 src/components/lists_edit/lists_edit.js          | 2 +-
 src/components/lists_menu/lists_menu_content.vue | 2 +-
 src/components/lists_new/lists_new.js            | 2 +-
 src/components/lists_timeline/lists_timeline.js  | 2 +-
 src/components/timeline_menu/timeline_menu.js    | 2 +-
 7 files changed, 9 insertions(+), 9 deletions(-)

(limited to 'src/components/lists_card/lists_card.vue')

diff --git a/src/boot/routes.js b/src/boot/routes.js
index 8bb7d196..95e47199 100644
--- a/src/boot/routes.js
+++ b/src/boot/routes.js
@@ -77,8 +77,8 @@ export default (store) => {
     { name: 'about', path: '/about', component: About },
     { name: 'user-profile', path: '/:_(users)?/:name', component: UserProfile },
     { name: 'lists', path: '/lists', component: Lists },
-    { name: 'list-timeline', path: '/lists/:id', component: ListsTimeline },
-    { name: 'list-edit', path: '/lists/:id/edit', component: ListsEdit }
+    { name: 'lists-timeline', path: '/lists/:id', component: ListsTimeline },
+    { name: 'lists-edit', path: '/lists/:id/edit', component: ListsEdit }
   ]
 
   if (store.state.instance.pleromaChatMessagesAvailable) {
diff --git a/src/components/lists_card/lists_card.vue b/src/components/lists_card/lists_card.vue
index c0d58f18..13866d8c 100644
--- a/src/components/lists_card/lists_card.vue
+++ b/src/components/lists_card/lists_card.vue
@@ -1,13 +1,13 @@
 <template>
   <div class="list-card">
     <router-link
-      :to="{ name: 'list-timeline', params: { id: list.id } }"
+      :to="{ name: 'lists-timeline', params: { id: list.id } }"
       class="list-name"
     >
       {{ list.title }}
     </router-link>
     <router-link
-      :to="{ name: 'list-edit', params: { id: list.id } }"
+      :to="{ name: 'lists-edit', params: { id: list.id } }"
       class="button-list-edit"
     >
       <FAIcon
diff --git a/src/components/lists_edit/lists_edit.js b/src/components/lists_edit/lists_edit.js
index 7b642929..a68bb589 100644
--- a/src/components/lists_edit/lists_edit.js
+++ b/src/components/lists_edit/lists_edit.js
@@ -79,7 +79,7 @@ const ListsNew = {
       this.$store.dispatch('setList', { id: this.id, title: this.title })
       this.$store.dispatch('setListAccounts', { id: this.id, accountIds: this.selectedUserIds })
 
-      this.$router.push({ name: 'list-timeline', params: { id: this.id } })
+      this.$router.push({ name: 'lists-timeline', params: { id: this.id } })
     },
     deleteList () {
       this.$store.dispatch('deleteList', { id: this.id })
diff --git a/src/components/lists_menu/lists_menu_content.vue b/src/components/lists_menu/lists_menu_content.vue
index 5606b74f..e910d6eb 100644
--- a/src/components/lists_menu/lists_menu_content.vue
+++ b/src/components/lists_menu/lists_menu_content.vue
@@ -6,7 +6,7 @@
     >
       <router-link
         class="menu-item"
-        :to="{ name: 'list-timeline', params: { id: list.id } }"
+        :to="{ name: 'lists-timeline', params: { id: list.id } }"
       >
         {{ list.title }}
       </router-link>
diff --git a/src/components/lists_new/lists_new.js b/src/components/lists_new/lists_new.js
index 7e3470fa..63dc28ad 100644
--- a/src/components/lists_new/lists_new.js
+++ b/src/components/lists_new/lists_new.js
@@ -70,7 +70,7 @@ const ListsNew = {
       this.$store.dispatch('createList', { title: this.title })
         .then((list) => {
           this.$store.dispatch('setListAccounts', { id: list.id, accountIds: this.selectedUserIds })
-          this.$router.push({ name: 'list-timeline', params: { id: list.id } })
+          this.$router.push({ name: 'lists-timeline', params: { id: list.id } })
         })
     }
   }
diff --git a/src/components/lists_timeline/lists_timeline.js b/src/components/lists_timeline/lists_timeline.js
index 4611a736..7534420d 100644
--- a/src/components/lists_timeline/lists_timeline.js
+++ b/src/components/lists_timeline/lists_timeline.js
@@ -13,7 +13,7 @@ const ListsTimeline = {
   },
   watch: {
     $route: function (route) {
-      if (route.name === 'list-timeline' && route.params.id !== this.listId) {
+      if (route.name === 'lists-timeline' && route.params.id !== this.listId) {
         this.listId = route.params.id
         this.$store.dispatch('stopFetchingTimeline', 'list')
         this.$store.commit('clearTimeline', { timeline: 'list' })
diff --git a/src/components/timeline_menu/timeline_menu.js b/src/components/timeline_menu/timeline_menu.js
index 0792dc13..5a67b0a5 100644
--- a/src/components/timeline_menu/timeline_menu.js
+++ b/src/components/timeline_menu/timeline_menu.js
@@ -58,7 +58,7 @@ const TimelineMenu = {
       if (route === 'tag-timeline') {
         return '#' + this.$route.params.tag
       }
-      if (route === 'list-timeline') {
+      if (route === 'lists-timeline') {
         return this.$store.getters.findListTitle(this.$route.params.id)
       }
       const i18nkey = timelineNames()[this.$route.name]
-- 
cgit v1.2.3-70-g09d2

