/pages/**/*.vue'
20 | ],
21 | testEnvironment: 'jsdom'
22 | }
23 |
--------------------------------------------------------------------------------
/jsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "baseUrl": ".",
4 | "paths": {
5 | "~/*": ["./*"],
6 | "@/*": ["./*"],
7 | "~~/*": ["./*"],
8 | "@@/*": ["./*"]
9 | }
10 | },
11 | "exclude": ["node_modules", ".nuxt", "dist"]
12 | }
13 |
--------------------------------------------------------------------------------
/lang/by.js:
--------------------------------------------------------------------------------
1 | export default {
2 | MyPage: 'Мая старонка',
3 | Im: 'Дыялогі',
4 | Contacts: 'Кантакты',
5 | Feed: 'Стужка',
6 | UsersCatalog: 'Спіс карыстальнікаў',
7 | AboutProject: 'Аб праекце',
8 | Explore: 'Даследаваць',
9 | // Страница пользователя
10 | Friends: 'Сябры',
11 | Subscribes: 'Падпіскі',
12 | Requests: 'Запыты',
13 | BirthDay: 'Дата нараджэння',
14 | Gender: 'Пол',
15 | Location: 'Месцазнаходжанне',
16 | ShortDesc: 'Кароткае апісанне',
17 | // конец Страница пользователя
18 | Wall: 'Сцяна',
19 | Send: 'Адправіць',
20 | AnswerPost: 'Адказаць',
21 | LikePost: 'лайк',
22 | FriendsUser: 'Ваша сетка',
23 | Login: 'Увайсці',
24 | Logout: 'Выйсці',
25 | InputUsername: 'Увядзіце свой логін',
26 | InputPassword: 'Увядзіце пароль',
27 | UserName: 'Імя карыстальніка',
28 | UserPassword: 'Пароль',
29 | SavePassword: 'Запомніць пароль',
30 | Welcome: 'Сардэчна запрашаем',
31 | YouDontHaveAccount: 'У Вас няма акаўнта',
32 | Reigster: 'Рэгістрацыя',
33 | InFreeDomSocialNetwork: 'у свабодную сацыяльную сетку',
34 | WeAreOnlyOneWeAreOnlyOneTogether: 'Мы ўсяго толькі адны, разам мы адно!'
35 | }
--------------------------------------------------------------------------------
/lang/en.js:
--------------------------------------------------------------------------------
1 | export default {
2 | MyPage: 'My profile',
3 | Contacts: 'My contacts',
4 | Im: 'Im',
5 | Feed: 'Feed',
6 | UsersCatalog: 'User Catalog',
7 | AboutProject: 'About',
8 | // page User
9 | Friends: 'Friends',
10 | Subscribes: 'Subscribes',
11 | Requests: 'Requests',
12 | BirthDay: 'BirthDay',
13 | Gender: 'Gender',
14 | Location: 'Location',
15 | ShortDesc: 'ShortDesc',
16 | // end page User
17 | Wall: 'Wall',
18 | Send: 'Send',
19 | AnswerPost: 'Answer',
20 | LikePost: 'like',
21 | FriendsUser: 'Friends',
22 | Login: 'Log In',
23 | Logout: 'Log Out',
24 | UserName: 'Username',
25 | UserPassword: 'Password',
26 | InputUsername: 'Write your username',
27 | InputPassword: 'Write your password',
28 | SavePassword: 'Save password',
29 | Welcome: 'Welcome',
30 | YouDontHaveAccount: 'You don`t have account',
31 | Reigster: 'Sign up',
32 | InFreeDomSocialNetwork: 'In freedom social network',
33 | WeAreOnlyOneWeAreOnlyOneTogether: 'We are only one, We are only one together'
34 | }
35 |
--------------------------------------------------------------------------------
/lang/kz.js:
--------------------------------------------------------------------------------
1 | export default {
2 | // by https://vk.com/aisberg.stalk
3 | MyPage: 'менің парағым',
4 | Im: 'Диалогтар',
5 | Contacts: 'Байланыстар',
6 | Feed: 'жаңалықтар желісі',
7 | UsersCatalog: 'пайдаланушылар тізімі',
8 | AboutProject: 'жоба туралы',
9 | // Страница пользователя
10 | Friends: 'Достар',
11 | Subscribes: 'Жазылу',
12 | Requests: 'Сұраулар',
13 | BirthDay: 'туған күні',
14 | Гендер: 'Гендер',
15 | Location: 'Орналасқан Жері',
16 | ShortDesc: 'қысқаша сипаттама',
17 | // конец Страница пользователя
18 | Wall: 'Қабырға',
19 | Send: 'Жіберу',
20 | AnswerPost: 'Жауап Беру',
21 | LikePost: 'like',
22 | FriendsUser: 'сіздің желіңіз',
23 | Login: 'Intra',
24 | Logout: 'Шығу',
25 | InputUsername: 'логинді енгізіңіз',
26 | InputPassword: 'құпия сөзді енгізіңіз',
27 | UserName: 'пайдаланушы аты',
28 | UserPassword: 'Пароль',
29 | SavePassword: 'парольді есте сақтау',
30 | Welcome: 'қош келдіңіздер!',
31 | YouDontHaveAccount: 'сізде жоқ',
32 | Reigster: 'Тіркеу',
33 | InFreeDomSocialNetwork: 'тегін әлеуметтік желіде',
34 | WeAreOnlyOneWeAreOnlyOneTogether: 'біз бірміз, Біз біргеміз!'
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/lang/md.js:
--------------------------------------------------------------------------------
1 | export default {
2 | MyPage: 'Моя страница',
3 | Im: 'Диалоги',
4 | Contacts: 'Контакты',
5 | Feed: 'Лента',
6 | UsersCatalog: 'Список пользователей',
7 | AboutProject: 'О проекте',
8 | // Страница пользователя
9 | Friends: 'Друзья',
10 | Subscribes: 'Подписки',
11 | Requests: 'Запросы',
12 | BirthDay: 'Дата рождения',
13 | Gender: 'Пол',
14 | Location: 'Местоположение',
15 | ShortDesc: 'Краткое описание',
16 | // конец Страница пользователя
17 | Wall: 'Стена',
18 | Send: 'Отправить',
19 | AnswerPost: 'Ответить',
20 | LikePost: 'лайк',
21 | FriendsUser: 'Ваша сеть',
22 | Login: 'Войти',
23 | Logout: 'Выйти',
24 | InputUsername: 'Введите ваш логин',
25 | InputPassword: 'Введите ваш пароль',
26 | UserName: 'Имя пользователя',
27 | UserPassword: 'Пароль',
28 | SavePassword: 'Запомнить пароль',
29 | Welcome: 'Добро пожаловать',
30 | YouDontHaveAccount: 'У Вас нет аккаунта',
31 | Reigster: 'Регистрация',
32 | InFreeDomSocialNetwork: 'в свободную социальную сеть',
33 | WeAreOnlyOneWeAreOnlyOneTogether: 'Мы всего лишь одни, вместе мы одно!'
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/lang/ro.js:
--------------------------------------------------------------------------------
1 | export default {
2 | MyPage: 'Pagina mea',
3 | Im: 'Dialoguri ',
4 | Contacts: 'Contacte',
5 | Feed: 'Linia de știri',
6 | UsersCatalog: 'Listă de utilizatori ',
7 | AboutProject: 'Despre proiect',
8 | // Страница пользователя
9 | Friends: 'Prieteni',
10 | Subscribes: 'Abonamente',
11 | Requests: 'Cereri',
12 | BirthDay: 'Data nașterii',
13 | Gender: 'Sex',
14 | Location: 'Locație',
15 | ShortDesc: 'Scurta descriere',
16 | // конец Страница пользователя
17 | Wall: 'Perete',
18 | Send: 'Trimite',
19 | AnswerPost: 'Raspunde',
20 | LikePost: 'like',
21 | FriendsUser: 'Rețeaua dvs',
22 | Login: 'Intra',
23 | Logout: 'Ieși',
24 | InputUsername: 'Introduceți login dvs',
25 | InputPassword: 'Introduceți parola dvs',
26 | UserName: 'Nume de utilizator',
27 | UserPassword: 'Parola',
28 | SavePassword: 'Aminte parola',
29 | Welcome: 'Bine ați venit',
30 | YouDontHaveAccount: 'Nu ai o considerare',
31 | Reigster: 'Înregistrare',
32 | InFreeDomSocialNetwork: 'la o rețea socială liberă',
33 | WeAreOnlyOneWeAreOnlyOneTogether: 'Suntem doar unul, împreună suntem una!'
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/lang/ru.js:
--------------------------------------------------------------------------------
1 | export default {
2 | MyPage: 'Моя страница',
3 | Im: 'Диалоги',
4 | Contacts: 'Контакты',
5 | Feed: 'Лента',
6 | UsersCatalog: 'Список пользователей',
7 | AboutProject: 'О проекте',
8 | Explore: 'Исследовать',
9 | // Страница пользователя
10 | Friends: 'Друзья',
11 | Subscribes: 'Подписки',
12 | Requests: 'Запросы',
13 | BirthDay: 'Дата рождения',
14 | Gender: 'Пол',
15 | Location: 'Местоположение',
16 | ShortDesc: 'Краткое описание',
17 | // конец Страница пользователя
18 | Wall: 'Стена',
19 | Send: 'Отправить',
20 | AnswerPost: 'Ответить',
21 | LikePost: 'лайк',
22 | FriendsUser: 'Ваша сеть',
23 | Login: 'Войти',
24 | Logout: 'Выйти',
25 | InputUsername: 'Введите ваш логин',
26 | InputPassword: 'Введите ваш пароль',
27 | UserName: 'Имя пользователя',
28 | UserPassword: 'Пароль',
29 | SavePassword: 'Запомнить пароль',
30 | Welcome: 'Добро пожаловать',
31 | YouDontHaveAccount: 'У Вас нет аккаунта',
32 | Reigster: 'Регистрация',
33 | InFreeDomSocialNetwork: 'в свободную социальную сеть',
34 | WeAreOnlyOneWeAreOnlyOneTogether: 'Мы всего лишь одни, вместе мы одно!'
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/lang/ua.js:
--------------------------------------------------------------------------------
1 | export default {
2 | MyPage: 'Моя сторінка',
3 | Im: 'Діалоги',
4 | Contacts: 'Контакти',
5 | Feed: 'Стрічка',
6 | UsersCatalog: 'Список користувачів',
7 | AboutProject: 'Про проєкт',
8 | Explore: 'Досліджувати',
9 | // Страница пользователя
10 | Friends: 'Друзі',
11 | Subscribes: 'Підписки',
12 | Requests: 'Запити',
13 | BirthDay: 'Дата народження',
14 | Gender: 'Стать',
15 | Location: 'Місцезнаходження',
16 | ShortDesc: 'Короткий опис',
17 | // конец Страница пользователя
18 | Wall: 'Стіна',
19 | Send: 'Відправити',
20 | AnswerPost: 'Відповісти',
21 | LikePost: 'вподобайка',
22 | FriendsUser: 'Ваша мережа',
23 | Login: 'Увійти',
24 | Logout: 'Вийти',
25 | UserName: 'Ім`я користувача',
26 | UserPassword: 'Пароль',
27 | InputUsername: 'Введіть ваш логін',
28 | InputPassword: 'Введіть ваш пароль',
29 | SavePassword: 'Запам`ятати пароль',
30 | Welcome: 'Ласкаво просимо',
31 | YouDontHaveAccount: 'У Вас немає акаунта',
32 | Reigster: 'Реєстрація',
33 | InFreeDomSocialNetwork: 'у вільну соціальну мережу',
34 | WeAreOnlyOneWeAreOnlyOneTogether: 'Ми всього лише одні, разом ми одне!'
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/lang/zh_cn.js:
--------------------------------------------------------------------------------
1 | export default {
2 | MyPage: '我的页面',
3 | Contacts: '我的联络人',
4 | Im: '对话',
5 | Feed: '动态',
6 | UsersCatalog: '使用者目录',
7 | AboutProject: '关于',
8 | // page User
9 | Friends: '好友',
10 | Subscribes: '订阅',
11 | Requests: '好友要求',
12 | BirthDay: '生日',
13 | Gender: '性别',
14 | Location: '位置',
15 | ShortDesc: '简述',
16 | // end page User
17 | Send: '传送',
18 | AnswerPost: '回答',
19 | LikePost: '赞',
20 | FriendsUser: '好友',
21 | Login: '登入',
22 | Logout: '登出',
23 | UserName: '使用者名称',
24 | UserPassword: '密码',
25 | InputUsername: '输入你的使用者名称',
26 | InputPassword: '输入你的密码',
27 | SavePassword: '储存密码',
28 | Welcome: '欢迎',
29 | YouDontHaveAccount: '你尚未拥有一个账号',
30 | Reigster: '注册',
31 | InFreeDomSocialNetwork: '在自由的社交网络',
32 | WeAreOnlyOneWeAreOnlyOneTogether: 'We are only one, We are only one together'
33 | }
34 |
--------------------------------------------------------------------------------
/lang/zh_tw.js:
--------------------------------------------------------------------------------
1 | export default {
2 | MyPage: '我的頁面',
3 | Contacts: '我的聯絡人',
4 | Im: '對話',
5 | Feed: '動態',
6 | UsersCatalog: '使用者目錄',
7 | AboutProject: '關於',
8 | // page User
9 | Friends: '好友',
10 | Subscribes: '訂閱',
11 | Requests: '好友要求',
12 | BirthDay: '生日',
13 | Gender: '性別',
14 | Location: '位置',
15 | ShortDesc: '簡述',
16 | // end page User
17 | Send: '傳送',
18 | AnswerPost: '回答',
19 | LikePost: '讚',
20 | FriendsUser: '好友',
21 | Login: '登入',
22 | Logout: '登出',
23 | UserName: '使用者名稱',
24 | UserPassword: '密碼',
25 | InputUsername: '輸入你的使用者名稱',
26 | InputPassword: '輸入你的密碼',
27 | SavePassword: '儲存密碼',
28 | Welcome: '歡迎',
29 | YouDontHaveAccount: '你尚未擁有一個帳號',
30 | Reigster: '註冊',
31 | InFreeDomSocialNetwork: '在自由的社交網路',
32 | WeAreOnlyOneWeAreOnlyOneTogether: 'We are only one, We are only one together'
33 | }
34 |
--------------------------------------------------------------------------------
/layouts/default.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
25 |
26 |
27 |
166 |
167 |
247 |
248 |
282 |
--------------------------------------------------------------------------------
/layouts/error.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 | 404
12 | По некоторым причинам данная страница не найдена, вернитесь на главную страницу
13 | главная страница
14 |
15 |
16 |
22 |
23 |
24 |
25 |
26 |
39 |
--------------------------------------------------------------------------------
/middleware/trailingSlashRedirect.js:
--------------------------------------------------------------------------------
1 | export default function ({ route, redirect }) {
2 | if (route.path !== '/' && route.path.endsWith('/')) {
3 | const { path, query, hash } = route
4 | const nextPath = path.replace(/\/+$/, '') || '/'
5 | const nextRoute = { path: nextPath, query, hash }
6 |
7 | redirect(nextRoute)
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/nuxt.config.js:
--------------------------------------------------------------------------------
1 | import axios from 'axios'
2 | export default {
3 | // Global page headers: https://go.nuxtjs.dev/config-head
4 | server: {
5 | host: '0.0.0.0', // default: localhost
6 | port: 8111
7 | },
8 | env: {
9 | version: 0.05
10 | },
11 | router: {
12 | middleware: 'trailingSlashRedirect',
13 | trailingSlash: false
14 | },
15 | head: {
16 | title: 'Social network',
17 | meta: [
18 | { charset: 'utf-8' },
19 | { name: 'viewport', content: 'width=device-width, initial-scale=1' },
20 | { name: 'description', content: '', hid: 'description' },
21 | { name: 'format-detection', content: 'telephone=no' }
22 | ],
23 | link: [
24 | { rel: 'icon', type: 'image/png', href: '/icons/favicon.png' },
25 | { rel: 'icon', type: 'image/x-icon', href: '/icons/favicon.ico' }
26 | ]
27 | },
28 | toast: {
29 | position: 'bottom-right',
30 | register: [ // Register custom toasts
31 | {
32 | name: 'my-error',
33 | message: 'Oops...Something went wrong',
34 | options: {
35 | type: 'error'
36 | }
37 | }
38 | ]
39 | },
40 | cache: {
41 | // ....
42 | store: {
43 | type: 'redis',
44 | host: 'localhost',
45 | ttl: 10 * 60,
46 | configure: [
47 | // these values are configured
48 | // on redis upon initialization
49 | ['maxmemory', '200mb'],
50 | ['maxmemory-policy', 'allkeys-lru']
51 | ]
52 | }
53 | },
54 |
55 | // Global CSS: https://go.nuxtjs.dev/config-css
56 | css: ['node_modules/lite-youtube-embed/src/lite-yt-embed.css'],
57 | // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
58 | plugins: [
59 | '~/plugins/axios',
60 | '~/plugins/youtube.client.js',
61 | '~/plugins/linkified.js'
62 | ],
63 |
64 | // Auto import components: https://go.nuxtjs.dev/config-components
65 | components: true,
66 |
67 | // Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
68 | // Modules: https://go.nuxtjs.dev/config-modules
69 | modules: [
70 | // https://go.nuxtjs.dev/axios
71 | '@nuxtjs/axios',
72 | // https://go.nuxtjs.dev/pwa
73 | '@nuxtjs/pwa',
74 | 'nuxt-ssr-cache',
75 | 'cookie-universal-nuxt',
76 | '@nuxtjs/recaptcha',
77 | '@nuxtjs/sitemap',
78 | '@nuxtjs/yandex-metrika',
79 | '@nuxtjs/i18n',
80 | '@nuxtjs/toast',
81 | '@nuxtjs/google-gtag'
82 | ],
83 |
84 | 'google-gtag': {
85 | id: 'G-XSYZL3D898', // required
86 | debug: true
87 |
88 | },
89 |
90 | i18n: {
91 | strategy: 'no_prefix',
92 | detectBrowserLanguage: {
93 | useCookie: true,
94 | cookieKey: 'i18n_redirected'
95 | },
96 | langDir: 'lang/',
97 | locales: [
98 | { code: 'en', iso: 'en-US', file: 'en.js', dir: 'ltr' },
99 | { code: 'ru', iso: 'ru-RU', file: 'ru.js', dir: 'ltr' },
100 | { code: 'uk', iso: 'uk_UA', file: 'ua.js', dir: 'ltr' },
101 | { code: 'md', iso: 'ro_MD', file: 'md.js', dir: 'ltr' },
102 | { code: 'be', iso: 'be-BY', file: 'by.js', dir: 'ltr' },
103 | { code: 'ro', iso: 'ro-MD', file: 'ro.js', dir: 'ltr' },
104 | { code: 'kz', iso: 'kk-KZ', file: 'kz.js', dir: 'ltr' },
105 | { code: 'zhtw', iso: 'zh-tw', file: 'zh_tw.js', dir: 'ltr' },
106 | { code: 'zhcn', iso: 'zh-cn', file: 'zh_cn.js', dir: 'ltr' }
107 | ],
108 | defaultLocale: 'en',
109 | vueI18n: {
110 | fallbackLocale: 'en',
111 | messages: {
112 | en: {
113 | welcome: 'Welcome'
114 | },
115 | fr: {
116 | welcome: 'Bienvenue'
117 | },
118 | es: {
119 | welcome: 'Bienvenido'
120 | }
121 | }
122 | }
123 | },
124 | yandexMetrika: {
125 | id: '86443781',
126 | webvisor: false
127 | // clickmap:true,
128 | // useCDN:false,
129 | // trackLinks:true,
130 | // accurateTrackBounce:true,
131 | },
132 | sitemap:
133 | {
134 | path: '/sitemap.xml',
135 | hostname: 'https://only-one.su',
136 | gzip: false,
137 | routes: ['/users', '/login', '/about'],
138 | sitemaps: [
139 | {
140 | path: '/sitemap-main.xml',
141 | routes: ['/users', '/login', '/about'],
142 | exclude: ['/im', '/news', '/', '/settings', '/wallet']
143 | },
144 | {
145 | path: '/sitemap-users.xml',
146 | exclude: ['/users', '/login', '/about', '/news', '/', '/settings', '/wallet', '/im', '/register'],
147 | routes: async () => {
148 | const array = []
149 | const { data } = await axios.get('https://only-one.su/api/user/get')
150 | array.push(...data.users.map(user => `/user/${user.id}`))
151 | array.push(...data.users.map(user => `/user/${user.id}/friends`))
152 | return array
153 | }
154 | }
155 | ]
156 | },
157 |
158 | recaptcha: {
159 | siteKey: '6LeM-igcAAAAAJNQUHNOzpAH1jzTgruIMcjtUTsJ', // Site key for requests
160 | version: 2
161 |
162 | },
163 |
164 | // Axios module configuration: https://go.nuxtjs.dev/config-axios
165 | axios: {},
166 |
167 | // PWA module configuration: https://go.nuxtjs.dev/pwa
168 | pwa: {
169 | icon: false,
170 | manifest: {
171 | name: 'Only one',
172 | lang: 'ru'
173 | }
174 | },
175 |
176 | // Build Configuration: https://go.nuxtjs.dev/config-build
177 | build: {
178 | babel: {
179 | // envName: server, client, modern
180 | presets ({ envName }) {
181 | return [
182 | [
183 | '@nuxt/babel-preset-app',
184 | {
185 | corejs: { version: 3 }
186 | }
187 | ]
188 | ]
189 | }
190 | }
191 | }
192 | }
193 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "only-one",
3 | "version": "1.0.0",
4 | "private": true,
5 | "scripts": {
6 | "dev": "nuxt",
7 | "build": "nuxt build",
8 | "start": "nuxt start",
9 | "generate": "nuxt generate",
10 | "lint:js": "eslint --ext \".js,.vue\" --ignore-path .gitignore .",
11 | "lint": "npm run lint:js",
12 | "test": "jest"
13 | },
14 | "dependencies": {
15 | "@nuxtjs/axios": "^5.13.6",
16 | "@nuxtjs/google-gtag": "^1.0.4",
17 | "@nuxtjs/i18n": "^7.2.0",
18 | "@nuxtjs/pwa": "^3.3.5",
19 | "@nuxtjs/recaptcha": "^1.0.4",
20 | "@nuxtjs/sitemap": "^2.4.0",
21 | "@nuxtjs/toast": "^3.3.1",
22 | "@nuxtjs/yandex-metrika": "^1.3.0",
23 | "cookie-universal-nuxt": "^2.1.5",
24 | "jwt-decode": "^3.1.2",
25 | "linkifyjs": "^3.0.5",
26 | "lite-youtube-embed": "^0.2.0",
27 | "moment": "^2.29.1",
28 | "nuxt": "^2.15.8",
29 | "nuxt-ssr-cache": "^1.5.2",
30 | "v-emoji-picker": "^2.3.3",
31 | "vue-advanced-cropper": "^1.10.0",
32 | "vue-popperjs": "^2.3.0"
33 | },
34 | "devDependencies": {
35 | "@babel/eslint-parser": "^7.14.7",
36 | "@babel/runtime-corejs3": "7.17.2",
37 | "@nuxt/babel-preset-app": "^2.15.8",
38 | "@nuxtjs/eslint-config": "^6.0.1",
39 | "@nuxtjs/eslint-module": "^3.0.2",
40 | "@nuxtjs/style-resources": "^1.2.1",
41 | "@vue/test-utils": "^1.2.1",
42 | "babel-core": "7.0.0-bridge.0",
43 | "babel-jest": "^27.0.5",
44 | "core-js": "3.21.0",
45 | "eslint": "^7.29.0",
46 | "eslint-plugin-nuxt": "^2.0.0",
47 | "eslint-plugin-vue": "^7.12.1",
48 | "fibers": "^5.0.0",
49 | "jest": "^27.0.5",
50 | "vue-jest": "^3.0.4",
51 | "webpack": "~4.46.0"
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/pages/about.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
О проекте
5 |
6 |
7 | Свободная платформа для общения.
8 |
9 | Исходный код проекта открыт, и пользователи могут внести свой вклад через прямое участие в разработке или делясь своим опытом использования и предложениями.
10 |
11 |
12 | Платформа представляет собой социальную сеть, поскольку именно в такой форме нуждаются пользователи, желающие общаться и искать новые знакомства.
13 |
14 | Наша главная цель — предоставить стабильную и удобную платформу, где пользователи смогут чувствовать себя спокойно, выполняя свои задачи.
15 |
16 |
17 | А еще мы намного меньше загрязняем окружающую среду, чем другие проекты. Спасем планету вместе!
18 |
19 |
20 |
21 |
22 | Группа в VK
23 |
24 |
25 |
26 | Авторка проекта
27 |
28 | admin@only-one.su почта для обратной связи
29 |
30 |
31 | Организация на Github
32 |
33 |
34 |
35 |
36 |
37 |
53 |
66 |
--------------------------------------------------------------------------------
/pages/explore.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | Поиск пользователей
4 |
18 |
19 |
20 | {{ user.username }}
21 |
22 |
23 |
24 |
25 |
26 |
72 |
--------------------------------------------------------------------------------
/pages/im.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | {{ me.username }}
15 |
16 |
17 | {{ msg.time }}
18 |
19 |
20 |
21 |
22 |
23 |
24 | {{ msg.text }}
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 | {{ msg.username }}
36 |
37 |
38 | {{ msg.time }}
39 |
40 |
41 |
42 |
43 |
44 |
45 | {{ msg.text }}
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
73 |
74 |
75 |
76 |
116 |
117 |
118 |
119 | {{ $t('Im') }}
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
{{ dialog.username }}
128 |
{{ FromNowTime(dialog.timestamp) }}
129 |
130 |
131 |
132 | {{ 30 > dialog.text.length ? dialog.text : dialog.text.slice(0,30) }}
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
238 |
335 |
--------------------------------------------------------------------------------
/pages/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {{ $t('InFreeDomSocialNetwork') }} Only one
8 |
9 | {{ $t('WeAreOnlyOneWeAreOnlyOneTogether') }}!
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
39 |
74 |
--------------------------------------------------------------------------------
/pages/login.vue:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
28 |
--------------------------------------------------------------------------------
/pages/news.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | News
6 |
7 |
8 |
9 |
10 |
11 |
12 |
56 |
57 |
63 |
--------------------------------------------------------------------------------
/pages/open.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Внимание
5 | вы переходите на сайт
6 | который может быть опасен
7 |
8 | {{ $route.query.url }}
9 |
10 | Вы точно хотите перейти ?
11 |
12 |
13 | Перейти
14 |
15 |
16 |
17 |
18 |
33 |
--------------------------------------------------------------------------------
/pages/post/_post.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | Ответ
10 |
11 |
12 |
13 |
14 |
15 |
85 |
--------------------------------------------------------------------------------
/pages/register.vue:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
19 |
20 |
83 |
84 |
97 |
98 |
99 |
100 |
101 |
184 |
401 |
--------------------------------------------------------------------------------
/pages/settings.vue:
--------------------------------------------------------------------------------
1 |
2 |
92 |
93 |
197 |
279 |
--------------------------------------------------------------------------------
/pages/user/_id/contacts.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Персональный сайт https://url.ru
5 |
6 | социальные сети:
7 |
8 |
9 | vk.com
10 |
11 |
12 |
13 | tg.com
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/pages/user/_id/friends.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
друзья ({{ friends.count }}) {{ user.username }}
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | {{ friend.user.username }}
16 |
17 |
18 | {{ 120 > Math.floor(new Date().getTime()/1000 - friend.user.online) ? "Онлайн":OfflinefromOnline(friend.user.online) }}
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
101 |
177 |
--------------------------------------------------------------------------------
/pages/user/_id/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
{{ user.username }}
28 |
29 | {{ 120 > Math.floor(new Date().getTime()/1000 - user.online) ? "Онлайн":OfflinefromOnline(user.online) }}
30 |
31 |
32 |
39 |
40 |
41 |
49 |
50 |
51 |
52 |
53 |
54 |
55 | {{ $t('BirthDay') }}:
56 | {{ new Date(user.birthday_date * 1000).toLocaleDateString() }} ({{ Math.floor((new Date()-new Date(user.birthday_date * 1000))/1000/60/60/24/365) }})
57 |
58 |
59 | {{ $t('Gender') }}: {{ user.gender }}
60 |
61 |
62 | Контакты и страницы
63 |
64 |
65 | {{ $t('Location') }}: {{ user.country }}, {{ user.city }}
66 |
67 | {{ $t('ShortDesc') }}: {{ user.bio }}
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 | {{ $t('FriendsUser') }}
77 |
78 |
79 |
80 |
84 |
85 |
86 | {{ $t('Friends') }}
87 | {{ $t('Subscribes') }}
88 | {{ $t('Requests') }} ({{ requests.count }})
89 |
90 |
91 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | {{ friend.user.username }}
107 |
108 |
109 | {{ 120 > Math.floor(new Date().getTime()/1000 - friend.user.online) ? "Онлайн":OfflinefromOnline(friend.user.online) }}
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 | {{ friend.user.username }}
129 |
130 |
131 | {{ 120 > Math.floor(new Date().getTime()/1000 - friend.user.online) ? "Онлайн":OfflinefromOnline(friend.user.online) }}
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
282 |
406 |
420 |
--------------------------------------------------------------------------------
/pages/users.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
Users({{ users.total }})
5 |
6 |
7 |
8 |
14 |
17 | {{ user.username }}
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
71 |
88 |
--------------------------------------------------------------------------------
/pages/wallet.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 | Wallet
7 |
8 | у вас 0 коинов
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/pages/weareonlyone.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
We are only one
5 |
6 | we are only one together
7 |
8 | Сообщество, созданное для людей, людьми, во благо людям
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/plugins/axios.js:
--------------------------------------------------------------------------------
1 | export default function (context, inject) {
2 | const token = context.$cookies.get('token')
3 | let headers = {}
4 |
5 | if (token !== '') {
6 | headers = {
7 | authorization: 'Bearer ' + token
8 | }
9 | }
10 |
11 | const api = context.$axios.create({
12 | headers
13 | })
14 | if (process.client) {
15 | if (window.location.host.split(':')[0] === 'social.anon') { api.setBaseURL('http://social.anon/api/') } else { api.setBaseURL('https://only-one.su/api/') }
16 | }
17 | if (process.server) {
18 | if (context.req.headers.host.split(':')[0] === 'social.anon') { api.setBaseURL('http://social.anon/api/') } else { api.setBaseURL('https://only-one.su/api/') }
19 | }
20 | // Inject to context as $api
21 | inject('api', api)
22 | }
23 |
--------------------------------------------------------------------------------
/plugins/linkified.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import { tokenize, Options } from 'linkifyjs'
3 |
4 | function escapeText (text) {
5 | return text
6 | .replace(/&/g, '&')
7 | .replace(//g, '>')
9 | }
10 |
11 | function escapeAttr (href) {
12 | return href.replace(/"/g, '"')
13 | }
14 |
15 | const object = {
16 | bind: (el, binding) => {
17 | // el.innerHTML = linkifyStr(el.innerHTML, binding.value)
18 |
19 | const opts = new Options(binding.value)
20 |
21 | const tokens = tokenize(el.innerHTML)
22 | const result = []
23 |
24 | for (let i = 0; i < tokens.length; i++) {
25 | const token = tokens[i]
26 |
27 | if (token.t === 'nl' && opts.nl2br) {
28 | result.push(' \n')
29 | continue
30 | } else if (!token.isLink || !opts.check(token)) {
31 | result.push(escapeText(token.toString()))
32 | continue
33 | }
34 |
35 | const {
36 | formatted,
37 | formattedHref,
38 | tagName
39 | } = opts.resolve(token)
40 |
41 | const url = new URL(formattedHref)
42 |
43 | const link = [`<${tagName} href="${url.hostname === 'only-one.su' ? '' : '/open?url='}${escapeAttr(formattedHref)}"`]
44 |
45 | link.push('target="_blank"')
46 | link.push('rel="nofollow noopener"')
47 |
48 | link.push(`>${escapeText(formatted)}${tagName}>`)
49 | result.push(link.join(''))
50 | }
51 |
52 | const resultReally = result.join('')
53 | el.innerHTML = resultReally
54 | }
55 | }
56 |
57 | Vue.directive('linkified', object)
58 |
--------------------------------------------------------------------------------
/plugins/youtube.client.js:
--------------------------------------------------------------------------------
1 | import 'lite-youtube-embed'
2 |
--------------------------------------------------------------------------------
/static/fonts/SFProDisplay-Regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OnlyOneSocial/nuxtjsFrontend/595a23d714bfac072b1751bf63df7371eca8f39e/static/fonts/SFProDisplay-Regular.eot
--------------------------------------------------------------------------------
/static/fonts/SFProDisplay-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OnlyOneSocial/nuxtjsFrontend/595a23d714bfac072b1751bf63df7371eca8f39e/static/fonts/SFProDisplay-Regular.ttf
--------------------------------------------------------------------------------
/static/fonts/SFProDisplay-Regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OnlyOneSocial/nuxtjsFrontend/595a23d714bfac072b1751bf63df7371eca8f39e/static/fonts/SFProDisplay-Regular.woff
--------------------------------------------------------------------------------
/static/fonts/SFProDisplay-Regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OnlyOneSocial/nuxtjsFrontend/595a23d714bfac072b1751bf63df7371eca8f39e/static/fonts/SFProDisplay-Regular.woff2
--------------------------------------------------------------------------------
/static/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OnlyOneSocial/nuxtjsFrontend/595a23d714bfac072b1751bf63df7371eca8f39e/static/icon.png
--------------------------------------------------------------------------------
/static/icons/dislike.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/static/icons/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OnlyOneSocial/nuxtjsFrontend/595a23d714bfac072b1751bf63df7371eca8f39e/static/icons/favicon.ico
--------------------------------------------------------------------------------
/static/icons/like.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/static/img/Logo.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/static/img/OnlyOneSocial.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OnlyOneSocial/nuxtjsFrontend/595a23d714bfac072b1751bf63df7371eca8f39e/static/img/OnlyOneSocial.png
--------------------------------------------------------------------------------
/static/img/OpenGraphLogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OnlyOneSocial/nuxtjsFrontend/595a23d714bfac072b1751bf63df7371eca8f39e/static/img/OpenGraphLogo.png
--------------------------------------------------------------------------------
/static/img/footer/newspaper.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/img/footer/user.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/img/footer/users.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
24 |
25 |
26 |
27 |
28 |
30 |
31 |
32 |
33 |
34 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
--------------------------------------------------------------------------------
/static/img/im/smile.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/img/login/login-form-input-icon-login.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/static/img/login/login-form-input-icon-password.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/static/img/login/login-form-input-show.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/static/img/login/login-header-logo.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/static/img/menu/about.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/static/img/menu/contacts.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/static/img/menu/explore.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
6 |
7 |
15 |
22 |
23 |
27 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
--------------------------------------------------------------------------------
/static/img/menu/im.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/static/img/menu/my_page.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/static/img/menu/news.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/static/img/menu/people.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/static/img/post/photo.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/static/img/post/send.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/static/img/privacy_policy_android.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Privacy Policy
7 |
8 |
9 |
10 | Privacy Policy
11 | Only One built the Only one app as
12 | a Free app. This SERVICE is provided by
13 | Only One at no cost and is intended for use as
14 | is.
15 |
16 | This page is used to inform visitors regarding our
17 | policies with the collection, use, and disclosure of Personal
18 | Information if anyone decided to use our Service.
19 |
20 | If you choose to use our Service, then you agree to
21 | the collection and use of information in relation to this
22 | policy. The Personal Information that we collect is
23 | used for providing and improving the Service. We will not use or share your information with
24 | anyone except as described in this Privacy Policy.
25 |
26 | The terms used in this Privacy Policy have the same meanings
27 | as in our Terms and Conditions, which are accessible at
28 | Only one unless otherwise defined in this Privacy Policy.
29 |
Information Collection and Use
30 | For a better experience, while using our Service, we
31 | may require you to provide us with certain personally
32 | identifiable information, including but not limited to birdthday,city,gender. The information that
33 | we request will be retained by us and used as described in this privacy policy.
34 |
35 | The app does use third-party services that may collect
36 | information used to identify you.
37 |
38 | Link to the privacy policy of third-party service providers used
39 | by the app
40 |
Log Data
41 | We want to inform you that whenever you
42 | use our Service, in a case of an error in the app
43 | we collect data and information (through third-party
44 | products) on your phone called Log Data. This Log Data may
45 | include information such as your device Internet Protocol
46 | (“IP”) address, device name, operating system version, the
47 | configuration of the app when utilizing our Service,
48 | the time and date of your use of the Service, and other
49 | statistics.
50 |
Cookies
51 | Cookies are files with a small amount of data that are
52 | commonly used as anonymous unique identifiers. These are sent
53 | to your browser from the websites that you visit and are
54 | stored on your device's internal memory.
55 |
56 | This Service does not use these “cookies” explicitly. However,
57 | the app may use third-party code and libraries that use
58 | “cookies” to collect information and improve their services.
59 | You have the option to either accept or refuse these cookies
60 | and know when a cookie is being sent to your device. If you
61 | choose to refuse our cookies, you may not be able to use some
62 | portions of this Service.
63 |
Service Providers
64 | We may employ third-party companies and
65 | individuals due to the following reasons:
66 |
To facilitate our Service; To provide the Service on our behalf; To perform Service-related services; or To assist us in analyzing how our Service is used.
67 | We want to inform users of this Service
68 | that these third parties have access to their Personal
69 | Information. The reason is to perform the tasks assigned to
70 | them on our behalf. However, they are obligated not to
71 | disclose or use the information for any other purpose.
72 |
Security
73 | We value your trust in providing us your
74 | Personal Information, thus we are striving to use commercially
75 | acceptable means of protecting it. But remember that no method
76 | of transmission over the internet, or method of electronic
77 | storage is 100% secure and reliable, and we cannot
78 | guarantee its absolute security.
79 |
Links to Other Sites
80 | This Service may contain links to other sites. If you click on
81 | a third-party link, you will be directed to that site. Note
82 | that these external sites are not operated by us.
83 | Therefore, we strongly advise you to review the
84 | Privacy Policy of these websites. We have
85 | no control over and assume no responsibility for the content,
86 | privacy policies, or practices of any third-party sites or
87 | services.
88 |
Children’s Privacy
89 | These Services do not address anyone under the age of 13.
90 | We do not knowingly collect personally
91 | identifiable information from children under 13 years of age. In the case
92 | we discover that a child under 13 has provided
93 | us with personal information, we immediately
94 | delete this from our servers. If you are a parent or guardian
95 | and you are aware that your child has provided us with
96 | personal information, please contact us so that
97 | we will be able to do the necessary actions.
98 |
Changes to This Privacy Policy
99 | We may update our Privacy Policy from
100 | time to time. Thus, you are advised to review this page
101 | periodically for any changes. We will
102 | notify you of any changes by posting the new Privacy Policy on
103 | this page.
104 |
This policy is effective as of 2022-03-02
Contact Us
105 | If you have any questions or suggestions about our
106 | Privacy Policy, do not hesitate to contact us at support@only-one.ru.
107 |
This privacy policy page was created at privacypolicytemplate.net and modified/generated by App Privacy Policy Generator
108 |
109 |
110 |
111 |
--------------------------------------------------------------------------------
/static/img/search.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/static/img/settings.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/static/img/user/UserAcceptAdd.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/static/img/user/UserAddUser.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/static/img/user/UserCancel.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/static/img/user/UserDelete.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/static/img/user/forbidden.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/static/img/user/message.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/static/img/user/ooi-add-contact.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
19 |
38 |
40 |
51 |
52 |
56 |
60 |
66 |
74 |
83 |
84 |
85 |
--------------------------------------------------------------------------------
/static/img/user/user_add.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/static/img/user/wallet.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/static/manrope.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OnlyOneSocial/nuxtjsFrontend/595a23d714bfac072b1751bf63df7371eca8f39e/static/manrope.woff2
--------------------------------------------------------------------------------
/static/robots.txt:
--------------------------------------------------------------------------------
1 | User-agent: *
2 | Sitemap: https://only-one.su/sitemap.xml
--------------------------------------------------------------------------------
/static/sound.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OnlyOneSocial/nuxtjsFrontend/595a23d714bfac072b1751bf63df7371eca8f39e/static/sound.mp3
--------------------------------------------------------------------------------
/static/twilight.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OnlyOneSocial/nuxtjsFrontend/595a23d714bfac072b1751bf63df7371eca8f39e/static/twilight.png
--------------------------------------------------------------------------------
/static/yandex_ed17ca50d4c6fb8b.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Verification: ed17ca50d4c6fb8b
6 |
--------------------------------------------------------------------------------
/store/README.md:
--------------------------------------------------------------------------------
1 | # STORE
2 |
3 | **This directory is not required, you can delete it if you don't want to use it.**
4 |
5 | This directory contains your Vuex Store files.
6 | Vuex Store option is implemented in the Nuxt.js framework.
7 |
8 | Creating a file in this directory automatically activates the option in the framework.
9 |
10 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/vuex-store).
11 |
--------------------------------------------------------------------------------
/store/UserPage.js:
--------------------------------------------------------------------------------
1 | let serverUrl = 'https://only-one.su/api'
2 | let serverNewsUrl = serverUrl
3 | let serverUsersUrl = serverUrl
4 | if (process.env.NODE_ENV === 'production' && process.env.VUE_ENV === 'server') { serverUrl = 'http://localhost:3044/api'; serverNewsUrl = 'http://localhost:3053/api'; serverUsersUrl = 'http://localhost:3046/api' }
5 |
6 | export const state = () => ({
7 | user: {
8 | username: 'asdasdsd',
9 | id: '',
10 | avatar: ''
11 | },
12 | friends: {
13 | list: [],
14 | count: 0
15 | },
16 | friendStatus: {},
17 | posts: {
18 | list: [],
19 | end: false
20 | }
21 | })
22 |
23 | export const actions = {
24 | async getUser ({ commit }, userid) {
25 | const response = await this.$api.$get(`${serverUsersUrl}/user/get/${userid}`).catch((err) => {
26 | if (err.response.status === 404) { return '404' }
27 | })
28 | if (response.user) {
29 | const user = response.user
30 | const friends = response.friends
31 | const friendStatus = response.friend_status
32 | commit('SetUser', user)
33 | commit('SetFriends', friends)
34 | commit('SetFriendStatus', friendStatus)
35 | }
36 | if (response === '404') { throw new Error('404') }
37 | },
38 | async getPosts ({ commit }, { offset, limit, userid }) {
39 | const response = await this.$api.$get(`${serverNewsUrl}/wall/get/${userid}?offset=${offset}&limit=${limit}`)
40 | if (response) {
41 | const content = response
42 | commit('SetPosts', { content, offset })
43 | }
44 | return true
45 | }
46 | }
47 |
48 | export const mutations = {
49 | SetUser (state, content) {
50 | state.user = content
51 | },
52 | SetFriends (state, content) {
53 | state.friends = content
54 | },
55 | SetFriendStatus (state, content) {
56 | state.friendStatus = content
57 | },
58 | SetPosts (state, content) {
59 | if (content.content.length === 0 && content.offset !== 0) { state.posts.end = true }
60 | if (content.offset === 0) { state.posts.list = content.content } else { state.posts.list.push(...content.content) }
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/store/index.js:
--------------------------------------------------------------------------------
1 | import jwt_decode from 'jwt-decode'
2 | let serverUrl = 'https://only-one.su/api'
3 | let serverNewsUrl = serverUrl
4 | let serverUsersUrl = serverUrl
5 | if (process.env.NODE_ENV === 'production' && process.env.VUE_ENV === 'server') { serverUrl = 'http://localhost:3044/api'; serverNewsUrl = 'http://localhost:3053/api'; serverUsersUrl = 'http://localhost:3046/api' }
6 |
7 | export const state = () => ({
8 | socket: {},
9 | me: {
10 | id: 0
11 | },
12 | modal: {
13 | type: false,
14 | data: ''
15 | },
16 | news: { list: [], end: false },
17 | users: [],
18 | post: {
19 | text: '',
20 | author_username: ''
21 | }
22 | })
23 |
24 | export const actions = {
25 | async nuxtServerInit ({ commit, state }, { app, redirect }) {
26 | const token = this.$cookies.get('token')
27 | if (token !== undefined && jwt_decode(token).exp > new Date().getTime() / 1000) {
28 | let headers = {}
29 |
30 | if (token !== '') {
31 | headers = {
32 | authorization: 'Bearer ' + token
33 | }
34 | }
35 |
36 | const res = await this.$axios.get(`${serverUrl}/auth/user/`, { headers }).catch((err) => {
37 | if (err.response.status === 401) {
38 | this.$cookies.remove('token')
39 | // redirect('/login')
40 | }
41 | })
42 |
43 | if (res && res.data && res.data.user && res.data.user.id) { commit('SetMe', res.data.user) }
44 | } else if (jwt_decode(token).exp <= new Date().getTime() / 1000) {
45 | this.$cookies.remove('token')
46 | }
47 | const namePage = app.router.history.current.name
48 |
49 | const AuthRequiredPages = ['news', 'im']
50 |
51 | if (!token && AuthRequiredPages.includes(namePage)) {
52 | redirect('/login')
53 | }
54 | if (token === undefined && namePage === 'post-post' && app.router.history.current.query.answer === null) {
55 | redirect(app.router.history.current.path)
56 | }
57 |
58 | if (token && namePage === 'index') {
59 | redirect('/news')
60 | }
61 | if (token && namePage === 'login') {
62 | redirect('/news')
63 | }
64 | },
65 | InitWebSocket ({ commit }) {
66 | const WS = new WebSocket('wss://only-one.su/ws')
67 | commit('InitWebSocket', WS)
68 | },
69 | async getUsers ({ commit }, userid) {
70 | const response = await this.$api.$get(`${serverUsersUrl}/user/get`).catch((err) => {
71 | console.log(err)
72 | })
73 | if (response) {
74 | const content = response
75 | commit('SetUsers', content)
76 | }
77 | return true
78 | },
79 | async getNews ({ commit }, { offset, limit }) {
80 | const response = await this.$api.$get(`${serverNewsUrl}/wall/get?offset=${offset}&limit=${limit}`).catch((err) => {
81 | console.log(err)
82 | })
83 | if (response) {
84 | const content = response
85 | commit('SetNews', { content, offset })
86 | }
87 | return true
88 | },
89 | async getPost ({ commit }, { PostID }) {
90 | const response = await this.$api.$get(`${serverNewsUrl}/wall/post/${PostID}`).catch((err) => {
91 | console.log(err)
92 | })
93 | if (response) {
94 | const content = response
95 | commit('SetPost', content)
96 | }
97 | return true
98 | },
99 | async getMe ({ commit }) {
100 | const response = await this.$api.$get(`${serverUrl}/auth/user/`).catch((err) => {
101 | console.log(err)
102 | })
103 | if (response) {
104 | const content = response.user
105 | commit('SetMe', content)
106 | }
107 | return true
108 | }
109 | }
110 |
111 | export const mutations = {
112 | InitWebSocket (state, WS) {
113 | state.socket = WS
114 | },
115 | SetModal (state, { type, data }) {
116 | state.modal = {
117 | type,
118 | data
119 | }
120 | },
121 | SetNews (state, content) {
122 | if (content.content.length === 0 && content.offset !== 0) { state.news.end = true }
123 | if (content.offset === 0) { state.news.list = content.content } else { state.news.list.push(...content.content) }
124 | },
125 | SetPost (state, content) {
126 | state.post = content
127 | },
128 | SetMe (state, content) {
129 | state.me = content
130 | },
131 | SetUsers (state, content) {
132 | state.users = content
133 | }
134 | }
135 |
--------------------------------------------------------------------------------
/test/NewPostTest.spec.js:
--------------------------------------------------------------------------------
1 | import { mount } from '@vue/test-utils'
2 | import NewPost from '@/components/News/newPost.vue'
3 |
4 | describe('NuxtLogo', () => {
5 | test('is a Vue instance', () => {
6 | const wrapper = mount(NewPost)
7 | expect(wrapper.vm).toBeTruthy()
8 | })
9 | })
10 |
--------------------------------------------------------------------------------