fix(theming): Adjust app order settings for backend changes

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
pull/41341/head
Ferdinand Thiessen 2 years ago
parent 8d0c7cc5fa
commit 0254b68a1a
No known key found for this signature in database
GPG Key ID: 45FAE7268762B400
  1. 3
      apps/theming/src/components/AppOrderSelector.vue
  2. 10
      apps/theming/src/components/UserAppMenuSection.vue

@ -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…
Cancel
Save