You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d712293
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: electron/annotations-smoke.mjs
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ export async function verifyAnnotations(window,recents){
23
23
for(leti=0;i<100&&!captured;i++)awaitpause(20);
24
24
assert.ok(captured,'annotation event reaches native Electron Menu');
25
25
assert.equal(captured.options.window,window);
26
-
assert.deepEqual(captured.menu.items.filter(i=>i.type!=='separator').map(i=>i.label),kind==='comment'?['复制','分享','Hand over to AI','修改','删除']:['复制','分享','Hand over to AI','删除']);
26
+
assert.deepEqual(captured.menu.items.filter(i=>i.type!=='separator').map(i=>i.label),kind==='comment'?['复制','分享','Hand over to AI','修改','删除']:['复制','分享','谷歌搜索','谷歌学术搜索','Hand over to AI','删除']);
27
27
assert.equal(awaitrun(`!!document.querySelector('.annotation-menu')`),false,'macOS has no custom context menu');
consttemplate=[item('复制'),item('分享'),item('Hand over to AI'),{type:'separator'},...(kind==='comment'?[item('修改')]:[]),item('删除')];
270
+
consttemplate=[item('复制'),item('分享'),...(kind==='highlight'?[item('谷歌搜索'),item('谷歌学术搜索')]:[]),item('Hand over to AI'),{type:'separator'},...(kind==='comment'?[item('修改')]:[]),item('删除')];
<div v-if="menu":data-platform="popupPlatform"class="annotation-ui annotation-menu":style="{left:Math.min(menu.x,innerWidth-190)+'px',top:Math.min(menu.y,innerHeight-250)+'px'}" role="menu"><button v-for="name in menu.a.kind==='highlight'?['复制','分享','Hand over to AI','删除']:['复制','分享','Hand over to AI','修改','删除']":key="name" role="menuitem" @click="action(name)">{{name}}</button></div>
160
+
<div v-if="menu":data-platform="popupPlatform"class="annotation-ui annotation-menu":style="{left:Math.min(menu.x,innerWidth-190)+'px',top:Math.min(menu.y,innerHeight-330)+'px'}" role="menu"><button v-for="name in menu.a.kind==='highlight'?['复制','分享','谷歌搜索','谷歌学术搜索','Hand over to AI','删除']:['复制','分享','Hand over to AI','修改','删除']":key="name" role="menuitem" @click="action(name)">{{name}}</button></div>
0 commit comments