debian-mirror-gitlab/app/assets/javascripts/oauth_application/index.js
2023-06-20 00:43:36 +05:30

21 lines
448 B
JavaScript

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