mirror of
https://github.com/TimeCrafters/timecrafters_configuration_tool_desktop.git
synced 2025-12-16 13:52:34 +00:00
Added used software section to home page
This commit is contained in:
@@ -34,9 +34,43 @@ module TAC
|
|||||||
label "Total actions: #{actions.size}"
|
label "Total actions: #{actions.size}"
|
||||||
label "Total variables: #{variables.size}"
|
label "Total variables: #{variables.size}"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
stack(width: 1.0, fill: true, scroll: true, margin_top: 32) do
|
||||||
|
heading, items = Gosu::LICENSES.split("\n\n")
|
||||||
|
|
||||||
|
title heading
|
||||||
|
|
||||||
|
items.split("\n").each do |item|
|
||||||
|
name, website, license, license_website = item.split(",").map(&:strip)
|
||||||
|
flow(width: 1.0, height: 28) do
|
||||||
|
tagline "#{name} - "
|
||||||
|
button "Website", height: 1.0, tip: website do
|
||||||
|
open_url(website)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
flow(width: 1.0, height: 22, margin_bottom: 20) do
|
||||||
|
para "#{license} - "
|
||||||
|
button "License Website", height: 1.0, text_size: 16, tip: license_website do
|
||||||
|
open_url(license_website)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def open_url(url)
|
||||||
|
case RUBY_PLATFORM
|
||||||
|
when /mingw/ # windows
|
||||||
|
system("start #{url}")
|
||||||
|
when /linux/
|
||||||
|
system("xdg-open #{url}")
|
||||||
|
when /darwin/ # macos
|
||||||
|
system("open #{url}")
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
Reference in New Issue
Block a user