Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/web-app-app-store/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"pinia": "3.0.3",
"vue-concurrency": "5.0.3",
"vue-router": "4.5.1",
"zod": "3.25.75",
"zod": "4.0.5",
"vue3-gettext": "2.4.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const author3: AppAuthor = {
url: 'wololo'
}
const author4: AppAuthor = {
name: 'Trololo',
url: 'trololo'
}
const authors = [author1, author2, author3, author4]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const coverImageWithUrl: AppImage = {
caption: 'Cover image'
}
const coverImageWithoutUrl: AppImage = {
url: '',
caption: 'Trololo'
}
const screenshot1: AppImage = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ const resource2: AppResource = {
label: 'Wololo'
}
const resource3: AppResource = {
label: '',
url: 'https://some.url',
icon: 'file'
}
const resource4: AppResource = {
url: '',
label: 'Wololo'
}
const resources = [resource1, resource2, resource3, resource4]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const version4: AppVersion = {
version: '1.2.0'
}
const version5: AppVersion = {
version: '',
url: 'https://wololo.com/download-1.3.0.zip',
minOpenCloud: '6.5.0'
}
Expand Down
2 changes: 1 addition & 1 deletion packages/web-app-external/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
"vue-concurrency": "5.0.3",
"vue3-gettext": "2.4.0",
"vue-router": "4.5.1",
"zod": "3.25.75"
"zod": "4.0.5"
}
}
2 changes: 1 addition & 1 deletion packages/web-app-ocm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
"vue-concurrency": "5.0.3",
"uuid": "11.1.0",
"vue-router": "4.5.1",
"zod": "3.25.75"
"zod": "4.0.5"
}
}
2 changes: 1 addition & 1 deletion packages/web-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
"uuid": "^11.0.0",
"webdav": "^5.7.1",
"xml-js": "^1.6.11",
"zod": "^3.23.8"
"zod": "^4.0.0"
},
"devDependencies": {
"@types/luxon": "3.6.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/web-pkg/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"vue-concurrency": "^5.0.1",
"vue-router": "^4.2.5",
"vue3-gettext": "^2.4.0",
"zod": "^3.23.8"
"zod": "^4.0.0"
},
"devDependencies": {
"@opencloud-eu/web-test-helpers": "workspace:^",
Expand Down
4 changes: 2 additions & 2 deletions packages/web-pkg/src/composables/piniaStores/config/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const OpenIdConnectConfigSchema = z

export type OpenIdConnectConfig = z.infer<typeof OpenIdConnectConfigSchema>

const SentryConfigSchema = z.record(z.any())
const SentryConfigSchema = z.record(z.any(), z.any())

export type SentryConfig = z.infer<typeof SentryConfigSchema>

Expand Down Expand Up @@ -131,7 +131,7 @@ export type OptionsConfig = z.infer<typeof OptionsConfigSchema>
const ExternalApp = z.object({
id: z.string(),
path: z.string(),
config: z.record(z.unknown()).optional()
config: z.record(z.string(), z.unknown()).optional()
})

export const RawConfigSchema = z.object({
Expand Down
16 changes: 9 additions & 7 deletions packages/web-pkg/src/composables/piniaStores/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ const CommonSection = z.object({
})

const DesignTokens = z.object({
breakpoints: z.record(z.string()).optional(),
roles: z.record(z.string()).optional(),
colorPalette: z.record(z.string()).optional(),
breakpoints: z.record(z.string(), z.string()).optional(),
roles: z.record(z.string(), z.string()).optional(),
colorPalette: z.record(z.string(), z.string()).optional(),
fontFamily: z.string().optional(),
fontSizes: z.record(z.string()).optional(),
sizes: z.record(z.string()).optional(),
spacing: z.record(z.string()).optional()
fontSizes: z.record(z.string(), z.string()).optional(),
sizes: z.record(z.string(), z.string()).optional(),
spacing: z.record(z.string(), z.string()).optional()
})

const WebDefaults = CommonSection.extend({
Expand Down Expand Up @@ -77,7 +77,9 @@ export const useThemeStore = defineStore('theme', () => {
const availableThemes = ref<WebThemeType[]>([])

const initializeThemes = (themeConfig: ThemeConfigType) => {
const baseTheme = merge(themeConfig.common, themeConfig.clients.web.defaults)
const commonThemeConfig = themeConfig.common as WebThemeType
const webThemeConfig = themeConfig.clients.web.defaults as WebThemeType
const baseTheme = merge(commonThemeConfig, webThemeConfig)
availableThemes.value = themeConfig.clients.web.themes.map((theme) => {
return merge(baseTheme, theme)
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import FilePickerModal from '../../../../src/components/Modals/FilePickerModal.v
import { defaultComponentMocks, defaultPlugins, shallowMount } from '@opencloud-eu/web-test-helpers'
import { mock } from 'vitest-mock-extended'
import { Resource, SpaceResource } from '@opencloud-eu/web-client'
import { Modal, useModals } from '../../../../src/composables/piniaStores'
import { Modal, useModals, WebThemeType } from '../../../../src/composables/piniaStores'
import { RouteLocation } from 'vue-router'

window.open = vi.fn()
Expand Down Expand Up @@ -75,7 +75,7 @@ function getWrapper() {
...defaultPlugins({
piniaOptions: {
spacesState: { spaces: [mock<SpaceResource>({ id: '1' })] },
themeState: { currentTheme: { name: 'OpenCloud' } }
themeState: { currentTheme: { name: 'OpenCloud' } as WebThemeType }
}
})
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ import {
import { mock, mockDeep } from 'vitest-mock-extended'
import { Resource, SpaceResource } from '@opencloud-eu/web-client'
import { ListFilesResult } from '@opencloud-eu/web-client/webdav'
import { Modal, useMessages, useModals } from '../../../../src/composables/piniaStores'
import {
Modal,
useMessages,
useModals,
WebThemeType
} from '../../../../src/composables/piniaStores'
import { ClientService } from '../../../../src'

window.open = vi.fn()
Expand Down Expand Up @@ -114,7 +119,7 @@ function getWrapper() {
...defaultPlugins({
piniaOptions: {
spacesState: { spaces: [mock<SpaceResource>({ id: '1' })] },
themeState: { currentTheme: { name: 'OpenCloud' } }
themeState: { currentTheme: { name: 'OpenCloud' } as WebThemeType }
}
})
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe('useConfigStore', () => {
it('loads config for external apps', () => {
getWrapper({
setup: (instance) => {
const externalApp = { id: '1', config: { foo: 'bar' } }
const externalApp = { id: '1', config: { foo: 'bar' }, path: '' }
const data = {
server: 'https://foo.bar',
theme: undefined,
Expand Down
2 changes: 1 addition & 1 deletion packages/web-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"vue3-gettext": "2.4.0",
"webdav": "5.8.0",
"xml-js": "^1.6.11",
"zod": "3.25.75"
"zod": "4.0.5"
},
"devDependencies": {
"@opencloud-eu/web-test-helpers": "workspace:*"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
import { mock } from 'vitest-mock-extended'
import { SpaceResource } from '@opencloud-eu/web-client'
import { Quota } from '@opencloud-eu/web-client/graph/generated'
import { WebThemeType } from '@opencloud-eu/web-pkg'

const totalQuota = 1000
const basicQuota = 300
Expand Down Expand Up @@ -150,7 +151,7 @@ const getMountedWrapper = (
imprint: areThemeUrlsSet ? 'https://imprint.url.theme' : '',
accessibility: areThemeUrlsSet ? 'https://accessibility.url.theme' : ''
}
}
} as WebThemeType
},
userState: {
user: noUser
Expand Down
5 changes: 4 additions & 1 deletion packages/web-runtime/tests/unit/container/bootstrap.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ describe('initialize applications', () => {

const configStore = useConfigStore()
configStore.apps = ['internalFishy', 'internalValid']
configStore.externalApps = [{ path: 'externalFishy' }, { path: 'externalValid' }]
configStore.externalApps = [
{ id: '1', path: 'externalFishy' },
{ id: '2', path: 'externalValid' }
]

const applications = await initializeApplications({
app: createApp(defineComponent({})),
Expand Down
30 changes: 15 additions & 15 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.