mirror of
https://framagit.org/les/gancio.git
synced 2025-02-01 00:52:01 +01:00
import only needed lodash methods
This commit is contained in:
parent
ccb47742fb
commit
e0865ae7d7
3 changed files with 6 additions and 5 deletions
|
@ -1,4 +1,5 @@
|
||||||
import { take, get } from 'lodash'
|
import take from 'lodash/take'
|
||||||
|
import get from 'lodash/get'
|
||||||
|
|
||||||
export function attributesFromEvents (_events, _tags) {
|
export function attributesFromEvents (_events, _tags) {
|
||||||
const colors = ['blue', 'orange', 'yellow', 'teal', 'indigo', 'green', 'red', 'purple', 'pink', 'gray']
|
const colors = ['blue', 'orange', 'yellow', 'teal', 'indigo', 'green', 'red', 'purple', 'pink', 'gray']
|
||||||
|
|
|
@ -64,7 +64,7 @@
|
||||||
editor-content.content(:editor='editor' spellcheck='false' :style="{ 'max-height': maxHeight }")
|
editor-content.content(:editor='editor' spellcheck='false' :style="{ 'max-height': maxHeight }")
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import _ from 'lodash'
|
import debounce from 'lodash/debounce'
|
||||||
import { Editor, EditorContent, EditorMenuBar, EditorMenuBubble } from 'tiptap'
|
import { Editor, EditorContent, EditorMenuBar, EditorMenuBubble } from 'tiptap'
|
||||||
import {
|
import {
|
||||||
Blockquote,
|
Blockquote,
|
||||||
|
@ -118,7 +118,7 @@ export default {
|
||||||
this.editor = new Editor({
|
this.editor = new Editor({
|
||||||
onFocus: () => this.focus(),
|
onFocus: () => this.focus(),
|
||||||
onBlur: () => this.blur(),
|
onBlur: () => this.blur(),
|
||||||
onUpdate: _.debounce(({ getHTML }) => {
|
onUpdate: debounce(({ getHTML }) => {
|
||||||
this.update = true
|
this.update = true
|
||||||
this.$emit('input', getHTML())
|
this.$emit('input', getHTML())
|
||||||
}, 1000),
|
}, 1000),
|
||||||
|
|
|
@ -3,7 +3,7 @@ const path = require('path')
|
||||||
const config = require('config')
|
const config = require('config')
|
||||||
const fs = require('fs')
|
const fs = require('fs')
|
||||||
const { Op } = require('sequelize')
|
const { Op } = require('sequelize')
|
||||||
const _ = require('lodash')
|
const intersection = require('lodash/intersection')
|
||||||
const linkifyHtml = require('linkifyjs/html')
|
const linkifyHtml = require('linkifyjs/html')
|
||||||
const Sequelize = require('sequelize')
|
const Sequelize = require('sequelize')
|
||||||
const dayjs = require('dayjs')
|
const dayjs = require('dayjs')
|
||||||
|
@ -63,7 +63,7 @@ const eventController = {
|
||||||
if (!filters.tags && !filters.places) { return true }
|
if (!filters.tags && !filters.places) { return true }
|
||||||
if (!filters.tags.length && !filters.places.length) { return true }
|
if (!filters.tags.length && !filters.places.length) { return true }
|
||||||
if (filters.tags.length) {
|
if (filters.tags.length) {
|
||||||
const m = _.intersection(event.tags.map(t => t.tag), filters.tags)
|
const m = intersection(event.tags.map(t => t.tag), filters.tags)
|
||||||
if (m.length > 0) { return true }
|
if (m.length > 0) { return true }
|
||||||
}
|
}
|
||||||
if (filters.places.length) {
|
if (filters.places.length) {
|
||||||
|
|
Loading…
Reference in a new issue