Przeglądaj źródła

Fix missing version in vue footer

Bubka 3 lat temu
rodzic
commit
30331998d2

+ 9 - 0
config/2fauth.php

@@ -2,6 +2,15 @@
 
 
 return [
 return [
 
 
+    /*
+    |--------------------------------------------------------------------------
+    | Application Version
+    |--------------------------------------------------------------------------
+    |
+    */
+
+    'version' => '3.0.0 beta',
+
     /*
     /*
     |--------------------------------------------------------------------------
     |--------------------------------------------------------------------------
     | 2FAuth config
     | 2FAuth config

+ 0 - 9
config/app.php

@@ -15,15 +15,6 @@ return [
 
 
     'name' => env('APP_NAME', '2FAuth'),
     'name' => env('APP_NAME', '2FAuth'),
 
 
-    /*
-    |--------------------------------------------------------------------------
-    | Application Version
-    |--------------------------------------------------------------------------
-    |
-    */
-
-    'version' => '2.1.0',
-
     /*
     /*
     |--------------------------------------------------------------------------
     |--------------------------------------------------------------------------
     | Application Environment
     | Application Environment

+ 1 - 1
resources/js/components/Footer.vue

@@ -7,7 +7,7 @@
                 </div>
                 </div>
             </div>
             </div>
         </div>
         </div>
-        <div v-if="$route.name === 'settings'" class="content has-text-centered is-size-6">
+        <div v-if="$route.name.startsWith('settings.')" class="content has-text-centered is-size-6">
             <a class="has-text-grey" href="https://github.com/Bubka/2FAuth"><b>2FAuth</b> <font-awesome-icon :icon="['fab', 'github-alt']" /></a> - v{{ appVersion }}
             <a class="has-text-grey" href="https://github.com/Bubka/2FAuth"><b>2FAuth</b> <font-awesome-icon :icon="['fab', 'github-alt']" /></a> - v{{ appVersion }}
         </div>
         </div>
         <div v-else class="content has-text-centered">
         <div v-else class="content has-text-centered">

+ 1 - 1
resources/js/routes.js

@@ -44,7 +44,7 @@ const router = new Router({
         { path: '/settings/options', name: 'settings.options', component: SettingsOptions, meta: { requiresAuth: true } },
         { path: '/settings/options', name: 'settings.options', component: SettingsOptions, meta: { requiresAuth: true } },
         { path: '/settings/account', name: 'settings.account', component: SettingsAccount, meta: { requiresAuth: true } },
         { path: '/settings/account', name: 'settings.account', component: SettingsAccount, meta: { requiresAuth: true } },
         { path: '/settings/oauth', name: 'settings.oauth', component: SettingsOAuth, meta: { requiresAuth: true } },
         { path: '/settings/oauth', name: 'settings.oauth', component: SettingsOAuth, meta: { requiresAuth: true } },
-        { path: '/settings/webauthn/:credentialId/edit', name: 'editCredential', component: EditCredential, meta: { requiresAuth: true }, props: true },
+        { path: '/settings/webauthn/:credentialId/edit', name: 'settings.webauthn.editCredential', component: EditCredential, meta: { requiresAuth: true }, props: true },
         { path: '/settings/webauthn', name: 'settings.webauthn', component: SettingsWebAuthn, meta: { requiresAuth: true } },
         { path: '/settings/webauthn', name: 'settings.webauthn', component: SettingsWebAuthn, meta: { requiresAuth: true } },
         { path: '/settings/oauth/pat/create', name: 'settings.oauth.generatePAT', component: GeneratePAT, meta: { requiresAuth: true } },
         { path: '/settings/oauth/pat/create', name: 'settings.oauth.generatePAT', component: GeneratePAT, meta: { requiresAuth: true } },
 
 

+ 1 - 1
resources/js/views/settings/WebAuthn.vue

@@ -155,7 +155,7 @@
 
 
                 this.axios.post('/webauthn/register', publicKeyCredential).then(response => {
                 this.axios.post('/webauthn/register', publicKeyCredential).then(response => {
                     this.$notify({ type: 'is-success', text: this.$t('auth.webauthn.device_successfully_registered') })
                     this.$notify({ type: 'is-success', text: this.$t('auth.webauthn.device_successfully_registered') })
-                    this.$router.push({ name: 'editCredential', params: { id: publicKeyCredential.id, name: this.$t('auth.webauthn.my_device') } })
+                    this.$router.push({ name: 'settings.webauthn.editCredential', params: { id: publicKeyCredential.id, name: this.$t('auth.webauthn.my_device') } })
                 })
                 })
             },
             },
 
 

+ 1 - 1
resources/views/landing.blade.php

@@ -24,7 +24,7 @@
     </div>
     </div>
     <script type="text/javascript">
     <script type="text/javascript">
         var appSettings = {!! $appSettings !!};
         var appSettings = {!! $appSettings !!};
-        var appVersion = '{{ config("app.version") }}';
+        var appVersion = '{{ config("2fauth.version") }}';
         var appLocales = {!! $locales !!};
         var appLocales = {!! $locales !!};
     </script>
     </script>
     <script src="{{ mix('js/manifest.js') }}"></script>
     <script src="{{ mix('js/manifest.js') }}"></script>