Skip to content

Commit

Permalink
Implemented featurs for Postfeed Management (PalisadoesFoundation#982)
Browse files Browse the repository at this point in the history
* redesigned newsfeed

* added test

* newsfeed management

* pinned post

* postfeed management

* pin unpin tag and video control

* changes part 2

* newsfeed changes

* changes in Card Preview of newsfeed

* changes in Card Preview of newsfeed

* testing phase 1

* translation

* tests

* tests

* merged intto develop

* test

* Added query
  • Loading branch information
aashimawadhwa authored Nov 4, 2023
1 parent cf6bc4e commit 5696ed8
Show file tree
Hide file tree
Showing 15 changed files with 1,865 additions and 668 deletions.
15 changes: 13 additions & 2 deletions public/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -268,17 +268,25 @@
"posts": "Posts",
"createPost": "Create Post",
"postDetails": "Post Details",
"postTitle1": "Write title of the post",
"postTitle": "Title",
"information": "Information",
"information1": "Write information of the post",
"image": "Post Image",
"video": "Video",
"video": "Post Video",
"addPost": "Add Post",
"searchTitle": "Search By Title",
"searchText": "Search By Text",
"ptitle": "Post Title",
"postDes": "What do you to talk about?",
"Title": "Title",
"Text": "Text"
"Text": "Text",
"cancel": "Cancel",
"searchBy": "Search By",
"Oldest": "Oldest First",
"Latest": "Latest First",
"sortPost": "Sort Post",
"tag": " Your browser does not support the video tag"
},
"postNotFound": {
"post": "Post",
Expand All @@ -300,6 +308,7 @@
"author": "Author",
"imageURL": "Image URL",
"videoURL": "Video URL",
"edit": "Edit Post",
"deletePost": "Delete Post",
"deletePostMsg": "Do you want to remove this post?",
"no": "No",
Expand All @@ -313,6 +322,8 @@
"updatePost": "Update Post",
"postDeleted": "Post deleted successfully.",
"postUpdated": "Post Updated successfully.",
"tag": " Your browser does not support the video tag",
"pin": "Pin Post",
"talawaApiUnavailable": "Talawa-API service is unavailable. Is it running? Check your network connectivity too."
},
"blockUnblockUser": {
Expand Down
45 changes: 28 additions & 17 deletions public/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -257,22 +257,30 @@
"talawaApiUnavailable": "Le service Talawa-API n'est pas disponible. Est-il en cours d'exécution ? Vérifiez également votre connectivité réseau."
},
"orgPost": {
"title": "Postes de Talawa",
"searchPost": "Rechercher un article",
"posts": "Des postes",
"createPostnot found": "Créer un article",
"title": "Talawa Publications",
"searchPost": "Rechercher une publication",
"posts": "Publications",
"createPost": "Créer une publication",
"postDetails": "Détails de la publication",
"postTitle1": "Écrire le titre de la publication",
"postTitle": "Titre",
"information": "Informations",
"image": "Image",
"video": "Vidéo",
"addPost": "Ajouter un article",
"information1": "Écrire les informations de la publication",
"image": "Image de la publication",
"video": "Vidéo de la publication",
"addPost": "Ajouter une publication",
"searchTitle": "Rechercher par titre",
"searchText": "Rechercher par texte",
"ptitle": "Titre de l'article",
"postDes": "De quoi parlez-vous ?",
"ptitle": "Titre de la publication",
"postDes": "De quoi voulez-vous parler?",
"Title": "Titre",
"Text": "Texte"
"Text": "Texte",
"cancel": "Annuler",
"searchBy": "Rechercher par",
"Oldest": "Les plus anciennes d'abord",
"Latest": "Les plus récentes d'abord",
"sortPost": "Trier les publications",
"tag": "Votre navigateur ne prend pas en charge la balise vidéo"
},
"postNotFound": {
"post": "Poste",
Expand All @@ -294,19 +302,22 @@
"author": "Auteur",
"imageURL": "URL de l'image",
"videoURL": "URL de la vidéo",
"deletePost": "Supprimer le message",
"deletePostMsg": "Voulez-vous supprimer ce message ?",
"edit": "Modifier la publication",
"deletePost": "Supprimer la publication",
"deletePostMsg": "Voulez-vous supprimer cette publication ?",
"no": "Non",
"yes": "Oui",
"editPost": "Modifier le message",
"editPost": "Modifier la publication",
"postTitle": "Titre",
"information": "Informations",
"image": "Image",
"video": "Vidéo",
"close": "Proche",
"updatePost": "Mettre à jour le message",
"postDeleted": "Message supprimé avec succès.",
"postUpdated": "Message mis à jour avec succès.",
"close": "Fermer",
"pin": "Épingler la publication",
"updatePost": "Mettre à jour la publication",
"postDeleted": "Publication supprimée avec succès.",
"postUpdated": "Publication mise à jour avec succès.",
"tag": "Votre navigateur ne prend pas en charge la balise vidéo",
"talawaApiUnavailable": "Le service Talawa-API n'est pas disponible. Est-il en cours d'exécution ? Vérifiez également votre connectivité réseau."
},
"blockUnblockUser": {
Expand Down
49 changes: 30 additions & 19 deletions public/locales/hi.json
Original file line number Diff line number Diff line change
Expand Up @@ -257,22 +257,30 @@
"talawaApiUnavailable": "तलवा-एपीआई सेवा उपलब्ध नहीं है। क्या यह चल रहा है? अपनी नेटवर्क कनेक्टिविटी भी जांचें।"
},
"orgPost": {
"title": "तलावा पोस्ट",
"searchPost": "खोज पोस्ट",
"posts": "पोस्ट",
"createPost": "पोस्ट बनाएं",
"title": "तलवा पोस्ट्स",
"searchPost": "पोस्ट खोजें",
"posts": "पोस्ट्स",
"createPost": "पोस्ट बनाएँ",
"postDetails": "पोस्ट विवरण",
"postTitle1": "पोस्ट का शीर्षक लिखें",
"postTitle": "शीर्षक",
"information": "जानकारी",
"image": "छवि",
"video": "वीडियो",
"information1": "पोस्ट की जानकारी लिखें",
"image": "पोस्ट छवि",
"video": "पोस्ट वीडियो",
"addPost": "पोस्ट जोड़ें",
"searchTitle": "शीर्षक से खोजें",
"searchText": "पाठ द्वारा खोजें",
"ptitle": "शीर्षक पोस्ट करें",
"postDes": "आपको किस बारे में बात करनी है?",
"searchText": "टेक्स्ट से खोजें",
"ptitle": "पोस्ट का शीर्षक",
"postDes": "आप किस बारे में बात करना चाहते हैं?",
"Title": "शीर्षक",
"Text": "मूलपाठ"
"Text": "टेक्स्ट",
"cancel": "रद्द करें",
"searchBy": "इसके द्वारा खोजें",
"Oldest": "सबसे पुराना पहले",
"Latest": "सबसे नवीनतम पहले",
"sortPost": "पोस्ट को क्रमित करें",
"tag": "आपका ब्राउज़र वीडियो टैग का समर्थन नहीं करता"
},
"postNotFound": {
"post": "पोस्ट",
Expand All @@ -292,22 +300,25 @@
},
"orgPostCard": {
"author": "लेखक",
"imageURL": "छवि यूआरएल",
"videoURL": "वीडियो यूआरएल",
"deletePost": "पोस्ट को हटाएं",
"imageURL": "छवि URL",
"videoURL": "वीडियो URL",
"edit": "पोस्ट संपादित करें",
"deletePost": "पोस्ट हटाएं",
"deletePostMsg": "क्या आप इस पोस्ट को हटाना चाहते हैं?",
"no": "नहीं",
"yes": "हाँ",
"editPost": "संपादित पोस्ट",
"editPost": "पोस्ट संपादित करें",
"postTitle": "शीर्षक",
"information": "जानकारी",
"image": "छवि",
"video": "वीडियो",
"close": "बंद करना",
"updatePost": "अपडेट पोस्ट",
"postDeleted": "पोस्ट सफलतापूर्वक हटाई गई।",
"postUpdated": "पोस्ट सफलतापूर्वक अपडेट किया गया।",
"talawaApiUnavailable": "तलवा-एपीआई सेवा उपलब्ध नहीं है। क्या यह चल रहा है? अपनी नेटवर्क कनेक्टिविटी भी जांचें।"
"close": "बंद करें",
"updatePost": "पोस्ट अपडेट करें",
"postDeleted": "पोस्ट सफलतापूर्वक हटा दी गई है।",
"pin": "पोस्ट पिन करें",
"postUpdated": "पोस्ट सफलतापूर्वक अपडेट की गई है।",
"tag": "आपका ब्राउज़र वीडियो टैग का समर्थन नहीं करता",
"talawaApiUnavailable": "Talawa-API सेवा उपलब्ध नहीं है। क्या यह चल रहा है? अपनी नेटवर्क कनेक्टिविटी भी जाँचें।"
},
"blockUnblockUser": {
"title": "तलावा ब्लॉक/अनब्लॉक यूजर",
Expand Down
55 changes: 33 additions & 22 deletions public/locales/sp.json
Original file line number Diff line number Diff line change
Expand Up @@ -257,22 +257,30 @@
"talawaApiUnavailable": "El servicio Talawa-API no está disponible. ¿Está funcionando? Compruebe también la conectividad de su red."
},
"orgPost": {
"title": "Puestos Talawa",
"searchPost": "Buscar publicación",
"title": "Publicaciones de Talawa",
"searchPost": "Buscar Publicación",
"posts": "Publicaciones",
"createPost": "Crear publicación",
"postDetails": "Detalles de la publicación",
"createPost": "Crear Publicación",
"postDetails": "Detalles de la Publicación",
"postTitle1": "Escribir título de la publicación",
"postTitle": "Título",
"information": "Información",
"image": "Imagen",
"video": "Video",
"addPost": "Añadir publicación",
"searchTitle": "Buscar por título",
"searchText": "Buscar por texto",
"ptitle": "Título de la entrada",
"postDes": "¿De qué hablar?",
"information1": "Escribir información de la publicación",
"image": "Imagen de la Publicación",
"video": "Video de la Publicación",
"addPost": "Agregar Publicación",
"searchTitle": "Buscar por Título",
"searchText": "Buscar por Texto",
"ptitle": "Título de la Publicación",
"postDes": "¿De qué quieres hablar?",
"Title": "Título",
"Text": "Texto"
"Text": "Texto",
"cancel": "Cancelar",
"searchBy": "Buscar por",
"Oldest": "Más Antiguas Primero",
"Latest": "Más Recientes Primero",
"sortPost": "Ordenar Publicaciones",
"tag": "Su navegador no admite la etiqueta de video"
},
"postNotFound": {
"post": "Publicaciones",
Expand All @@ -290,24 +298,27 @@
"admin not found!": "Administrador no encontrado!",
"roles not found!": "roles no encontrados!"
},

"orgPostCard": {
"author": "Autor",
"imageURL": "URL de la imagen",
"videoURL": "URL del vídeo",
"deletePost": "Eliminar mensaje",
"deletePostMsg": "¿Quieres eliminar esta publicación?",
"imageURL": "URL de la Imagen",
"videoURL": "URL del Video",
"edit": "Editar Publicación",
"deletePost": "Eliminar Publicación",
"deletePostMsg": "¿Desea eliminar esta publicación?",
"no": "No",
"yes": "",
"editPost": "Editar post",
"editPost": "Editar Publicación",
"postTitle": "Título",
"information": "Información",
"image": "Imagen",
"video": "Video",
"close": "Cerca",
"updatePost": "Actualizar publicación",
"postDeleted": "Publicación eliminada con éxito.",
"postUpdated": "Publicación actualizada con éxito.",
"talawaApiUnavailable": "El servicio Talawa-API no está disponible. ¿Está funcionando? Compruebe también la conectividad de su red."
"close": "Cerrar",
"updatePost": "Actualizar Publicación",
"postDeleted": "Publicación eliminada exitosamente.",
"postUpdated": "Publicación actualizada exitosamente.",
"tag": "Su navegador no admite la etiqueta de video",
"talawaApiUnavailable": "El servicio Talawa-API no está disponible. ¿Está en funcionamiento? Compruebe también su conectividad de red."
},
"blockUnblockUser": {
"title": "Usuario de bloqueo/desbloqueo de Talawa",
Expand Down
61 changes: 36 additions & 25 deletions public/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -257,22 +257,30 @@
"talawaApiUnavailable": "服務不可用。它在運行嗎?還要檢查您的網絡連接。"
},
"orgPost": {
"title": "塔拉瓦郵報",
"title": "塔拉瓦帖子",
"searchPost": "搜索帖子",
"posts": "帖子",
"createPost": "創建帖子",
"postDetails": "發布詳細信息",
"postTitle": "標題",
"createPost": "创建帖子",
"postDetails": "帖子详情",
"postTitle1": "填写帖子标题",
"postTitle": "标题",
"information": "信息",
"image": "圖片",
"video": "視頻",
"information1": "填写帖子信息",
"image": "帖子图片",
"video": "帖子视频",
"addPost": "添加帖子",
"searchTitle": "按標題搜索",
"searchTitle": "按标题搜索",
"searchText": "按文本搜索",
"ptitle": "帖子標題",
"postDes": "你要談什麼?",
"Title": "標題",
"Text": "文本"
"ptitle": "帖子标题",
"postDes": "您想讨论什么?",
"Title": "标题",
"Text": "文本",
"cancel": "取消",
"searchBy": "按方式搜索",
"Oldest": "最旧的优先",
"Latest": "最新的优先",
"sortPost": "排序帖子",
"tag": "您的浏览器不支持视频标签"
},
"postNotFound": {
"post": "郵政",
Expand All @@ -292,22 +300,25 @@
},
"orgPostCard": {
"author": "作者",
"imageURL": "圖片網址",
"videoURL": "視頻網址",
"deletePost": "刪除帖子",
"deletePostMsg": "你想刪除這個帖子嗎?",
"no": "",
"yes": "是的",
"editPost": "編輯帖子",
"postTitle": "標題",
"imageURL": "图像链接",
"videoURL": "视频链接",
"edit": "编辑帖子",
"deletePost": "删除帖子",
"deletePostMsg": "您确定要删除此帖子吗?",
"no": "",
"yes": "",
"editPost": "编辑帖子",
"postTitle": "标题",
"information": "信息",
"image": "圖片",
"video": "視頻",
"close": "",
"image": "图片",
"video": "视频",
"close": "关闭",
"pin": "置顶帖子",
"updatePost": "更新帖子",
"postDeleted": "帖子刪除成功。",
"postUpdated": "帖子更新成功。",
"talawaApiUnavailable": "服務不可用。它在運行嗎?還要檢查您的網絡連接。"
"postDeleted": "帖子成功删除。",
"postUpdated": "帖子成功更新。",
"tag": "您的浏览器不支持视频标签",
"talawaApiUnavailable": "Talawa-API 服务不可用。是否正在运行?还请检查您的网络连接。"
},
"blockUnblockUser": {
"title": "塔拉瓦封鎖/解除封鎖用戶",
Expand Down
25 changes: 23 additions & 2 deletions src/GraphQl/Mutations/mutations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -402,8 +402,22 @@ export const ADD_PLUGIN_MUTATION = gql`
`;

export const UPDATE_POST_MUTATION = gql`
mutation UpdatePost($id: ID!, $title: String, $text: String) {
updatePost(id: $id, data: { title: $title, text: $text }) {
mutation UpdatePost(
$id: ID!
$title: String
$text: String
$imageUrl: String
$videoUrl: String
) {
updatePost(
id: $id
data: {
title: $title
text: $text
imageUrl: $imageUrl
videoUrl: $videoUrl
}
) {
_id
}
}
Expand Down Expand Up @@ -661,3 +675,10 @@ export const PLUGIN_SUBSCRIPTION = gql`
}
}
`;
export const TOGGLE_PINNED_POST = gql`
mutation TogglePostPin($id: ID!) {
togglePostPin(id: $id) {
_id
}
}
`;
Loading

0 comments on commit 5696ed8

Please sign in to comment.