├── .gitignore ├── README.md ├── babel.config.js ├── jsconfig.json ├── package-lock.json ├── package.json ├── public ├── .htaccess ├── favicon.ico └── index.html ├── src ├── App.vue ├── assets │ ├── Avatar.png │ ├── LoginBackground.jpeg │ ├── a.png │ ├── about.png │ ├── chat.png │ ├── h.png │ ├── logo.png │ ├── sara.png │ └── team-1.png ├── components │ ├── PostDetailsDialog.vue │ ├── SideBar.vue │ └── search │ │ └── SearchFilters.vue ├── main.js ├── plugins │ ├── event-bus.js │ ├── store.js │ ├── vue-axios.js │ ├── vue-moment.js │ └── vuetify.js ├── router │ └── index.js └── views │ ├── Boards.vue │ ├── ChatRoom.vue │ ├── Community.vue │ ├── Login.vue │ ├── Profile.vue │ ├── Search.vue │ └── Settings.vue └── vue.config.js /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | 6 | # local env files 7 | .env.local 8 | .env.*.local 9 | 10 | # Log files 11 | npm-debug.log* 12 | yarn-debug.log* 13 | yarn-error.log* 14 | pnpm-debug.log* 15 | 16 | # Editor directories and files 17 | .idea 18 | .vscode 19 | *.suo 20 | *.ntvs* 21 | *.njsproj 22 | *.sln 23 | *.sw? 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # usm 2 | 3 | ## Project setup 4 | ``` 5 | npm install 6 | ``` 7 | 8 | ### Compiles and hot-reloads for development 9 | ``` 10 | npm run serve 11 | ``` 12 | 13 | ### Compiles and minifies for production 14 | ``` 15 | npm run build 16 | ``` 17 | 18 | ### Lints and fixes files 19 | ``` 20 | npm run lint 21 | ``` 22 | 23 | ## TODO 24 | - ~~Boards (Mohammad & Nour)~~ 25 | - ~~Profile (Wajd)~~ 26 | - ~~Settings (Raneem & Katy)~~ 27 | - Chat (Taiseer & Solieman) 28 | - Search (Firas & Khaled) 29 | - Login/Signup (Ahmad & Abdallah) 30 | 31 | ### Customize configuration 32 | See [Configuration Reference](https://cli.vuejs.org/config/). 33 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/cli-plugin-babel/preset' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "baseUrl": ".", 4 | "paths": { 5 | "@/*": ["./src/*"], 6 | } 7 | }, 8 | "exclude": ["node_modules", "dist"] 9 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "usm", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "serve": "vue-cli-service serve", 7 | "build": "vue-cli-service build", 8 | "lint": "vue-cli-service lint" 9 | }, 10 | "dependencies": { 11 | "axios": "^0.21.1", 12 | "core-js": "^3.6.5", 13 | "pluralize": "^8.0.0", 14 | "vue": "^2.6.11", 15 | "vue-axios": "^3.2.2", 16 | "vue-moment": "^4.1.0", 17 | "vue-router": "^3.2.0", 18 | "vue-scroll-loader": "^2.2.0", 19 | "vuetify": "^2.2.11", 20 | "vuex": "^3.6.0" 21 | }, 22 | "devDependencies": { 23 | "@vue/cli-plugin-babel": "~4.5.0", 24 | "@vue/cli-plugin-eslint": "~4.5.0", 25 | "@vue/cli-plugin-router": "^4.5.9", 26 | "@vue/cli-service": "~4.5.0", 27 | "babel-eslint": "^10.1.0", 28 | "eslint": "^6.7.2", 29 | "eslint-plugin-vue": "^6.2.2", 30 | "sass": "^1.19.0", 31 | "sass-loader": "^8.0.0", 32 | "vue-cli-plugin-vuetify": "~2.0.9", 33 | "vue-template-compiler": "^2.6.11", 34 | "vuetify-loader": "^1.3.0" 35 | }, 36 | "eslintConfig": { 37 | "root": true, 38 | "env": { 39 | "node": true 40 | }, 41 | "extends": [ 42 | "plugin:vue/essential", 43 | "eslint:recommended" 44 | ], 45 | "parserOptions": { 46 | "parser": "babel-eslint" 47 | }, 48 | "rules": {} 49 | }, 50 | "browserslist": [ 51 | "> 1%", 52 | "last 2 versions", 53 | "not dead" 54 | ] 55 | } 56 | -------------------------------------------------------------------------------- /public/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | RewriteEngine On 3 | RewriteBase / 4 | RewriteRule ^index\.html$ - [L] 5 | RewriteCond %{REQUEST_FILENAME} !-f 6 | RewriteCond %{REQUEST_FILENAME} !-d 7 | RewriteRule . /index.html [L] 8 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RoduanKD/Frontend-05-USM-project/704ed6fd28a857cb0b8da839d806217168f2036d/public/favicon.ico -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | USM - University Social Media 9 | 13 | 17 | 18 | 19 | 26 |
27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 42 | -------------------------------------------------------------------------------- /src/assets/Avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RoduanKD/Frontend-05-USM-project/704ed6fd28a857cb0b8da839d806217168f2036d/src/assets/Avatar.png -------------------------------------------------------------------------------- /src/assets/LoginBackground.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RoduanKD/Frontend-05-USM-project/704ed6fd28a857cb0b8da839d806217168f2036d/src/assets/LoginBackground.jpeg -------------------------------------------------------------------------------- /src/assets/a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RoduanKD/Frontend-05-USM-project/704ed6fd28a857cb0b8da839d806217168f2036d/src/assets/a.png -------------------------------------------------------------------------------- /src/assets/about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RoduanKD/Frontend-05-USM-project/704ed6fd28a857cb0b8da839d806217168f2036d/src/assets/about.png -------------------------------------------------------------------------------- /src/assets/chat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RoduanKD/Frontend-05-USM-project/704ed6fd28a857cb0b8da839d806217168f2036d/src/assets/chat.png -------------------------------------------------------------------------------- /src/assets/h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RoduanKD/Frontend-05-USM-project/704ed6fd28a857cb0b8da839d806217168f2036d/src/assets/h.png -------------------------------------------------------------------------------- /src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RoduanKD/Frontend-05-USM-project/704ed6fd28a857cb0b8da839d806217168f2036d/src/assets/logo.png -------------------------------------------------------------------------------- /src/assets/sara.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RoduanKD/Frontend-05-USM-project/704ed6fd28a857cb0b8da839d806217168f2036d/src/assets/sara.png -------------------------------------------------------------------------------- /src/assets/team-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RoduanKD/Frontend-05-USM-project/704ed6fd28a857cb0b8da839d806217168f2036d/src/assets/team-1.png -------------------------------------------------------------------------------- /src/components/PostDetailsDialog.vue: -------------------------------------------------------------------------------- 1 | 63 | 64 | -------------------------------------------------------------------------------- /src/components/SideBar.vue: -------------------------------------------------------------------------------- 1 | 80 | 81 | -------------------------------------------------------------------------------- /src/components/search/SearchFilters.vue: -------------------------------------------------------------------------------- 1 | 37 | 38 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './App.vue' 3 | import router from './router' 4 | import vuetify from './plugins/vuetify' 5 | import './plugins/vue-axios' 6 | import './plugins/vue-moment' 7 | import EventBus from './plugins/event-bus' 8 | import store from './plugins/store' 9 | 10 | 11 | Vue.use(EventBus) 12 | 13 | Vue.config.productionTip = false 14 | 15 | new Vue({ 16 | router, 17 | vuetify, 18 | store, 19 | render: h => h(App) 20 | }).$mount('#app') 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/plugins/event-bus.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | 3 | const EventBus = new Vue() 4 | 5 | export default { 6 | 7 | install (Vue) { 8 | Vue.prototype.$eventBus = EventBus 9 | } 10 | } -------------------------------------------------------------------------------- /src/plugins/store.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Vuex from 'vuex' 3 | 4 | Vue.use(Vuex) 5 | 6 | const store = new Vuex.Store({ 7 | state: { 8 | loggedIn: false, 9 | user: null, 10 | search: { 11 | user: true, 12 | post: true, 13 | board: true, 14 | community: true, 15 | } 16 | }, 17 | getters: { 18 | searchPage: (state) => (target) => { 19 | return state.search[target] 20 | }, 21 | authenticated: (state) => state.user 22 | }, 23 | mutations: { 24 | login(state, user) { 25 | state.user = user 26 | }, 27 | logout(state) { 28 | state.user = null 29 | }, 30 | toggle(state, target) { 31 | state.search[target] = !state.search[target] 32 | } 33 | 34 | } 35 | }) 36 | 37 | export default store -------------------------------------------------------------------------------- /src/plugins/vue-axios.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import axios from 'axios' 3 | import VueAxios from 'vue-axios' 4 | 5 | const instance = axios.create({ 6 | baseURL: 'http://syberctf.hadara-group.com:8080', 7 | // baseURL: 'http://192.168.43.187:8080' 8 | }) 9 | 10 | Vue.use(VueAxios, instance) -------------------------------------------------------------------------------- /src/plugins/vue-moment.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import VueMoment from 'vue-moment' 3 | 4 | Vue.use(VueMoment) -------------------------------------------------------------------------------- /src/plugins/vuetify.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import Vuetify from 'vuetify/lib/framework'; 3 | 4 | Vue.use(Vuetify); 5 | 6 | export default new Vuetify({ 7 | theme: { 8 | themes: { 9 | light: { 10 | primary: '#3c3b54', 11 | secondary: '#a3a0fb', 12 | accent: '#a5a4bf', 13 | }, 14 | dark: { 15 | primary: '#3c3b54', 16 | background: 'colors.indigo.base', 17 | 18 | }, 19 | }, 20 | }, 21 | }); -------------------------------------------------------------------------------- /src/router/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import VueRouter from 'vue-router' 3 | import Community from '../views/Community.vue' 4 | import store from '../plugins/store' 5 | 6 | 7 | 8 | Vue.use(VueRouter) 9 | 10 | const routes = [ 11 | { 12 | // w 13 | path: '/', 14 | name: 'Community', 15 | component: Community 16 | }, 17 | 18 | { 19 | path: '/boards', 20 | name: 'Boards', 21 | component: () => import('../views/Boards.vue') 22 | }, 23 | { 24 | path: '/profile', 25 | name: 'Profile', 26 | component: () => import('../views/Profile.vue') 27 | }, 28 | { 29 | path: '/chatroom', 30 | name: 'ChatRoom', 31 | component: () => import('../views/ChatRoom.vue') 32 | }, 33 | { 34 | path: '/login', 35 | name: 'Login', 36 | component: () => import('../views/Login.vue') 37 | }, 38 | { 39 | path: '/settings', 40 | name: 'Settings', 41 | component: () => import('../views/Settings.vue') 42 | }, 43 | { 44 | path: '/search', 45 | name: 'Search', 46 | component: () => import('../views/Search.vue') 47 | } 48 | ] 49 | 50 | const router = new VueRouter({ 51 | mode: 'history', 52 | base: process.env.BASE_URL, 53 | routes 54 | }) 55 | 56 | router.beforeEach((to, from, next) => { 57 | if (to.name !== 'Login' && !store.state.user) { 58 | to = ({ name: 'Login', query: { redirect: to.path } }) 59 | next(to) 60 | } 61 | else next() 62 | }) 63 | 64 | export default router 65 | 66 | -------------------------------------------------------------------------------- /src/views/Boards.vue: -------------------------------------------------------------------------------- 1 | 228 | 229 | 250 | 251 | 252 | -------------------------------------------------------------------------------- /src/views/ChatRoom.vue: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /src/views/Community.vue: -------------------------------------------------------------------------------- 1 | 133 | 134 | 180 | 181 | -------------------------------------------------------------------------------- /src/views/Login.vue: -------------------------------------------------------------------------------- 1 | 195 | 308 | 309 | -------------------------------------------------------------------------------- /src/views/Profile.vue: -------------------------------------------------------------------------------- 1 | 67 | 68 | 77 | 78 | -------------------------------------------------------------------------------- /src/views/Search.vue: -------------------------------------------------------------------------------- 1 | 246 | 247 | 248 | 249 | 250 | 251 | 352 | 353 | -------------------------------------------------------------------------------- /src/views/Settings.vue: -------------------------------------------------------------------------------- 1 | 99 | 100 | 170 | 171 | -------------------------------------------------------------------------------- /vue.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "transpileDependencies": [ 3 | "vuetify" 4 | ] 5 | } --------------------------------------------------------------------------------