-
Notifications
You must be signed in to change notification settings - Fork 294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v1.0.3 代码审改 #374
Open
jiaojiaodubai
wants to merge
5
commits into
l0o0:main
Choose a base branch
from
jiaojiaodubai:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
v1.0.3 代码审改 #374
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
e3a162b
normalize prefs key name; rewite translator table; add zh-TW locale; …
jiaojiaodubai 771614c
focus search box when translators window is opened
jiaojiaodubai a813c1c
use `Zotero.DataDirectory.dir` to get data directory
jiaojiaodubai d8666d0
add repository toolbar button
jiaojiaodubai f1c576e
add `is` attribute for links in translators prefs window
jiaojiaodubai File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,112 @@ | ||
<?xml version="1.0"?> | ||
<!-- prettier-ignore --> | ||
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?> | ||
<!-- prettier-ignore --> | ||
<?xml-stylesheet href="chrome://zotero/skin/zotero.css" type="text/css"?> | ||
<!-- prettier-ignore --> | ||
<?xml-stylesheet href="chrome://zotero-platform/content/zotero-react-client.css" type="text/css"?> | ||
<!-- prettier-ignore --> | ||
<?xml-stylesheet href="chrome://zotero-platform/content/zotero.css" type="text/css"?> | ||
<!-- prettier-ignore --> | ||
<!DOCTYPE html> | ||
<html | ||
id="__addonRef__-translators" | ||
xmlns="http://www.w3.org/1999/xhtml" | ||
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" | ||
xmlns:html="http://www.w3.org/1999/xhtml" | ||
windowtype="__addonRef__:translators" | ||
> | ||
<head> | ||
<title data-l10n-id="title"></title> | ||
<meta charset="utf-8" /> | ||
<xul:linkset> | ||
<link rel="localization" href="zotero.ftl" /> | ||
<link rel="localization" href="__addonRef__-preferences-translators.ftl" /> | ||
</xul:linkset> | ||
<xul:keyset> | ||
<xul:key id="key_close" key="W" modifiers="accel" oncommand="window.close()"/> | ||
</xul:keyset> | ||
<script> | ||
document.addEventListener("DOMContentLoaded", (ev) => { | ||
Services.scriptloader.loadSubScript( | ||
"chrome://zotero/content/include.js", | ||
this, | ||
); | ||
window.arguments[0]._initPromise.resolve(); | ||
}); | ||
</script> | ||
<style> | ||
html, | ||
body { | ||
margin: 0; | ||
min-width: 800px; | ||
min-height: 400px; | ||
height: 100%; | ||
} | ||
header, footer { | ||
display: flex; | ||
align-items: center; | ||
height: 50px; | ||
padding: 0 10px; | ||
} | ||
toolbar, toolbar > hbox { | ||
width: 100%; | ||
} | ||
.toolbarbutton-text{ | ||
margin-left: 4px; | ||
} | ||
main { | ||
width: 100%; | ||
height: calc(100% - 2*50px); | ||
background: var(--material-background); | ||
} | ||
#table-container { | ||
height: 100%; | ||
width: 100%; | ||
} | ||
#translators-table { | ||
height: 100%; | ||
} | ||
footer { | ||
justify-content: space-between; | ||
} | ||
footer > * { | ||
display: flex; | ||
gap: 6px; | ||
} | ||
#links > .zotero-text-link { | ||
margin: 0 5px; | ||
} | ||
footer > * > :first-child { | ||
margin-left: 0; | ||
} | ||
footer > * > :last-child { | ||
margin-right: 0; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<header xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> | ||
<toolbar class="zotero-toolbar toolbar toolbar-primary"> | ||
<hbox align="center"> | ||
<toolbarbutton id="github-link" class="zotero-tb-button" data-l10n-id="github-link" image="chrome://__addonRef__/content/icons/github.svg" /> | ||
<spacer flex="1"></spacer> | ||
<search-textbox id="search-box" data-l10n-id="search-box" data-l10n-attrs="placeholder" timeout="1" style="padding: 0;"/> | ||
</hbox> | ||
</toolbar> | ||
</header> | ||
<main> | ||
<div id="table-container"></div> | ||
</main> | ||
<footer> | ||
<div id="buttons" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> | ||
<button id="request-new-translator" data-l10n-id="request-new-translator" /> | ||
<button id="report-translator-bug" data-l10n-id="report-translator-bug" /> | ||
</div> | ||
<div id="links" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> | ||
<label data-l10n-id="how-to-update-translators" class="zotero-text-link" is="zotero-text-link"/> | ||
<label data-l10n-id="translators-dashboard" class="zotero-text-link" is="zotero-text-link"/> | ||
</div> | ||
</footer> | ||
</body> | ||
</html> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里声明命名空间是刻意的吗?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
刻意的,button 在两个命名空间里都有,在此明示之。