mirror of
https://github.com/nextcloud/server.git
synced 2026-06-08 16:26:59 -04:00
fix(theming): Adjust app order settings for backend changes
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
parent
8d0c7cc5fa
commit
0254b68a1a
2 changed files with 5 additions and 8 deletions
|
|
@ -37,8 +37,7 @@ export interface IApp {
|
|||
icon: string // path to the icon svg
|
||||
label: string // display name
|
||||
default?: boolean // force app as default app
|
||||
app: string
|
||||
key: number
|
||||
app?: string
|
||||
}
|
||||
|
||||
export default defineComponent({
|
||||
|
|
|
|||
|
|
@ -58,13 +58,11 @@ interface INavigationEntry {
|
|||
/** Whether this is the default app */
|
||||
default?: boolean
|
||||
/** App that registered this navigation entry (not necessarly the same as the id) */
|
||||
app: string
|
||||
/** The key used to identify this entry in the navigations entries */
|
||||
key: number
|
||||
app?: string
|
||||
}
|
||||
|
||||
/** The app order user setting */
|
||||
type IAppOrder = Record<string, Record<number, number>>
|
||||
type IAppOrder = Record<string, { order: number, app?: string }>
|
||||
|
||||
/** OCS responses */
|
||||
interface IOCSResponse<T> {
|
||||
|
|
@ -131,8 +129,8 @@ export default defineComponent({
|
|||
*/
|
||||
const updateAppOrder = (value: IApp[]) => {
|
||||
const order: IAppOrder = {}
|
||||
value.forEach(({ app, key }, index) => {
|
||||
order[app] = { ...order[app], [key]: index }
|
||||
value.forEach(({ app, id }, index) => {
|
||||
order[id] = { order: index, app }
|
||||
})
|
||||
|
||||
saveSetting('apporder', order)
|
||||
|
|
|
|||
Loading…
Reference in a new issue