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 +0 -1
- package/i18n/zh-CN.json +0 -1
- package/index.js +5 -5
- package/package.json +1 -1
- package/views/index.js +0 -17
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
package/index.js
CHANGED
|
@@ -447,8 +447,8 @@ function pluginWillUnload() {
|
|
|
447
447
|
}
|
|
448
448
|
}
|
|
449
449
|
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
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
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
|
|