Browse Source

Initial work on module configs. Not yet rendering because ntnsndr doesn't know vue

Nathan Schneider 2 years ago
parent
commit
eec3e42902

+ 8 - 8
Gemfile.lock

@@ -4,7 +4,7 @@ GEM
     addressable (2.8.0)
     addressable (2.8.0)
       public_suffix (>= 2.0.2, < 5.0)
       public_suffix (>= 2.0.2, < 5.0)
     colorator (1.1.0)
     colorator (1.1.0)
-    concurrent-ruby (1.1.9)
+    concurrent-ruby (1.1.10)
     em-websocket (0.5.3)
     em-websocket (0.5.3)
       eventmachine (>= 0.12.9)
       eventmachine (>= 0.12.9)
       http_parser.rb (~> 0)
       http_parser.rb (~> 0)
@@ -12,7 +12,7 @@ GEM
     ffi (1.15.5)
     ffi (1.15.5)
     forwardable-extended (2.6.0)
     forwardable-extended (2.6.0)
     http_parser.rb (0.8.0)
     http_parser.rb (0.8.0)
-    i18n (1.10.0)
+    i18n (1.12.0)
       concurrent-ruby (~> 1.0)
       concurrent-ruby (~> 1.0)
     jekyll (4.1.1)
     jekyll (4.1.1)
       addressable (~> 2.4)
       addressable (~> 2.4)
@@ -37,7 +37,7 @@ GEM
       jekyll (>= 3.8, < 5.0)
       jekyll (>= 3.8, < 5.0)
     jekyll-watch (2.2.1)
     jekyll-watch (2.2.1)
       listen (~> 3.0)
       listen (~> 3.0)
-    kramdown (2.3.1)
+    kramdown (2.4.0)
       rexml
       rexml
     kramdown-parser-gfm (1.1.0)
     kramdown-parser-gfm (1.1.0)
       kramdown (~> 2.0)
       kramdown (~> 2.0)
@@ -52,21 +52,21 @@ GEM
       jekyll-seo-tag (~> 2.1)
       jekyll-seo-tag (~> 2.1)
     pathutil (0.16.2)
     pathutil (0.16.2)
       forwardable-extended (~> 2.6)
       forwardable-extended (~> 2.6)
-    public_suffix (4.0.6)
+    public_suffix (4.0.7)
     rb-fsevent (0.11.1)
     rb-fsevent (0.11.1)
     rb-inotify (0.10.1)
     rb-inotify (0.10.1)
       ffi (~> 1.0)
       ffi (~> 1.0)
     rexml (3.2.5)
     rexml (3.2.5)
-    rouge (3.28.0)
+    rouge (3.30.0)
     safe_yaml (1.0.5)
     safe_yaml (1.0.5)
     sassc (2.4.0)
     sassc (2.4.0)
       ffi (~> 1.9)
       ffi (~> 1.9)
     terminal-table (1.8.0)
     terminal-table (1.8.0)
       unicode-display_width (~> 1.1, >= 1.1.1)
       unicode-display_width (~> 1.1, >= 1.1.1)
     thread_safe (0.3.6)
     thread_safe (0.3.6)
-    tzinfo (1.2.9)
+    tzinfo (1.2.10)
       thread_safe (~> 0.1)
       thread_safe (~> 0.1)
-    tzinfo-data (1.2021.5)
+    tzinfo-data (1.2022.1)
       tzinfo (>= 1.0.0)
       tzinfo (>= 1.0.0)
     unicode-display_width (1.8.0)
     unicode-display_width (1.8.0)
     wdm (0.1.1)
     wdm (0.1.1)
@@ -85,4 +85,4 @@ DEPENDENCIES
   webrick (~> 1.7)
   webrick (~> 1.7)
 
 
 BUNDLED WITH
 BUNDLED WITH
-   2.3.9
+   2.3.19

+ 13 - 1
_includes/vue-rule-script.html

@@ -83,6 +83,18 @@
                             <span>Module Summary:</span>
                             <span>Module Summary:</span>
                             <textarea v-model="editor.module.summary"></textarea>
                             <textarea v-model="editor.module.summary"></textarea>
                         </label>
                         </label>
+
+                        <label v-if="editor.module.config != 'b'"
+                               class="label">
+                          <span>Config: {{ editor.module.config }}</span>
+                          <table>
+                            <tr v-for="(key, value) in editor.module.config">
+                              <td>{{ key }}</td>
+                              <td><input v-model="{{ value }}" /></td>
+                            </tr>
+                          </table>
+                        </label>
+                        
                         <!-- <div class="label-group">
                         <!-- <div class="label-group">
                             <label class="label">
                             <label class="label">
                                 <span>Module ID:</span>
                                 <span>Module ID:</span>
@@ -255,4 +267,4 @@
     global.rule = {{ page.rule | jsonify }};
     global.rule = {{ page.rule | jsonify }};
 
 
 </script>
 </script>
-<script src="/assets/js/vue.rules.js"></script>
+<script src="/assets/js/vue.rules.js"></script>

+ 4 - 1
_modules/approval_voting.md

@@ -2,8 +2,11 @@
 layout: module
 layout: module
 title: Approval voting
 title: Approval voting
 permalink: /modules/approval_voting/
 permalink: /modules/approval_voting/
-summary: Voters can approve or deny approval for each option.
 type: decision
 type: decision
+summary: Voters can approve or deny approval for each option.
+config:
+    Approvals: 3
+    Denials: 2
 ---
 ---
 
 
 Approval voting is a form of plurality-majority voting in which each voter either positively or negatively determines all candidates’ aptitude for the job. Rather than only voting for one candidate who would best serve in the role, voters participating in approval voting either give or deny approval for each candidate and may approve as many as they see fit. The candidate with the most approval votes wins.
 Approval voting is a form of plurality-majority voting in which each voter either positively or negatively determines all candidates’ aptitude for the job. Rather than only voting for one candidate who would best serve in the role, voters participating in approval voting either give or deny approval for each candidate and may approve as many as they see fit. The candidate with the most approval votes wins.

+ 2 - 2
_modules/initiation.md

@@ -2,6 +2,6 @@
 layout: module
 layout: module
 title: Initiation
 title: Initiation
 permalink: /modules/initiation/
 permalink: /modules/initiation/
-summary: A script for how people join the community or a certain part of it.
+summary: A procedure for how people join the community or a certain part of it.
 type: process
 type: process
----
+---

+ 2 - 2
_modules/stochastic_choice.md → _modules/random_choice.md

@@ -1,7 +1,7 @@
 ---
 ---
 layout: module
 layout: module
-title: Stochastic Choice
-permalink: /modules/stochastic_choice/
+title: Random Choice
+permalink: /modules/random_choice/
 summary: A choice among options is made at random.
 summary: A choice among options is made at random.
 type: decision
 type: decision
 ---
 ---

+ 6 - 0
assets/js/vue.rules.js

@@ -23,6 +23,7 @@ const app = Vue.createApp({
         name: "",
         name: "",
         lineage: "",
         lineage: "",
         summary: "",
         summary: "",
+        config: "", 
         creator: {
         creator: {
           name: "",
           name: "",
           url: "",
           url: "",
@@ -104,6 +105,7 @@ const app = Vue.createApp({
         name: "",
         name: "",
         icon: "",
         icon: "",
         summary: "",
         summary: "",
+        config: "",  
         type: "",
         type: "",
         modules: []
         modules: []
       },
       },
@@ -187,6 +189,7 @@ const app = Vue.createApp({
           name: module.name,
           name: module.name,
           icon: (module.icon && !module.icon.includes('http')) ? global.url + module.icon : module.icon,
           icon: (module.icon && !module.icon.includes('http')) ? global.url + module.icon : module.icon,
           summary: module.summary,
           summary: module.summary,
+          config: module.config,  
           type: module.type,
           type: module.type,
           modules: (module.modules) ? module.modules.map(cleanModules) : [],
           modules: (module.modules) ? module.modules.map(cleanModules) : [],
         }
         }
@@ -200,6 +203,7 @@ const app = Vue.createApp({
         name: this.rule.name,
         name: this.rule.name,
         lineage: this.rule.lineage,
         lineage: this.rule.lineage,
         summary: this.rule.summary,
         summary: this.rule.summary,
+        config: this.rule.config,
         creator: {
         creator: {
           name: this.rule.creator.name,
           name: this.rule.creator.name,
           url: this.rule.creator.url,
           url: this.rule.creator.url,
@@ -482,6 +486,7 @@ const app = Vue.createApp({
           name: rule.name,
           name: rule.name,
           lineage: rule.lineage,
           lineage: rule.lineage,
           summary: rule.summary,
           summary: rule.summary,
+          config: rule.config,  
           creator: {
           creator: {
             name: rule.creatorName,
             name: rule.creatorName,
             url: rule.creatorUrl,
             url: rule.creatorUrl,
@@ -651,6 +656,7 @@ const app = Vue.createApp({
         name: rule.name,
         name: rule.name,
         lineage: rule.lineage,
         lineage: rule.lineage,
         summary: rule.summary,
         summary: rule.summary,
+        config: this.jsonify(rule.config),
         modules: this.jsonify(rule.modules),
         modules: this.jsonify(rule.modules),
         creatorName: rule.creator.name,
         creatorName: rule.creator.name,
         creatorUrl: rule.creator.url,
         creatorUrl: rule.creator.url,