mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-21 03:15:45 -08:00
Pass urls to passport vue components to make work in subdirectories. (#4090)
This commit is contained in:
parent
c2616412c0
commit
a2453be573
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
||||||
{"version":3,"file":"css/AdminLTE.css","sources":[],"mappings":";;;;;;","sourceRoot":""}
|
{"version":3,"file":"css/AdminLTE.css","sources":[],"mappings":";;;;;;A","sourceRoot":""}
|
6880
build/css/app.css
6880
build/css/app.css
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
||||||
{"version":3,"file":"css/app.css","sources":[],"mappings":";;;;;;;;","sourceRoot":""}
|
{"version":3,"file":"css/app.css","sources":[],"mappings":";;;;;;;;A","sourceRoot":""}
|
File diff suppressed because one or more lines are too long
|
@ -3,6 +3,10 @@
|
||||||
"/css/AdminLTE.css": "/css/AdminLTE.css",
|
"/css/AdminLTE.css": "/css/AdminLTE.css",
|
||||||
"/css/app.css": "/css/app.css",
|
"/css/app.css": "/css/app.css",
|
||||||
"/css/overrides.css": "/css/overrides.css",
|
"/css/overrides.css": "/css/overrides.css",
|
||||||
|
"/vue.js.map": "/vue.js.map",
|
||||||
|
"/css/AdminLTE.css.map": "/css/AdminLTE.css.map",
|
||||||
|
"/css/app.css.map": "/css/app.css.map",
|
||||||
|
"/css/overrides.css.map": "/css/overrides.css.map",
|
||||||
"/public/css/dist/all.css": "/public/css/dist/all.css",
|
"/public/css/dist/all.css": "/public/css/dist/all.css",
|
||||||
"/public/js/dist/all.js": "/public/js/dist/all.js"
|
"/public/js/dist/all.js": "/public/js/dist/all.js"
|
||||||
}
|
}
|
52910
build/vue.js
52910
build/vue.js
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
BIN
public/css/dist/all.css
vendored
BIN
public/css/dist/all.css
vendored
Binary file not shown.
BIN
public/js/dist/all.js
vendored
BIN
public/js/dist/all.js
vendored
Binary file not shown.
|
@ -56,6 +56,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
|
props: ['clientsUrl', 'tokensUrl'],
|
||||||
/*
|
/*
|
||||||
* The component's data.
|
* The component's data.
|
||||||
*/
|
*/
|
||||||
|
@ -91,7 +92,7 @@
|
||||||
* Get all of the authorized tokens for the user.
|
* Get all of the authorized tokens for the user.
|
||||||
*/
|
*/
|
||||||
getTokens() {
|
getTokens() {
|
||||||
this.$http.get('/oauth/tokens')
|
this.$http.get(this.tokensUrl)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
this.tokens = response.data;
|
this.tokens = response.data;
|
||||||
});
|
});
|
||||||
|
@ -101,7 +102,7 @@
|
||||||
* Revoke the given token.
|
* Revoke the given token.
|
||||||
*/
|
*/
|
||||||
revoke(token) {
|
revoke(token) {
|
||||||
this.$http.delete('/oauth/tokens/' + token.id)
|
this.$http.delete(this.tokensUrl +'/'+ token.id)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
this.getTokens();
|
this.getTokens();
|
||||||
});
|
});
|
||||||
|
|
|
@ -219,6 +219,7 @@
|
||||||
/*
|
/*
|
||||||
* The component's data.
|
* The component's data.
|
||||||
*/
|
*/
|
||||||
|
props: ['clientsUrl'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
clients: [],
|
clients: [],
|
||||||
|
@ -271,7 +272,7 @@
|
||||||
* Get all of the OAuth clients for the user.
|
* Get all of the OAuth clients for the user.
|
||||||
*/
|
*/
|
||||||
getClients() {
|
getClients() {
|
||||||
this.$http.get('/oauth/clients')
|
this.$http.get(this.clientsUrl)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
this.clients = response.data;
|
this.clients = response.data;
|
||||||
});
|
});
|
||||||
|
@ -289,7 +290,7 @@
|
||||||
*/
|
*/
|
||||||
store() {
|
store() {
|
||||||
this.persistClient(
|
this.persistClient(
|
||||||
'post', '/oauth/clients',
|
'post', this.clientsUrl,
|
||||||
this.createForm, '#modal-create-client'
|
this.createForm, '#modal-create-client'
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
@ -310,7 +311,7 @@
|
||||||
*/
|
*/
|
||||||
update() {
|
update() {
|
||||||
this.persistClient(
|
this.persistClient(
|
||||||
'put', '/oauth/clients/' + this.editForm.id,
|
'put', this.clientsUrl + '/' + this.editForm.id,
|
||||||
this.editForm, '#modal-edit-client'
|
this.editForm, '#modal-edit-client'
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
@ -319,8 +320,10 @@
|
||||||
* Persist the client to storage using the given form.
|
* Persist the client to storage using the given form.
|
||||||
*/
|
*/
|
||||||
persistClient(method, uri, form, modal) {
|
persistClient(method, uri, form, modal) {
|
||||||
|
console.log('persisting');
|
||||||
form.errors = [];
|
form.errors = [];
|
||||||
|
|
||||||
|
console.log('method: ' + method);
|
||||||
this.$http[method](uri, form)
|
this.$http[method](uri, form)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
this.getClients();
|
this.getClients();
|
||||||
|
@ -344,7 +347,7 @@
|
||||||
* Destroy the given client.
|
* Destroy the given client.
|
||||||
*/
|
*/
|
||||||
destroy(client) {
|
destroy(client) {
|
||||||
this.$http.delete('/oauth/clients/' + client.id)
|
this.$http.delete(this.clientsUrl +'/' + client.id)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
this.getClients();
|
this.getClients();
|
||||||
});
|
});
|
||||||
|
|
|
@ -160,6 +160,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
|
props: ['tokenUrl', 'scopesUrl'],
|
||||||
/*
|
/*
|
||||||
* The component's data.
|
* The component's data.
|
||||||
*/
|
*/
|
||||||
|
@ -209,7 +210,7 @@
|
||||||
* Get all of the personal access tokens for the user.
|
* Get all of the personal access tokens for the user.
|
||||||
*/
|
*/
|
||||||
getTokens() {
|
getTokens() {
|
||||||
this.$http.get('/oauth/personal-access-tokens')
|
this.$http.get(this.tokenUrl)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
this.tokens = response.data;
|
this.tokens = response.data;
|
||||||
});
|
});
|
||||||
|
@ -219,7 +220,7 @@
|
||||||
* Get all of the available scopes.
|
* Get all of the available scopes.
|
||||||
*/
|
*/
|
||||||
getScopes() {
|
getScopes() {
|
||||||
this.$http.get('/oauth/scopes')
|
this.$http.get(this.scopesUrl)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
this.scopes = response.data;
|
this.scopes = response.data;
|
||||||
});
|
});
|
||||||
|
@ -240,7 +241,7 @@
|
||||||
|
|
||||||
this.form.errors = [];
|
this.form.errors = [];
|
||||||
|
|
||||||
this.$http.post('/oauth/personal-access-tokens', this.form)
|
this.$http.post(this.tokenUrl, this.form)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
this.form.name = '';
|
this.form.name = '';
|
||||||
this.form.scopes = [];
|
this.form.scopes = [];
|
||||||
|
@ -293,7 +294,7 @@
|
||||||
* Revoke the given token.
|
* Revoke the given token.
|
||||||
*/
|
*/
|
||||||
revoke(token) {
|
revoke(token) {
|
||||||
this.$http.delete('/oauth/personal-access-tokens/' + token.id)
|
this.$http.delete(this.tokenUrl +'/'+ token.id)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
this.getTokens();
|
this.getTokens();
|
||||||
});
|
});
|
||||||
|
|
|
@ -9,7 +9,10 @@
|
||||||
{{-- Page content --}}
|
{{-- Page content --}}
|
||||||
@section('content')
|
@section('content')
|
||||||
@if (!config('app.lock_passwords'))
|
@if (!config('app.lock_passwords'))
|
||||||
<passport-personal-access-tokens></passport-personal-access-tokens>
|
<passport-personal-access-tokens
|
||||||
|
token-url="{{ url('oauth/personal-access-tokens') }}"
|
||||||
|
scopes-url="{{ url('oauth/scopes') }}">
|
||||||
|
</passport-personal-access-tokens>
|
||||||
@else
|
@else
|
||||||
<p class="help-block">{{ trans('general.feature_disabled') }}</p>
|
<p class="help-block">{{ trans('general.feature_disabled') }}</p>
|
||||||
@endif
|
@endif
|
||||||
|
|
|
@ -14,8 +14,8 @@
|
||||||
@section('content')
|
@section('content')
|
||||||
@if (!config('app.lock_passwords'))
|
@if (!config('app.lock_passwords'))
|
||||||
<div id="app">
|
<div id="app">
|
||||||
<passport-clients></passport-clients>
|
<passport-clients clients-url="{{ url('oauth/clients') }}"></passport-clients>
|
||||||
<passport-authorized-clients></passport-authorized-clients>
|
<passport-authorized-clients clients-url="{{ url('oauth/clients') }}" tokens-url="{{ url('oauth/tokens') }}"></passport-authorized-clients>
|
||||||
</div>
|
</div>
|
||||||
@else
|
@else
|
||||||
<p class="help-block">{{ trans('general.feature_disabled') }}</p>
|
<p class="help-block">{{ trans('general.feature_disabled') }}</p>
|
||||||
|
|
Loading…
Reference in a new issue