diff --git a/app/components/discourserankedlist.js b/app/components/discourserankedlist.js index dfc996fb..afe8b596 100644 --- a/app/components/discourserankedlist.js +++ b/app/components/discourserankedlist.js @@ -28,81 +28,8 @@ function TimeSince(date) { return Math.floor(seconds) + ' seconds ago'; } -function Discourserankedlist(props) { - const Data = [ - { - id: 1, - title: - 'Upload stuck at 0% again after initially fixing with chanding site url in General admin options', - time: '6:57 PM', - upvotes: '89', - comments: '91', - }, - { - id: 2, - title: 'Why can’t we have thumbnails for video uploads on mobile?', - time: '4:00 PM', - upvotes: '500', - comments: '4', - }, - { - id: 3, - title: 'Can’t find “Users must use Two Factor Authentication” Option', - time: '12:53 PM', - upvotes: '456', - comments: '75', - }, - { - id: 4, - title: 'Can’t “forget/remove my data” directly in RC 4.3.0 in livechat', - time: '8:36 AM', - upvotes: '234', - comments: '199', - }, - { - id: 5, - title: 'Not migrating, control is locked', - time: '11:30 PM', - upvotes: '441', - comments: '74', - }, - { - id: 6, - title: - 'Upload stuck at 0% again after initially fixing with chanding site url in General admin options', - time: '7:14 PM', - upvotes: '972', - comments: '42', - }, - { - id: 7, - title: 'Can’t find “Users must use Two Factor Authentication” Option', - time: '3:36 PM', - upvotes: '4279', - comments: '98', - }, - { - id: 8, - title: 'Cannot Chat Log Level - Option has disappeared', - time: '11:06 AM', - upvotes: '51', - comments: '291', - }, - { - id: 9, - title: 'Wrong IP Server', - time: '2:00 PM', - upvotes: '478', - comments: '25', - }, - { - id: 10, - title: 'Not migrating, control is locked', - time: '11:03 PM', - upvotes: '16', - comments: '15', - }, - ]; +function Discourserankedlist({activities}) { + //generates random colour for border styling const color = [ 'border-primary', @@ -130,7 +57,7 @@ function Discourserankedlist(props) { - {Data.map(item => ( + {activities.map(item => ( -
-
- - {process.browser && ( - - )} - - - Users -
- -
- - {process.browser && ( - - )} - - Messages -
+
+ {counters.map((count, index) => { + return ( +
+ + {process.browser && ( + + )} + -
- - {process.browser && ( - - )} - - Online -
+ {count.title} +
+ ); + })}
); diff --git a/app/components/infotiles.js b/app/components/infotiles.js index 12a695ef..2d7f2028 100644 --- a/app/components/infotiles.js +++ b/app/components/infotiles.js @@ -2,10 +2,11 @@ import Image from "next/image"; import Link from "next/link"; import Styles from "../styles/Infotiles.module.css"; -export default function Infotiles({ data }) { +export default function Infotiles(props) { + return ( <> - {data.map((obj) => ( + {props?.infotiles?.map((obj) => (
)}
-
{obj.name}
+
{obj.title}
{obj.bio &&

{obj.bio}

} -

{obj.content}

+

{obj.description}

{obj.live && }
diff --git a/app/components/newscarousel.js b/app/components/newscarousel.js index d6628a17..a9b6506b 100644 --- a/app/components/newscarousel.js +++ b/app/components/newscarousel.js @@ -48,13 +48,21 @@ function Newscarousel(props) { }, }, { - breakpoint: 600, + breakpoint: 800, settings: { slidesToShow: 2, slidesToScroll: 2, initialSlide: 2, }, }, + { + breakpoint: 600, + settings: { + slidesToShow: 1, + slidesToScroll: 2, + initialSlide: 2, + }, + }, ]} prevArrow={ - - -
- - - - - -
-
Admin
-
- -
- - - - - - -
-
Developer
-
- -
- - - - - - -
-
Group Chat
-
- -
- - - - - - - - -
-
GSoC
-
- - - ); -} diff --git a/app/components/personcircle.js b/app/components/personcircle.js new file mode 100644 index 00000000..fc06e566 --- /dev/null +++ b/app/components/personcircle.js @@ -0,0 +1,33 @@ +import { Col } from "react-bootstrap"; +import styles from "../styles/Personacircle.module.css"; +import dynamic from 'next/dynamic' +import React from "react"; + + +const fetchIcon=(iconName)=>{ + let Icon = dynamic(() => import('react-icons/fa').then(icons => icons[iconName])); + return ; +} + +export default function Personcircle({persons}) { + return ( + <> + + {persons.map((person) => { + return ( + +
+ + { fetchIcon(person?.persona_icon?.icon) } + +
+
{person.name}
+
+ ); + })} + + + ); +} diff --git a/app/lib/const/infotiles.js b/app/lib/const/infotiles.js deleted file mode 100644 index 8c636a9a..00000000 --- a/app/lib/const/infotiles.js +++ /dev/null @@ -1,23 +0,0 @@ -export const INFOTILES_DATA = [ - { - id: 1, - name: "Documentation", - content: "Find in-depth information about Rocket.Chat features and API.", - }, - { - id: 2, - name: "Learn", - content: "Learn about Rocket.Chat in an interactive course with quizzes!", - }, - { - id: 3, - name: "Examples", - content: "Discover and deploy boilerplate example Rocket.Chat projects.", - }, - { - id: 4, - name: "Deploy", - content: - "Instantly deploy your Rocket.Chat site to a public URL with Rocket.Chat SaaS.", - }, -]; diff --git a/app/pages/index.js b/app/pages/index.js index 9f18028b..3fc72b63 100644 --- a/app/pages/index.js +++ b/app/pages/index.js @@ -2,14 +2,13 @@ import Head from 'next/head'; import styles from '../styles/Home.module.css'; import Infotiles from '../components/infotiles'; import Newscarousel from '../components/newscarousel'; -import Personacircle from '../components/personalcircle'; +import Personacircle from '../components/personcircle'; import Discourserankedlist from '../components/discourserankedlist'; import Searchbox from '../components/searchbox'; import Growthcounters from '../components/growthcounters'; import { Container, Col } from 'react-bootstrap'; import { fetchAPI } from '../lib/api'; import { withFirebaseAuthUser } from '../components/auth/firebase'; -import { INFOTILES_DATA } from '../lib/const/infotiles'; function Home(props) { return ( @@ -42,11 +41,11 @@ function Home(props) { - + -
- +
+
@@ -56,19 +55,19 @@ function Home(props) {

Latest Community News

- +

Get What You Need...

- +

Community Activity

- +
@@ -78,14 +77,18 @@ export default withFirebaseAuthUser()(Home); export async function getStaticProps({ params }) { const carousels = await fetchAPI('/carousels'); - const personas = await fetchAPI('/personas'); + const persons = await fetchAPI('/personas'); const guides = await fetchAPI('/guides'); const releaseNotes = await fetchAPI('/release-notes'); + const infotiles=await fetchAPI('/infotiles'); + const counters=await fetchAPI('/counters'); + const discourses=await fetchAPI('/discourses'); const topNavItems = await fetchAPI('/top-nav-item'); - const topPosts = await fetchAPI('/discourses'); + + return { - props: { carousels, personas, guides, releaseNotes, topNavItems, topPosts }, + props: { carousels, persons, guides, releaseNotes, topNavItems,infotiles,counters,discourses }, // Next.js will attempt to re-generate the page: // - When a request comes in // - At most once every 1 second diff --git a/app/styles/Infotiles.module.css b/app/styles/Infotiles.module.css index 5fb90acd..651ee316 100644 --- a/app/styles/Infotiles.module.css +++ b/app/styles/Infotiles.module.css @@ -44,3 +44,9 @@ background: #1d74f5; color: white; } + +@media (max-width: 600px) { + .card { + width: 100%; + } +} diff --git a/app/styles/Newscarousel.module.css b/app/styles/Newscarousel.module.css index 87140d20..178803a3 100644 --- a/app/styles/Newscarousel.module.css +++ b/app/styles/Newscarousel.module.css @@ -33,3 +33,11 @@ .carousel-item-title { font-size: 22.5px; } +@media (max-width: 600px) { + .heading { + font-size: clamp(1.3rem, 1.7vw, 1.2rem); + } + .description { + font-size: clamp(0.8rem, 1.2vw, 0.8rem); + } +} diff --git a/app/styles/Personacircle.module.css b/app/styles/Personacircle.module.css index 00c18e29..0ae3668d 100644 --- a/app/styles/Personacircle.module.css +++ b/app/styles/Personacircle.module.css @@ -7,13 +7,15 @@ flex-direction: column; align-items: center; justify-content: space-between; - gap: 1rem; + gap: 3rem; width: clamp(8rem, 14vw, 20rem); margin: 0.2rem; padding-bottom: 1rem; } .svg { - width: clamp(3rem, 4vw, 4rem); + text-align: center; + transform: scale(4); + color: #1D74F5; } .title { font-size: clamp(0.9rem, 2vw, 1.4rem); diff --git a/cms/api/community-activity/config/routes.json b/cms/api/community-activity/config/routes.json new file mode 100644 index 00000000..7babc65f --- /dev/null +++ b/cms/api/community-activity/config/routes.json @@ -0,0 +1,52 @@ +{ + "routes": [ + { + "method": "GET", + "path": "/community-activities", + "handler": "community-activity.find", + "config": { + "policies": [] + } + }, + { + "method": "GET", + "path": "/community-activities/count", + "handler": "community-activity.count", + "config": { + "policies": [] + } + }, + { + "method": "GET", + "path": "/community-activities/:id", + "handler": "community-activity.findOne", + "config": { + "policies": [] + } + }, + { + "method": "POST", + "path": "/community-activities", + "handler": "community-activity.create", + "config": { + "policies": [] + } + }, + { + "method": "PUT", + "path": "/community-activities/:id", + "handler": "community-activity.update", + "config": { + "policies": [] + } + }, + { + "method": "DELETE", + "path": "/community-activities/:id", + "handler": "community-activity.delete", + "config": { + "policies": [] + } + } + ] +} diff --git a/cms/api/persona-icons/controllers/persona-icons.js b/cms/api/community-activity/controllers/community-activity.js similarity index 100% rename from cms/api/persona-icons/controllers/persona-icons.js rename to cms/api/community-activity/controllers/community-activity.js diff --git a/cms/api/persona-icons/models/persona-icons.js b/cms/api/community-activity/models/community-activity.js similarity index 100% rename from cms/api/persona-icons/models/persona-icons.js rename to cms/api/community-activity/models/community-activity.js diff --git a/cms/api/community-activity/models/community-activity.settings.json b/cms/api/community-activity/models/community-activity.settings.json new file mode 100644 index 00000000..70fecfe3 --- /dev/null +++ b/cms/api/community-activity/models/community-activity.settings.json @@ -0,0 +1,28 @@ +{ + "kind": "collectionType", + "collectionName": "community_activities", + "info": { + "name": "CommunityActivity", + "description": "" + }, + "options": { + "increments": true, + "timestamps": true, + "draftAndPublish": true + }, + "pluginOptions": {}, + "attributes": { + "title": { + "type": "text" + }, + "time": { + "type": "string" + }, + "upvotes": { + "type": "integer" + }, + "comments": { + "type": "integer" + } + } +} diff --git a/cms/api/persona-icons/services/persona-icons.js b/cms/api/community-activity/services/community-activity.js similarity index 100% rename from cms/api/persona-icons/services/persona-icons.js rename to cms/api/community-activity/services/community-activity.js diff --git a/cms/api/counter/config/routes.json b/cms/api/counter/config/routes.json new file mode 100644 index 00000000..b428f153 --- /dev/null +++ b/cms/api/counter/config/routes.json @@ -0,0 +1,52 @@ +{ + "routes": [ + { + "method": "GET", + "path": "/counters", + "handler": "counter.find", + "config": { + "policies": [] + } + }, + { + "method": "GET", + "path": "/counters/count", + "handler": "counter.count", + "config": { + "policies": [] + } + }, + { + "method": "GET", + "path": "/counters/:id", + "handler": "counter.findOne", + "config": { + "policies": [] + } + }, + { + "method": "POST", + "path": "/counters", + "handler": "counter.create", + "config": { + "policies": [] + } + }, + { + "method": "PUT", + "path": "/counters/:id", + "handler": "counter.update", + "config": { + "policies": [] + } + }, + { + "method": "DELETE", + "path": "/counters/:id", + "handler": "counter.delete", + "config": { + "policies": [] + } + } + ] +} diff --git a/cms/api/counter/controllers/counter.js b/cms/api/counter/controllers/counter.js new file mode 100644 index 00000000..e8608953 --- /dev/null +++ b/cms/api/counter/controllers/counter.js @@ -0,0 +1,8 @@ +'use strict'; + +/** + * Read the documentation (https://strapi.io/documentation/developer-docs/latest/development/backend-customization.html#core-controllers) + * to customize this controller + */ + +module.exports = {}; diff --git a/cms/api/counter/models/counter.js b/cms/api/counter/models/counter.js new file mode 100644 index 00000000..0054d33c --- /dev/null +++ b/cms/api/counter/models/counter.js @@ -0,0 +1,8 @@ +'use strict'; + +/** + * Read the documentation (https://strapi.io/documentation/developer-docs/latest/development/backend-customization.html#lifecycle-hooks) + * to customize this model + */ + +module.exports = {}; diff --git a/cms/api/counter/models/counter.settings.json b/cms/api/counter/models/counter.settings.json new file mode 100644 index 00000000..7f640007 --- /dev/null +++ b/cms/api/counter/models/counter.settings.json @@ -0,0 +1,22 @@ +{ + "kind": "collectionType", + "collectionName": "counters", + "info": { + "name": "Counter", + "description": "" + }, + "options": { + "increments": true, + "timestamps": true, + "draftAndPublish": true + }, + "pluginOptions": {}, + "attributes": { + "count": { + "type": "integer" + }, + "title": { + "type": "string" + } + } +} diff --git a/cms/api/counter/services/counter.js b/cms/api/counter/services/counter.js new file mode 100644 index 00000000..6538a8c8 --- /dev/null +++ b/cms/api/counter/services/counter.js @@ -0,0 +1,8 @@ +'use strict'; + +/** + * Read the documentation (https://strapi.io/documentation/developer-docs/latest/development/backend-customization.html#core-services) + * to customize this service + */ + +module.exports = {}; diff --git a/cms/api/discourse/models/discourse.settings.json b/cms/api/discourse/models/discourse.settings.json index 0ad4a21e..9888489c 100644 --- a/cms/api/discourse/models/discourse.settings.json +++ b/cms/api/discourse/models/discourse.settings.json @@ -2,8 +2,7 @@ "kind": "collectionType", "collectionName": "discourses", "info": { - "name": "discourse", - "description": "" + "name": "discourse" }, "options": { "increments": true, @@ -12,10 +11,17 @@ }, "pluginOptions": {}, "attributes": { - "TopPost": { - "type": "json", - "required": true, - "unique": false + "title": { + "type": "text" + }, + "time": { + "type": "string" + }, + "upvotes": { + "type": "biginteger" + }, + "comments": { + "type": "biginteger" } } } diff --git a/cms/api/infotile/config/routes.json b/cms/api/infotile/config/routes.json new file mode 100644 index 00000000..dbb746f3 --- /dev/null +++ b/cms/api/infotile/config/routes.json @@ -0,0 +1,52 @@ +{ + "routes": [ + { + "method": "GET", + "path": "/infotiles", + "handler": "infotile.find", + "config": { + "policies": [] + } + }, + { + "method": "GET", + "path": "/infotiles/count", + "handler": "infotile.count", + "config": { + "policies": [] + } + }, + { + "method": "GET", + "path": "/infotiles/:id", + "handler": "infotile.findOne", + "config": { + "policies": [] + } + }, + { + "method": "POST", + "path": "/infotiles", + "handler": "infotile.create", + "config": { + "policies": [] + } + }, + { + "method": "PUT", + "path": "/infotiles/:id", + "handler": "infotile.update", + "config": { + "policies": [] + } + }, + { + "method": "DELETE", + "path": "/infotiles/:id", + "handler": "infotile.delete", + "config": { + "policies": [] + } + } + ] +} diff --git a/cms/api/infotile/controllers/infotile.js b/cms/api/infotile/controllers/infotile.js new file mode 100644 index 00000000..e8608953 --- /dev/null +++ b/cms/api/infotile/controllers/infotile.js @@ -0,0 +1,8 @@ +'use strict'; + +/** + * Read the documentation (https://strapi.io/documentation/developer-docs/latest/development/backend-customization.html#core-controllers) + * to customize this controller + */ + +module.exports = {}; diff --git a/cms/api/infotile/models/infotile.js b/cms/api/infotile/models/infotile.js new file mode 100644 index 00000000..0054d33c --- /dev/null +++ b/cms/api/infotile/models/infotile.js @@ -0,0 +1,8 @@ +'use strict'; + +/** + * Read the documentation (https://strapi.io/documentation/developer-docs/latest/development/backend-customization.html#lifecycle-hooks) + * to customize this model + */ + +module.exports = {}; diff --git a/cms/api/infotile/models/infotile.settings.json b/cms/api/infotile/models/infotile.settings.json new file mode 100644 index 00000000..b00ba8af --- /dev/null +++ b/cms/api/infotile/models/infotile.settings.json @@ -0,0 +1,21 @@ +{ + "kind": "collectionType", + "collectionName": "infotiles", + "info": { + "name": "infotile" + }, + "options": { + "increments": true, + "timestamps": true, + "draftAndPublish": true + }, + "pluginOptions": {}, + "attributes": { + "title": { + "type": "string" + }, + "description": { + "type": "text" + } + } +} diff --git a/cms/api/infotile/services/infotile.js b/cms/api/infotile/services/infotile.js new file mode 100644 index 00000000..6538a8c8 --- /dev/null +++ b/cms/api/infotile/services/infotile.js @@ -0,0 +1,8 @@ +'use strict'; + +/** + * Read the documentation (https://strapi.io/documentation/developer-docs/latest/development/backend-customization.html#core-services) + * to customize this service + */ + +module.exports = {}; diff --git a/cms/api/persona-icons/config/routes.json b/cms/api/persona-icon/config/routes.json similarity index 75% rename from cms/api/persona-icons/config/routes.json rename to cms/api/persona-icon/config/routes.json index 1407e41e..0e578b1e 100644 --- a/cms/api/persona-icons/config/routes.json +++ b/cms/api/persona-icon/config/routes.json @@ -3,7 +3,7 @@ { "method": "GET", "path": "/persona-icons", - "handler": "persona-icons.find", + "handler": "persona-icon.find", "config": { "policies": [] } @@ -11,7 +11,7 @@ { "method": "GET", "path": "/persona-icons/count", - "handler": "persona-icons.count", + "handler": "persona-icon.count", "config": { "policies": [] } @@ -19,7 +19,7 @@ { "method": "GET", "path": "/persona-icons/:id", - "handler": "persona-icons.findOne", + "handler": "persona-icon.findOne", "config": { "policies": [] } @@ -27,7 +27,7 @@ { "method": "POST", "path": "/persona-icons", - "handler": "persona-icons.create", + "handler": "persona-icon.create", "config": { "policies": [] } @@ -35,7 +35,7 @@ { "method": "PUT", "path": "/persona-icons/:id", - "handler": "persona-icons.update", + "handler": "persona-icon.update", "config": { "policies": [] } @@ -43,7 +43,7 @@ { "method": "DELETE", "path": "/persona-icons/:id", - "handler": "persona-icons.delete", + "handler": "persona-icon.delete", "config": { "policies": [] } diff --git a/cms/api/persona-icon/controllers/persona-icon.js b/cms/api/persona-icon/controllers/persona-icon.js new file mode 100644 index 00000000..e8608953 --- /dev/null +++ b/cms/api/persona-icon/controllers/persona-icon.js @@ -0,0 +1,8 @@ +'use strict'; + +/** + * Read the documentation (https://strapi.io/documentation/developer-docs/latest/development/backend-customization.html#core-controllers) + * to customize this controller + */ + +module.exports = {}; diff --git a/cms/api/persona-icon/models/persona-icon.js b/cms/api/persona-icon/models/persona-icon.js new file mode 100644 index 00000000..0054d33c --- /dev/null +++ b/cms/api/persona-icon/models/persona-icon.js @@ -0,0 +1,8 @@ +'use strict'; + +/** + * Read the documentation (https://strapi.io/documentation/developer-docs/latest/development/backend-customization.html#lifecycle-hooks) + * to customize this model + */ + +module.exports = {}; diff --git a/cms/api/persona-icons/models/persona-icons.settings.json b/cms/api/persona-icon/models/persona-icon.settings.json similarity index 93% rename from cms/api/persona-icons/models/persona-icons.settings.json rename to cms/api/persona-icon/models/persona-icon.settings.json index b4fc3576..75807614 100644 --- a/cms/api/persona-icons/models/persona-icons.settings.json +++ b/cms/api/persona-icon/models/persona-icon.settings.json @@ -2,7 +2,7 @@ "kind": "collectionType", "collectionName": "persona_icons", "info": { - "name": "PersonaIcons" + "name": "persona-icon" }, "options": { "increments": true, diff --git a/cms/api/persona-icon/services/persona-icon.js b/cms/api/persona-icon/services/persona-icon.js new file mode 100644 index 00000000..6538a8c8 --- /dev/null +++ b/cms/api/persona-icon/services/persona-icon.js @@ -0,0 +1,8 @@ +'use strict'; + +/** + * Read the documentation (https://strapi.io/documentation/developer-docs/latest/development/backend-customization.html#core-services) + * to customize this service + */ + +module.exports = {}; diff --git a/cms/api/persona/models/persona.settings.json b/cms/api/persona/models/persona.settings.json index ee510d39..974fcd0b 100644 --- a/cms/api/persona/models/persona.settings.json +++ b/cms/api/persona/models/persona.settings.json @@ -2,7 +2,7 @@ "kind": "collectionType", "collectionName": "personas", "info": { - "name": "Persona", + "name": "persona", "description": "" }, "options": { @@ -16,7 +16,7 @@ "type": "string" }, "persona_icon": { - "model": "persona-icons" + "model": "persona-icon" } } } diff --git a/cms/config/functions/fetchData.js b/cms/config/functions/fetchData.js index 78a09064..b8ea7db0 100644 --- a/cms/config/functions/fetchData.js +++ b/cms/config/functions/fetchData.js @@ -6,14 +6,18 @@ const { carousels, subMenus, topNavItem, speakers, - forms } = require('../initialData'); + forms, + discourses, + counters, + infotiles + } = require('../initialData'); const { githubKit } = require('./github'); module.exports = async () => { try { var carouselCount = await strapi.query("carousel").count(); - var personaIconsCount = await strapi.query("persona-icons").count(); + var personaIconsCount = await strapi.query("persona-icon").count(); var personaCount = await strapi.query("persona").count(); var subMenuCount = await strapi.query("sub-menu").count(); var topNavItemCount = await strapi.query("top-nav-item").count(); @@ -22,7 +26,9 @@ module.exports = async () => { var formCount = await strapi.query("form").count(); var ghrepos = await strapi.query("github-repositories").count({}); var speakersCount = await strapi.query("speaker").count({}); - + var discourseCount = await strapi.query("discourse").count(); + var counterCount = await strapi.query("counter").count(); + var infotileCounter=await strapi.query("infotile").count(); // initial fetch speakers.map(async (speaker, index) => { if (index <= speakersCount - 1) { @@ -102,7 +108,7 @@ module.exports = async () => { personaIcons.map(async (personaIcon, index) => { if (index <= personaIconsCount - 1) { - await strapi.query("persona-icons").update( + await strapi.query("persona-icon").update( { id: personaIcon.id }, { icon: personaIcon.icon, @@ -111,7 +117,7 @@ module.exports = async () => { } ); } else { - await strapi.query("persona-icons").create({ + await strapi.query("persona-icon").create({ icon: personaIcon.icon, size: personaIcon.size, color: personaIcon.color, @@ -163,6 +169,64 @@ module.exports = async () => { } }); + discourses.map(async (discourse, index) => { + if (index <= discourseCount - 1) { + + await strapi.query("discourse").update( + { id: discourse.id }, + { + title: discourse.title, + time: discourse.time, + upvotes: discourse.upvotes, + comments: discourse.comments, + } + ); + } else { + await strapi.query("discourse").create({ + title: discourse.title, + time: discourse.time, + upvotes: discourse.upvotes, + comments: discourse.comments, + }); + } + }); + + counters.map(async (counter, index) => { + if (index <= counterCount - 1) { + + await strapi.query("counter").update( + { id: counter.id }, + { + count: counter.count, + title: counter.title, + } + ); + } else { + await strapi.query("counter").create({ + count: counter.count, + title: counter.title, + }); + } + }); + + infotiles.map(async (infotile, index) => { + if (index <= infotileCounter - 1) { + + await strapi.query("infotile").update( + { id: infotile.id }, + { + title: infotile.title, + description: infotile.description, + } + ); + } else { + await strapi.query("infotile").create({ + title: infotile.title, + description: infotile.description, + }); + } + }); + if (releaseNotesCount) { await strapi.query("release-notes").update( { id: 1 }, diff --git a/cms/config/initialData/counters.json b/cms/config/initialData/counters.json new file mode 100644 index 00000000..3b8bb206 --- /dev/null +++ b/cms/config/initialData/counters.json @@ -0,0 +1,26 @@ +[ + { + "id": 1, + "count": 343433, + "title": "Users", + "published_at": "2022-04-16T11:56:43.525Z", + "created_at": "2022-04-16T11:56:38.281Z", + "updated_at": "2022-04-16T11:56:43.540Z" + }, + { + "id": 2, + "count": 1294056, + "title": "Messages", + "published_at":"2022-04-16T11:56:54.753Z", + "created_at": "2022-04-16T11:56:53.180Z", + "updated_at": "2022-04-16T11:56:54.769Z" + }, + { + "id": 3, + "count": 507, + "title": "Online", + "published_at": "2022-04-16T11:57:22.753Z", + "created_at": "2022-04-16T11:57:21.361Z", + "updated_at": "2022-04-16T11:57:21.368Z" + } + ] \ No newline at end of file diff --git a/cms/config/initialData/discourses.json b/cms/config/initialData/discourses.json new file mode 100644 index 00000000..e20b7740 --- /dev/null +++ b/cms/config/initialData/discourses.json @@ -0,0 +1,102 @@ +[ + { + "id": 1, + "title": "Upload stuck at 0% again after initially fixing with chanding site url in General admin options", + "time": "6:57 PM", + "upvotes": "89", + "comments": "91", + "published_at": "2022-04-16T10:07:51.063Z", + "created_at": "2022-04-16T10:07:51.076Z", + "updated_at": "2022-04-16T10:07:51.076Z" + }, + { + "id": 2, + "title": "Why can’t we have thumbnails for video uploads on mobile?", + "time": "4:00 PM", + "upvotes": "500", + "comments": "4", + "published_at": "2022-04-16T10:07:51.063Z", + "created_at": "2022-04-16T10:07:51.203Z", + "updated_at": "2022-04-16T10:07:51.203Z" + }, + { + "id": 3, + "title": "Can’t find “Users must use Two Factor Authentication” Option", + "time": "12:53 PM", + "upvotes": "456", + "comments": "75", + "published_at": "2022-04-16T10:07:51.063Z", + "created_at": "2022-04-16T10:07:51.328Z", + "updated_at": "2022-04-16T10:07:51.328Z" + }, + { + "id": 4, + "title": "Can’t “forget/remove my data” directly in RC 4.3.0 in livechat", + "time": "8:36 AM", + "upvotes": "234", + "comments": "199", + "published_at": "2022-04-16T10:07:51.063Z", + "created_at": "2022-04-16T10:07:51.454Z", + "updated_at": "2022-04-16T10:07:51.454Z" + }, + { + "id": 5, + "title": "Not migrating, control is locked", + "time": "11:30 PM", + "upvotes": "441", + "comments": "74", + "published_at": "2022-04-16T10:07:51.064Z", + "created_at": "2022-04-16T10:07:51.570Z", + "updated_at": "2022-04-16T10:07:51.570Z" + }, + { + "id": 6, + "title": "Upload stuck at 0% again after initially fixing with chanding site url in General admin options", + "time": "7:14 PM", + "upvotes": "972", + "comments": "42", + "published_at": "2022-04-16T10:07:51.064Z", + "created_at": "2022-04-16T10:07:51.695Z", + "updated_at": "2022-04-16T10:07:51.695Z" + }, + { + "id": 7, + "title": "Can’t find “Users must use Two Factor Authentication” Option", + "time": "3:36 PM", + "upvotes": "4279", + "comments": "98", + "published_at": "2022-04-16T10:07:51.064Z", + "created_at": "2022-04-16T10:07:51.826Z", + "updated_at": "2022-04-16T10:07:51.826Z" + }, + { + "id": 8, + "title": "Cannot Chat Log Level - Option has disappeared", + "time": "11:06 AM", + "upvotes": "51", + "comments": "291", + "published_at": "2022-04-16T10:07:51.064Z", + "created_at": "2022-04-16T10:07:51.951Z", + "updated_at": "2022-04-16T10:07:51.951Z" + }, + { + "id": 9, + "title": "Wrong IP Server", + "time": "2:00 PM", + "upvotes": "478", + "comments": "25", + "published_at": "2022-04-16T10:07:51.064Z", + "created_at": "2022-04-16T10:07:52.078Z", + "updated_at": "2022-04-16T10:07:52.078Z" + }, + { + "id": 10, + "title": "Not migrating, control is locked", + "time": "11:03 PM", + "upvotes": "16", + "comments": "15", + "published_at": "2022-04-16T10:07:51.064Z", + "created_at": "2022-04-16T10:07:52.212Z", + "updated_at": "2022-04-16T10:07:52.212Z" + } +] \ No newline at end of file diff --git a/cms/config/initialData/index.js b/cms/config/initialData/index.js index 5512a755..6c688972 100644 --- a/cms/config/initialData/index.js +++ b/cms/config/initialData/index.js @@ -6,7 +6,10 @@ const releaseNotes = require("./release-notes.json"); const subMenus = require("./sub-menus.json"); const topNavItem = require("./top-nav-item.json"); const forms = require("./forms.json") -const speakers = require("./speakers.json") +const speakers = require("./speakers.json"); +const discourses=require('./discourses.json'); +const counters=require('./counters.json'); +const infotiles=require('./infotiles.json'); module.exports = { carousels, @@ -17,5 +20,8 @@ module.exports = { subMenus, topNavItem, forms, - speakers + speakers, + discourses, + counters, + infotiles }; \ No newline at end of file diff --git a/cms/config/initialData/infotiles.json b/cms/config/initialData/infotiles.json new file mode 100644 index 00000000..fadef4b2 --- /dev/null +++ b/cms/config/initialData/infotiles.json @@ -0,0 +1,34 @@ +[ + { + "id": 1, + "title": "Documentation", + "description": "Find in-depth information about Rocket.Chat features and API.", + "published_at": "2022-04-16T12:13:24.232Z", + "created_at": "2022-04-16T12:13:21.138Z", + "updated_at": "2022-04-16T12:13:24.246Z" + }, + { + "id": 2, + "title": "Learn", + "description": "Learn about Rocket.Chat in an interactive course with quizzes!", + "published_at": "2022-04-16T12:13:40.861Z", + "created_at": "2022-04-16T12:13:35.389Z", + "updated_at": "2022-04-16T12:13:40.875Z" + }, + { + "id": 3, + "title": "Examples", + "description": "Discover and deploy boilerplate example Rocket.Chat projects.", + "published_at": "2022-04-16T12:13:59.714Z", + "created_at": "2022-04-16T12:13:50.649Z", + "updated_at": "2022-04-16T12:13:59.737Z" + }, + { + "id": 4, + "title": "Deploy", + "description": "Instantly deploy your Rocket.Chat site to a public URL with Rocket.Chat SaaS.", + "published_at": "2022-04-16T12:14:24.720Z", + "created_at": "2022-04-16T12:14:20.916Z", + "updated_at": "2022-04-16T12:14:24.733Z" + } + ] \ No newline at end of file diff --git a/cms/config/initialData/persona-icons.json b/cms/config/initialData/persona-icons.json index 91ee0db0..9f8d1606 100644 --- a/cms/config/initialData/persona-icons.json +++ b/cms/config/initialData/persona-icons.json @@ -1,38 +1,38 @@ [ - { - "id": 1, - "icon": "FaUserLock", - "size": 50, - "color": "black", - "published_at": "2021-06-21T09:03:49.990Z", - "created_at": "2021-06-21T09:03:50.881Z", - "updated_at": "2021-06-21T09:03:50.881Z" - }, - { - "id": 2, - "icon": "FaLaptopCode", - "size": 50, - "color": "black", - "published_at": "2021-06-21T09:03:49.990Z", - "created_at": "2021-06-21T09:03:51.215Z", - "updated_at": "2021-06-21T09:03:51.215Z" - }, - { - "id": 3, - "icon": "FaRegCommentDots", - "size": 50, - "color": "black", - "published_at": "2021-06-21T09:03:49.990Z", - "created_at": "2021-06-21T09:03:51.538Z", - "updated_at": "2021-06-21T09:03:51.538Z" - }, - { - "id": 4, - "icon": "FaRegSun", - "size": 50, - "color": "black", - "published_at": "2021-06-21T09:03:49.990Z", - "created_at": "2021-06-21T09:03:51.884Z", - "updated_at": "2021-06-21T09:03:51.884Z" - } -] \ No newline at end of file + { + "id": 1, + "icon": "FaUserLock", + "size": 50, + "color": "black", + "published_at": "2021-06-21T09:03:49.990Z", + "created_at": "2021-06-21T09:03:50.881Z", + "updated_at": "2021-06-21T09:03:50.881Z" + }, + { + "id": 2, + "icon": "FaLaptopCode", + "size": 50, + "color": "black", + "published_at": "2021-06-21T09:03:49.990Z", + "created_at": "2021-06-21T09:03:51.215Z", + "updated_at": "2021-06-21T09:03:51.215Z" + }, + { + "id": 3, + "icon": "FaRegCommentDots", + "size": 50, + "color": "black", + "published_at": "2021-06-21T09:03:49.990Z", + "created_at": "2021-06-21T09:03:51.538Z", + "updated_at": "2021-06-21T09:03:51.538Z" + }, + { + "id": 4, + "icon": "FaRegSun", + "size": 50, + "color": "black", + "published_at": "2021-06-21T09:03:49.990Z", + "created_at": "2021-06-21T09:03:51.884Z", + "updated_at": "2021-06-21T09:03:51.884Z" + } + ] \ No newline at end of file