diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2023-07-05 18:27:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-05 18:27:10 +0200 |
commit | 6862ff28002c8c282bcca5c198619c03f5cb4e0b (patch) | |
tree | 546086e72ab130e6d0760f84f56999e6a2ea4364 /apps/files/src/store/userconfig.ts | |
parent | 79d24bfb8eebd82dd75b15c5503a4bb33563ee69 (diff) | |
parent | 7f8a390b60003adcf7ec89c3fbf86c3e98134cce (diff) | |
download | nextcloud-server-6862ff28002c8c282bcca5c198619c03f5cb4e0b.tar.gz nextcloud-server-6862ff28002c8c282bcca5c198619c03f5cb4e0b.zip |
Merge pull request #38950 from nextcloud/feat/f2v/favorites
Diffstat (limited to 'apps/files/src/store/userconfig.ts')
-rw-r--r-- | apps/files/src/store/userconfig.ts | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/apps/files/src/store/userconfig.ts b/apps/files/src/store/userconfig.ts index 42821951dbf..42530a3b54d 100644 --- a/apps/files/src/store/userconfig.ts +++ b/apps/files/src/store/userconfig.ts @@ -19,21 +19,21 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* eslint-disable */ -import { loadState } from '@nextcloud/initial-state' -import { generateUrl } from '@nextcloud/router' +import type { UserConfig, UserConfigStore } from '../types' import { defineStore } from 'pinia' -import Vue from 'vue' -import axios from '@nextcloud/axios' -import type { UserConfig, UserConfigStore } from '../types.ts' import { emit, subscribe } from '@nextcloud/event-bus' +import { generateUrl } from '@nextcloud/router' +import { loadState } from '@nextcloud/initial-state' +import axios from '@nextcloud/axios' +import Vue from 'vue' const userConfig = loadState('files', 'config', { show_hidden: false, crop_image_previews: true, + sort_favorites_first: true, }) as UserConfig -export const useUserConfigStore = function() { +export const useUserConfigStore = function(...args) { const store = defineStore('userconfig', { state: () => ({ userConfig, @@ -56,11 +56,11 @@ export const useUserConfigStore = function() { }) emit('files:config:updated', { key, value }) - } - } + }, + }, }) - const userConfigStore = store(...arguments) + const userConfigStore = store(...args) // Make sure we only register the listeners once if (!userConfigStore._initialized) { @@ -72,4 +72,3 @@ export const useUserConfigStore = function() { return userConfigStore } - |