From 0f7312d21bf3498af7957d539f553da78347978f Mon Sep 17 00:00:00 2001 From: ogerly Date: Thu, 15 Jun 2023 15:54:34 +0200 Subject: [PATCH] vue-advanced-chat implemented and game page set up --- webapp/components/utils/InternalPages.js | 21 +++ webapp/constants/links.js | 16 ++ webapp/nuxt.config.js | 8 + webapp/package.json | 1 + webapp/pages/chat.vue | 205 +++++++++++++++++++++++ webapp/yarn.lock | 18 ++ 6 files changed, 269 insertions(+) create mode 100644 webapp/pages/chat.vue diff --git a/webapp/components/utils/InternalPages.js b/webapp/components/utils/InternalPages.js index dfdc04a6e..6a10f7293 100644 --- a/webapp/components/utils/InternalPages.js +++ b/webapp/components/utils/InternalPages.js @@ -1,6 +1,27 @@ import { PageParams } from '~/components/utils/PageParams.js' export const defaultPageParamsPages = { + CHAT: new PageParams({ + name: 'chat', + + // externalLink: { + // url: 'https://ocelot.social', + // target: '_blank', + // }, + externalLink: null, // if defined it's dominating + + internalPage: { + pageRoute: '/chat', // static, don't change! internal page in case no external is defined + footerIdent: 'chatX', // localized string identifier + headTitleIdent: 'chatX', // localized string identifier + headlineIdent: 'chatX', // localized string identifier. on null it's hidden, on empty string default is used + hasContainer: true, + hasBaseCard: true, + hasLoginInHeader: true, + // in case internal page content is here 'webapp/locales/html/' + // htmlIdent: 'html.chat', + }, + }), ORGANIZATION: new PageParams({ name: 'organization', diff --git a/webapp/constants/links.js b/webapp/constants/links.js index 3af64d374..ca8ff6db2 100644 --- a/webapp/constants/links.js +++ b/webapp/constants/links.js @@ -2,6 +2,20 @@ import { defaultPageParamsPages } from '~/components/utils/InternalPages.js' +const CHAT = defaultPageParamsPages.CHAT.overwrite({ + // externalLink: null, // if defined it's dominating + + internalPage: { + // footerIdent: 'site.faq', // localized string identifier, if undefined default is used + // headTitleIdent: 'site.faq', // localized string identifier, if undefined default is used + // headlineIdent: 'site.faq', // on null default is used, on empty string it's hidden + hasContainer: true, + hasBaseCard: true, + hasLoginInHeader: true, + // in case internal page content is here 'webapp/locales/html/' + }, +}) + const ORGANIZATION = defaultPageParamsPages.ORGANIZATION.overwrite({ // if defined it's dominating externalLink: { @@ -130,6 +144,7 @@ export default { // you can find and store templates for 👇🏼 at https://github.com/Ocelot-Social-Community/Ocelot-Social-Deploy-Rebranding/tree/master/branding/templates/ ORGANIZATION, + CHAT, DONATE, IMPRINT, TERMS_AND_CONDITIONS, @@ -140,6 +155,7 @@ export default { FOOTER_LINK_LIST: [ ORGANIZATION, + CHAT, TERMS_AND_CONDITIONS, CODE_OF_CONDUCT, DATA_PRIVACY, diff --git a/webapp/nuxt.config.js b/webapp/nuxt.config.js index 2a837ffb4..5c47b9fa3 100644 --- a/webapp/nuxt.config.js +++ b/webapp/nuxt.config.js @@ -248,6 +248,14 @@ export default { ** You can extend webpack config here */ extend(config, ctx) { + // Add the compilerOptions + ctx.loaders.vue.compilerOptions = { + // Add your compilerOptions here + isCustomElement: (tagName) => { + return tagName === 'vue-advanced-chat' || tagName === 'emoji-picker' + }, + } + if (CONFIG.STYLEGUIDE_DEV) { config.resolve.alias['@@'] = path.resolve(__dirname, `${styleguidePath}/src/system`) config.module.rules.push({ diff --git a/webapp/package.json b/webapp/package.json index 8e9b6e02b..f0bb8c608 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -54,6 +54,7 @@ "v-mapbox": "^1.11.2", "v-tooltip": "~2.1.3", "validator": "^13.0.0", + "vue-advanced-chat": "^2.0.7", "vue-count-to": "~1.0.13", "vue-infinite-loading": "^2.4.5", "vue-izitoast": "^1.2.1", diff --git a/webapp/pages/chat.vue b/webapp/pages/chat.vue new file mode 100644 index 000000000..c87a5bad4 --- /dev/null +++ b/webapp/pages/chat.vue @@ -0,0 +1,205 @@ + + + + + diff --git a/webapp/yarn.lock b/webapp/yarn.lock index df00613b7..6b95b979b 100644 --- a/webapp/yarn.lock +++ b/webapp/yarn.lock @@ -10503,6 +10503,11 @@ emittery@^0.13.1: resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.13.1.tgz#c04b8c3457490e0847ae51fced3af52d338e3dad" integrity sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ== +emoji-picker-element@1.12.1: + version "1.12.1" + resolved "https://registry.yarnpkg.com/emoji-picker-element/-/emoji-picker-element-1.12.1.tgz#854a9bbae4d9a04fa2b5cd0763845921f4904c83" + integrity sha512-F9AY/re8uqZmBcCXLHLGvyy7fxuMQdZl9R8OToLRH8Vnns+WMX8RYUbI2nSJklzl5+82qzpYWeus1/puDepWcQ== + emoji-regex@^7.0.1: version "7.0.3" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" @@ -14729,6 +14734,11 @@ linkify-it@~3.0.2: dependencies: uc.micro "^1.0.1" +linkifyjs@2.1.9: + version "2.1.9" + resolved "https://registry.yarnpkg.com/linkifyjs/-/linkifyjs-2.1.9.tgz#af06e45a2866ff06c4766582590d098a4d584702" + integrity sha512-74ivurkK6WHvHFozVaGtQWV38FzBwSTGNmJolEgFp7QgR2bl6ArUWlvT4GcHKbPe1z3nWYi+VUdDZk16zDOVug== + listr-silent-renderer@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/listr-silent-renderer/-/listr-silent-renderer-1.1.1.tgz#924b5a3757153770bf1a8e3fbf74b8bbf3f9242e" @@ -21951,6 +21961,14 @@ vt-pbf@^3.1.1: "@mapbox/vector-tile" "^1.3.1" pbf "^3.2.1" +vue-advanced-chat@^2.0.7: + version "2.0.7" + resolved "https://registry.yarnpkg.com/vue-advanced-chat/-/vue-advanced-chat-2.0.7.tgz#bd35830c19fc5eb4e26545dc554d88e7808913cc" + integrity sha512-s+6v+KtVT46lFM8YohneLLS/vN10sSTAPfZiqAczXf13Q8vQWD9rSeWAokL0zuJeQ+jguNgFI6oN2wbI/RC1iw== + dependencies: + emoji-picker-element "1.12.1" + linkifyjs "2.1.9" + vue-apollo@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/vue-apollo/-/vue-apollo-3.0.2.tgz#b198ecfa3765850a0b9f2b84ffaa7fbd8ec15f52"