debian-mirror-gitlab/app/assets/javascripts/oauth_application/index.js

22 lines
448 B
JavaScript
Raw Normal View History

2023-06-20 00:43:36 +05:30
import Vue from 'vue';
import OAuthSecret from './components/oauth_secret.vue';
export const initOAuthApplicationSecret = () => {
const el = document.querySelector('#js-oauth-application-secret');
if (!el) {
return null;
}
const { initialSecret, renewPath } = el.dataset;
return new Vue({
el,
name: 'OAuthSecretRoot',
provide: { initialSecret, renewPath },
render(h) {
return h(OAuthSecret);
},
});
};