poi-plugin-reload-game-button 0.3.0 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/i18n/en-US.json CHANGED
@@ -3,7 +3,6 @@
3
3
  "description": "A touch-friendly floating button for reloading only the game frame.",
4
4
  "showPanel": "Show floating panel",
5
5
  "reloadGame": "Reload game",
6
- "repository": "Repository",
7
6
  "panelVisible": "Floating panel is visible.",
8
7
  "panelHidden": "Floating panel is hidden.",
9
8
  "close": "Close"
package/i18n/zh-CN.json CHANGED
@@ -3,7 +3,6 @@
3
3
  "description": "适合触摸屏使用的悬浮按钮,只重新载入游戏本体。",
4
4
  "showPanel": "显示悬浮窗",
5
5
  "reloadGame": "重新载入游戏",
6
- "repository": "仓库地址",
7
6
  "panelVisible": "悬浮窗已显示。",
8
7
  "panelHidden": "悬浮窗已隐藏。",
9
8
  "close": "关闭"
package/index.js CHANGED
@@ -447,8 +447,8 @@ function pluginWillUnload() {
447
447
  }
448
448
  }
449
449
 
450
- module.exports = {
451
- pluginDidLoad,
452
- pluginWillUnload,
453
- reactClass: (props) => require('./views').reactClass(props),
454
- }
450
+ // Use explicit CommonJS exports so poi's dynamic import() exposes every hook
451
+ // as a named export, including the function-valued reactClass property.
452
+ exports.pluginDidLoad = pluginDidLoad
453
+ exports.pluginWillUnload = pluginWillUnload
454
+ exports.reactClass = (props) => require('./views').reactClass(props)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "poi-plugin-reload-game-button",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "Adds a touch-friendly floating reload-game panel to poi.",
5
5
  "main": "index.js",
6
6
  "files": [
package/views/index.js CHANGED
@@ -7,7 +7,6 @@ const { useTranslation } = require('react-i18next')
7
7
  const SHOW_PANEL_EVENT = 'poi-plugin-reload-game-button:show-panel'
8
8
  const RELOAD_GAME_EVENT = 'poi-plugin-reload-game-button:reload-game'
9
9
  const PANEL_ID = 'poi-reload-game-panel'
10
- const REPOSITORY_URL = 'https://github.com/DuskWhite/poi-plugin-reload-game-button'
11
10
 
12
11
  function tt(t, key, fallback) {
13
12
  const translated = t(key)
@@ -85,22 +84,6 @@ function reactClass() {
85
84
  ? tt(t, 'panelVisible', '悬浮窗已显示。')
86
85
  : tt(t, 'panelHidden', '悬浮窗已隐藏。'),
87
86
  ),
88
- React.createElement(
89
- 'div',
90
- { style: { marginTop: 10 } },
91
- `${tt(t, 'repository', '仓库地址')}: `,
92
- React.createElement(
93
- 'a',
94
- {
95
- href: REPOSITORY_URL,
96
- onClick: (event) => {
97
- event.preventDefault()
98
- require('electron').shell.openExternal(REPOSITORY_URL)
99
- },
100
- },
101
- REPOSITORY_URL,
102
- ),
103
- ),
104
87
  )
105
88
  }
106
89