mirror of https://github.com/go-gitea/gitea
Git with a cup of tea, painless self-hosted git service
Mirror for internal git.with.parts use
https://git.with.parts
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
835 B
20 lines
835 B
import {createApp} from 'vue';
|
|
|
|
export async function initScopedAccessTokenCategories() {
|
|
const el = document.querySelector('#scoped-access-token-selector');
|
|
if (!el) return;
|
|
|
|
const {default: ScopedAccessTokenSelector} = await import(/* webpackChunkName: "scoped-access-token-selector" */'../components/ScopedAccessTokenSelector.vue');
|
|
try {
|
|
const View = createApp(ScopedAccessTokenSelector, {
|
|
isAdmin: JSON.parse(el.getAttribute('data-is-admin')),
|
|
noAccessLabel: el.getAttribute('data-no-access-label'),
|
|
readLabel: el.getAttribute('data-read-label'),
|
|
writeLabel: el.getAttribute('data-write-label'),
|
|
});
|
|
View.mount(el);
|
|
} catch (err) {
|
|
console.error('ScopedAccessTokenSelector failed to load', err);
|
|
el.textContent = el.getAttribute('data-locale-component-failed-to-load');
|
|
}
|
|
}
|
|
|