Skip to content

Commit

Permalink
Merge pull request #575 from nextcloud/feature/issue571insertAbove
Browse files Browse the repository at this point in the history
Insert tool, ingredient, and instruction in between existing ones
  • Loading branch information
christianlupus authored Feb 11, 2021
2 parents 138bb4d + 391bbb9 commit 458ef8b
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 8 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
[#562](https://github.com/nextcloud/cookbook/pull/562/) @seyfeb
- Bundle Analyzer documentation
[#573](https://github.com/nextcloud/cookbook/pull/573/) @seyfeb
- Added button to allow adding empty ingredient, instruction, and tool entries above existing ones in editor
[#575](https://github.com/nextcloud/cookbook/pull/575/) @seyfeb

### Changed
- Using computed property in recipe view
Expand Down
9 changes: 5 additions & 4 deletions src/components/EditInputGroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@
<input v-if="fieldType==='text'" type="text" ref="list-field" v-model="buffer[idx]" @keyup="keyPressed" v-on:input="handleInput" @paste="handlePaste" />
<textarea v-else-if="fieldType==='textarea'" ref="list-field" v-model="buffer[idx]" @keyup="keyPressed" v-on:input="handleInput" @paste="handlePaste"></textarea>
<div class="controls">
<button class="icon-arrow-up" @click="moveEntryUp(idx)"></button>
<button class="icon-arrow-down" @click="moveEntryDown(idx)"></button>
<button class="icon-delete" @click="deleteEntry(idx)"></button>
<button class="icon-arrow-up" @click="moveEntryUp(idx)" :title="t('cookbook', 'Move entry up')"></button>
<button class="icon-arrow-down" @click="moveEntryDown(idx)" :title="t('cookbook', 'Move entry down')"></button>
<button class="icon-add" @click="addNewEntry(idx)" :title="t('cookbook', 'Insert entry above')"></button>
<button class="icon-delete" @click="deleteEntry(idx)" :title="t('cookbook', 'Delete entry')"></button>
</div>
</li>
</ul>
<button class="button add-list-item" @click="addNewEntry ()"><span class="icon-add"></span> {{ t('cookbook', 'Add') }}</button>
<button class="button add-list-item" @click="addNewEntry()"><span class="icon-add"></span> {{ t('cookbook', 'Add') }}</button>
</fieldset>
</template>

Expand Down
22 changes: 18 additions & 4 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,16 @@ module.exports = {
rules: [
{
test: /\.css$/,
use: ['vue-style-loader', 'css-loader'],
use: [{ loader: 'vue-style-loader' },
{
loader: 'css-loader',
options: {
esModule: false
}
},
// [sass-loader](/loaders/sass-loader)
{ loader: 'sass-loader' }
]
},
{
test: /\.html$/,
Expand Down Expand Up @@ -61,9 +70,14 @@ module.exports = {
{
test: /\.scss$/,
use: [
'vue-style-loader',
'css-loader',
'sass-loader'
{ loader: 'vue-style-loader' },
{
loader: 'css-loader',
options: {
esModule: false
}
},
{ loader: 'sass-loader' }
]
}
],
Expand Down

0 comments on commit 458ef8b

Please sign in to comment.