Skip to content

Commit

Permalink
fix: #72, 优化进度列透明度
Browse files Browse the repository at this point in the history
  • Loading branch information
MuiseDestiny committed Jan 28, 2023
1 parent b96eb89 commit e46c551
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zotero-style",
"version": "2.0.4",
"version": "2.0.5",
"description": "Zotero Style",
"config": {
"addonName": "Zotero Style",
Expand Down
6 changes: 2 additions & 4 deletions src/modules/progress.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { log } from "zotero-plugin-toolkit/dist/utils";
import { config } from "../../package.json";


Expand Down Expand Up @@ -75,7 +74,7 @@ export default class Progress {
styles: {
width: "100%",
height: "20px",
opacity
// opacity
}
}
) as HTMLDivElement
Expand Down Expand Up @@ -104,8 +103,7 @@ export default class Progress {
const [red, green, blue] = this.getRGB(color)
paper.path(polygon).attr({
stroke: "transparent",
// fill: `90-rgba(255, 255, 255, 0)-rgba(${red}, ${green}, ${blue}, 0.8)`,
fill: `rgba(${red}, ${green}, ${blue}, 0.8)`,
fill: `90-rgba(${red}, ${green}, ${blue}, ${opacity})-rgba(${red}, ${green}, ${blue}, 0.8)`,
})
paper.path(line).attr({
stroke: `rgba(${red}, ${green}, ${blue}, 1)`,
Expand Down
10 changes: 5 additions & 5 deletions src/modules/views.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ export default class Views {
(index: number, data: string, column: any, original: Function) => {
const cellSpan = original(index, data, column) as HTMLSpanElement;
let titleSpan = cellSpan.querySelector(".cell-text") as HTMLSpanElement;
const title = titleSpan.innerText
titleSpan.innerText = ""
const titleHTML = titleSpan.innerHTML
titleSpan.innerHTML = ""
const span = ztoolkit.UI.createElement(
document,
"span",
{
id: "title",
properties: {
innerText: title
innerHTML: titleHTML
}
})
titleSpan.appendChild(span)
Expand Down Expand Up @@ -539,8 +539,8 @@ export default class Views {
let columnsView = columnsViews[i]
const r: number = .7
const color = {
active: "#fd91a6",
default: "#7f7f88"
active: "#FF597B",
default: "#97DECE"
}
let optionNode = switchContainer.appendChild(
ztoolkit.UI.createElement(
Expand Down
4 changes: 2 additions & 2 deletions update.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"[email protected]": {
"updates": [
{
"version": "2.0.4",
"version": "2.0.5",
"update_link": "https://github.com/muisedestiny/zotero-style/releases/latest/download/zotero-style.xpi",
"applications": {
"gecko": {
Expand All @@ -12,7 +12,7 @@
}
},
{
"version": "2.0.4",
"version": "2.0.5",
"update_link": "https://github.com/muisedestiny/zotero-style/releases/latest/download/zotero-style.xpi",
"applications": {
"zotero": {
Expand Down
2 changes: 1 addition & 1 deletion update.rdf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<rdf:Seq>
<rdf:li>
<rdf:Description>
<em:version>2.0.4</em:version>
<em:version>2.0.5</em:version>
<em:targetApplication>
<rdf:Description>
<em:id>[email protected]</em:id>
Expand Down

0 comments on commit e46c551

Please sign in to comment.