Bläddra i källkod

issue resolved: icon not sticking in preview

JanushiShastri 4 månader sedan
förälder
incheckning
256f1f11bd
2 ändrade filer med 4 tillägg och 3 borttagningar
  1. 3 2
      _includes/vue-rule-script.html
  2. 1 1
      assets/js/vue.rules.js

+ 3 - 2
_includes/vue-rule-script.html

@@ -31,8 +31,9 @@
                     <textarea v-model="rule.summary"></textarea>
                 </label>
             </div>
+            <!-- edit mode -->
             <div class="rule__modules" :class="{ target: holding }">
-                <label class="label" for="" v-if="rule.name"><icon :icon="rule.icon"></icon>[[rule.name]]</label>
+                <label class="label" for="" v-if="rule.name"><icon style="width: 24px; height: 24px;" :icon="rule.icon"></icon>[[rule.name]]</label>
                 <div
                     class="modules__dropzone modules__grid"
                     :data-module-id="rule.ruleID"
@@ -189,7 +190,7 @@
                 </label>
             </div>
         </div>
-        
+          <!-- <!- preview mode -->
         <div class="rule" v-show="preview" v-if="!legacy">
             <div class="controls">
                 <vue-button class="primary is-large" @click="clickPreview" :icon="icons.edit" v-if="!view">Edit</vue-button>

+ 1 - 1
assets/js/vue.rules.js

@@ -759,7 +759,7 @@ const app = Vue.createApp({
      * Handles the click event for activating the rule preview
      */
     clickPreview() {
-      if(this.template) this.rule.icon = ''; // TODO: find a less hacky way to reset template icons
+      //if(this.template) this.rule.icon = ''; // TODO: find a less hacky way to reset template icons
       this.view = false;
       this.preview = !this.preview;
     },