applin-rails 0.2.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/applin/rails/version.rb +1 -1
- data/lib/applin/rails.rb +5 -43
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f11a102a56166f3f421fb2c6d0786d5a90da55daa6c615485ae06acecf02b2ed
|
4
|
+
data.tar.gz: c1298b70fae23013717056445f5a101c159ab649b994118badf08c473d993e66
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2baf2bc186d74f6da057c733f5bede7eeaf04ea1132961bdf3e6a199892a643a265b72b9415ae0b744af4a53cd8c2eed032f9ae6439e6796303c474ddd11c0d2
|
7
|
+
data.tar.gz: 6b664c8f4d86b48a5c5cee0b57aac4803e8451d4fc55a3b53cfb44890c0930d62f94e5f655de589877c9d76a9b4a3c292f6a3ef960657f382dedf5344d7e8057
|
data/lib/applin/rails/version.rb
CHANGED
data/lib/applin/rails.rb
CHANGED
@@ -59,6 +59,7 @@ module Applin
|
|
59
59
|
{ typ: :empty }
|
60
60
|
end
|
61
61
|
|
62
|
+
# The client replaces `${INTERACTIVE_ERROR_DETAILS}` with the text of the last error.
|
62
63
|
def error_text(text)
|
63
64
|
{ typ: :error_text, text: text }
|
64
65
|
end
|
@@ -89,25 +90,6 @@ module Applin
|
|
89
90
|
{ typ: :last_error_text }
|
90
91
|
end
|
91
92
|
|
92
|
-
def modal_button(text:, actions:, is_cancel: nil, is_default: nil, is_destructive: nil)
|
93
|
-
{
|
94
|
-
typ: :modal_button,
|
95
|
-
is_cancel: is_cancel,
|
96
|
-
is_default: is_default,
|
97
|
-
is_destructive: is_destructive,
|
98
|
-
text: text,
|
99
|
-
actions: actions,
|
100
|
-
}.reject { |_k, v| v.nil? }
|
101
|
-
end
|
102
|
-
|
103
|
-
def ok_modal_button(is_default: true)
|
104
|
-
modal_button(text: "OK", is_default: is_default, actions: [pop])
|
105
|
-
end
|
106
|
-
|
107
|
-
def cancel_modal_button(is_default: false)
|
108
|
-
modal_button(text: "Cancel", is_default: is_default, actions: [pop])
|
109
|
-
end
|
110
|
-
|
111
93
|
def nav_button(text:, actions:, badge_text: nil, photo_url: nil, sub_text: nil)
|
112
94
|
{
|
113
95
|
typ: :nav_button,
|
@@ -153,33 +135,12 @@ module Applin
|
|
153
135
|
}.reject { |_k, v| v.nil? }
|
154
136
|
end
|
155
137
|
|
156
|
-
def
|
157
|
-
{
|
158
|
-
typ: :alert_modal,
|
159
|
-
stream: stream,
|
160
|
-
poll_seconds: poll_seconds,
|
161
|
-
text: text,
|
162
|
-
title: title,
|
163
|
-
widgets: modal_buttons
|
164
|
-
}.reject { |_k, v| v.nil? }
|
165
|
-
end
|
166
|
-
|
167
|
-
def drawer_modal(title:, modal_buttons:, stream: nil, poll_seconds: nil, text: nil)
|
168
|
-
{
|
169
|
-
typ: :drawer_modal,
|
170
|
-
stream: stream,
|
171
|
-
poll_seconds: poll_seconds,
|
172
|
-
text: text,
|
173
|
-
title: title,
|
174
|
-
widgets: modal_buttons
|
175
|
-
}.reject { |_k, v| v.nil? }
|
176
|
-
end
|
177
|
-
|
178
|
-
def nav_page(title:, start: nil, end_: nil, stream: nil, poll_seconds: nil, &widget_block)
|
138
|
+
def nav_page(title:, start: nil, end_: nil, ephemeral: nil, stream: nil, poll_seconds: nil, &widget_block)
|
179
139
|
{
|
180
140
|
typ: :nav_page,
|
181
141
|
start: start,
|
182
142
|
end: end_,
|
143
|
+
ephemeral: ephemeral,
|
183
144
|
title: title,
|
184
145
|
stream: stream,
|
185
146
|
poll_seconds: poll_seconds,
|
@@ -187,10 +148,11 @@ module Applin
|
|
187
148
|
}.reject { |_k, v| v.nil? }
|
188
149
|
end
|
189
150
|
|
190
|
-
def plain_page(title: nil, stream: nil, poll_seconds: nil, &widget_block)
|
151
|
+
def plain_page(title: nil, ephemeral: nil, stream: nil, poll_seconds: nil, &widget_block)
|
191
152
|
{
|
192
153
|
typ: :plain_page,
|
193
154
|
title: title,
|
155
|
+
ephemeral: ephemeral,
|
194
156
|
stream: stream,
|
195
157
|
poll_seconds: poll_seconds,
|
196
158
|
widget: widget_block.yield
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: applin-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Leonhard
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-09-
|
11
|
+
date: 2023-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Create mobile apps using only backend code. Applin™ is a Server-Driven
|
14
14
|
UI (SDUI) system.
|