@bettertogether/community-engine-vue 0.1.7 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +140 -1
- package/dist/assets/BBadge.vue_vue_type_script_setup_true_lang-IIZ8QpjG-Z9WDKHqT.js +1 -0
- package/dist/assets/BCardText.vue_vue_type_script_setup_true_lang-Be6CD36N-B5JCTdmm.js +3 -0
- package/dist/assets/BFormSelect.vue_vue_type_script_setup_true_lang-BigptVap-B_HbOOZR.js +1 -0
- package/dist/assets/BRow.vue_vue_type_script_setup_true_lang-69TY75-8-DJdEdyx7.js +1 -0
- package/dist/assets/Communities-Cx4tT-bx.js +1 -0
- package/dist/assets/Communities-n33ssuUH.css +1 -0
- package/dist/assets/CommunityConversation-bBkYBs2k.css +1 -0
- package/dist/assets/CommunityConversation-jHAnv_Ps.js +1 -0
- package/dist/assets/CommunityConversations-rEDGS7To.js +1 -0
- package/dist/assets/CommunityEvent-CUdT0aT4.js +1 -0
- package/dist/assets/CommunityEvents-rsOgcxQr.js +1 -0
- package/dist/assets/CommunityHome-ChuTE2Nz.js +1 -0
- package/dist/assets/CommunityJoaTu-CpLIY_83.js +1 -0
- package/dist/assets/CommunityMembers-C3UtzQGp.css +1 -0
- package/dist/assets/CommunityMembers-DKf74ltl.js +1 -0
- package/dist/assets/CommunityPage-C5x23iQl.css +1 -0
- package/dist/assets/CommunityPage-CRYg9-rW.js +1 -0
- package/dist/assets/CommunityPages-IsLTNFC3.js +1 -0
- package/dist/assets/CommunityPost-BOnqqxVs.js +1 -0
- package/dist/assets/CommunityPost-BRYtkDSY.css +1 -0
- package/dist/assets/CommunityPosts-DY1olmcU.js +1 -0
- package/dist/assets/Error404-D10VQARe.js +1 -0
- package/dist/assets/EventCard-vfutXTdg.js +1 -0
- package/dist/assets/EventList-ChtehYcJ.js +1 -0
- package/dist/assets/ExtensionSlot-DJKbrq4c.js +1 -0
- package/dist/assets/PostList-BuHrBBqX.css +1 -0
- package/dist/assets/PostList-DYFgxlE8.js +1 -0
- package/dist/assets/SyncBadge-B1JBsdUk.js +1 -0
- package/dist/assets/SyncBadge-FNO-QLuu.css +1 -0
- package/dist/assets/UserPasswordNew-D_Djldm9.css +1 -0
- package/dist/assets/UserPasswordNew-al9bNBTZ.js +1 -0
- package/dist/assets/UserPasswordReset-42zs98RW.js +1 -0
- package/dist/assets/UserPasswordReset-D_6OQDZY.css +1 -0
- package/dist/assets/UserResendConfirmation-CGavYB81.js +1 -0
- package/dist/assets/UserResendConfirmation-DNTHcaar.css +1 -0
- package/dist/assets/UserSignIn-BIRb0HkV.js +1 -0
- package/dist/assets/UserSignIn-C-Pol8OD.css +1 -0
- package/dist/assets/UserSignUp-ChkKQAd2.css +1 -0
- package/dist/assets/UserSignUp-Df6o3vlO.js +1 -0
- package/dist/assets/better-together-logo-61cxo5d5.png +0 -0
- package/dist/assets/index-BFt-JKVh.css +5 -0
- package/dist/assets/index-COo3Jb7v.js +1088 -0
- package/dist/assets/nodefs-Bfyh92qg.js +1 -0
- package/dist/assets/opfs-ahp-BLzlXf6u.js +3 -0
- package/dist/assets/pglite-BdRI_ZYT.wasm +0 -0
- package/dist/assets/pglite-COscPi1Y.data +0 -0
- package/dist/assets/usePages-DDjDQRCy.js +1 -0
- package/dist/assets/usePosts-Bf2Ccwr4.js +1 -0
- package/{public → dist}/index.html +9 -19
- package/package.json +57 -45
- package/src/BtApp.vue +34 -43
- package/src/components/BtBrandingLogo.vue +10 -18
- package/src/components/BtHeader.vue +31 -89
- package/src/components/BtMainContent.vue +12 -43
- package/src/components/BtNavBar.vue +25 -38
- package/src/components/BtNavItem.vue +25 -58
- package/src/components/BtNavUser.vue +65 -86
- package/src/components/BtProfileForm.vue +48 -39
- package/src/components/BtUserNewPasswordForm.vue +52 -74
- package/src/components/BtUserResendConfirmationForm.vue +45 -83
- package/src/components/BtUserResetPasswordForm.vue +45 -77
- package/src/components/BtUserSignInForm.vue +59 -75
- package/src/components/BtUserSignUpForm.vue +90 -103
- package/src/components/CommunityForm.vue +47 -39
- package/src/components/community/CommunityCard.vue +113 -0
- package/src/components/community/CommunityHeader.vue +91 -0
- package/src/components/community/CommunityList.vue +59 -0
- package/src/components/community/MemberRoleRow.vue +107 -0
- package/src/components/conversation/ConversationCard.vue +49 -0
- package/src/components/conversation/ConversationDetail.vue +53 -0
- package/src/components/conversation/ConversationList.vue +51 -0
- package/src/components/conversation/MessageForm.vue +45 -0
- package/src/components/conversation/MessageItem.vue +43 -0
- package/src/components/conversation/MessageList.vue +39 -0
- package/src/components/event/EventCard.vue +82 -0
- package/src/components/event/EventForm.vue +99 -0
- package/src/components/event/EventList.vue +47 -0
- package/src/components/invitation/InvitationCard.vue +56 -0
- package/src/components/invitation/InvitationForm.vue +70 -0
- package/src/components/invitation/InvitationList.vue +51 -0
- package/src/components/joatu/AgreementCard.vue +57 -0
- package/src/components/joatu/AgreementList.vue +51 -0
- package/src/components/joatu/OfferCard.vue +65 -0
- package/src/components/joatu/OfferForm.vue +82 -0
- package/src/components/joatu/OfferList.vue +51 -0
- package/src/components/joatu/RequestCard.vue +65 -0
- package/src/components/joatu/RequestForm.vue +82 -0
- package/src/components/joatu/RequestList.vue +51 -0
- package/src/components/page/PageCard.vue +55 -0
- package/src/components/page/PageDetail.vue +35 -0
- package/src/components/page/PageList.vue +51 -0
- package/src/components/person/MemberList.vue +61 -0
- package/src/components/person/PersonAvatar.vue +54 -0
- package/src/components/person/PersonCard.vue +47 -0
- package/src/components/post/PostCard.vue +105 -0
- package/src/components/post/PostDetail.vue +98 -0
- package/src/components/post/PostForm.vue +84 -0
- package/src/components/post/PostList.vue +53 -0
- package/src/components/role/BlockButton.vue +44 -0
- package/src/components/role/RoleBadge.vue +19 -0
- package/src/components/role/RoleGate.vue +62 -0
- package/src/components/role/RoleSelector.vue +29 -0
- package/src/components/shared/ExtensionSlot.vue +27 -0
- package/src/components/sync/OfflineBanner.vue +49 -0
- package/src/components/sync/SyncBadge.vue +108 -0
- package/src/components/sync/SyncStatusBar.vue +121 -0
- package/src/composables/useCommunities.js +19 -0
- package/src/composables/useConversations.js +5 -0
- package/src/composables/useEvents.js +28 -0
- package/src/composables/useInvitations.js +10 -0
- package/src/composables/useJoaTuAgreements.js +11 -0
- package/src/composables/useJoaTuOffers.js +10 -0
- package/src/composables/useJoaTuRequests.js +10 -0
- package/src/composables/useMembers.js +30 -0
- package/src/composables/useMessages.js +5 -0
- package/src/composables/useNotifications.js +5 -0
- package/src/composables/usePages.js +6 -0
- package/src/composables/usePersonBlocks.js +65 -0
- package/src/composables/usePosts.js +27 -0
- package/src/composables/useResource.js +137 -0
- package/src/composables/useRoles.js +94 -0
- package/src/composables/useSyncStatus.js +22 -0
- package/src/composables/useToaster.js +20 -0
- package/src/context.js +18 -0
- package/src/db/client.js +343 -0
- package/src/db/migrations/001_initial.sql +131 -0
- package/src/db/migrations/003_conversations_invitations_pages_joatu.sql +76 -0
- package/src/db/sync.js +276 -0
- package/src/endpoints/BtApiAuth.js +1 -1
- package/src/endpoints/BtApiV1.js +1 -1
- package/src/extension.js +45 -0
- package/src/i18n/index.js +103 -0
- package/src/i18n/locales/en.json +275 -0
- package/src/i18n/locales/es.json +275 -0
- package/src/i18n/locales/fr.json +223 -0
- package/src/i18n/locales/uk.json +275 -0
- package/src/index.js +168 -22
- package/src/layouts/CommunityLayout.vue +89 -0
- package/src/main.js +16 -12
- package/src/mixins/error-handling.js +6 -15
- package/src/mixins/toaster.js +15 -10
- package/src/pages/Communities.vue +59 -0
- package/src/pages/Error404.vue +10 -14
- package/src/pages/Home.vue +11 -18
- package/src/pages/Me.vue +39 -59
- package/src/pages/UserPasswordNew.vue +12 -68
- package/src/pages/UserPasswordReset.vue +15 -64
- package/src/pages/UserResendConfirmation.vue +39 -113
- package/src/pages/UserSignIn.vue +18 -67
- package/src/pages/UserSignUp.vue +15 -64
- package/src/pages/community/CommunityConversation.vue +31 -0
- package/src/pages/community/CommunityConversations.vue +18 -0
- package/src/pages/community/CommunityEvent.vue +39 -0
- package/src/pages/community/CommunityEvents.vue +58 -0
- package/src/pages/community/CommunityHome.vue +49 -0
- package/src/pages/community/CommunityJoaTu.vue +115 -0
- package/src/pages/community/CommunityMembers.vue +23 -0
- package/src/pages/community/CommunityPage.vue +31 -0
- package/src/pages/community/CommunityPages.vue +25 -0
- package/src/pages/community/CommunityPost.vue +28 -0
- package/src/pages/community/CommunityPosts.vue +58 -0
- package/src/pages/community/CommunitySettingsPage.vue +117 -0
- package/src/pages/community/RoleManagerPage.vue +93 -0
- package/src/plugins/bootstrap-vue.js +5 -5
- package/src/plugins/font-awesome.js +3 -2
- package/src/plugins/index.js +9 -4
- package/src/plugins/progress.js +16 -0
- package/src/pwa/index.js +156 -0
- package/src/pwa/sw-helpers.js +130 -0
- package/src/router/communityRoutes.js +78 -0
- package/src/router/index.js +30 -144
- package/src/slot-registry.js +15 -0
- package/src/stores/auth.js +134 -0
- package/src/stores/communities.js +59 -0
- package/src/stores/index.js +5 -0
- package/src/stores/menus.js +14 -0
- package/src/stores/people.js +48 -0
- package/src/stores/sync.js +93 -0
- package/src/stylesheets/sync-indicators.scss +34 -0
- package/.env.sample +0 -1
- package/.eslintrc.js +0 -51
- package/.gitlab-ci.yml +0 -14
- package/.travis/.rbenv-gemsets +0 -1
- package/.travis/.ruby-version +0 -1
- package/.travis.yml +0 -31
- package/babel.config.js +0 -5
- package/cypress.json +0 -3
- package/deploy/build.sh +0 -8
- package/eslint.config.js +0 -16
- package/postcss.config.js +0 -5
- package/src/eslint.config.js +0 -16
- package/src/forms/BtProfileFormSchema.js +0 -19
- package/src/forms/BtUserConfirmationFormSchema.js +0 -20
- package/src/forms/BtUserNewPasswordFormSchema.js +0 -29
- package/src/forms/BtUserResetPasswordFormSchema.js +0 -20
- package/src/forms/BtUserSignInFormSchema.js +0 -29
- package/src/forms/BtUserSignUpFormSchema.js +0 -63
- package/src/forms/CommunityFormSchema.js +0 -19
- package/src/plugins/vue-form-generator.js +0 -4
- package/src/plugins/vue-loading.js +0 -10
- package/src/registerServiceWorker.js +0 -32
- package/src/store/index.js +0 -32
- package/src/store/modules/authentication.js +0 -170
- package/src/store/modules/communities.js +0 -98
- package/src/store/modules/community-engine.js +0 -14
- package/src/store/modules/menus.js +0 -52
- package/src/store/modules/people.js +0 -88
- package/src/vue.config.js +0 -0
- package/tests/e2e/.eslintrc.js +0 -12
- package/tests/e2e/plugins/index.js +0 -26
- package/tests/e2e/specs/home.js +0 -8
- package/tests/e2e/support/commands.js +0 -25
- package/tests/e2e/support/index.js +0 -20
- package/tests/unit/.eslintrc.js +0 -5
- package/tests/unit/example.spec.js +0 -13
- package/vue.config.js +0 -11
- package/webpack.config.js +0 -28
- /package/{public → dist}/_redirects +0 -0
- /package/{public → dist}/favicon.ico +0 -0
- /package/{public → dist}/img/favicon.ico +0 -0
- /package/{public → dist}/img/icons/android-chrome-192x192.png +0 -0
- /package/{public → dist}/img/icons/android-chrome-384x384.png +0 -0
- /package/{public → dist}/img/icons/apple-touch-icon.png +0 -0
- /package/{public → dist}/img/icons/favicon-16x16.png +0 -0
- /package/{public → dist}/img/icons/favicon-32x32.png +0 -0
- /package/{public → dist}/img/icons/favicon.ico +0 -0
- /package/{public → dist}/img/icons/mstile-150x150.png +0 -0
- /package/{public → dist}/img/icons/safari-pinned-tab.svg +0 -0
- /package/{public → dist}/robots.txt +0 -0
package/.gitlab-ci.yml
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
pages: # the job must be named pages
|
|
2
|
-
image: node:latest
|
|
3
|
-
stage: deploy
|
|
4
|
-
script:
|
|
5
|
-
- ./deploy/build.sh
|
|
6
|
-
- mv public public-vue # GitLab Pages hooks on the public folder
|
|
7
|
-
- mv dist public # rename the dist folder (result of npm run build)
|
|
8
|
-
# optionally, you can activate gzip support wih the following line:
|
|
9
|
-
- find public -type f -regex '.*\.\(htm\|html\|txt\|text\|js\|css\)$' -exec gzip -f -k {} \;
|
|
10
|
-
artifacts:
|
|
11
|
-
paths:
|
|
12
|
-
- public # artifact path must be /public for GitLab Pages to pick it up
|
|
13
|
-
only:
|
|
14
|
-
- master
|
package/.travis/.rbenv-gemsets
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
bt-travis
|
package/.travis/.ruby-version
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
2.6.3
|
package/.travis.yml
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
language: node_js
|
|
3
|
-
node_js:
|
|
4
|
-
- "14.0"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
# line 9 resolved an issue where the Travis server would
|
|
8
|
-
# try to connect to my remote using ssh-dss, which then caused my
|
|
9
|
-
# remote server to puke and demand a password, causing the build
|
|
10
|
-
# to time out
|
|
11
|
-
dist: trusty
|
|
12
|
-
sudo: false
|
|
13
|
-
|
|
14
|
-
# This keeps the "add <your-host.tld> to known_hosts" prompt from popping up
|
|
15
|
-
addons:
|
|
16
|
-
ssh_known_hosts:
|
|
17
|
-
- <your-host.tld>:<portnumber> # if your server uses a different port for ssh
|
|
18
|
-
|
|
19
|
-
before_install:
|
|
20
|
-
# - <openssl line generated by travis encrypt>
|
|
21
|
-
- eval "$(ssh-agent -s)"
|
|
22
|
-
# - cp .travis/id_rsa ~/.ssh/id_rsa
|
|
23
|
-
# - chmod 600 ~/.ssh/id_rsa
|
|
24
|
-
# - ssh-add ~/.ssh/id_rsa
|
|
25
|
-
|
|
26
|
-
deploy:
|
|
27
|
-
- provider: script
|
|
28
|
-
skip_cleanup: true
|
|
29
|
-
script: echo "deploy script!"
|
|
30
|
-
on:
|
|
31
|
-
branch: production
|
package/babel.config.js
DELETED
package/cypress.json
DELETED
package/deploy/build.sh
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
echo "VUE_APP_BETTER_TOGETHER_API_URI=${VUE_APP_BETTER_TOGETHER_API_URI}" >> ./.env
|
|
4
|
-
|
|
5
|
-
yarn install --frozen-lockfile
|
|
6
|
-
yarn build
|
|
7
|
-
# optionally, you can activate gzip support wih the following line:
|
|
8
|
-
find dist -type f -regex '.*\.\(htm\|html\|txt\|text\|js\|css\)$' -exec gzip -f -k {} \;
|
package/eslint.config.js
DELETED
package/postcss.config.js
DELETED
package/src/eslint.config.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
fields: [
|
|
3
|
-
{
|
|
4
|
-
type: 'input',
|
|
5
|
-
inputType: 'text',
|
|
6
|
-
label: 'Name',
|
|
7
|
-
model: 'name',
|
|
8
|
-
placeholder: 'Your name..',
|
|
9
|
-
validator: ['string', 'required'],
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
type: 'textArea',
|
|
13
|
-
label: 'Description',
|
|
14
|
-
model: 'description',
|
|
15
|
-
placeholder: 'Your bio..',
|
|
16
|
-
validator: ['string', 'required'],
|
|
17
|
-
},
|
|
18
|
-
],
|
|
19
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
fields: [
|
|
3
|
-
{
|
|
4
|
-
type: 'input',
|
|
5
|
-
inputType: 'text',
|
|
6
|
-
label: 'Email',
|
|
7
|
-
model: 'user.email',
|
|
8
|
-
placeholder: 'Your email address..',
|
|
9
|
-
required: true,
|
|
10
|
-
validator: ['string', 'required', 'email'],
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
type: 'submit',
|
|
14
|
-
label: '',
|
|
15
|
-
buttonText: 'Send your confirmation email',
|
|
16
|
-
fieldClasses: 'btn btn-primary btn-block',
|
|
17
|
-
validateBeforeSubmit: true,
|
|
18
|
-
},
|
|
19
|
-
],
|
|
20
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
fields: [
|
|
3
|
-
{
|
|
4
|
-
type: 'input',
|
|
5
|
-
inputType: 'hidden',
|
|
6
|
-
model: 'user.reset_password_token',
|
|
7
|
-
required: true,
|
|
8
|
-
validator: ['string', 'required'],
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
type: 'input',
|
|
12
|
-
inputType: 'password',
|
|
13
|
-
label: 'Password *',
|
|
14
|
-
model: 'user.password',
|
|
15
|
-
min: 12,
|
|
16
|
-
placeholder: 'Your password..',
|
|
17
|
-
required: true,
|
|
18
|
-
validator: ['string', 'required'],
|
|
19
|
-
hint: 'Should be a short phase or sentence that is easy to remember. Minimum 12 characters. It helps if it\'s funny or melodic.',
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
type: 'submit',
|
|
23
|
-
label: '',
|
|
24
|
-
buttonText: 'Change Password',
|
|
25
|
-
fieldClasses: 'btn btn-primary btn-block',
|
|
26
|
-
validateBeforeSubmit: true,
|
|
27
|
-
},
|
|
28
|
-
],
|
|
29
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
fields: [
|
|
3
|
-
{
|
|
4
|
-
type: 'input',
|
|
5
|
-
inputType: 'text',
|
|
6
|
-
label: 'Email',
|
|
7
|
-
model: 'email',
|
|
8
|
-
placeholder: 'Your email address..',
|
|
9
|
-
required: true,
|
|
10
|
-
validator: ['string', 'required', 'email'],
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
type: 'submit',
|
|
14
|
-
label: '',
|
|
15
|
-
buttonText: 'Send password reset email',
|
|
16
|
-
fieldClasses: 'btn btn-primary btn-block',
|
|
17
|
-
validateBeforeSubmit: true,
|
|
18
|
-
},
|
|
19
|
-
],
|
|
20
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
fields: [
|
|
3
|
-
{
|
|
4
|
-
type: 'input',
|
|
5
|
-
inputType: 'text',
|
|
6
|
-
label: 'Email',
|
|
7
|
-
model: 'user.email',
|
|
8
|
-
placeholder: 'Your email address..',
|
|
9
|
-
required: true,
|
|
10
|
-
validator: ['string', 'required', 'email'],
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
type: 'input',
|
|
14
|
-
inputType: 'password',
|
|
15
|
-
label: 'Password',
|
|
16
|
-
model: 'user.password',
|
|
17
|
-
placeholder: 'Your password..',
|
|
18
|
-
required: true,
|
|
19
|
-
validator: ['string', 'required'],
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
type: 'submit',
|
|
23
|
-
label: '',
|
|
24
|
-
buttonText: 'Sign In',
|
|
25
|
-
fieldClasses: 'btn btn-primary btn-block',
|
|
26
|
-
validateBeforeSubmit: true,
|
|
27
|
-
},
|
|
28
|
-
],
|
|
29
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
groups: [
|
|
3
|
-
{
|
|
4
|
-
legend: 'Login Info',
|
|
5
|
-
fields: [
|
|
6
|
-
{
|
|
7
|
-
type: 'input',
|
|
8
|
-
inputType: 'text',
|
|
9
|
-
label: 'Email *',
|
|
10
|
-
model: 'user.email',
|
|
11
|
-
placeholder: 'Your email address..',
|
|
12
|
-
required: true,
|
|
13
|
-
validator: ['string', 'required', 'email'],
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
type: 'input',
|
|
17
|
-
inputType: 'password',
|
|
18
|
-
label: 'Password *',
|
|
19
|
-
model: 'user.password',
|
|
20
|
-
min: 12,
|
|
21
|
-
placeholder: 'Your password..',
|
|
22
|
-
required: true,
|
|
23
|
-
validator: ['string', 'required'],
|
|
24
|
-
hint: 'Should be a short phase or sentence that is easy to remember. Minimum 12 characters. It helps if it\'s funny or melodic.',
|
|
25
|
-
},
|
|
26
|
-
],
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
legend: 'Personal Info',
|
|
30
|
-
fields: [
|
|
31
|
-
{
|
|
32
|
-
type: 'input',
|
|
33
|
-
inputType: 'text',
|
|
34
|
-
label: 'Name *',
|
|
35
|
-
model: 'user.person_attributes.name',
|
|
36
|
-
placeholder: 'Your name..',
|
|
37
|
-
required: true,
|
|
38
|
-
validator: ['string', 'required'],
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
type: 'textArea',
|
|
42
|
-
label: 'Description *',
|
|
43
|
-
model: 'user.person_attributes.description',
|
|
44
|
-
placeholder: 'Your description..',
|
|
45
|
-
validator: ['string', 'required'],
|
|
46
|
-
required: true,
|
|
47
|
-
},
|
|
48
|
-
],
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
legend: '',
|
|
52
|
-
fields: [
|
|
53
|
-
{
|
|
54
|
-
type: 'submit',
|
|
55
|
-
label: '',
|
|
56
|
-
buttonText: 'Sign Up',
|
|
57
|
-
fieldClasses: 'btn btn-primary btn-block',
|
|
58
|
-
validateBeforeSubmit: true,
|
|
59
|
-
},
|
|
60
|
-
],
|
|
61
|
-
},
|
|
62
|
-
],
|
|
63
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
fields: [
|
|
3
|
-
{
|
|
4
|
-
type: 'input',
|
|
5
|
-
inputType: 'text',
|
|
6
|
-
label: 'Name',
|
|
7
|
-
model: 'name',
|
|
8
|
-
placeholder: 'Your community name..',
|
|
9
|
-
validator: ['string', 'required'],
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
type: 'textArea',
|
|
13
|
-
label: 'Description',
|
|
14
|
-
model: 'description',
|
|
15
|
-
placeholder: 'Your community description..',
|
|
16
|
-
validator: ['string', 'required'],
|
|
17
|
-
},
|
|
18
|
-
],
|
|
19
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/* eslint-disable no-console */
|
|
2
|
-
|
|
3
|
-
import { register } from 'register-service-worker'
|
|
4
|
-
|
|
5
|
-
if (process.env.NODE_ENV === 'production') {
|
|
6
|
-
register(`${process.env.BASE_URL}service-worker.js`, {
|
|
7
|
-
ready() {
|
|
8
|
-
console.log(
|
|
9
|
-
'App is being served from cache by a service worker.\n'
|
|
10
|
-
+ 'For more details, visit https://goo.gl/AFskqB',
|
|
11
|
-
)
|
|
12
|
-
},
|
|
13
|
-
registered() {
|
|
14
|
-
console.log('Service worker has been registered.')
|
|
15
|
-
},
|
|
16
|
-
cached() {
|
|
17
|
-
console.log('Content has been cached for offline use.')
|
|
18
|
-
},
|
|
19
|
-
updatefound() {
|
|
20
|
-
console.log('New content is downloading.')
|
|
21
|
-
},
|
|
22
|
-
updated() {
|
|
23
|
-
console.log('New content is available; please refresh.')
|
|
24
|
-
},
|
|
25
|
-
offline() {
|
|
26
|
-
console.log('No internet connection found. App is running in offline mode.')
|
|
27
|
-
},
|
|
28
|
-
error(error) {
|
|
29
|
-
console.error('Error during service worker registration:', error)
|
|
30
|
-
},
|
|
31
|
-
})
|
|
32
|
-
}
|
package/src/store/index.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import Vue from 'vue'
|
|
2
|
-
import Vuex from 'vuex'
|
|
3
|
-
import createPersistedState from 'vuex-persistedstate'
|
|
4
|
-
import SecureLS from 'secure-ls'
|
|
5
|
-
import CommunityEngine from './modules/community-engine'
|
|
6
|
-
|
|
7
|
-
const ls = new SecureLS({ isCompression: false })
|
|
8
|
-
|
|
9
|
-
Vue.use(Vuex)
|
|
10
|
-
|
|
11
|
-
const BtStoreModules = {
|
|
12
|
-
CommunityEngine,
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const BtStorePlugins = [
|
|
16
|
-
createPersistedState({
|
|
17
|
-
storage: {
|
|
18
|
-
getItem: (key) => ls.get(key),
|
|
19
|
-
setItem: (key, value) => ls.set(key, value),
|
|
20
|
-
removeItem: (key) => ls.remove(key),
|
|
21
|
-
},
|
|
22
|
-
}),
|
|
23
|
-
]
|
|
24
|
-
|
|
25
|
-
const BtStore = new Vuex.Store({
|
|
26
|
-
modules: BtStoreModules,
|
|
27
|
-
plugins: BtStorePlugins,
|
|
28
|
-
})
|
|
29
|
-
|
|
30
|
-
export { BtStoreModules, BtStorePlugins }
|
|
31
|
-
|
|
32
|
-
export default BtStore
|
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
/* eslint no-shadow: ["error", { "allow": ["state"] }] */
|
|
2
|
-
|
|
3
|
-
import axios from 'axios'
|
|
4
|
-
import BtApiAuth from '../../endpoints/BtApiAuth'
|
|
5
|
-
|
|
6
|
-
// initial state
|
|
7
|
-
const state = {
|
|
8
|
-
currentUser: {},
|
|
9
|
-
token: '',
|
|
10
|
-
status: '',
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
if (state.token) {
|
|
14
|
-
axios.defaults.headers.common.Authorization = state.token
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
// getters
|
|
18
|
-
const getters = {
|
|
19
|
-
// isAuthenticated() { return state.token !== '' },
|
|
20
|
-
isAuthenticated: (state) => !!state.token,
|
|
21
|
-
authStatus: (state) => state.status,
|
|
22
|
-
authToken: (state) => state.token,
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
// actions
|
|
26
|
-
const actions = {
|
|
27
|
-
signIn({ commit }, params) {
|
|
28
|
-
return new Promise((resolve, reject) => {
|
|
29
|
-
BtApiAuth.post(
|
|
30
|
-
'sign-in',
|
|
31
|
-
params,
|
|
32
|
-
)
|
|
33
|
-
.then(({ data, headers }) => {
|
|
34
|
-
const token = headers.authorization
|
|
35
|
-
commit('AUTH_SUCCESS', token)
|
|
36
|
-
commit('SET_USER', data)
|
|
37
|
-
axios.defaults.headers.common.Authorization = token
|
|
38
|
-
resolve(data)
|
|
39
|
-
}).catch((response) => {
|
|
40
|
-
commit('AUTH_ERROR', response)
|
|
41
|
-
delete axios.defaults.headers.common.Authorization
|
|
42
|
-
reject(response)
|
|
43
|
-
})
|
|
44
|
-
})
|
|
45
|
-
},
|
|
46
|
-
signOut({ commit }) {
|
|
47
|
-
return new Promise((resolve, reject) => {
|
|
48
|
-
BtApiAuth.delete(
|
|
49
|
-
'sign-out',
|
|
50
|
-
)
|
|
51
|
-
.then(({ data }) => {
|
|
52
|
-
resolve(data)
|
|
53
|
-
}).catch((response) => {
|
|
54
|
-
commit('AUTH_ERROR', response)
|
|
55
|
-
reject(response)
|
|
56
|
-
}).then(() => {
|
|
57
|
-
commit('AUTH_LOGOUT')
|
|
58
|
-
delete axios.defaults.headers.common.Authorization
|
|
59
|
-
commit('CommunityEngine/People/CLEAR_CURRENT_PERSON', null, { root: true })
|
|
60
|
-
})
|
|
61
|
-
resolve()
|
|
62
|
-
})
|
|
63
|
-
},
|
|
64
|
-
signUp(_ctx, params) {
|
|
65
|
-
return new Promise((resolve, reject) => {
|
|
66
|
-
BtApiAuth.post(
|
|
67
|
-
'sign-up',
|
|
68
|
-
{
|
|
69
|
-
...params,
|
|
70
|
-
confirmation_url: `${window.location.origin}/users/confirmation`,
|
|
71
|
-
},
|
|
72
|
-
)
|
|
73
|
-
.then(({ data }) => {
|
|
74
|
-
resolve(data)
|
|
75
|
-
}).catch((response) => {
|
|
76
|
-
reject(response)
|
|
77
|
-
})
|
|
78
|
-
})
|
|
79
|
-
},
|
|
80
|
-
resendConfirmation(_ctx, params) {
|
|
81
|
-
return new Promise((resolve, reject) => {
|
|
82
|
-
BtApiAuth.post(
|
|
83
|
-
'confirmation',
|
|
84
|
-
{
|
|
85
|
-
...params,
|
|
86
|
-
confirmation_url: `${window.location.origin}/users/confirmation`,
|
|
87
|
-
},
|
|
88
|
-
)
|
|
89
|
-
.then(({ data }) => {
|
|
90
|
-
resolve(data)
|
|
91
|
-
}).catch((response) => {
|
|
92
|
-
reject(response)
|
|
93
|
-
})
|
|
94
|
-
})
|
|
95
|
-
},
|
|
96
|
-
sendConfirmation(_ctx, params) {
|
|
97
|
-
return new Promise((resolve, reject) => {
|
|
98
|
-
BtApiAuth.get(
|
|
99
|
-
'confirmation',
|
|
100
|
-
{ params },
|
|
101
|
-
)
|
|
102
|
-
.then(({ data }) => {
|
|
103
|
-
resolve(data)
|
|
104
|
-
}).catch((response) => {
|
|
105
|
-
reject(response)
|
|
106
|
-
})
|
|
107
|
-
})
|
|
108
|
-
},
|
|
109
|
-
resetPassword(_ctx, params) {
|
|
110
|
-
return new Promise((resolve, reject) => {
|
|
111
|
-
BtApiAuth.post(
|
|
112
|
-
'password',
|
|
113
|
-
{
|
|
114
|
-
...params,
|
|
115
|
-
new_password_url: `${window.location.origin}/users/password/new`,
|
|
116
|
-
},
|
|
117
|
-
)
|
|
118
|
-
.then(({ data }) => {
|
|
119
|
-
resolve(data)
|
|
120
|
-
}).catch((response) => {
|
|
121
|
-
reject(response)
|
|
122
|
-
})
|
|
123
|
-
})
|
|
124
|
-
},
|
|
125
|
-
newPassword(_ctx, params) {
|
|
126
|
-
return new Promise((resolve, reject) => {
|
|
127
|
-
BtApiAuth.put(
|
|
128
|
-
'password',
|
|
129
|
-
params,
|
|
130
|
-
)
|
|
131
|
-
.then(({ data }) => {
|
|
132
|
-
resolve(data)
|
|
133
|
-
}).catch((response) => {
|
|
134
|
-
reject(response)
|
|
135
|
-
})
|
|
136
|
-
})
|
|
137
|
-
},
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
// mutations
|
|
141
|
-
const mutations = {
|
|
142
|
-
AUTH_LOGOUT(currentState) {
|
|
143
|
-
currentState.status = ''
|
|
144
|
-
currentState.currentUser = {}
|
|
145
|
-
currentState.token = ''
|
|
146
|
-
},
|
|
147
|
-
AUTH_REQUEST(currentState) {
|
|
148
|
-
currentState.status = 'loading'
|
|
149
|
-
},
|
|
150
|
-
AUTH_SUCCESS(currentState, token) {
|
|
151
|
-
currentState.status = 'success'
|
|
152
|
-
currentState.token = token
|
|
153
|
-
},
|
|
154
|
-
AUTH_ERROR(currentState) {
|
|
155
|
-
currentState.status = 'error'
|
|
156
|
-
currentState.currentUser = {}
|
|
157
|
-
currentState.token = ''
|
|
158
|
-
},
|
|
159
|
-
SET_USER(currentState, user) {
|
|
160
|
-
currentState.currentUser = user
|
|
161
|
-
},
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
export default {
|
|
165
|
-
namespaced: true,
|
|
166
|
-
state,
|
|
167
|
-
getters,
|
|
168
|
-
actions,
|
|
169
|
-
mutations,
|
|
170
|
-
}
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
/* eslint no-shadow: ["error", { "allow": ["state"] }] */
|
|
2
|
-
|
|
3
|
-
// import axios from 'axios'
|
|
4
|
-
import BtApiV1 from '../../endpoints/BtApiV1'
|
|
5
|
-
|
|
6
|
-
// initial state
|
|
7
|
-
const state = {
|
|
8
|
-
activeCommunity: {},
|
|
9
|
-
communities: [],
|
|
10
|
-
platformCommunity: {
|
|
11
|
-
id: 0,
|
|
12
|
-
name: 'Better Together',
|
|
13
|
-
description: 'A community buiding platform',
|
|
14
|
-
customization: {
|
|
15
|
-
backgroundColor: '#343a40 !important',
|
|
16
|
-
coverImageUrl: '',
|
|
17
|
-
coverImagePositionY: 'center',
|
|
18
|
-
imageUrl: '',
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
state.activeCommunity = {
|
|
24
|
-
...state.platformCommunity,
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
// getters
|
|
28
|
-
const getters = {
|
|
29
|
-
activeCommunity: (state) => state.activeCommunity,
|
|
30
|
-
customization: (state) => state.activeCommunity.customization,
|
|
31
|
-
coverImageUrl: (state) => state.activeCommunity.customization.coverImageUrl,
|
|
32
|
-
coverImagePositionY: (state) => state.activeCommunity.customization.coverImagePositionY,
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
// actions
|
|
36
|
-
const actions = {
|
|
37
|
-
setCoverImageUrl({ commit }, url) {
|
|
38
|
-
return new Promise((resolve) => {
|
|
39
|
-
commit('SET_COVER_IMAGE_URL', url)
|
|
40
|
-
resolve(url)
|
|
41
|
-
})
|
|
42
|
-
},
|
|
43
|
-
setCustomizationOptions({ commit }, options) {
|
|
44
|
-
return new Promise((resolve) => {
|
|
45
|
-
commit('SET_CUSTOMIZATION_OPTIONS', options)
|
|
46
|
-
resolve(options)
|
|
47
|
-
})
|
|
48
|
-
},
|
|
49
|
-
getCommunities({ commit }, params) {
|
|
50
|
-
return new Promise((resolve, reject) => {
|
|
51
|
-
BtApiV1.findAll('communities', { params }).then(({ data }) => {
|
|
52
|
-
commit('SET_COMMUNITIES', data)
|
|
53
|
-
resolve(data)
|
|
54
|
-
})
|
|
55
|
-
.catch(({ response }) => {
|
|
56
|
-
reject(response)
|
|
57
|
-
})
|
|
58
|
-
})
|
|
59
|
-
},
|
|
60
|
-
postCommunity({ commit }, params) {
|
|
61
|
-
return new Promise((resolve, reject) => {
|
|
62
|
-
BtApiV1.create('community', params)
|
|
63
|
-
.then(({ data }) => {
|
|
64
|
-
commit('PREPEND_COMMUNITY', data)
|
|
65
|
-
resolve(data)
|
|
66
|
-
}).catch((response) => {
|
|
67
|
-
reject(response)
|
|
68
|
-
})
|
|
69
|
-
})
|
|
70
|
-
},
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
// mutations
|
|
74
|
-
const mutations = {
|
|
75
|
-
SET_COMMUNITIES(currentState, communities) {
|
|
76
|
-
currentState.communities = communities
|
|
77
|
-
},
|
|
78
|
-
SET_COVER_IMAGE_URL(currentState, url) {
|
|
79
|
-
currentState.activeCommunity.customization.coverImageUrl = url
|
|
80
|
-
},
|
|
81
|
-
SET_CUSTOMIZATION_OPTIONS(currentState, options) {
|
|
82
|
-
currentState.activeCommunity.customization = {
|
|
83
|
-
...currentState.platformCommunity.customization,
|
|
84
|
-
...options,
|
|
85
|
-
}
|
|
86
|
-
},
|
|
87
|
-
PREPEND_COMMUNITY(currentState, community) {
|
|
88
|
-
currentState.communities.unshift(community)
|
|
89
|
-
},
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
export default {
|
|
93
|
-
namespaced: true,
|
|
94
|
-
state,
|
|
95
|
-
getters,
|
|
96
|
-
actions,
|
|
97
|
-
mutations,
|
|
98
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import Authentication from './authentication'
|
|
2
|
-
import Communities from './communities'
|
|
3
|
-
import Menus from './menus'
|
|
4
|
-
import People from './people'
|
|
5
|
-
|
|
6
|
-
export default {
|
|
7
|
-
namespaced: true,
|
|
8
|
-
modules: {
|
|
9
|
-
Authentication,
|
|
10
|
-
Communities,
|
|
11
|
-
Menus,
|
|
12
|
-
People,
|
|
13
|
-
},
|
|
14
|
-
}
|