Update Routes for upcoming Groups entity

This commit is contained in:
Bubka 2020-10-22 17:15:05 +02:00
parent 27dbf6b72f
commit 8f8c6ac83f
4 changed files with 17 additions and 7 deletions

View File

@ -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 } });
},

View File

@ -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 },

View File

@ -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>

View File

@ -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');