diff --git a/.env b/.env index 008d602..6fa3219 100644 --- a/.env +++ b/.env @@ -4,3 +4,4 @@ VUE_APP_GATEWAYENDPOINT=https://gateway.kaverti.com VUE_APP_STAGING=false VUE_APP_I18N_LOCALE=en VUE_APP_I18N_FALLBACK_LOCALE=en +VUE_APP_RELEASE="Canary" \ No newline at end of file diff --git a/.env.development b/.env.development index f6420e8..f5b345c 100644 --- a/.env.development +++ b/.env.development @@ -1,4 +1,5 @@ VUE_APP_APIENDPOINT="/api/" VUE_APP_APIVERSION="v1" VUE_APP_GATEWAYENDPOINT="http://localhost:23981" -VUE_APP_STAGING=true \ No newline at end of file +VUE_APP_STAGING=true +VUE_APP_RELEASE="Canary" \ No newline at end of file diff --git a/assets/css/sidebar.css b/assets/css/sidebar.css new file mode 100644 index 0000000..c048941 --- /dev/null +++ b/assets/css/sidebar.css @@ -0,0 +1,242 @@ +body { + padding-bottom: 30px!important; + position: relative!important; + min-height: 100%!important; +} + +a { + transition: background 0.2s, color 0.2s!important; +} +a:hover, +a:focus { + text-decoration: none!important; +} + +#wrapper { + padding-left: 0!important; + transition: all 0.5s ease!important; + position: relative!important; +} + +#sidebar-wrapper { + z-index: 1000!important; + position: fixed!important; + left: 250px!important; + width: 0!important; + height: 100%!important; + margin-left: -250px!important; + overflow-y: auto!important; + overflow-x: hidden!important; + background: #222!important; + transition: all 0.5s ease!important; +} + +#wrapper.toggled #sidebar-wrapper { + width: 250px!important; +} + +.sidebar-brand { + position: absolute!important; + top: 0!important; + width: 250px!important; + text-align: center!important; + padding: 20px 0!important; +} +.sidebar-brand h2 { + margin: 0!important; + font-weight: 600!important; + font-size: 24px!important; + color: #fff!important; +} + +.sidebar-nav { + position: absolute!important; + top: 75px!important; + width: 250px!important; + margin: 0!important; + padding: 0!important; + list-style: none!important; +} +.sidebar-nav > li { + text-indent: 10px!important; + line-height: 42px!important; +} +.sidebar-nav > li a { + display: block!important; + text-decoration: none!important; + color: #757575!important; + font-weight: 600!important; + font-size: 18px!important; +} +.sidebar-nav > li > a:hover, +.sidebar-nav > li.active > a { + text-decoration: none!important; + color: #fff!important; + background: #F8BE12!important; +} +.sidebar-nav > li > a i.fa { + font-size: 24px!important; + width: 60px!important; +} + +#navbar-wrapper { + width: 100%!important; + position: absolute!important; + z-index: 2!important; +} +#wrapper.toggled #navbar-wrapper { + position: absolute!important; + margin-right: -250px!important; +} +#navbar-wrapper .navbar { + border-width: 0 0 0 0!important; + background-color: #eee!important; + font-size: 24px!important; + margin-bottom: 0!important; + border-radius: 0!important; +} +#navbar-wrapper .navbar a { + color: #757575!important; +} +#navbar-wrapper .navbar a:hover { + color: #F8BE12!important; +} + +#content-wrapper { + width: 100%!important; + position: absolute!important; + padding: 15px!important; + top: 100px!important; +} +#wrapper.toggled #content-wrapper { + position: absolute!important; + margin-right: -250px!important; +} + +@media (min-width: 992px) { + #wrapper { + padding-left: 250px!important; + } + + #wrapper.toggled { + padding-left: 60px!important; + } + + #sidebar-wrapper { + width: 250px!important; + } + + #wrapper.toggled #sidebar-wrapper { + width: 60px!important; + } + + #wrapper.toggled #navbar-wrapper { + position: absolute!important; + margin-right: -190px!important; + } + + #wrapper.toggled #content-wrapper { + position: absolute!important; + margin-right: -190px!important; + } + + #navbar-wrapper { + position: relative!important; + } + + #wrapper.toggled { + padding-left: 60px!important; + } + + #content-wrapper { + position: relative!important; + top: 0!important; + } + + #wrapper.toggled #navbar-wrapper, + #wrapper.toggled #content-wrapper { + position: relative!important; + margin-right: 60px!important; + } +} + +@media (min-width: 768px) and (max-width: 991px) { + #wrapper { + padding-left: 60px!important; + } + + #sidebar-wrapper { + width: 60px!important; + } + + #wrapper.toggled #navbar-wrapper { + position: absolute!important; + margin-right: -250px!important; + } + + #wrapper.toggled #content-wrapper { + position: absolute!important; + margin-right: -250px!important; + } + + #navbar-wrapper { + position: relative!important; + } + + #wrapper.toggled { + padding-left: 250px!important; + } + + #content-wrapper { + position: relative!important; + top: 0!important; + } + + #wrapper.toggled #navbar-wrapper, + #wrapper.toggled #content-wrapper { + position: relative!important; + margin-right: 250px!important; + } +} + +@media (max-width: 767px) { + #wrapper { + padding-left: 0!important; + } + + #sidebar-wrapper { + width: 0!important; + } + + #wrapper.toggled #sidebar-wrapper { + width: 250px!important; + } + #wrapper.toggled #navbar-wrapper { + position: absolute!important; + margin-right: -250px!important; + } + + #wrapper.toggled #content-wrapper { + position: absolute!important; + margin-right: -250px!important; + } + + #navbar-wrapper { + position: relative!important; + } + + #wrapper.toggled { + padding-left: 250px!important; + } + + #content-wrapper { + position: relative!important; + top: 0!important; + } + + #wrapper.toggled #navbar-wrapper, + #wrapper.toggled #content-wrapper { + position: relative!important; + margin-right: 250px!important; + } +} \ No newline at end of file diff --git a/assets/js/errorHandler.js b/assets/js/errorHandler.js index ebd9666..31b0e00 100644 --- a/assets/js/errorHandler.js +++ b/assets/js/errorHandler.js @@ -1,4 +1,5 @@ -module.exports = function(vuex) { +import { SnackbarProgrammatic as Snackbar } from 'buefy' +export default function (vuex) { return function (res, ignorePathErrorCb) { let errors = [] @@ -17,7 +18,7 @@ module.exports = function(vuex) { } if(errors.length) { vuex.commit('setAjaxErrors', errors) - vuex.commit('setAjaxErrorsModalState', true) + Snackbar.open({message: ' ' + vuex.state.errors.errors, type: 'is-danger'}) } } diff --git a/src/App.vue b/src/App.vue index 924df6b..78740f3 100644 --- a/src/App.vue +++ b/src/App.vue @@ -9,9 +9,10 @@ -
+
+
@@ -51,7 +52,7 @@ export default { this.$store.commit('setID', res.data.id) this.$store.commit('setBot', res.data.bot) }).catch(() => { - this.$buefy.snackbar.open({message:this.$t('errors.authFail'), type: 'is-warning'}) + this.$buefy.snackbar.open({message:this.$t('errors.down'), type: 'is-warning'}) }) } } diff --git a/src/assets/css/sidebar.css b/src/assets/css/sidebar.css new file mode 100644 index 0000000..e69de29 diff --git a/src/components/Navbar.vue b/src/components/Navbar.vue index de5556a..77b7bc7 100644 --- a/src/components/Navbar.vue +++ b/src/components/Navbar.vue @@ -204,6 +204,15 @@
+
+
+
+
+

{{$t('errors.emailVerify')}}

+
+
+
+
+
+
+
+
+

{{$store.state.client.bannerText}}

+
+
+
- - \ No newline at end of file + \ No newline at end of file diff --git a/src/locales/en.json b/src/locales/en.json index 1bfb83b..7211afe 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -156,7 +156,12 @@ "authFail": "Request failed, you are not authenticated. (Is API blocked?)", "devBuild": "Warning: You are using a development build of Kaverti, expect instabilities.", "disableDebug": "Debug mode disabled, you will no longer have access to development features until you refresh.", - "authSuccess": "Request successful, your token is valid, and the Kaverti server instance is running correctly." + "authSuccess": "Request successful, your token is valid, and the Kaverti server instance is running correctly.", + "login": "You have been logged into Kaverti.", + "down": "There has appeared to be an issue communicating with Kaverti, please try again later.", + "canaryBuild": "You are using the Canary client, if you are expecting a stable experience, please use the regular one on Kaverti.com.", + "logout": "You have been logged out of Kaverti.", + "register": "You have been registered to Kaverti, Welcome!" }, "user": { "title": "Loading", diff --git a/src/main.js b/src/main.js index d3fba4e..7cedc5b 100644 --- a/src/main.js +++ b/src/main.js @@ -2,14 +2,14 @@ import Vue from 'vue' import App from './App.vue' import router from './router' import store from './store' -import Buefy from 'buefy' +import Buefy, {Snackbar} from 'buefy' import axios from 'axios' import VueAxios from 'vue-axios' import i18n from './i18n' Vue.use(VueAxios, axios) Vue.use(Buefy) Vue.config.productionTip = false - +Vue.prototype.$snackbar = Snackbar new Vue({ router, store, diff --git a/src/router/index.js b/src/router/index.js index bbd6adf..0cc87ec 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -37,6 +37,30 @@ const routes = [ name: 'Users', component: route('Users') }, + { + path: '/teams', + name: 'Teams', + component: route('Teams') + }, + { path: '/t/:username', component: route('Team'), children: [ + { path: 'posts', component: route('UserPosts') }, + { path: 'threads', component: route('UserThreads') }, + { path: 'items', component: route('UserMarketplace') }, + { path: 'wall', component: route('UserWall') }, + { path: 'inventory', component: route('UserInventory') }, + { path: 'friends', component: route('UserFriends') }, + { path: 'awards', component: route('UserAwards') } + ] }, + { + path: '/awards', + name: 'Awards', + component: route('Awards') + }, + { + path: '/forums', + name: 'Forums', + component: route('Forums') + }, { path: '/roadmap', name: 'Roadmap', diff --git a/src/store/index.js b/src/store/index.js index bb5f376..ef066ea 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -12,13 +12,20 @@ if(JSON.parse( } export default new Vuex.Store({ state: { - name: "Kaverti", debug: tb(process.env.VUE_APP_STAGING), wind: false, client: { clientVersion: '1.0.0-prerelease', latestClientVersion: '', latestAPIVersion: '', + bannerText: '', + bannerEnabled: false, + bannerId: 0, + registrationsDisabled: false, + name: "Kaverti", + logo: '', + icon: '', + release: process.env.VUE_APP_RELEASE }, errors: { errors: null, @@ -41,6 +48,17 @@ export default new Vuex.Store({ } }, mutations: { + setSettings(state, value) { + state.client.name = value.siteName + state.client.bannerEnabled = value.bannerEnabled + state.client.bannerText = value.bannerText + state.client.registrationsDisabled = value.RegistrationsDisabled + state.client.logo = value.logo + state.client.icon = value.icon + }, + setVersion(state, value) { + state.client.latestClientVersion = value + }, turnOffDebug(state) { state.debug = false }, diff --git a/src/views/Awards.vue b/src/views/Awards.vue new file mode 100644 index 0000000..a333130 --- /dev/null +++ b/src/views/Awards.vue @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/src/views/Forums.vue b/src/views/Forums.vue new file mode 100644 index 0000000..a333130 --- /dev/null +++ b/src/views/Forums.vue @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/src/views/Marketplace.vue b/src/views/Marketplace.vue new file mode 100644 index 0000000..a333130 --- /dev/null +++ b/src/views/Marketplace.vue @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/src/views/Team.vue b/src/views/Team.vue new file mode 100644 index 0000000..a333130 --- /dev/null +++ b/src/views/Team.vue @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/src/views/Teams.vue b/src/views/Teams.vue new file mode 100644 index 0000000..a333130 --- /dev/null +++ b/src/views/Teams.vue @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/src/views/UserAwards.vue b/src/views/UserAwards.vue new file mode 100644 index 0000000..a333130 --- /dev/null +++ b/src/views/UserAwards.vue @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/src/views/UserFriends.vue b/src/views/UserFriends.vue new file mode 100644 index 0000000..a333130 --- /dev/null +++ b/src/views/UserFriends.vue @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/src/views/UserInventory.vue b/src/views/UserInventory.vue new file mode 100644 index 0000000..a333130 --- /dev/null +++ b/src/views/UserInventory.vue @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/src/views/UserItems.vue b/src/views/UserItems.vue new file mode 100644 index 0000000..a333130 --- /dev/null +++ b/src/views/UserItems.vue @@ -0,0 +1,5 @@ + \ No newline at end of file