Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/bookmarks.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Klehr <mklehr@gmx.net>2019-12-11 00:33:54 +0300
committerMarcel Klehr <mklehr@gmx.net>2019-12-11 00:33:54 +0300
commit3c750997441226699020883d87f8b3bee502dbcd (patch)
tree7ea2d8ff43c684ed39c4ac87ca9c8f11086c1d52
parent198ab088ec4b1efb49b90d325d8f28cc76e10ac6 (diff)
v2.3.2v2.3.2
-rw-r--r--CHANGELOG.md8
-rw-r--r--Makefile4
-rw-r--r--appinfo/info.xml2
-rw-r--r--package-lock.json2
-rw-r--r--package.json2
-rw-r--r--src/App.vue6
-rw-r--r--src/admin.js2
-rw-r--r--src/components/Bookmark.vue16
-rw-r--r--src/components/BookmarksList.vue12
-rw-r--r--src/components/Breadcrumbs.vue10
-rw-r--r--src/components/CreateBookmark.vue10
-rw-r--r--src/components/CreateFolder.vue10
-rw-r--r--src/components/Folder.vue12
-rw-r--r--src/components/MoveDialog.vue10
-rw-r--r--src/components/Navigation.vue30
-rw-r--r--src/components/Settings.vue10
-rw-r--r--src/components/SidebarBookmark.vue12
-rw-r--r--src/components/TagLine.vue8
-rw-r--r--src/components/TreeFolder.vue8
-rw-r--r--src/components/ViewAdmin.vue14
-rw-r--r--src/components/ViewBookmarklet.vue18
-rw-r--r--src/components/ViewPrivate.vue14
-rw-r--r--src/main.js2
-rw-r--r--src/mixins/AppGlobal.js6
-rw-r--r--src/router.js18
-rw-r--r--src/store/actions.js58
-rw-r--r--src/store/index.js20
-rw-r--r--src/store/mutations.js4
28 files changed, 168 insertions, 160 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 603d8d20..8730ec55 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,11 @@
+## v2.3.2
+
+- FIX webpack build
+- FIX: Create bookmarks in the current folder
+- FIX: Make folder icons clickable
+- FIX translations
+- NEW: translations
+
## v2.3.1
- FIX: Load tags on app init
diff --git a/Makefile b/Makefile
index a5f9aff3..82d6c91c 100644
--- a/Makefile
+++ b/Makefile
@@ -7,9 +7,9 @@ source_dir=$(build_dir)/source
sign_dir=$(build_dir)/sign
package_name=$(app_name)
cert_dir=$(HOME)/.nextcloud/certificates
-version+=2.3.1
+version+=2.3.2
-all: dev-setup lint build-js-production test test-php
+all: dev-setup build-js-production test test-php
release: appstore create-tag
diff --git a/appinfo/info.xml b/appinfo/info.xml
index f7561273..7f6ad64d 100644
--- a/appinfo/info.xml
+++ b/appinfo/info.xml
@@ -9,7 +9,7 @@ This app provides you with a web interface for collecting and organizing bookmar
Check out the third-party clients listed here: https://github.com/nextcloud/bookmarks#third-party-clients
]]></description>
- <version>2.3.1</version>
+ <version>2.3.2</version>
<licence>agpl</licence>
<author mail="blizzz@arthur-schiwon.de" homepage="https://www.arthur-schiwon.de">Arthur Schiwon</author>
<author mail="mklehr@gmx.net">Marcel Klehr</author>
diff --git a/package-lock.json b/package-lock.json
index 1c7f1a50..ef7ed5ca 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "bookmarks",
- "version": "2.3.1",
+ "version": "2.3.2",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
diff --git a/package.json b/package.json
index fe8935a7..8deed437 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "bookmarks",
- "version": "2.3.1",
+ "version": "2.3.2",
"main": "js/index.js",
"scripts": {
"dev": "webpack --config webpack.dev.js",
diff --git a/src/App.vue b/src/App.vue
index 84409ba9..78211b96 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -9,14 +9,14 @@ export default {
computed: {
error() {
return this.$store.state.error
- }
+ },
},
watch: {
error(error) {
if (!error) return
OC.Notification.showTemporary(error)
this.$store.commit(mutations.SET_ERROR, null)
- }
- }
+ },
+ },
}
</script>
diff --git a/src/admin.js b/src/admin.js
index 422ba76a..95ebe530 100644
--- a/src/admin.js
+++ b/src/admin.js
@@ -31,7 +31,7 @@ Vue.directive('tooltip', Tooltip)
const BookmarksApp = (global['Bookmarks'] = new Vue({
el: '#bookmarks',
store,
- render: h => h(App)
+ render: h => h(App),
}))
export default BookmarksApp
diff --git a/src/components/Bookmark.vue b/src/components/Bookmark.vue
index 63c32acb..39edf2d2 100644
--- a/src/components/Bookmark.vue
+++ b/src/components/Bookmark.vue
@@ -79,13 +79,13 @@ export default {
components: {
Actions,
ActionButton,
- TagLine
+ TagLine,
},
props: {
bookmark: {
type: Object,
- required: true
- }
+ required: true,
+ },
},
data() {
return { title: this.bookmark.title, renaming: false, selected: false }
@@ -112,7 +112,7 @@ export default {
},
viewMode() {
return this.$store.state.viewMode
- }
+ },
},
watch: {
selected(val, oldVal) {
@@ -121,14 +121,14 @@ export default {
} else {
this.$store.commit(mutations.REMOVE_SELECTION_BOOKMARK, this.bookmark)
}
- }
+ },
},
created() {},
methods: {
onDelete() {
this.$store.dispatch(actions.DELETE_BOOKMARK, {
id: this.bookmark.id,
- folder: this.$store.state.fetchState.query.folder
+ folder: this.$store.state.fetchState.query.folder,
})
},
onDetails() {
@@ -151,8 +151,8 @@ export default {
},
clickSelect() {
this.selected = !this.selected
- }
- }
+ },
+ },
}
</script>
<style>
diff --git a/src/components/BookmarksList.vue b/src/components/BookmarksList.vue
index a005eb1a..065d73e9 100644
--- a/src/components/BookmarksList.vue
+++ b/src/components/BookmarksList.vue
@@ -42,17 +42,17 @@ export default {
Bookmark,
Folder,
CreateBookmark,
- CreateFolder
+ CreateFolder,
},
props: {
bookmarks: {
type: Array,
- required: true
+ required: true,
},
loading: {
type: Boolean,
- required: true
- }
+ required: true,
+ },
},
computed: {
folderChildren() {
@@ -73,8 +73,8 @@ export default {
},
viewMode() {
return this.$store.state.viewMode
- }
- }
+ },
+ },
}
</script>
<style>
diff --git a/src/components/Breadcrumbs.vue b/src/components/Breadcrumbs.vue
index 11884a33..f68c9ca9 100644
--- a/src/components/Breadcrumbs.vue
+++ b/src/components/Breadcrumbs.vue
@@ -77,7 +77,7 @@ export default {
props: {},
data() {
return {
- url: ''
+ url: '',
}
},
computed: {
@@ -99,7 +99,7 @@ export default {
},
selection() {
return this.$store.state.selection.bookmarks
- }
+ },
},
created() {},
methods: {
@@ -124,7 +124,7 @@ export default {
onToggleViewMode() {
this.$store.dispatch(actions.SET_SETTING, {
key: 'viewMode',
- value: this.$store.state.viewMode === 'grid' ? 'list' : 'grid'
+ value: this.$store.state.viewMode === 'grid' ? 'list' : 'grid',
})
},
@@ -134,8 +134,8 @@ export default {
},
onBulkMove() {
this.$store.commit(mutations.DISPLAY_MOVE_DIALOG, true)
- }
- }
+ },
+ },
}
</script>
<style>
diff --git a/src/components/CreateBookmark.vue b/src/components/CreateBookmark.vue
index 048ddbe2..25f39521 100644
--- a/src/components/CreateBookmark.vue
+++ b/src/components/CreateBookmark.vue
@@ -28,13 +28,13 @@ export default {
components: { Actions, ActionButton },
data() {
return {
- url: ''
+ url: '',
}
},
computed: {
creating() {
return this.$store.state.loading.createBookmark
- }
+ },
},
mounted() {
this.$refs['input'].focus()
@@ -43,10 +43,10 @@ export default {
submit() {
this.$store.dispatch(actions.CREATE_BOOKMARK, {
url: this.url,
- ...(this.$route.name === 'folder' && { folders: [this.$route.params.folder] })
+ ...(this.$route.name === 'folder' && { folders: [this.$route.params.folder] }),
})
- }
- }
+ },
+ },
}
</script>
<style>
diff --git a/src/components/CreateFolder.vue b/src/components/CreateFolder.vue
index 7f9b9393..ff513952 100644
--- a/src/components/CreateFolder.vue
+++ b/src/components/CreateFolder.vue
@@ -29,13 +29,13 @@ export default {
components: { Actions, ActionButton },
data() {
return {
- title: ''
+ title: '',
}
},
computed: {
loading() {
return this.$store.state.loading.createFolder
- }
+ },
},
mounted() {
this.$refs['input'].focus()
@@ -45,10 +45,10 @@ export default {
const parentFolder = this.$route.params.folder
this.$store.dispatch(actions.CREATE_FOLDER, {
parentFolder,
- title: this.title
+ title: this.title,
})
- }
- }
+ },
+ },
}
</script>
<style>
diff --git a/src/components/Folder.vue b/src/components/Folder.vue
index ed891179..76f55f4a 100644
--- a/src/components/Folder.vue
+++ b/src/components/Folder.vue
@@ -46,13 +46,13 @@ export default {
name: 'Folder',
components: {
Actions,
- ActionButton
+ ActionButton,
},
props: {
folder: {
type: Object,
- required: true
- }
+ required: true,
+ },
},
data() {
return { renaming: false, title: this.folder.title }
@@ -60,7 +60,7 @@ export default {
computed: {
viewMode() {
return this.$store.state.viewMode
- }
+ },
},
created() {},
methods: {
@@ -84,8 +84,8 @@ export default {
this.folder.title = this.title
this.$store.dispatch(actions.SAVE_FOLDER, this.folder.id)
this.renaming = false
- }
- }
+ },
+ },
}
</script>
<style>
diff --git a/src/components/MoveDialog.vue b/src/components/MoveDialog.vue
index 0306c434..d995e661 100644
--- a/src/components/MoveDialog.vue
+++ b/src/components/MoveDialog.vue
@@ -21,7 +21,7 @@ export default {
name: 'MoveDialog',
components: {
Modal,
- TreeFolder
+ TreeFolder,
},
computed: {
showModal() {
@@ -55,7 +55,7 @@ export default {
this.selection.bookmarks.length
)
}
- }
+ },
},
created() {},
methods: {
@@ -76,10 +76,10 @@ export default {
)
.map(child => ({
...child,
- children: this.filterFolders(child.children)
+ children: this.filterFolders(child.children),
}))
- }
- }
+ },
+ },
}
</script>
<style>
diff --git a/src/components/Navigation.vue b/src/components/Navigation.vue
index 25100736..bf13191b 100644
--- a/src/components/Navigation.vue
+++ b/src/components/Navigation.vue
@@ -27,11 +27,11 @@ export default {
AppNavigationNew,
AppNavigationItem,
AppNavigationSettings,
- Settings
+ Settings,
},
data() {
return {
- editingTag: false
+ editingTag: false,
}
},
computed: {
@@ -43,7 +43,7 @@ export default {
text: tag.name,
edit: {
action: e => this.onRenameTag(tag.name, e.target.elements[0].value),
- reset: () => this.setEditingTag(tag.name, false)
+ reset: () => this.setEditingTag(tag.name, false),
},
utils: {
counter: tag.count,
@@ -51,15 +51,15 @@ export default {
{
icon: 'icon-rename',
text: 'Rename',
- action: () => this.setEditingTag(tag.name, true)
+ action: () => this.setEditingTag(tag.name, true),
},
{
icon: 'icon-delete',
text: 'Delete',
- action: () => this.onDeleteTag(tag.name)
- }
- ]
- }
+ action: () => this.onDeleteTag(tag.name),
+ },
+ ],
+ },
}))
},
@@ -68,21 +68,21 @@ export default {
{
router: { name: 'home' },
icon: 'icon-home',
- text: this.t('bookmarks', 'All Bookmarks')
+ text: this.t('bookmarks', 'All Bookmarks'),
},
{
router: { name: 'recent' },
icon: 'icon-category-monitoring',
- text: this.t('bookmarks', 'Recent Bookmarks')
+ text: this.t('bookmarks', 'Recent Bookmarks'),
},
{
router: { name: 'untagged' },
icon: 'icon-category-disabled',
- text: this.t('bookmarks', 'Untagged')
+ text: this.t('bookmarks', 'Untagged'),
},
- ...this.tagMenu
+ ...this.tagMenu,
]
- }
+ },
},
created() {},
@@ -109,7 +109,7 @@ export default {
} else {
this.editingTag = false
}
- }
- }
+ },
+ },
}
</script>
diff --git a/src/components/Settings.vue b/src/components/Settings.vue
index e610a819..455a9cc9 100644
--- a/src/components/Settings.vue
+++ b/src/components/Settings.vue
@@ -104,7 +104,7 @@ export default {
+ new URLSearchParams(
Object.assign({}, this.$store.state.fetchState.query, {
format: 'rss',
- page: -1
+ page: -1,
})
).toString()
)
@@ -115,7 +115,7 @@ export default {
},
sorting() {
return this.$store.state.settings.sorting
- }
+ },
},
methods: {
onImportOpen(e) {
@@ -132,7 +132,7 @@ export default {
async onChangeSorting(e) {
await this.$store.dispatch(actions.SET_SETTING, {
key: 'sorting',
- value: e.target.value
+ value: e.target.value,
})
await this.$store.dispatch(actions.FETCH_PAGE)
},
@@ -152,8 +152,8 @@ export default {
}
await this.$store.dispatch(actions.DELETE_BOOKMARKS)
this.$router.push({ name: 'home' })
- }
- }
+ },
+ },
}
</script>
<style>
diff --git a/src/components/SidebarBookmark.vue b/src/components/SidebarBookmark.vue
index 57b98227..de1bcc52 100644
--- a/src/components/SidebarBookmark.vue
+++ b/src/components/SidebarBookmark.vue
@@ -53,7 +53,7 @@ export default {
components: { AppSidebar, AppSidebarTab, Multiselect },
data() {
return {
- description: ''
+ description: '',
}
},
computed: {
@@ -75,7 +75,7 @@ export default {
const duration = humanizeDuration(age, {
language: OC.getLanguage().split('-')[0],
units: ['d', 'h', 'm', 's'],
- largest: 1
+ largest: 1,
})
return this.t('bookmarks', '{time} ago', { time: duration })
} else {
@@ -87,12 +87,12 @@ export default {
},
allTags() {
return this.$store.state.tags.map(tag => tag.name)
- }
+ },
},
watch: {
bookmark(newBookmark) {
this.description = newBookmark.description
- }
+ },
},
created() {},
methods: {
@@ -117,8 +117,8 @@ export default {
await this.$store.dispatch(actions.SAVE_BOOKMARK, this.bookmark.id)
await this.$store.dispatch(actions.LOAD_TAGS)
}, 1000)
- }
- }
+ },
+ },
}
</script>
<style>
diff --git a/src/components/TagLine.vue b/src/components/TagLine.vue
index 98be12cb..8dc7ab63 100644
--- a/src/components/TagLine.vue
+++ b/src/components/TagLine.vue
@@ -12,8 +12,8 @@ export default {
props: {
tags: {
type: Array,
- required: true
- }
+ required: true,
+ },
},
data() {
return {}
@@ -22,8 +22,8 @@ export default {
methods: {
submit() {
this.$emit('create-bookmark', this.url)
- }
- }
+ },
+ },
}
</script>
<style>
diff --git a/src/components/TreeFolder.vue b/src/components/TreeFolder.vue
index bd7c9724..6dd10d27 100644
--- a/src/components/TreeFolder.vue
+++ b/src/components/TreeFolder.vue
@@ -30,19 +30,19 @@ export default {
props: {
folder: {
type: Object,
- required: true
+ required: true,
},
showChildrenDefault: {
type: Boolean,
- default: false
- }
+ default: false,
+ },
},
data() {
return { showChildren: false }
},
mounted() {
this.showChildren = this.showChildrenDefault
- }
+ },
}
</script>
<style>
diff --git a/src/components/ViewAdmin.vue b/src/components/ViewAdmin.vue
index 94a21a54..68cfa94e 100644
--- a/src/components/ViewAdmin.vue
+++ b/src/components/ViewAdmin.vue
@@ -83,7 +83,7 @@ const SETTINGS = [
'previews.screenly.url',
'previews.screenly.token',
'privacy.enableScraping',
- 'performance.maxBookmarksperAccount'
+ 'performance.maxBookmarksperAccount',
]
export default {
@@ -94,7 +94,7 @@ export default {
loading: false,
success: false,
error: '',
- timeout: null
+ timeout: null,
}
},
@@ -103,7 +103,7 @@ export default {
error(error) {
if (!error) return
OC.Notification.showTemporary(error)
- }
+ },
},
async created() {
@@ -145,7 +145,7 @@ export default {
await new Promise((resolve, reject) =>
OCP.AppConfig.setValue('bookmarks', setting, value, {
success: resolve,
- error: reject
+ error: reject,
})
)
} catch (e) {
@@ -159,7 +159,7 @@ export default {
const resDocument = await new Promise((resolve, reject) =>
OCP.AppConfig.getValue('bookmarks', setting, null, {
success: resolve,
- error: reject
+ error: reject,
})
)
if (resDocument.querySelector('status').textContent !== 'ok') {
@@ -173,8 +173,8 @@ export default {
this.error = this.t('bookmarks', 'Failed to load settings')
throw e
}
- }
- }
+ },
+ },
}
</script>
<style>
diff --git a/src/components/ViewBookmarklet.vue b/src/components/ViewBookmarklet.vue
index 71915f43..4bb28300 100644
--- a/src/components/ViewBookmarklet.vue
+++ b/src/components/ViewBookmarklet.vue
@@ -46,17 +46,17 @@ export default {
name: 'ViewBookmarklet',
components: {
Content,
- Multiselect
+ Multiselect,
},
props: {
title: {
type: String,
- default: ''
+ default: '',
},
url: {
type: String,
- default: ''
- }
+ default: '',
+ },
},
data: function() {
return {
@@ -64,9 +64,9 @@ export default {
title: this.title,
url: this.url,
tags: [],
- description: ''
+ description: '',
},
- exists: false
+ exists: false,
}
},
computed: {
@@ -75,7 +75,7 @@ export default {
},
folders() {
return this.$store.state.folders
- }
+ },
},
created() {
@@ -122,8 +122,8 @@ export default {
await this.$store.dispatch(actions.CREATE_BOOKMARK, this.bookmark)
}
window.close()
- }
- }
+ },
+ },
}
</script>
<style>
diff --git a/src/components/ViewPrivate.vue b/src/components/ViewPrivate.vue
index 932ebc4e..f2759b1a 100644
--- a/src/components/ViewPrivate.vue
+++ b/src/components/ViewPrivate.vue
@@ -29,11 +29,11 @@ export default {
Breadcrumbs,
BookmarksList,
SidebarBookmark,
- MoveDialog
+ MoveDialog,
},
data: function() {
return {
- newBookmark: false
+ newBookmark: false,
}
},
computed: {
@@ -48,11 +48,11 @@ export default {
},
loading() {
return this.$store.state.loading
- }
+ },
},
watch: {
- $route: 'onRoute'
+ $route: 'onRoute',
},
async created() {
@@ -63,7 +63,7 @@ export default {
await Promise.all([
this.reloadSettings(),
this.reloadTags(),
- this.reloadFolders()
+ this.reloadFolders(),
])
this.onRoute()
},
@@ -123,8 +123,8 @@ export default {
) {
this.$store.dispatch(actions.FETCH_PAGE)
}
- }
- }
+ },
+ },
}
</script>
<style>
diff --git a/src/main.js b/src/main.js
index a1714521..c8e5596d 100644
--- a/src/main.js
+++ b/src/main.js
@@ -33,7 +33,7 @@ const BookmarksApp = (global['Bookmarks'] = new Vue({
el: '#content',
store,
router,
- render: h => h(App)
+ render: h => h(App),
}))
export default BookmarksApp
diff --git a/src/mixins/AppGlobal.js b/src/mixins/AppGlobal.js
index 3a53f3de..237d4919 100644
--- a/src/mixins/AppGlobal.js
+++ b/src/mixins/AppGlobal.js
@@ -1,10 +1,10 @@
export default {
methods: {
t,
- n
+ n,
},
data: () => ({
OC,
- OCA
- })
+ OCA,
+ }),
}
diff --git a/src/router.js b/src/router.js
index 93b67799..b8783751 100644
--- a/src/router.js
+++ b/src/router.js
@@ -14,38 +14,38 @@ export default new Router({
{
path: '/',
name: 'home',
- component: ViewPrivate
+ component: ViewPrivate,
},
{
path: '/recent',
name: 'recent',
- component: ViewPrivate
+ component: ViewPrivate,
},
{
path: '/search/:search',
name: 'search',
- component: ViewPrivate
+ component: ViewPrivate,
},
{
path: '/folder/:folder',
name: 'folder',
- component: ViewPrivate
+ component: ViewPrivate,
},
{
path: '/tags/:tags',
name: 'tags',
- component: ViewPrivate
+ component: ViewPrivate,
},
{
path: '/untagged',
name: 'untagged',
- component: ViewPrivate
+ component: ViewPrivate,
},
{
path: '/bookmarklet',
name: 'bookmarklet',
component: ViewBookmarklet,
- props: (route) => ({ url: route.query.url, title: route.query.title })
- }
- ]
+ props: (route) => ({ url: route.query.url, title: route.query.title }),
+ },
+ ],
})
diff --git a/src/store/actions.js b/src/store/actions.js
index 3db99e64..9d15b09b 100644
--- a/src/store/actions.js
+++ b/src/store/actions.js
@@ -40,7 +40,7 @@ export const actions = {
SET_SETTING: 'SET_SETTING',
LOAD_SETTING: 'LOAD_SETTING',
- LOAD_SETTINGS: 'SLOAD_SETTINGS'
+ LOAD_SETTINGS: 'SLOAD_SETTINGS',
}
export default {
@@ -55,11 +55,11 @@ export default {
try {
const response = await axios.get(url('/bookmark'), {
params: {
- url: link
- }
+ url: link,
+ },
})
const {
- data: { data: bookmarks, status }
+ data: { data: bookmarks, status },
} = response
if (status !== 'success') {
throw new Error(response.data)
@@ -85,11 +85,11 @@ export default {
title: data.title,
description: data.description,
folders: data.folders,
- tags: data.tags
+ tags: data.tags,
})
.then(response => {
const {
- data: { item: bookmark, status }
+ data: { item: bookmark, status },
} = response
if (status !== 'success') {
throw new Error(response.data.data.join('\n'))
@@ -116,7 +116,7 @@ export default {
.put(url(`/bookmark/${id}`), this.getters.getBookmark(id))
.then(response => {
const {
- data: { status }
+ data: { status },
} = response
if (status !== 'success') {
throw new Error(response.data)
@@ -140,13 +140,13 @@ export default {
) {
commit(mutations.FETCH_START, { type: 'moveBookmark' })
try {
- let response = await axios.post(
+ const response = await axios.post(
url(`/folder/${newFolder}/bookmarks/${bookmark}`)
)
if (response.data.status !== 'success') {
throw new Error(response.data)
}
- let response2 = await axios.delete(
+ const response2 = await axios.delete(
url(`/folder/${oldFolder}/bookmarks/${bookmark}`)
)
if (response2.data.status !== 'success') {
@@ -202,7 +202,7 @@ export default {
}
},
[actions.IMPORT_BOOKMARKS]({ commit, dispatch, state }, file) {
- var data = new FormData()
+ const data = new FormData()
data.append('bm_import', file)
return axios
.post(url(`/bookmark/import`), data)
@@ -233,7 +233,7 @@ export default {
.delete(url(`/bookmark`))
.then(response => {
const {
- data: { status }
+ data: { status },
} = response
if (status !== 'success') {
throw new Error(response.data)
@@ -254,11 +254,11 @@ export default {
commit(mutations.FETCH_START, { type: 'tag' })
return axios
.put(url(`/tag/${oldName}`), {
- name: newName
+ name: newName,
})
.then(response => {
const {
- data: { status }
+ data: { status },
} = response
if (status !== 'success') {
throw new Error(response.data)
@@ -302,7 +302,7 @@ export default {
.delete(url(`/tag/${tag}`))
.then(response => {
const {
- data: { status }
+ data: { status },
} = response
if (status !== 'success') {
throw new Error(response.data)
@@ -325,14 +325,14 @@ export default {
type: 'folders',
cancel: () => {
canceled = true
- }
+ },
})
return axios
.get(url('/folder'), { params: {} })
.then(response => {
if (canceled) return
const {
- data: { data, status }
+ data: { data, status },
} = response
if (status !== 'success') throw new Error(data)
const folders = data
@@ -355,7 +355,7 @@ export default {
.delete(url(`/folder/${id}`))
.then(response => {
const {
- data: { status }
+ data: { status },
} = response
if (status !== 'success') {
throw new Error(response.data)
@@ -378,11 +378,11 @@ export default {
return axios
.post(url(`/folder`), {
parent_folder: parentFolder,
- title
+ title,
})
.then(response => {
const {
- data: { status }
+ data: { status },
} = response
if (status !== 'success') {
throw new Error(response.data)
@@ -405,11 +405,11 @@ export default {
return axios
.put(url(`/folder/${id}`), {
parent_folder: folder.parent_folder,
- title: folder.title
+ title: folder.title,
})
.then(response => {
const {
- data: { status }
+ data: { status },
} = response
if (status !== 'success') {
throw new Error(response.data)
@@ -443,7 +443,7 @@ export default {
await dispatch(actions.MOVE_BOOKMARK, {
oldFolder: bookmark.folders[bookmark.folders.length - 1], // FIXME This is veeeery ugly and will cause issues. Inevitably.
newFolder: folderId,
- bookmark: bookmark.id
+ bookmark: bookmark.id,
})
}
} catch (err) {
@@ -517,7 +517,7 @@ export default {
type: 'bookmarks',
cancel() {
canceled = true
- }
+ },
})
axios
.get(url('/bookmark'), {
@@ -525,13 +525,13 @@ export default {
limit: BATCH_SIZE,
page: state.fetchState.page,
sortby: state.settings.sorting,
- ...state.fetchState.query
- }
+ ...state.fetchState.query,
+ },
})
.then(response => {
if (canceled) return
const {
- data: { data, status }
+ data: { data, status },
} = response
if (status !== 'success') throw new Error(data)
const bookmarks = data
@@ -565,7 +565,7 @@ export default {
}
return axios
.post(url(`/settings/${key}`), {
- [key]: value
+ [key]: value,
})
.catch(err => {
console.error(err)
@@ -581,7 +581,7 @@ export default {
.get(url(`/settings/${key}`))
.then(async response => {
const {
- data: { [key]: value }
+ data: { [key]: value },
} = response
await commit(mutations.SET_SETTING, { key, value })
if (key === 'viewMode') {
@@ -604,7 +604,7 @@ export default {
return Promise.all(
['sorting', 'viewMode'].map(key => dispatch(actions.LOAD_SETTING, key))
)
- }
+ },
}
function url(url) {
diff --git a/src/store/index.js b/src/store/index.js
index 4e96146e..4fdc816f 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -16,7 +16,7 @@ export default new Store({
fetchState: {
page: 0,
query: {},
- reachedEnd: false
+ reachedEnd: false,
},
loading: {
tags: false,
@@ -25,12 +25,12 @@ export default new Store({
createBookmark: false,
saveBookmark: false,
createFolder: false,
- saveFolder: false
+ saveFolder: false,
},
error: null,
settings: {
viewMode: 'list',
- sorting: 'lastmodified'
+ sorting: 'lastmodified',
},
bookmarks: [],
bookmarksById: {},
@@ -39,13 +39,13 @@ export default new Store({
foldersById: {},
selection: {
folders: [],
- bookmarks: []
+ bookmarks: [],
},
displayNewBookmark: false,
displayNewFolder: false,
displayMoveDialog: false,
sidebar: null,
- viewMode: 'list'
+ viewMode: 'list',
},
getters: {
@@ -57,18 +57,18 @@ export default new Store({
return [{ id: '-1', children: state.folders }]
}
return findFolder(id, state.folders)
- }
- }
+ },
+ },
})
function findFolder(id, children) {
if (!children || !children.length) return []
- let folders = children.filter(folder => Number(folder.id) === Number(id))
+ const folders = children.filter(folder => Number(folder.id) === Number(id))
if (folders.length) {
return folders
} else {
- for (let child of children) {
- let folders = findFolder(id, child.children)
+ for (const child of children) {
+ const folders = findFolder(id, child.children)
if (folders.length) {
folders.push(child)
return folders
diff --git a/src/store/mutations.js b/src/store/mutations.js
index 5268d2b7..e2b47169 100644
--- a/src/store/mutations.js
+++ b/src/store/mutations.js
@@ -24,7 +24,7 @@ export const mutations = {
SET_FOLDERS: 'SET_FOLDERS',
SET_SIDEBAR: 'SET_SIDEBAR',
SET_SETTING: 'SET_SETTING',
- SET_VIEW_MODE: 'SET_VIEW_MODE'
+ SET_VIEW_MODE: 'SET_VIEW_MODE',
}
export default {
[mutations.SET_VIEW_MODE](state, viewMode) {
@@ -132,7 +132,7 @@ export default {
[mutations.REACHED_END](state) {
Vue.set(state.fetchState, 'reachedEnd', true)
- }
+ },
}
function sortFolders(folders) {