-
Notifications
You must be signed in to change notification settings - Fork 242
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Allow to customize the port in case that can't find available port automatically. Fixed [Issue #117](#117). - Optimize the sound request cycle when the server is down. Fixed [Issue #110](#110
- Loading branch information
Showing
12 changed files
with
136 additions
and
9 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1 +1 @@ | ||
1.3.0 | ||
1.4.0 |
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
window.VERSION = "1.3.0"; | ||
window.VERSION = "1.4.0"; | ||
window.URL_PREFIX = location.pathname === "/" ? "" : location.pathname; |
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 |
---|---|---|
@@ -1,9 +1,14 @@ | ||
const vscode = require('vscode'); | ||
const { registerCommand } = vscode.commands; | ||
const share = require("./share.js"); | ||
const initService = require("./service.js"); | ||
|
||
module.exports = function (context) { | ||
context.subscriptions.push(registerCommand('rainbow-fart.enable', function () { | ||
share.showTip && share.showTip(); | ||
if (share.showTip) { | ||
share.showTip(); | ||
} else { | ||
initService(); | ||
} | ||
})); | ||
} |
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,26 @@ | ||
const messages = require("./messages.json"); | ||
|
||
let locale; | ||
const currentLanguage = JSON.parse(process.env.VSCODE_NLS_CONFIG).locale; | ||
const supportLanguage = ["en", "zh"] | ||
if (supportLanguage.indexOf(currentLanguage) != -1) { | ||
locale = currentLanguage | ||
} else { | ||
for (let lang of supportLanguage) { | ||
if (currentLanguage.indexOf(lang) == 0) { | ||
locale = lang; | ||
break; | ||
} | ||
} | ||
} | ||
|
||
module.exports = function (str) { | ||
let result = messages[locale] || messages["en"]; | ||
let props = str.split("."); | ||
props.forEach(prop => { result = result[prop] }); | ||
if (!result && locale != "en") { | ||
result = messages["en"]; | ||
props.forEach(prop => { result = result[prop] }); | ||
} | ||
return result; | ||
} |
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,24 @@ | ||
{ | ||
"en": { | ||
"service": { | ||
"require-port": { | ||
"title": "Can't find available port after retry 3 times, please provide one.", | ||
"placeholder": "E.g. 7777, 6666, 5555 ...", | ||
"available": "✅ Current port is available, please press Enter to confirm.", | ||
"unavailable": "❌ Current port is unavailable, please change." | ||
}, | ||
"failed": "Can't enable Rainbow Fart, please retry." | ||
} | ||
}, | ||
"zh": { | ||
"service": { | ||
"require-port": { | ||
"title": "经过 3 次尝试后仍无法自动找到可用端口,请手动提供一个。", | ||
"placeholder": "例如 7777, 6666, 5555 ...", | ||
"available": "✅ 当前端口可用,请按回车确认。", | ||
"unavailable": "❌ 当前端口不可用,请更换。" | ||
}, | ||
"failed": "无法启用彩虹屁,请重试。" | ||
} | ||
} | ||
} |
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
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