poi-plugin-ship-info
Advanced tools
Comparing version 7.0.4 to 7.1.0
@@ -83,3 +83,4 @@ { | ||
"ブーゲンビル島沖海戦": "Battle of Empress Augusta Bay", | ||
"セント・ジョージ岬沖海戦": "Battle of Cape St. George" | ||
"セント・ジョージ岬沖海戦": "Battle of Cape St. George", | ||
"helpContent": "Right click on a ship could remove it from current plan" | ||
} |
@@ -186,3 +186,4 @@ { | ||
"European": "ヨーロッパ", | ||
"Solomon Sea": "ソロモン海" | ||
"Solomon Sea": "ソロモン海", | ||
"helpContent": "現在の計画から艦むすを削除するには、右クリックしてください" | ||
} |
@@ -49,3 +49,4 @@ { | ||
"Sally Area": "출격해역", | ||
"No Sally Area": "미출격" | ||
"No Sally Area": "미출격", | ||
"helpContent": "Right click on a ship could remove it from current plan" | ||
} |
@@ -187,3 +187,4 @@ { | ||
"European": "欧洲舰队", | ||
"Solomon Sea": "所罗门海" | ||
"Solomon Sea": "所罗门海", | ||
"helpContent": "在舰娘上右键点击可以将她从当前计划中移出" | ||
} |
@@ -187,3 +187,4 @@ { | ||
"European": "歐洲艦隊", | ||
"Solomon Sea": "所羅門海" | ||
"Solomon Sea": "所羅門海", | ||
"helpContent": "在艦娘上右鍵點擊可以將她從當前計劃中移出" | ||
} |
module.exports = { | ||
linters: { | ||
'*.{es,js}': ['eslint --fix', 'git add'], | ||
'*.{css}': 'stylelint', | ||
@@ -5,0 +4,0 @@ '*.{ts,tsx}': ['tslint --fix', 'git add'], |
{ | ||
"name": "poi-plugin-ship-info", | ||
"version": "7.0.4", | ||
"version": "7.1.0", | ||
"description": "Show detailed information of all owned ship girls", | ||
@@ -43,14 +43,14 @@ "main": "index.es", | ||
"devDependencies": { | ||
"@commitlint/cli": "^7.6.1", | ||
"@commitlint/config-conventional": "^7.6.0", | ||
"@types/bluebird": "^3.5.26", | ||
"@types/classnames": "^2.2.7", | ||
"@commitlint/cli": "^8.0.0", | ||
"@commitlint/config-conventional": "^8.0.0", | ||
"@types/bluebird": "^3.5.27", | ||
"@types/classnames": "^2.2.8", | ||
"@types/fs-extra": "^7.0.0", | ||
"@types/html2canvas": "^0.0.35", | ||
"@types/i18next": "^12.1.0", | ||
"@types/lodash": "^4.14.126", | ||
"@types/react": "^16.8.17", | ||
"@types/lodash": "^4.14.133", | ||
"@types/react": "^16.8.19", | ||
"@types/react-fontawesome": "^1.6.4", | ||
"@types/react-redux": "^7.0.9", | ||
"@types/react-virtualized": "^9.21.1", | ||
"@types/react-virtualized": "^9.21.2", | ||
"@types/react-virtualized-auto-sizer": "^1.0.0", | ||
@@ -62,14 +62,5 @@ "@types/react-window": "^1.8.0", | ||
"babel-eslint": "10.0.1", | ||
"eslint": "^5.16.0", | ||
"eslint-config-airbnb": "^17.1.0", | ||
"eslint-config-airbnb-base": "^13.1.0", | ||
"eslint-config-poi-plugin": "^2.0.0", | ||
"eslint-config-prettier": "^4.2.0", | ||
"eslint-plugin-import": "^2.17.2", | ||
"eslint-plugin-jsx-a11y": "^6.2.1", | ||
"eslint-plugin-prettier": "^3.1.0", | ||
"eslint-plugin-react": "^7.13.0", | ||
"husky": "^2.2.0", | ||
"husky": "^2.3.0", | ||
"kcsapi": "^1.190112.0", | ||
"lint-staged": "^8.1.6", | ||
"lint-staged": "^8.1.7", | ||
"poi-util-transpile": "^10.3.4", | ||
@@ -79,7 +70,7 @@ "prettier": "^1.17.1", | ||
"stylelint-config-standard": "^18.3.0", | ||
"tslint": "^5.16.0", | ||
"tslint": "^5.17.0", | ||
"tslint-config-prettier": "^1.18.0", | ||
"tslint-plugin-prettier": "^2.0.1", | ||
"tslint-react": "^4.0.0", | ||
"typescript": "^3.4.5" | ||
"typescript": "^3.5.1" | ||
}, | ||
@@ -86,0 +77,0 @@ "dependencies": {}, |
@@ -19,2 +19,3 @@ interface IConfig { | ||
getStore: (path?: string) => any | ||
isMain: boolean | ||
} |
@@ -56,3 +56,3 @@ "use strict"; | ||
componentId: "sc-1fp2vz9-1" | ||
})(["padding:0;margin:0;height:30em;overflow:scroll;width:20em;span{cursor:pointer;}"]); | ||
})(["padding:0;margin:0;height:30em;overflow-y:scroll;width:20em;span{cursor:pointer;}"]); | ||
@@ -75,2 +75,3 @@ const ShipItem = _styledComponents["default"].li.withConfig({ | ||
const Menu = (0, _redux.compose)((0, _reactI18next.withTranslation)('poi-plugin-ship-info'), (0, _reactRedux.connect)(state => ({ | ||
allSelectedId: (0, _selectors.deckPlannerAllShipIdsSelector)(state), | ||
ships: (0, _selectors.shipMenuDataSelector)(state) | ||
@@ -122,2 +123,3 @@ })))((_temp = class MenuBase extends _react.Component { | ||
ships, | ||
allSelectedId, | ||
t | ||
@@ -150,3 +152,3 @@ } = this.props; | ||
className: "ship-info-scrollable" | ||
}, (0, _lodash["default"])(ships).filter(ship => type === -1 || type === ship.superTypeIndex).filter(ship => !query || (filtered || []).includes(ship.id)).sortBy([ship => (filtered || []).indexOf(ship.id), ship => -ship.lv, ship => -ship.exp]).map(ship => _react["default"].createElement(ShipItem, { | ||
}, (0, _lodash["default"])(ships).filter(ship => type === -1 || type === ship.superTypeIndex).filter(ship => !query || (filtered || []).includes(ship.id)).filter(ship => !ship.area).filter(ship => !allSelectedId.includes(ship.id)).sortBy([ship => (filtered || []).indexOf(ship.id), ship => -ship.lv, ship => -ship.exp]).map(ship => _react["default"].createElement(ShipItem, { | ||
key: ship.id, | ||
@@ -153,0 +155,0 @@ onClick: this.handleSelect(ship.id), |
@@ -28,2 +28,4 @@ "use strict"; | ||
var _windowEnv = require("views/components/etc/window-env"); | ||
var _createStore = require("views/create-store"); | ||
@@ -35,2 +37,4 @@ | ||
var _utils = require("../../utils"); | ||
var _checkbox = require("../components/checkbox"); | ||
@@ -140,2 +144,11 @@ | ||
const [fill, setFill] = (0, _react.useState)(-1); | ||
const captureSection = (0, _react.useRef)(null); | ||
const { | ||
window | ||
} = (0, _react.useContext)(_windowEnv.WindowEnv); | ||
const capture = (0, _react.useCallback)(() => { | ||
if (captureSection.current) { | ||
(0, _utils.captureRect)(captureSection.current); | ||
} | ||
}, []); | ||
return _react["default"].createElement("div", null, _react["default"].createElement(ActionPanel, null, _react["default"].createElement(_core.Button, { | ||
@@ -145,3 +158,11 @@ intent: _core.Intent.PRIMARY, | ||
onClick: handleRefresh | ||
}, t('Refresh'))), activeTab === 'area' ? _react["default"].createElement("div", null, _react["default"].createElement("div", null, areas.map(area => _react["default"].createElement(_area.Area, { | ||
}, t('Refresh')), !window.isMain && _react["default"].createElement(_core.Button, { | ||
intent: _core.Intent.PRIMARY, | ||
minimal: true, | ||
onClick: capture | ||
}, t('Save to image'))), _react["default"].createElement(_core.Callout, { | ||
intent: _core.Intent.PRIMARY | ||
}, t('helpContent')), activeTab === 'area' ? _react["default"].createElement("div", null, _react["default"].createElement("div", { | ||
ref: captureSection | ||
}, areas.map(area => _react["default"].createElement(_area.Area, { | ||
key: area.color, | ||
@@ -164,3 +185,4 @@ area: area, | ||
}, area.name)))), _react["default"].createElement(_shipGrid.ShipGrid, { | ||
fill: fill | ||
fill: fill, | ||
ref: captureSection | ||
}))); | ||
@@ -171,3 +193,3 @@ }); | ||
componentId: "sc-1itvfpl-2" | ||
})(["width:80vw;height:90vh;", "{overflow:scroll;}"], `.${_core.Classes.DIALOG_BODY}`); | ||
})(["width:80vw;height:90vh;", "{overflow-y:scroll;}"], `.${_core.Classes.DIALOG_BODY}`); | ||
@@ -174,0 +196,0 @@ const Title = _styledComponents["default"].div.withConfig({ |
@@ -65,7 +65,9 @@ "use strict"; | ||
ships: (0, _selectors.shipMenuDataSelector)(state) | ||
}))(({ | ||
}), null, null, { | ||
forwardRef: true | ||
})((0, _react.forwardRef)(({ | ||
ships, | ||
dispatch, | ||
fill | ||
}) => { | ||
}, ref) => { | ||
const handleClick = (0, _react.useCallback)(shipId => { | ||
@@ -80,3 +82,5 @@ dispatch(getDPAction(shipId, fill)); | ||
} = (0, _reactI18next.useTranslation)(['poi-plugin-ship-info']); | ||
return _react["default"].createElement("div", null, _constants.shipSuperTypeMap.map(stype => _react["default"].createElement("div", { | ||
return _react["default"].createElement("div", { | ||
ref: ref | ||
}, _constants.shipSuperTypeMap.map(stype => _react["default"].createElement("div", { | ||
key: stype.name | ||
@@ -90,3 +94,3 @@ }, _react["default"].createElement("h2", null, t(stype.name)), _react["default"].createElement(Grid, null, _fp["default"].flow(_fp["default"].filter(ship => stype.id.includes(ship.typeId)), _fp["default"].sortBy([ship => -ship.lv, ship => -ship.id]), _fp["default"].map(ship => _react["default"].createElement(_shipItem.ShipItem, { | ||
})))(ships))))); | ||
}); | ||
})); | ||
exports.ShipGrid = ShipGrid; |
@@ -61,3 +61,3 @@ "use strict"; | ||
componentId: "sc-1j6vyfd-4" | ||
})(["font-weight:600;display:inline-block;padding:0 1ex;color:white;"]); | ||
})(["font-weight:600;display:inline-block;padding:0 1ex;color:white;user-select:none;"]); | ||
@@ -67,3 +67,3 @@ const ShipLevel = _styledComponents["default"].div.withConfig({ | ||
componentId: "sc-1j6vyfd-5" | ||
})(["display:inline-block;line-height:1em;padding:0 1ex;color:white;"]); | ||
})(["display:inline-block;line-height:1em;padding:0 1ex;color:white;user-select:none;"]); | ||
@@ -70,0 +70,0 @@ const ShipItem = (0, _reactRedux.connect)(state => ({ |
@@ -150,3 +150,3 @@ "use strict"; | ||
if (columnIndex === 0) { | ||
content = _react["default"].createElement(_cells.Cell, props, rowIndex); | ||
content = _react["default"].createElement(_cells.Cell, props, rowIndex + 1); | ||
} else { | ||
@@ -153,0 +153,0 @@ const index = columnIndex - 1; |
@@ -454,5 +454,3 @@ "use strict"; | ||
const captureRect = async (query, mountPoint) => { | ||
const rect = mountPoint.querySelector(query); | ||
const captureRect = async rect => { | ||
if (!rect) { | ||
@@ -466,9 +464,16 @@ return; | ||
} = rect.getBoundingClientRect(); | ||
const canvas = await (0, _html2canvas["default"])(rect, { | ||
allowTaint: true, | ||
backgroundColor: '#333', | ||
height: _lodash["default"].ceil(height, 16), | ||
width: _lodash["default"].ceil(width, 16) | ||
}); | ||
let canvas; | ||
try { | ||
canvas = await (0, _html2canvas["default"])(rect, { | ||
allowTaint: true, | ||
backgroundColor: '#333', | ||
height: _lodash["default"].ceil(height, 16), | ||
width: _lodash["default"].ceil(width, 16) | ||
}); | ||
} catch (e) { | ||
console.error(e); | ||
return; | ||
} | ||
_electron.remote.getCurrentWebContents().downloadURL(canvas.toDataURL('image/png')); | ||
@@ -475,0 +480,0 @@ }; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
1484154
30
27310
0
1