CottageCabbage / vu-dooit

Task Manager application for Web, Desktop and Mobile. Still in development
https://CottageCabbage.github.io/vu-dooit
3 stars 1 forks source link

Styling issue: cut repetition with v-for #47

Open CottageCabbage opened 2 years ago

CottageCabbage commented 2 years ago

e.g. at NewTaskDialog.vue

<q-btn-dropdown
  dropdown-icon="flag"
  flat
  no-icon-animation
  :color="getIconColor()"
>
  <q-list>
    <q-item
      clickable
      v-close-popup
      @click="assignPriority(1)"
      :class="selected_priority === 1 ? 'selected-priority' : ''"
    >
      <q-btn icon="flag" dense flat color="grey-7" />
    </q-item>
    <q-item
      clickable
      v-close-popup
      @click="assignPriority(2)"
      :class="selected_priority === 2 ? 'selected-priority' : ''"
    >
      <q-btn icon="flag" dense flat color="amber-8" />
    </q-item>
    <q-item
      clickable
      v-close-popup
      @click="assignPriority(3)"
      :class="selected_priority === 3 ? 'selected-priority' : ''"
    >
      <q-btn icon="flag" dense flat color="red-5" />
    </q-item>
  </q-list>
</q-btn-dropdown>

I think it would be better if a v-for was used at q-item, but not really important rn.