mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: performance update
This commit is contained in:
1 parent
a03ee5ec2c
commit
e15c75d4b8
2 files changed
+7
-1
No files matched your search
@@ -123,6 +123,12 @@ monaco.editor.registerCommand('hydro.openUserPage', (accesser, uid) => {
|
||||
monaco.languages.registerCodeLensProvider('markdown', {
|
||||
async provideCodeLenses(model) {
|
||||
const users = model.findMatches('\\[\\]\\(/user/(\\d+)\\)', true, true, true, null, true);
|
||||
if (!users.length) {
|
||||
return {
|
||||
lenses: [],
|
||||
dispose: () => { },
|
||||
};
|
||||
}
|
||||
const { data } = await api(gql`
|
||||
users(ids: ${users.map((i) => +i.matches[1])}) {
|
||||
_id
|
||||
|
||||
Reference in new issue
Block a user