diff --git a/package-lock.json b/package-lock.json index 3cd4581..dc389d9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1280,6 +1280,11 @@ "integrity": "sha512-5am6HnnfN+urzt4yfg7IgTbotDjIT/u8AJpEt0sIU9FtXfVeezXAPKswrG+xKUCOYAINpSdgZVDU6QFh+cuH3w==", "dev": true }, + "blueimp-md5": { + "version": "2.18.0", + "resolved": "https://registry.npmjs.org/blueimp-md5/-/blueimp-md5-2.18.0.tgz", + "integrity": "sha512-vE52okJvzsVWhcgUHOv+69OG3Mdg151xyn41aVQN/5W5S+S43qZhxECtYLAEHMSFWX6Mv5IZrzj3T5+JqXfj5Q==" + }, "bn.js": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.1.2.tgz", diff --git a/package.json b/package.json index edafd88..f8dec94 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "dev": "webpack-dev-server --open --env.server=$MY_BUBBLE_API" }, "dependencies": { + "blueimp-md5": "^2.18.0", "lottie-web": "^5.7.1", "luxon": "^1.21.3", "qrcode": "^1.4.4", diff --git a/src/_assets/post_auth_messages.json b/src/_assets/post_auth_messages.json index 2c63c08..a08853a 100644 --- a/src/_assets/post_auth_messages.json +++ b/src/_assets/post_auth_messages.json @@ -1,2 +1,5 @@ { + "label_homepage_welcome": "Hello", + "label_menu_help": "Help", + "label_menu_settings": "Settings" } diff --git a/src/_assets/pre_auth_messages.json b/src/_assets/pre_auth_messages.json index 2c63c08..bac8ec1 100644 --- a/src/_assets/pre_auth_messages.json +++ b/src/_assets/pre_auth_messages.json @@ -1,2 +1,9 @@ { + "footer_links": "get_help,legal_stuff,about_bubble", + "title_get_help": "Get Help", + "title_legal_stuff": "Legal Stuff", + "title_about_bubble": "About Bubble", + "link_get_help": "https://example.com/get_help", + "link_legal_stuff": "https://example.com/legal_stuff", + "link_about_bubble": "https://example.com/about_bubble" } diff --git a/src/_components/layout/Footer.vue b/src/_components/layout/Footer.vue new file mode 100644 index 0000000..3a40db7 --- /dev/null +++ b/src/_components/layout/Footer.vue @@ -0,0 +1,117 @@ + + + + + diff --git a/src/_components/layout/Header.vue b/src/_components/layout/Header.vue index 71d0547..a1991a1 100644 --- a/src/_components/layout/Header.vue +++ b/src/_components/layout/Header.vue @@ -1,6 +1,6 @@ + + diff --git a/src/_components/layout/Sidebar.vue b/src/_components/layout/Sidebar.vue new file mode 100644 index 0000000..30a1963 --- /dev/null +++ b/src/_components/layout/Sidebar.vue @@ -0,0 +1,245 @@ + + + + + diff --git a/src/_components/layout/index.js b/src/_components/layout/index.js index 2abf172..d37206c 100644 --- a/src/_components/layout/index.js +++ b/src/_components/layout/index.js @@ -3,3 +3,6 @@ * For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/ */ export { default as Header } from './Header'; +export { default as Footer } from './Footer'; +export { default as Notification } from './Notification'; +export { default as Sidebar } from './Sidebar'; diff --git a/src/_pages/Layout.vue b/src/_pages/Layout.vue index a2910a7..bafb6f0 100644 --- a/src/_pages/Layout.vue +++ b/src/_pages/Layout.vue @@ -1,8 +1,6 @@ diff --git a/src/_pages/main/Layout.vue b/src/_pages/main/Layout.vue index a000830..bb3aae7 100644 --- a/src/_pages/main/Layout.vue +++ b/src/_pages/main/Layout.vue @@ -1,21 +1,102 @@ + + diff --git a/src/_router/index.js b/src/_router/index.js index 743c422..24c779d 100644 --- a/src/_router/index.js +++ b/src/_router/index.js @@ -62,23 +62,12 @@ const newNetworkChildren = [ export const router = new Router({ mode: 'history', routes: [ - // existing pages - { path: '', component: DashboardPage }, - { path: '/', component: DashboardPage }, // { path: '/legal', component: LegalPage }, // { path: '/support', component: SupportPage }, // { path: '/me/old', component: ProfilePage }, // { path: '/me/policy', component: PolicyPage }, - { - path: '/me/download/:uuid', - redirect: (r) => ({ - path: '/me/policy', - query: { download: r.params.uuid }, - }), - }, - { path: '/me/action', component: ActionPage }, // { path: '/me/changePassword/old', component: ChangePasswordPage }, // { path: '/me/setPassword/:code', component: SetPasswordPage }, // { path: '/me/keys', component: SshKeysPage }, @@ -89,64 +78,17 @@ export const router = new Router({ // children: paymentMethodsChildren, // }, // { path: '/devices', component: DevicesPage }, - { path: '/apps', component: AppsPage }, - { path: '/app/:app', component: AppPage }, - { path: '/app/:app/config/:view', component: AppConfigPage }, - { path: '/app/:app/config/:view/:item', component: AppConfigPage }, - { path: '/app/:app/view/:view', component: AppDataViewPage }, - { path: '/app/:app/site/:site', component: AppSitePage }, - { path: '/app/:app/site/:site/view/:view', component: AppDataViewPage }, - { path: '/notifications', component: NotificationsPage }, - { - path: '/bubbles', - component: NetworksPage, - children: [ - { - path: '', - component: NewNetworkPage, - children: newNetworkChildren, - }, - ], - }, - { - path: '/new_bubble', - component: NewNetworkPage, - children: newNetworkChildren, - }, - { path: '/bubble/:id', component: NetworkPage }, - { path: '/action', component: ActionPage }, - { path: '/resetPassword/:code', component: SetPasswordPage }, - { path: '/activate', component: ActivationPage }, // { // path: '/register', // component: RegisterPage, // children: paymentMethodsChildren, // }, - { path: '/auth', component: MultifactorAuthPage }, // { path: '/login', component: LoginPage }, - { path: '/logout', component: LogoutPage }, // { path: '/forgotPassword', component: ForgotPasswordPage }, // { path: '/appLogin', component: AppLoginPage }, // { path: '/restore', component: RestorePage }, - { path: '/admin/accounts', component: AccountsPage }, - { path: '/admin/new_account', component: ProfilePage }, - { path: '/admin/accounts/:id', component: ProfilePage }, - { path: '/admin/accounts/:id/policy', component: PolicyPage }, - { - path: '/admin/accounts/:id/changePassword', - component: ChangePasswordPage, - }, - { path: '/admin/accounts/:id/keys', component: SshKeysPage }, - { path: '/admin/accounts/:id/bills', component: BillsPage }, - { - path: '/admin/accounts/:id/payment', - component: PaymentMethodsPage, - children: paymentMethodsChildren, - }, - { path: '/admin/model', component: ModelSetupPage }, - // new route { path: '', @@ -154,100 +96,123 @@ export const router = new Router({ children: [ { path: '', - component: () => import('~/_pages/auth/Layout'), + component: () => import('~/_pages/main/Layout'), children: [ + { path: '', component: DashboardPage }, { - path: 'login', - component: () => import('~/_pages/auth/Login'), + path: 'me/download/:uuid', + redirect: (r) => ({ + path: 'me/policy', + query: { download: r.params.uuid }, + }), }, + { path: 'me/action', component: ActionPage }, + { path: 'apps', component: AppsPage }, + { path: 'app/:app', component: AppPage }, + { path: 'app/:app/config/:view', component: AppConfigPage }, { - path: 'forgotPassword', - component: () => import('~/_pages/auth/ForgotPassword'), + path: 'app/:app/config/:view/:item', + component: AppConfigPage, }, + { path: 'app/:app/view/:view', component: AppDataViewPage }, + { path: 'app/:app/site/:site', component: AppSitePage }, { - path: 'register', - component: () => import('~/_pages/auth/Register'), + path: 'app/:app/site/:site/view/:view', + component: AppDataViewPage, }, + { path: 'notifications', component: NotificationsPage }, { - path: 'appLogin', - component: () => import('~/_pages/auth/AppLogin'), - }, - ], - }, - { - path: '', - component: () => import('~/_pages/main/Layout'), - children: [ - { - path: '', - component: () => import('~/_pages/main/account/Layout'), + path: 'bubbles', + component: NetworksPage, children: [ { - path: 'verifyEmail', - component: () => import('~/_pages/main/account/VerifyEmail'), - }, - { - path: 'payment', - component: () => import('~/_pages/main/account/Payment'), - }, - { - path: 'me', - exact: true, - component: () => import('~/_pages/main/account/MyAccount'), - }, - { - path: 'me/changePassword', - component: () => - import('~/_pages/main/account/ChangePassword'), - }, - { - path: 'me/setPassword/:code', - component: () => import('~/_pages/main/account/SetPassword'), - }, - { - path: 'me/keys', - component: () => import('~/_pages/main/account/ManageSSH'), - }, - { - path: 'me/payment', - component: () => - import('~/_pages/main/account/PaymentMethods'), - }, - { - path: 'me/bills', - component: () => import('~/_pages/main/account/Bills'), - }, - { - path: 'me/policy', - component: () => import('~/_pages/main/account/Policy'), - }, - { - path: 'me/delete', - component: () => import('~/_pages/main/account/Delete'), + path: '', + component: NewNetworkPage, + children: newNetworkChildren, }, + ], + }, + { + path: 'new_bubble', + component: NewNetworkPage, + children: newNetworkChildren, + }, + { path: 'bubble/:id', component: NetworkPage }, + { path: 'action', component: ActionPage }, + { path: 'resetPassword/:code', component: SetPasswordPage }, - { - path: 'devices', - component: () => import('~/_pages/main/account/Devices'), - }, + { path: 'activate', component: ActivationPage }, + { path: 'auth', component: MultifactorAuthPage }, + { path: 'admin/accounts', component: AccountsPage }, + { path: 'admin/new_account', component: ProfilePage }, + { path: 'admin/accounts/:id', component: ProfilePage }, + { path: 'admin/accounts/:id/policy', component: PolicyPage }, + { + path: 'admin/accounts/:id/changePassword', + component: ChangePasswordPage, + }, + { path: 'admin/accounts/:id/keys', component: SshKeysPage }, + { path: 'admin/accounts/:id/bills', component: BillsPage }, + { + path: 'admin/accounts/:id/payment', + component: PaymentMethodsPage, + children: paymentMethodsChildren, + }, + { path: 'admin/model', component: ModelSetupPage }, + { + path: 'me', + exact: true, + component: () => import('~/_pages/main/account/MyAccount'), + }, + { + path: 'me/changePassword', + component: () => import('~/_pages/main/account/ChangePassword'), + }, + { + path: 'me/setPassword/:code', + component: () => import('~/_pages/main/account/SetPassword'), + }, + { + path: 'me/keys', + component: () => import('~/_pages/main/account/ManageSSH'), + }, + { + path: 'me/payment', + component: () => import('~/_pages/main/account/PaymentMethods'), + }, + { + path: 'me/bills', + component: () => import('~/_pages/main/account/Bills'), + }, + { + path: 'me/policy', + component: () => import('~/_pages/main/account/Policy'), + }, + { + path: 'me/delete', + component: () => import('~/_pages/main/account/Delete'), + }, - { - path: 'bubble/:id', - component: () => import('~/_pages/main/bubble/Network'), - }, - { - path: 'restore', - component: () => import('~/_pages/main/bubble/Restore'), - }, - { - path: 'legal', - component: () => import('~/_pages/main/account/Legal'), - }, - { - path: 'support', - component: () => import('~/_pages/main/account/Support'), - }, - ], + { + path: 'devices', + component: () => import('~/_pages/main/account/Devices'), + }, + + { + path: 'bubble/:id', + component: () => import('~/_pages/main/bubble/Network'), + }, + { + path: 'restore', + component: () => import('~/_pages/main/bubble/Restore'), + }, + { + path: 'legal', + component: () => import('~/_pages/main/account/Legal'), + }, + { + path: 'support', + component: () => import('~/_pages/main/account/Support'), }, { path: 'launch-bubble', @@ -259,11 +224,42 @@ export const router = new Router({ }, ], }, + { + path: '', + component: () => import('~/_pages/auth/Layout'), + children: [ + { + path: 'login', + component: () => import('~/_pages/auth/Login'), + }, + { + path: 'forgotPassword', + component: () => import('~/_pages/auth/ForgotPassword'), + }, + { + path: 'register', + component: () => import('~/_pages/auth/Register'), + }, + { + path: 'appLogin', + component: () => import('~/_pages/auth/AppLogin'), + }, + { + path: 'verifyEmail', + component: () => import('~/_pages/auth/VerifyEmail'), + }, + { + path: 'payment', + component: () => import('~/_pages/auth/Payment'), + }, + { path: 'logout', component: () => import('~/auth/LogoutPage') }, + ], + }, ], }, // otherwise redirect to dashboard - { path: '*', redirect: '/' }, + { path: '*', redirect: '' }, ], }); @@ -281,10 +277,10 @@ const publicPages = [ '/legal', // new Pages - '/new_pages', ]; router.beforeEach((to, from, next) => { + console.log('to', to); const authRequired = !publicPages.includes(to.path) && publicPages.filter((p) => to.path.startsWith(p)).length === 0; diff --git a/src/app/App.vue b/src/app/App.vue index a4393be..8574e51 100644 --- a/src/app/App.vue +++ b/src/app/App.vue @@ -1,18 +1,15 @@ @@ -121,13 +118,9 @@ import { mapState, mapActions, mapGetters } from 'vuex'; import { util } from '~/_helpers'; import { loadingImgSrc } from '~/_store'; -import { Header } from '~/_components/layout'; export default { name: 'app', - components: { - Header, - }, data() { return { showLocaleSelector: false, @@ -197,7 +190,7 @@ export default { '/support', '/legal', ]; - + return ( newPages.includes(this.$route.path) || newPages.filter((p) => this.$route.path.startsWith(p)).length diff --git a/src/public/bubble_bkgrnd.png b/src/public/bubble_bkgrnd.png new file mode 100644 index 0000000..5607dca Binary files /dev/null and b/src/public/bubble_bkgrnd.png differ