mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-01-22 22:30:05 +01:00
Update Routes for upcoming Groups entity
This commit is contained in:
parent
27dbf6b72f
commit
8f8c6ac83f
@ -29,7 +29,7 @@
|
||||
</div>
|
||||
<!-- Fallback link to classic form -->
|
||||
<div class="column is-full quick-uploader-footer">
|
||||
<router-link :to="{ name: 'create' }" class="is-link">{{ $t('twofaccounts.use_full_form') }}</router-link>
|
||||
<router-link :to="{ name: 'createAccount' }" class="is-link">{{ $t('twofaccounts.use_full_form') }}</router-link>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -210,7 +210,7 @@
|
||||
response = await this.form.post('/api/qrcode/decode')
|
||||
}
|
||||
|
||||
this.$router.push({ name: 'create', params: { qrAccount: response.data } });
|
||||
this.$router.push({ name: 'createAccount', params: { qrAccount: response.data } });
|
||||
|
||||
},
|
||||
|
||||
|
16
resources/js/routes.js
vendored
16
resources/js/routes.js
vendored
@ -4,8 +4,11 @@ import Router from 'vue-router'
|
||||
Vue.use(Router)
|
||||
|
||||
import Accounts from './views/Accounts'
|
||||
import Create from './views/twofaccounts/Create'
|
||||
import Edit from './views/twofaccounts/Edit'
|
||||
import CreateAccount from './views/twofaccounts/Create'
|
||||
import EditAccount from './views/twofaccounts/Edit'
|
||||
import Groups from './views/Groups'
|
||||
import CreateGroup from './views/groups/Create'
|
||||
import EditGroup from './views/groups/Edit'
|
||||
import Login from './views/auth/Login'
|
||||
import Register from './views/auth/Register'
|
||||
import PasswordRequest from './views/auth/password/Request'
|
||||
@ -17,9 +20,14 @@ const router = new Router({
|
||||
mode: 'history',
|
||||
routes: [
|
||||
{ path: '/accounts', name: 'accounts', component: Accounts, meta: { requiresAuth: true }, alias: '/', props: true },
|
||||
{ path: '/account/create', name: 'createAccount', component: CreateAccount, meta: { requiresAuth: true } },
|
||||
{ path: '/account/edit/:twofaccountId', name: 'editAccount', component: EditAccount, meta: { requiresAuth: true } },
|
||||
|
||||
{ path: '/groups', name: 'groups', component: Groups, meta: { requiresAuth: true }, props: true },
|
||||
{ path: '/group/create', name: 'createGroup', component: CreateGroup, meta: { requiresAuth: true } },
|
||||
{ path: '/group/edit/:groupId', name: 'editGroup', component: EditGroup, meta: { requiresAuth: true } },
|
||||
|
||||
{ path: '/settings', name: 'settings', component: Settings, meta: { requiresAuth: true } },
|
||||
{ path: '/create', name: 'create', component: Create, meta: { requiresAuth: true } },
|
||||
{ path: '/edit/:twofaccountId', name: 'edit', component: Edit, meta: { requiresAuth: true } },
|
||||
|
||||
{ path: '/login', name: 'login', component: Login },
|
||||
{ path: '/register', name: 'register', component: Register },
|
||||
|
@ -30,7 +30,7 @@
|
||||
</div>
|
||||
<transition name="fadeInOut">
|
||||
<div class="tfa-edit has-text-grey" v-if="editMode">
|
||||
<router-link :to="{ name: 'edit', params: { twofaccountId: account.id }}" class="tag is-dark is-rounded">
|
||||
<router-link :to="{ name: 'editAccount', params: { twofaccountId: account.id }}" class="tag is-dark is-rounded">
|
||||
{{ $t('commons.edit') }}
|
||||
</router-link>
|
||||
</div>
|
||||
|
@ -39,6 +39,8 @@
|
||||
Route::delete('twofaccounts/batch', 'TwoFAccountController@batchDestroy');
|
||||
Route::patch('twofaccounts/reorder', 'TwoFAccountController@reorder');
|
||||
Route::apiResource('twofaccounts', 'TwoFAccountController');
|
||||
Route::patch('group/accounts', 'GroupController@associateAccounts');
|
||||
Route::apiResource('groups', 'GroupController');
|
||||
Route::post('twofaccounts/otp', 'TwoFAccountController@generateOTP')->name('twofaccounts.generateOTP');
|
||||
Route::post('qrcode/decode', 'QrCodeController@decode');
|
||||
Route::post('icon/upload', 'IconController@upload');
|
||||
|
Loading…
Reference in New Issue
Block a user