fix: window styles
This commit is contained in:
parent
fc915fcf58
commit
908c0899f7
|
|
@ -13,6 +13,7 @@
|
|||
<!DOCTYPE window>
|
||||
<window
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
id="bn-note-picker"
|
||||
data-l10n-id="title"
|
||||
|
|
@ -21,9 +22,26 @@
|
|||
style="min-width: 40em"
|
||||
drawintitlebar-platforms="mac"
|
||||
>
|
||||
<linkset>
|
||||
<xul:linkset>
|
||||
<html:link rel="localization" href="browser/menubar.ftl" />
|
||||
<html:link rel="localization" href="browser/browserSets.ftl" />
|
||||
<html:link rel="localization" href="toolkit/global/textActions.ftl" />
|
||||
<html:link rel="localization" href="zotero.ftl" />
|
||||
<html:link rel="localization" href="__addonRef__-linkCreator.ftl" />
|
||||
</linkset>
|
||||
</xul:linkset>
|
||||
|
||||
<xul:commandset id="mainCommandSet">
|
||||
<xul:command id="cmd_close" oncommand="window.close();" />
|
||||
</xul:commandset>
|
||||
<xul:keyset id="mainKeyset">
|
||||
<xul:key
|
||||
id="key_close"
|
||||
data-l10n-id="close-shortcut"
|
||||
command="cmd_close"
|
||||
modifiers="accel"
|
||||
reserved="true"
|
||||
/>
|
||||
</xul:keyset>
|
||||
|
||||
<script src="chrome://zotero/content/include.js"></script>
|
||||
<script src="chrome://zotero/content/title.js"></script>
|
||||
|
|
|
|||
|
|
@ -22,6 +22,25 @@
|
|||
<head>
|
||||
<title data-l10n-id="title"></title>
|
||||
<meta charset="utf-8" />
|
||||
<xul:linkset>
|
||||
<link rel="localization" href="browser/menubar.ftl" />
|
||||
<link rel="localization" href="browser/browserSets.ftl" />
|
||||
<link rel="localization" href="toolkit/global/textActions.ftl" />
|
||||
<link rel="localization" href="zotero.ftl" />
|
||||
<link rel="localization" href="__addonRef__-syncManager.ftl" />
|
||||
</xul:linkset>
|
||||
<xul:commandset id="mainCommandSet">
|
||||
<xul:command id="cmd_close" oncommand="window.close();" />
|
||||
</xul:commandset>
|
||||
<xul:keyset id="mainKeyset">
|
||||
<xul:key
|
||||
id="key_close"
|
||||
data-l10n-id="close-shortcut"
|
||||
command="cmd_close"
|
||||
modifiers="accel"
|
||||
reserved="true"
|
||||
/>
|
||||
</xul:keyset>
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", (ev) => {
|
||||
const { Services } = ChromeUtils.import(
|
||||
|
|
@ -44,6 +63,7 @@
|
|||
height: 100%;
|
||||
overflow: hidden;
|
||||
word-wrap: break-word;
|
||||
user-select: none;
|
||||
}
|
||||
.viewport {
|
||||
margin: 0 5px 0 5px;
|
||||
|
|
@ -69,7 +89,6 @@
|
|||
overflow: auto;
|
||||
}
|
||||
</style>
|
||||
<link rel="localization" href="__addonRef__-syncManager.ftl" />
|
||||
</head>
|
||||
<body class="zotero-window">
|
||||
<div class="viewport-container">
|
||||
|
|
|
|||
|
|
@ -23,6 +23,25 @@
|
|||
<title data-l10n-id="title"></title>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="referrer" content="no-referrer" />
|
||||
<xul:linkset>
|
||||
<link rel="localization" href="browser/menubar.ftl" />
|
||||
<link rel="localization" href="browser/browserSets.ftl" />
|
||||
<link rel="localization" href="toolkit/global/textActions.ftl" />
|
||||
<link rel="localization" href="zotero.ftl" />
|
||||
<link rel="localization" href="__addonRef__-templateEditor.ftl" />
|
||||
</xul:linkset>
|
||||
<xul:commandset id="mainCommandSet">
|
||||
<xul:command id="cmd_close" oncommand="window.close();" />
|
||||
</xul:commandset>
|
||||
<xul:keyset id="mainKeyset">
|
||||
<xul:key
|
||||
id="key_close"
|
||||
data-l10n-id="close-shortcut"
|
||||
command="cmd_close"
|
||||
modifiers="accel"
|
||||
reserved="true"
|
||||
/>
|
||||
</xul:keyset>
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", (ev) => {
|
||||
const { Services } = ChromeUtils.import(
|
||||
|
|
@ -106,22 +125,8 @@
|
|||
type="text/css"
|
||||
href="chrome://__addonRef__/content/lib/css/github-markdown.css"
|
||||
/>
|
||||
<link rel="localization" href="browser/browserSets.ftl" />
|
||||
<link rel="localization" href="__addonRef__-templateEditor.ftl" />
|
||||
</head>
|
||||
<body class="zotero-window">
|
||||
<xul:commandset id="mainCommandSet">
|
||||
<xul:command id="cmd_close" oncommand="window.close();" />
|
||||
</xul:commandset>
|
||||
<xul:keyset id="mainKeyset">
|
||||
<xul:key
|
||||
id="key_close"
|
||||
data-l10n-id="close-shortcut"
|
||||
command="cmd_close"
|
||||
modifiers="accel"
|
||||
reserved="true"
|
||||
/>
|
||||
</xul:keyset>
|
||||
<div class="viewport-container">
|
||||
<xul:hbox id="list-container" class="viewport list-viewport">
|
||||
<div id="table-container"></div>
|
||||
|
|
|
|||
|
|
@ -29,7 +29,20 @@
|
|||
<link rel="localization" href="browser/browserSets.ftl" />
|
||||
<link rel="localization" href="toolkit/global/textActions.ftl" />
|
||||
<link rel="localization" href="zotero.ftl" />
|
||||
<link rel="localization" href="__addonRef__-workspaceWindow.ftl" />
|
||||
</xul:linkset>
|
||||
<xul:commandset id="mainCommandSet">
|
||||
<xul:command id="cmd_close" oncommand="window.close();" />
|
||||
</xul:commandset>
|
||||
<xul:keyset id="mainKeyset">
|
||||
<xul:key
|
||||
id="key_close"
|
||||
data-l10n-id="close-shortcut"
|
||||
command="cmd_close"
|
||||
modifiers="accel"
|
||||
reserved="true"
|
||||
/>
|
||||
</xul:keyset>
|
||||
<style>
|
||||
html,
|
||||
body {
|
||||
|
|
@ -48,22 +61,8 @@
|
|||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
<link rel="localization" href="browser/browserSets.ftl" />
|
||||
<link rel="localization" href="__addonRef__-workspaceWindow.ftl" />
|
||||
</head>
|
||||
<body class="zotero-window workspace-window">
|
||||
<xul:commandset id="mainCommandSet">
|
||||
<xul:command id="cmd_close" oncommand="window.close();" />
|
||||
</xul:commandset>
|
||||
<xul:keyset id="mainKeyset">
|
||||
<xul:key
|
||||
id="key_close"
|
||||
data-l10n-id="close-shortcut"
|
||||
command="cmd_close"
|
||||
modifiers="accel"
|
||||
reserved="true"
|
||||
/>
|
||||
</xul:keyset>
|
||||
<div id="workspace-container"></div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -22,3 +22,5 @@ outbound-step3-middle =
|
|||
[true] links to
|
||||
*[other] { "" }
|
||||
}
|
||||
|
||||
outlinePicker-cursorLine = 🖋️Cursor (L{ $line })
|
||||
|
|
|
|||
|
|
@ -22,3 +22,5 @@ outbound-step3-middle =
|
|||
[true] links to
|
||||
*[other] { "" }
|
||||
}
|
||||
|
||||
outlinePicker-cursorLine = 🖋️Cursor (L{ $line })
|
||||
|
|
|
|||
|
|
@ -22,3 +22,5 @@ outbound-step3-middle =
|
|||
[true] links to
|
||||
*[other] { "" }
|
||||
}
|
||||
|
||||
outlinePicker-cursorLine = 🖋️Cursor (L{ $line })
|
||||
|
|
|
|||
|
|
@ -22,3 +22,5 @@ outbound-step3-middle =
|
|||
[true] links to
|
||||
*[other] { "" }
|
||||
}
|
||||
|
||||
outlinePicker-cursorLine = 🖋️Cursor (L{ $line })
|
||||
|
|
|
|||
|
|
@ -21,4 +21,6 @@ outbound-step3-middle =
|
|||
{ $show ->
|
||||
[true] 指向了
|
||||
*[other] { "" }
|
||||
}
|
||||
}
|
||||
|
||||
outlinePicker-cursorLine = 🖋️光标位置 (行{ $line })
|
||||
|
|
|
|||
|
|
@ -134,10 +134,17 @@ export class OutlinePicker extends PluginCEBase {
|
|||
this.noteOutline = this._addon.api.note.getNoteTreeFlattened(this.item);
|
||||
// Fake a cursor position
|
||||
if (typeof this.lineIndex === "number") {
|
||||
// @ts-ignore - formatValues is not in the types
|
||||
const [name] = (await document?.l10n?.formatValues([
|
||||
{
|
||||
id: `${config.addonRef}-outlinePicker-cursorLine`,
|
||||
args: { line: this.lineIndex },
|
||||
},
|
||||
])) as string[];
|
||||
this.noteOutline.unshift({
|
||||
model: {
|
||||
level: 0,
|
||||
name: `🖋️Cursor (L${this._lineIndex})`,
|
||||
name,
|
||||
lineIndex: this._lineIndex,
|
||||
endIndex: this._lineIndex,
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue