glib-web 0.5.16 → 0.5.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/app/helpers/glib/json_ui/action_builder.rb +7 -0
- data/app/helpers/glib/json_ui/page_helper.rb +6 -0
- data/app/helpers/glib/json_ui/response_helper.rb +0 -0
- data/app/helpers/glib/json_ui/view_builder/fields.rb +1 -0
- data/app/views/json_ui/garage/_nav_menu.json.jbuilder +0 -1
- data/app/views/json_ui/garage/actions/_http.json.jbuilder +9 -3
- data/app/views/json_ui/garage/actions/index.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/dynamic_group.json.jbuilder +31 -16
- data/app/views/json_ui/garage/lists/chat_ui.json.jbuilder +96 -0
- data/app/views/json_ui/garage/lists/index.json.jbuilder +2 -2
- data/app/views/json_ui/garage/notifications/android_post.json.jbuilder +56 -0
- data/app/views/json_ui/garage/notifications/index.json.jbuilder +11 -0
- data/app/views/json_ui/garage/tables/_autoload_section.json.jbuilder +6 -2
- data/app/views/json_ui/garage/tables/autoload_all.json.jbuilder +2 -0
- data/app/views/json_ui/garage/tables/autoload_as_needed.json.jbuilder +13 -2
- data/app/views/json_ui/garage/tables/index.json.jbuilder +3 -3
- data/app/views/json_ui/garage/views/banners.json.jbuilder +3 -3
- data/app/views/json_ui/garage/views/icons.json.jbuilder +1439 -11
- data/app/views/json_ui/garage/views/index.json.jbuilder +6 -3
- data/app/views/layouts/json_ui/renderer.html.erb +7 -4
- metadata +4 -3
- data/app/views/json_ui/garage/lists/chat.json.jbuilder +0 -112
@@ -22,12 +22,15 @@ json_ui_page json do |page|
|
|
22
22
|
template.thumbnail title: 'Banners', onClick: ->(action) do
|
23
23
|
action.windows_open url: json_ui_garage_url(path: 'views/banners')
|
24
24
|
end
|
25
|
-
template.thumbnail title: 'Icons', onClick: ->(action) do
|
26
|
-
action.windows_open url: json_ui_garage_url(path: 'views/icons')
|
27
|
-
end
|
28
25
|
template.thumbnail title: 'Misc', onClick: ->(action) do
|
29
26
|
action.windows_open url: json_ui_garage_url(path: 'views/misc')
|
30
27
|
end
|
28
|
+
|
29
|
+
if !Rails.env.test? # Avoid slowing down tests
|
30
|
+
template.thumbnail title: 'Icons', onClick: ->(action) do
|
31
|
+
action.windows_open url: json_ui_garage_url(path: 'views/icons')
|
32
|
+
end
|
33
|
+
end
|
31
34
|
end
|
32
35
|
end,
|
33
36
|
->(section) do
|
@@ -4,16 +4,19 @@
|
|
4
4
|
<head>
|
5
5
|
<meta charset="utf-8" />
|
6
6
|
<meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport" />
|
7
|
-
|
7
|
+
|
8
8
|
<title>App</title>
|
9
9
|
<%= csrf_meta_tags %>
|
10
|
-
|
10
|
+
|
11
11
|
<%= javascript_pack_tag 'vue_renderer', defer: true %>
|
12
12
|
<%#= javascript_include_tag 'vue_renderer_extras', defer: true %>
|
13
13
|
|
14
14
|
<%= stylesheet_pack_tag 'vue_renderer' %>
|
15
15
|
|
16
|
-
<link href="
|
16
|
+
<link href="//fonts.googleapis.com/css?family=Material+Icons" rel="stylesheet" />
|
17
|
+
|
18
|
+
<%# Without this, checkboxes and radio buttons will not display. %>
|
19
|
+
<link href="//cdn.materialdesignicons.com/2.1.99/css/materialdesignicons.min.css" rel="stylesheet" />
|
17
20
|
|
18
21
|
<%= yield :head %>
|
19
22
|
</head>
|
@@ -21,7 +24,7 @@
|
|
21
24
|
<body>
|
22
25
|
<noscript>Please enable JavaScript to view this web site.</noscript>
|
23
26
|
<div id="app"></div>
|
24
|
-
|
27
|
+
|
25
28
|
<script>
|
26
29
|
var __page = <%= raw @__json_ui_orig_page%>;
|
27
30
|
</script>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: glib-web
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ''
|
@@ -145,11 +145,12 @@ files:
|
|
145
145
|
- app/views/json_ui/garage/lists/_autoload_section.json.jbuilder
|
146
146
|
- app/views/json_ui/garage/lists/autoload_all.json.jbuilder
|
147
147
|
- app/views/json_ui/garage/lists/autoload_as_needed.json.jbuilder
|
148
|
-
- app/views/json_ui/garage/lists/
|
148
|
+
- app/views/json_ui/garage/lists/chat_ui.json.jbuilder
|
149
149
|
- app/views/json_ui/garage/lists/edit_actions.json.jbuilder
|
150
150
|
- app/views/json_ui/garage/lists/fab.json.jbuilder
|
151
151
|
- app/views/json_ui/garage/lists/index.json.jbuilder
|
152
152
|
- app/views/json_ui/garage/lists/templating.json.jbuilder
|
153
|
+
- app/views/json_ui/garage/notifications/android_post.json.jbuilder
|
153
154
|
- app/views/json_ui/garage/notifications/index.json.jbuilder
|
154
155
|
- app/views/json_ui/garage/notifications/web_socket.json.jbuilder
|
155
156
|
- app/views/json_ui/garage/pages/flat_centered.json.jbuilder
|
@@ -243,7 +244,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
243
244
|
version: '0'
|
244
245
|
requirements: []
|
245
246
|
rubyforge_project:
|
246
|
-
rubygems_version: 2.6
|
247
|
+
rubygems_version: 2.7.6
|
247
248
|
signing_key:
|
248
249
|
specification_version: 4
|
249
250
|
summary: ''
|
@@ -1,112 +0,0 @@
|
|
1
|
-
json.title 'Lists'
|
2
|
-
|
3
|
-
liked = params[:liked] == 'true'
|
4
|
-
|
5
|
-
json_ui_page json do |page|
|
6
|
-
render "#{@path_prefix}/nav_menu", json: json, page: page
|
7
|
-
|
8
|
-
page.list firstSection: ->(section) do
|
9
|
-
section.header padding: { top: 12, left: 16, right: 16, bottom: 12 }, childViews: ->(header) do
|
10
|
-
header.h3 text: 'Chat with John Doe'
|
11
|
-
end
|
12
|
-
|
13
|
-
section.rows builder: ->(template) do
|
14
|
-
# template.thumbnail title: "windows/reload (timestamp: #{DateTime.current.to_i}) -- #{liked}", onClick: ->(action) do
|
15
|
-
# action.windows_reload
|
16
|
-
# end, onLongPress: ->(action) do
|
17
|
-
# action.sheets_select message: "Context Menu (#{DateTime.current.to_i})", buttons: ->(menu) do
|
18
|
-
# if liked
|
19
|
-
# menu.button text: 'Cancel 👍', onClick: ->(subaction) do
|
20
|
-
# subaction.windows_reload url: json_ui_garage_url(path: 'lists/chat', liked: false)
|
21
|
-
# end
|
22
|
-
# else
|
23
|
-
# menu.button text: 'Give 👍', onClick: ->(subaction) do
|
24
|
-
# subaction.windows_reload url: json_ui_garage_url(path: 'lists/chat', liked: true)
|
25
|
-
# end
|
26
|
-
# end
|
27
|
-
# end
|
28
|
-
# end
|
29
|
-
|
30
|
-
template.commentOutgoing subtitle: 'Hey!', subsubtitle: l(10.minutes.ago, format: :short), imageUrl: glib_json_image_standard_url, chips: ->(menu) do
|
31
|
-
menu.button text: '😊 2', styleClass: 'info'
|
32
|
-
end
|
33
|
-
|
34
|
-
template.commentOutgoing subtitle: 'How are you?', subsubtitle: l(DateTime.current, format: :short)
|
35
|
-
|
36
|
-
template.commentIncoming title: 'John Doe', subtitle: 'Very well', subsubtitle: l(7.minutes.ago, format: :short), imageUrl: glib_json_image_standard_url, chips: ->(menu) do
|
37
|
-
menu.button text: "👍 #{liked ? 2 : 1}"
|
38
|
-
end, onLongPress: ->(action) do
|
39
|
-
action.sheets_select message: 'Context Menu', buttons: ->(menu) do
|
40
|
-
if liked
|
41
|
-
menu.button text: 'Cancel 👍', onClick: ->(subaction) do
|
42
|
-
subaction.windows_reload url: json_ui_garage_url(path: 'lists/chat', liked: false)
|
43
|
-
end
|
44
|
-
else
|
45
|
-
menu.button text: 'Give 👍', onClick: ->(subaction) do
|
46
|
-
subaction.windows_reload url: json_ui_garage_url(path: 'lists/chat', liked: true)
|
47
|
-
end
|
48
|
-
end
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|
53
|
-
section.footer padding: { top: 12, left: 16, right: 16, bottom: 12 }, childViews: ->(footer) do
|
54
|
-
# footer.
|
55
|
-
|
56
|
-
# json.ws({
|
57
|
-
# "socket" => {
|
58
|
-
# "endpoint" => "/socket/websocket",
|
59
|
-
# "params" => {
|
60
|
-
# vsn: '2.0.0',
|
61
|
-
# token: 'TOKEN'
|
62
|
-
# }
|
63
|
-
# },
|
64
|
-
# # "topic" => "room:30",
|
65
|
-
# # "event" => "comments_updated",
|
66
|
-
# "topic" => "links",
|
67
|
-
# "events" => ["new_link_added"],
|
68
|
-
# "header" => {
|
69
|
-
# "user_id" => 2,
|
70
|
-
# "prev_item_id" => nil,
|
71
|
-
# "last_item_id" => nil
|
72
|
-
# }
|
73
|
-
# })
|
74
|
-
|
75
|
-
# page.form url: json_ui_garage_url(path: 'forms/basic_post'), method: 'post', padding: glib_json_padding_body, paramNameForFormData: 'formData', onSubmit: ->(action) do
|
76
|
-
# json.action "ws/push"
|
77
|
-
# json.topic "links"
|
78
|
-
# json.event "new_link"
|
79
|
-
# json.payload({
|
80
|
-
# "club_id": "2",
|
81
|
-
# "room_id": "30",
|
82
|
-
# "user_id": "2"
|
83
|
-
# # title: "TITLE",
|
84
|
-
# # url: "URL"
|
85
|
-
# })
|
86
|
-
|
87
|
-
# end, childViews: ->(form) do
|
88
|
-
# form.spacer height: 14
|
89
|
-
# form.label text: "Message: #{params[:message]}"
|
90
|
-
# form.spacer height: 14
|
91
|
-
|
92
|
-
# form.fields_text name: 'message[body]', width: 'matchParent', label: 'Message'
|
93
|
-
|
94
|
-
# # TODO: Change this to radio for selecting alert vs reload response
|
95
|
-
# form.fields_password name: 'user[password]', width: 'matchParent', label: 'Password'
|
96
|
-
|
97
|
-
# form.fields_hidden name: 'baseUrl', width: 'matchParent', value: json_ui_garage_url(path: 'notifications/web_socket')
|
98
|
-
|
99
|
-
# form.panels_split width: 'matchParent', content: ->(split) do
|
100
|
-
# # split.left childViews: ->(left) do
|
101
|
-
# # if params[:mode] == 'dialog'
|
102
|
-
# # left.button styleClass: 'link', text: 'cancel', onClick: ->(action) { action.dialogs_close }
|
103
|
-
# # end
|
104
|
-
# # end
|
105
|
-
# split.right childViews: ->(right) do
|
106
|
-
# right.button text: 'Submit', onClick: ->(action) { action.forms_submit }
|
107
|
-
# end
|
108
|
-
# end
|
109
|
-
|
110
|
-
end
|
111
|
-
end
|
112
|
-
end
|