gdk-toogle 0.9.5 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +61 -7
- data/Rakefile +4 -1
- data/app/assets/javascript/toogle/application.js +186 -54
- data/app/assets/stylesheets/toogle/application.css +1 -3
- data/app/assets/stylesheets/toogle/components/toggle.css +37 -20
- data/app/assets/stylesheets/toogle/elements.css +87 -18
- data/app/assets/stylesheets/toogle/layout.css +47 -18
- data/app/assets/stylesheets/toogle/utilities.css +0 -4
- data/app/assets/stylesheets/toogle/variables.css +61 -7
- data/app/controllers/toogle/application_controller.rb +2 -5
- data/app/controllers/toogle/definitions_controller.rb +1 -4
- data/app/controllers/toogle/features_controller.rb +14 -4
- data/app/models/toogle/definition.rb +9 -8
- data/app/models/toogle/feature.rb +4 -4
- data/app/views/layouts/toogle/application.html.haml +16 -4
- data/app/views/toogle/features/_details_button.html.haml +7 -0
- data/app/views/toogle/features/index.html.haml +90 -63
- data/lib/toogle/version.rb +1 -1
- metadata +4 -11
- data/app/assets/stylesheets/toogle/components/card.css +0 -11
- data/app/assets/stylesheets/toogle/components/scrollbox.css +0 -26
- data/app/views/toogle/definitions/index.html.haml +0 -9
- data/app/views/toogle/features/_dialog.html.haml +0 -18
- data/app/views/toogle/features/_toggle.html.haml +0 -8
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
%ul.scrollbox
|
|
2
|
-
- @definitions.each do |definition|
|
|
3
|
-
- name = definition.name
|
|
4
|
-
- enabled = definition.default_enabled
|
|
5
|
-
%li.d-flex.center.row.nowrap(x-show="$el.textContent.includes(query) || query == ''")
|
|
6
|
-
%label.toggle(x-data="toggle('#{name}', #{enabled}, '#{features_url}')")
|
|
7
|
-
%input(type="checkbox" x-bind="input" x-model="checked"){checked: enabled}
|
|
8
|
-
%span.handle.round(:title="checked ? 'Enabled by default. Click to disable.' : 'Disabled by default. Click to enable.'")
|
|
9
|
-
%code.grow= name
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
%dialog(x-ref="dialog" x-data="{enable: #{@definition.present?}, feature: '#{@definition&.name}', isAlreadyEnabled: #{@definition && @features.select {|f| f.state == :enabled }.map(&:name).include?(@definition.name) || false}}" x-init="if(enable) $refs.dialog.showModal()")
|
|
2
|
-
.card{"x-on:click.outside": "$refs.dialog.close()"}
|
|
3
|
-
%header
|
|
4
|
-
%h2
|
|
5
|
-
%label.toggle(x-data="toggle(feature, isAlreadyEnabled, '#{features_url}')")
|
|
6
|
-
%input(type="checkbox" x-bind="input" x-model="checked")
|
|
7
|
-
%span.handle.round
|
|
8
|
-
|
|
9
|
-
%code(x-text="feature")
|
|
10
|
-
%template(x-if="isAlreadyEnabled")
|
|
11
|
-
%main
|
|
12
|
-
%p
|
|
13
|
-
This feature is already enabled.
|
|
14
|
-
Click the toggle to disable it.
|
|
15
|
-
%template(x-if="!isAlreadyEnabled")
|
|
16
|
-
%main
|
|
17
|
-
%p
|
|
18
|
-
Click the toggle to enable this feature.
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
- if feature.state == :unknown
|
|
2
|
-
%label.toggle(title="This feature does not exist on the current branch.")
|
|
3
|
-
%input(type="checkbox" disabled){name: feature.name}
|
|
4
|
-
%span.handle.round
|
|
5
|
-
- else
|
|
6
|
-
%label.toggle(x-data="toggle('#{feature.name}', #{feature.state == :enabled})")
|
|
7
|
-
%input(type="checkbox" x-bind="input" x-model="checked"){checked: feature.state == :enabled, name: feature.name}
|
|
8
|
-
%span.handle.round(:title="checked ? 'Enabled. Click to disable.' : 'Disabled. Click to enable.'")
|