Fix eslint and disable invalid unused import

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
John Molakvoæ (skjnldsv) 2020-03-31 16:04:54 +02:00
parent 7e7e1c76c4
commit 598d86bb11
No known key found for this signature in database
GPG Key ID: 60C25B8C072916CF
6 changed files with 136 additions and 136 deletions

View File

@ -67,24 +67,24 @@
</div>
</template>
<script>
import Vue from 'vue'
import Actions from '@nextcloud/vue/dist/Components/Actions'
import ActionButton from '@nextcloud/vue/dist/Components/ActionButton'
import { generateUrl } from '@nextcloud/router'
import { actions, mutations } from '../store/'
import TagLine from './TagLine'
import Vue from 'vue'
import Actions from '@nextcloud/vue/dist/Components/Actions'
import ActionButton from '@nextcloud/vue/dist/Components/ActionButton'
import { generateUrl } from '@nextcloud/router'
import { actions, mutations } from '../store/'
import TagLine from './TagLine'
export default {
name: 'Bookmark',
components: {
Actions,
ActionButton,
TagLine,
},
props: {
bookmark: {
type: Object,
required: true,
export default {
name: 'Bookmark',
components: {
Actions,
ActionButton,
TagLine,
},
props: {
bookmark: {
type: Object,
required: true,
},
},
data() {

View File

@ -66,22 +66,22 @@
</div>
</template>
<script>
import Multiselect from '@nextcloud/vue/dist/Components/Multiselect'
import Actions from '@nextcloud/vue/dist/Components/Actions'
import ActionButton from '@nextcloud/vue/dist/Components/ActionButton'
import { actions, mutations } from '../store/'
import Multiselect from '@nextcloud/vue/dist/Components/Multiselect'
import Actions from '@nextcloud/vue/dist/Components/Actions'
import ActionButton from '@nextcloud/vue/dist/Components/ActionButton'
import { actions, mutations } from '../store/'
export default {
name: 'Breadcrumbs',
components: { Multiselect, Actions, ActionButton },
props: {},
data() {
return {
url: '',
}
},
computed: {
allTags() {
export default {
name: 'Breadcrumbs',
components: { Multiselect, Actions, ActionButton },
props: {},
data() {
return {
url: '',
}
},
computed: {
allTags() {
return this.$store.state.tags.map(tag => tag.name)
},
tags() {

View File

@ -7,27 +7,27 @@
@click="onNewBookmark" />
<ul>
<AppNavigationItem key="menu-home"
:to="{ name: 'home' }"
icon="icon-home"
:title="t('bookmarks', 'All Bookmarks')"/>
:to="{ name: 'home' }"
icon="icon-home"
:title="t('bookmarks', 'All Bookmarks')" />
<AppNavigationItem key="menu-recent"
:to="{ name: 'recent' }"
icon="icon-category-monitoring"
:title="t('bookmarks', 'Recent Bookmarks')"/>
:to="{ name: 'recent' }"
icon="icon-category-monitoring"
:title="t('bookmarks', 'Recent Bookmarks')" />
<AppNavigationItem key="menu-untagged"
:to="{ name: 'untagged' }"
icon="icon-category-disabled"
:title="t('bookmarks', 'Untagged')"/>
<AppNavigationSpacer/>
:to="{ name: 'untagged' }"
icon="icon-category-disabled"
:title="t('bookmarks', 'Untagged')" />
<AppNavigationSpacer />
<AppNavigationItem v-for="tag in tags"
:key="'tag-'+tag.name"
icon="icon-tag"
:to="tag.route"
:force-menu="true"
:edit-label="t('bookmarks', 'Rename')"
:editable="true"
:title="tag.name"
@update:title="onRenameTag(tag.name, $event)">
:key="'tag-'+tag.name"
icon="icon-tag"
:to="tag.route"
:force-menu="true"
:edit-label="t('bookmarks', 'Rename')"
:editable="true"
:title="tag.name"
@update:title="onRenameTag(tag.name, $event)">
<AppNavigationCounter slot="counter">
{{ tag.count }}
</AppNavigationCounter>
@ -39,63 +39,63 @@
</AppNavigationItem>
</ul>
<AppNavigationSettings>
<Settings/>
<Settings />
</AppNavigationSettings>
</AppNavigation>
</template>
<script>
import AppNavigation from '@nextcloud/vue/dist/Components/AppNavigation'
import AppNavigationNew from '@nextcloud/vue/dist/Components/AppNavigationNew'
import AppNavigationItem from '@nextcloud/vue/dist/Components/AppNavigationItem'
import AppNavigationCounter from '@nextcloud/vue/dist/Components/AppNavigationCounter'
import AppNavigationSettings from '@nextcloud/vue/dist/Components/AppNavigationSettings'
import AppNavigationSpacer from '@nextcloud/vue/dist/Components/AppNavigationSpacer'
import ActionButton from '@nextcloud/vue/dist/Components/ActionButton'
import Settings from './Settings'
import { actions, mutations } from '../store/'
import AppNavigation from '@nextcloud/vue/dist/Components/AppNavigation'
import AppNavigationNew from '@nextcloud/vue/dist/Components/AppNavigationNew'
import AppNavigationItem from '@nextcloud/vue/dist/Components/AppNavigationItem'
import AppNavigationCounter from '@nextcloud/vue/dist/Components/AppNavigationCounter'
import AppNavigationSettings from '@nextcloud/vue/dist/Components/AppNavigationSettings'
import AppNavigationSpacer from '@nextcloud/vue/dist/Components/AppNavigationSpacer'
import ActionButton from '@nextcloud/vue/dist/Components/ActionButton'
import Settings from './Settings'
import { actions, mutations } from '../store/'
export default {
name: 'Navigation',
components: {
AppNavigation,
AppNavigationNew,
AppNavigationItem,
AppNavigationCounter,
AppNavigationSettings,
AppNavigationSpacer,
ActionButton,
Settings,
},
export default {
name: 'Navigation',
components: {
AppNavigation,
AppNavigationNew,
AppNavigationItem,
AppNavigationCounter,
AppNavigationSettings,
AppNavigationSpacer,
ActionButton,
Settings,
},
data() {
return {}
},
computed: {
tags() {
return this.$store.state.tags.map(tag => ({
route: { name: 'tags', params: { tags: tag.name } },
name: tag.name,
count: tag.count,
}))
},
computed: {
tags() {
return this.$store.state.tags.map(tag => ({
route: { name: 'tags', params: { tags: tag.name } },
name: tag.name,
count: tag.count,
}))
},
},
created() {
},
created() {
},
methods: {
onNewBookmark() {
this.$store.commit(
mutations.DISPLAY_NEW_BOOKMARK,
!this.$store.state.displayNewBookmark
)
},
onDeleteTag(tag) {
this.$store.dispatch(actions.DELETE_TAG, tag)
},
onRenameTag(oldName, newName) {
this.$store.dispatch(actions.RENAME_TAG, { oldName, newName })
},
methods: {
onNewBookmark() {
this.$store.commit(
mutations.DISPLAY_NEW_BOOKMARK,
!this.$store.state.displayNewBookmark
)
},
onDeleteTag(tag) {
this.$store.dispatch(actions.DELETE_TAG, tag)
},
onRenameTag(oldName, newName) {
this.$store.dispatch(actions.RENAME_TAG, { oldName, newName })
},
},
}
</script>

View File

@ -82,21 +82,21 @@
</div>
</template>
<script>
import { generateUrl } from '@nextcloud/router'
import { actions } from '../store/'
import { getRequestToken } from '@nextcloud/auth'
import { generateUrl } from '@nextcloud/router'
import { actions } from '../store/'
import { getRequestToken } from '@nextcloud/auth'
export default {
name: 'Settings',
components: {},
computed: {
oc_defaults() {
return window.oc_defaults
},
bookmarklet() {
const bookmarkletUrl
export default {
name: 'Settings',
components: {},
computed: {
oc_defaults() {
return window.oc_defaults
},
bookmarklet() {
const bookmarkletUrl
= window.location.origin + generateUrl('/apps/bookmarks/bookmarklet')
return `javascript:(function(){var a=window,b=document,c=encodeURIComponent,e=c(document.title),d=a.open('${bookmarkletUrl}?url='+c(b.location)+'&title='+e,'bkmk_popup','left='+((a.screenX||a.screenLeft)+10)+',top='+((a.screenY||a.screenTop)+10)+',height=500px,width=550px,resizable=1,alwaysRaised=1');a.setTimeout(function(){d.focus()},300);})();`
return `javascript:(function(){var a=window,b=document,c=encodeURIComponent,e=c(document.title),d=a.open('${bookmarkletUrl}?url='+c(b.location)+'&title='+e,'bkmk_popup','left='+((a.screenX||a.screenLeft)+10)+',top='+((a.screenY||a.screenTop)+10)+',height=500px,width=550px,resizable=1,alwaysRaised=1');a.setTimeout(function(){d.focus()},300);})();`
},
rssURL() {
return (

View File

@ -39,14 +39,14 @@
</AppSidebar>
</template>
<script>
import AppSidebar from '@nextcloud/vue/dist/Components/AppSidebar'
import AppSidebarTab from '@nextcloud/vue/dist/Components/AppSidebarTab'
import Multiselect from '@nextcloud/vue/dist/Components/Multiselect'
import { generateUrl } from '@nextcloud/router'
import humanizeDuration from 'humanize-duration'
import { actions, mutations } from '../store/'
import AppSidebar from '@nextcloud/vue/dist/Components/AppSidebar'
import AppSidebarTab from '@nextcloud/vue/dist/Components/AppSidebarTab'
import Multiselect from '@nextcloud/vue/dist/Components/Multiselect'
import { generateUrl } from '@nextcloud/router'
import humanizeDuration from 'humanize-duration'
import { actions, mutations } from '../store/'
const MAX_RELATIVE_DATE = 1000 * 60 * 60 * 24 * 7 // one week
const MAX_RELATIVE_DATE = 1000 * 60 * 60 * 24 * 7 // one week
export default {
name: 'SidebarBookmark',

View File

@ -6,33 +6,33 @@
<BookmarksList :loading="!!loading.bookmarks" :bookmarks="bookmarks" />
</AppContent>
<SidebarBookmark />
<SidebarFolder />
<!-- <SidebarFolder /> -->
<MoveDialog />
</Content>
</template>
<script>
import Content from '@nextcloud/vue/dist/Components/Content'
import AppContent from '@nextcloud/vue/dist/Components/AppContent'
import Navigation from './Navigation'
import BookmarksList from './BookmarksList'
import Breadcrumbs from './Breadcrumbs'
import SidebarBookmark from './SidebarBookmark'
import SidebarFolder from './SidebarFolder'
import MoveDialog from './MoveDialog'
import { actions, mutations } from '../store/'
import Content from '@nextcloud/vue/dist/Components/Content'
import AppContent from '@nextcloud/vue/dist/Components/AppContent'
import Navigation from './Navigation'
import BookmarksList from './BookmarksList'
import Breadcrumbs from './Breadcrumbs'
import SidebarBookmark from './SidebarBookmark'
// import SidebarFolder from './SidebarFolder'
import MoveDialog from './MoveDialog'
import { actions, mutations } from '../store/'
export default {
name: 'ViewPrivate',
components: {
Navigation,
Content,
AppContent,
Breadcrumbs,
BookmarksList,
SidebarBookmark,
SidebarFolder,
MoveDialog,
export default {
name: 'ViewPrivate',
components: {
Navigation,
Content,
AppContent,
Breadcrumbs,
BookmarksList,
SidebarBookmark,
// SidebarFolder,
MoveDialog,
},
data: function() {
return {