mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-04-25 07:06:12 +00:00
Add changing toolbar icon to indicate state (#538)
* Add changing toolbar icon * Return to default icon after closing error * Update changelog * Add assets * Improved link icon * Upload new icons Co-authored-by: Lucien Greathouse <me@lpghatguy.com>
This commit is contained in:
@@ -5,11 +5,13 @@
|
|||||||
* Added support for optional paths in project files. ([#472])
|
* Added support for optional paths in project files. ([#472])
|
||||||
* Added support for the new Open Cloud API when uploading. ([#504])
|
* Added support for the new Open Cloud API when uploading. ([#504])
|
||||||
* Added `sourcemap` command for generating sourcemaps to feed into other tools. ([#530])
|
* Added `sourcemap` command for generating sourcemaps to feed into other tools. ([#530])
|
||||||
|
* Added changing toolbar icon to indicate state ([#538])
|
||||||
|
|
||||||
[#472]: https://github.com/rojo-rbx/rojo/pull/472
|
[#472]: https://github.com/rojo-rbx/rojo/pull/472
|
||||||
[#504]: https://github.com/rojo-rbx/rojo/pull/504
|
[#504]: https://github.com/rojo-rbx/rojo/pull/504
|
||||||
[#507]: https://github.com/rojo-rbx/rojo/pull/507
|
[#507]: https://github.com/rojo-rbx/rojo/pull/507
|
||||||
[#530]: https://github.com/rojo-rbx/rojo/pull/530
|
[#530]: https://github.com/rojo-rbx/rojo/pull/530
|
||||||
|
[#538]: https://github.com/rojo-rbx/rojo/pull/538
|
||||||
|
|
||||||
## [7.0.0] - December 10, 2021
|
## [7.0.0] - December 10, 2021
|
||||||
* Fixed Rojo's interactions with properties enabled by FFlags that are not yet enabled. ([#493])
|
* Fixed Rojo's interactions with properties enabled by FFlags that are not yet enabled. ([#493])
|
||||||
|
|||||||
BIN
assets/icon-link-32.png
Normal file
BIN
assets/icon-link-32.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
BIN
assets/icon-warn-32.png
Normal file
BIN
assets/icon-warn-32.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
@@ -44,6 +44,10 @@ function StudioToggleButton:didUpdate(lastProps)
|
|||||||
self.button.Enabled = self.props.enabled
|
self.button.Enabled = self.props.enabled
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if self.props.icon ~= lastProps.icon then
|
||||||
|
self.button.Icon = self.props.icon
|
||||||
|
end
|
||||||
|
|
||||||
if self.props.active ~= lastProps.active then
|
if self.props.active ~= lastProps.active then
|
||||||
self.button:SetActive(self.props.active)
|
self.button:SetActive(self.props.active)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ function App:init()
|
|||||||
self:setState({
|
self:setState({
|
||||||
appStatus = AppStatus.NotConnected,
|
appStatus = AppStatus.NotConnected,
|
||||||
guiEnabled = false,
|
guiEnabled = false,
|
||||||
|
toolbarIcon = Assets.Images.PluginButton,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -57,6 +58,7 @@ function App:startSession(host, port, sessionOptions)
|
|||||||
if status == ServeSession.Status.Connecting then
|
if status == ServeSession.Status.Connecting then
|
||||||
self:setState({
|
self:setState({
|
||||||
appStatus = AppStatus.Connecting,
|
appStatus = AppStatus.Connecting,
|
||||||
|
toolbarIcon = Assets.Images.PluginButton,
|
||||||
})
|
})
|
||||||
elseif status == ServeSession.Status.Connected then
|
elseif status == ServeSession.Status.Connected then
|
||||||
local address = ("%s:%s"):format(host, port)
|
local address = ("%s:%s"):format(host, port)
|
||||||
@@ -64,6 +66,7 @@ function App:startSession(host, port, sessionOptions)
|
|||||||
appStatus = AppStatus.Connected,
|
appStatus = AppStatus.Connected,
|
||||||
projectName = details,
|
projectName = details,
|
||||||
address = address,
|
address = address,
|
||||||
|
toolbarIcon = Assets.Images.PluginButtonConnected,
|
||||||
})
|
})
|
||||||
elseif status == ServeSession.Status.Disconnected then
|
elseif status == ServeSession.Status.Disconnected then
|
||||||
self.serveSession = nil
|
self.serveSession = nil
|
||||||
@@ -76,10 +79,12 @@ function App:startSession(host, port, sessionOptions)
|
|||||||
self:setState({
|
self:setState({
|
||||||
appStatus = AppStatus.Error,
|
appStatus = AppStatus.Error,
|
||||||
errorMessage = tostring(details),
|
errorMessage = tostring(details),
|
||||||
|
toolbarIcon = Assets.Images.PluginButtonWarning,
|
||||||
})
|
})
|
||||||
else
|
else
|
||||||
self:setState({
|
self:setState({
|
||||||
appStatus = AppStatus.NotConnected,
|
appStatus = AppStatus.NotConnected,
|
||||||
|
toolbarIcon = Assets.Images.PluginButton,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -186,6 +191,7 @@ function App:render()
|
|||||||
onClose = function()
|
onClose = function()
|
||||||
self:setState({
|
self:setState({
|
||||||
appStatus = AppStatus.NotConnected,
|
appStatus = AppStatus.NotConnected,
|
||||||
|
toolbarIcon = Assets.Images.PluginButton,
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
}),
|
}),
|
||||||
@@ -206,7 +212,7 @@ function App:render()
|
|||||||
button = e(StudioToggleButton, {
|
button = e(StudioToggleButton, {
|
||||||
name = "Rojo",
|
name = "Rojo",
|
||||||
tooltip = "Show or hide the Rojo panel",
|
tooltip = "Show or hide the Rojo panel",
|
||||||
icon = Assets.Images.PluginButton,
|
icon = self.state.toolbarIcon,
|
||||||
active = self.state.guiEnabled,
|
active = self.state.guiEnabled,
|
||||||
enabled = true,
|
enabled = true,
|
||||||
onClick = function()
|
onClick = function()
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ local Assets = {
|
|||||||
Images = {
|
Images = {
|
||||||
Logo = "rbxassetid://5990772764",
|
Logo = "rbxassetid://5990772764",
|
||||||
PluginButton = "rbxassetid://3405341609",
|
PluginButton = "rbxassetid://3405341609",
|
||||||
|
PluginButtonConnected = "rbxassetid://9529783993",
|
||||||
|
PluginButtonWarning = "rbxassetid://9529784530",
|
||||||
Icons = {
|
Icons = {
|
||||||
Close = "rbxassetid://6012985953",
|
Close = "rbxassetid://6012985953",
|
||||||
Back = "rbxassetid://6017213752",
|
Back = "rbxassetid://6017213752",
|
||||||
|
|||||||
Reference in New Issue
Block a user