forked from go-gitea/gitea
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix the component of access token list not mounted (go-gitea#31824)
try to fix go-gitea#31771
- Loading branch information
1 parent
fe9a631
commit 6a06094
Showing
4 changed files
with
28 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
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'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters