diff --git a/dev/docker/ocis.web.config.json b/dev/docker/ocis.web.config.json index abcb088fe8d..b6e680d769b 100644 --- a/dev/docker/ocis.web.config.json +++ b/dev/docker/ocis.web.config.json @@ -20,14 +20,19 @@ "ocm", "webfinger", "epub-reader", - "app-store" + "app-store", + "activities" ], "external_apps": [ { "id": "preview", "path": "web-app-preview", "config": { - "mimeTypes": ["image/tiff", "image/bmp", "image/x-ms-bmp"] + "mimeTypes": [ + "image/tiff", + "image/bmp", + "image/x-ms-bmp" + ] } }, { diff --git a/packages/web-app-activities/l10n/.tx/config b/packages/web-app-activities/l10n/.tx/config new file mode 100644 index 00000000000..fa4b15f12ad --- /dev/null +++ b/packages/web-app-activities/l10n/.tx/config @@ -0,0 +1,9 @@ +[main] +host = https://www.transifex.com + +[o:owncloud-org:p:owncloud-web:r:activities] +file_filter = locale//app.po +minimum_perc = 0 +source_file = template.pot +source_lang = en +type = PO diff --git a/packages/web-app-activities/l10n/translations.json b/packages/web-app-activities/l10n/translations.json new file mode 100644 index 00000000000..0967ef424bc --- /dev/null +++ b/packages/web-app-activities/l10n/translations.json @@ -0,0 +1 @@ +{} diff --git a/packages/web-app-activities/package.json b/packages/web-app-activities/package.json new file mode 100644 index 00000000000..04dd8fd4c1b --- /dev/null +++ b/packages/web-app-activities/package.json @@ -0,0 +1,20 @@ +{ + "name": "web-app-activities", + "version": "0.0.0", + "private": true, + "description": "ownCloud activities app", + "license": "AGPL-3.0", + "devDependencies": { + "web-test-helpers": "workspace:*" + }, + "peerDependencies": { + "@ownclouders/web-client": "workspace:*", + "@ownclouders/web-pkg": "workspace:*", + "design-system": "workspace:@ownclouders/design-system@*", + "pinia": "^2.2.2", + "luxon": "^3.5.0", + "vue-concurrency": "^5.0.1", + "vue-router": "^4.2.5", + "vue3-gettext": "^2.4.0" + } +} diff --git a/packages/web-app-activities/src/LayoutContainer.vue b/packages/web-app-activities/src/LayoutContainer.vue new file mode 100644 index 00000000000..be0d6a77012 --- /dev/null +++ b/packages/web-app-activities/src/LayoutContainer.vue @@ -0,0 +1,20 @@ + + + + + diff --git a/packages/web-app-activities/src/appid.ts b/packages/web-app-activities/src/appid.ts new file mode 100644 index 00000000000..f6dd373072f --- /dev/null +++ b/packages/web-app-activities/src/appid.ts @@ -0,0 +1 @@ +export const APPID = 'activities' diff --git a/packages/web-app-activities/src/components/ActivityItem.vue b/packages/web-app-activities/src/components/ActivityItem.vue new file mode 100644 index 00000000000..4e16f0d636e --- /dev/null +++ b/packages/web-app-activities/src/components/ActivityItem.vue @@ -0,0 +1,110 @@ + + + + + diff --git a/packages/web-app-activities/src/index.ts b/packages/web-app-activities/src/index.ts new file mode 100644 index 00000000000..eaec50a8655 --- /dev/null +++ b/packages/web-app-activities/src/index.ts @@ -0,0 +1,67 @@ +import translations from '../l10n/translations.json' +import { useGettext } from 'vue3-gettext' +import { computed } from 'vue' +import { AppMenuItemExtension, defineWebApplication, Extension } from '@ownclouders/web-pkg' +import { urlJoin } from '@ownclouders/web-client' +import { RouteRecordRaw } from 'vue-router' +import { APPID } from './appid' + +export default defineWebApplication({ + setup() { + const { $gettext } = useGettext() + + const appInfo = { + name: $gettext('Activities'), + id: APPID, + icon: 'pulse', + color: '#887ef1' + } + + const routes: RouteRecordRaw[] = [ + { + path: '/', + name: 'root', + component: () => import('./LayoutContainer.vue'), + redirect: urlJoin(appInfo.id, 'list'), + meta: { + authContext: 'user' + }, + children: [ + { + path: 'list', + name: 'list', + component: () => import('./views/App.vue'), + meta: { + authContext: 'user', + title: $gettext('Activities') + } + } + ] + } + ] + + const menuItemExtension: AppMenuItemExtension = { + id: `app.${appInfo.id}.menuItem`, + type: 'appMenuItem', + label: () => appInfo.name, + color: appInfo.color, + icon: appInfo.icon, + priority: 30, + path: urlJoin(appInfo.id) + } + const extensions = computed(() => { + const result: Extension[] = [] + + result.push(menuItemExtension) + + return result + }) + + return { + appInfo, + routes, + translations, + extensions + } + } +}) diff --git a/packages/web-app-activities/src/views/ActivityList.vue b/packages/web-app-activities/src/views/ActivityList.vue new file mode 100644 index 00000000000..8973ea698f0 --- /dev/null +++ b/packages/web-app-activities/src/views/ActivityList.vue @@ -0,0 +1,76 @@ + + + + + diff --git a/packages/web-app-activities/src/views/App.vue b/packages/web-app-activities/src/views/App.vue new file mode 100644 index 00000000000..9b301d7ec4a --- /dev/null +++ b/packages/web-app-activities/src/views/App.vue @@ -0,0 +1,117 @@ + + + diff --git a/packages/web-app-app-store/package.json b/packages/web-app-app-store/package.json index 2481a8f49fa..74ff2030ad0 100644 --- a/packages/web-app-app-store/package.json +++ b/packages/web-app-app-store/package.json @@ -18,6 +18,7 @@ "pinia": "2.2.2", "vue-concurrency": "5.0.1", "vue-router": "4.2.5", - "zod": "3.23.8" + "zod": "3.23.8", + "vue3-gettext": "2.4.0" } } diff --git a/packages/web-app-files/src/components/SideBar/ActivitiesPanel.vue b/packages/web-app-files/src/components/SideBar/ActivitiesPanel.vue index ac039bd6f54..1d58f00f027 100644 --- a/packages/web-app-files/src/components/SideBar/ActivitiesPanel.vue +++ b/packages/web-app-files/src/components/SideBar/ActivitiesPanel.vue @@ -4,7 +4,7 @@ diff --git a/packages/web-app-files/tests/unit/components/SideBar/__snapshots__/ActivitiesPanel.spec.ts.snap b/packages/web-app-files/tests/unit/components/SideBar/__snapshots__/ActivitiesPanel.spec.ts.snap index 2d1b5cfd57e..145d885868b 100644 --- a/packages/web-app-files/tests/unit/components/SideBar/__snapshots__/ActivitiesPanel.spec.ts.snap +++ b/packages/web-app-files/tests/unit/components/SideBar/__snapshots__/ActivitiesPanel.spec.ts.snap @@ -3,7 +3,7 @@ exports[`ActivitiesPanel > should render a list of activities when data is present 1`] = ` "
-
    +
    • Marie Curie created new folder. Jul 29, 2024, 6:34 PM
    • Albert Einstein moved textfile.txt. Jul 29, 2023, 6:34 PM
    • Robert Oppenheimer deleted atom plans.pdf. Jul 29, 2022, 6:34 PM
    • diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a910d01af5c..1c19a7ff709 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -510,6 +510,37 @@ importers: packages/tsconfig: {} + packages/web-app-activities: + dependencies: + '@ownclouders/web-client': + specifier: workspace:* + version: link:../web-client + '@ownclouders/web-pkg': + specifier: workspace:* + version: link:../web-pkg + design-system: + specifier: workspace:@ownclouders/design-system@* + version: link:../design-system + luxon: + specifier: ^3.5.0 + version: 3.5.0 + pinia: + specifier: ^2.2.2 + version: 2.2.2(typescript@5.6.2)(vue@3.5.8(typescript@5.6.2)) + vue-concurrency: + specifier: ^5.0.1 + version: 5.0.1(vue@3.5.8(typescript@5.6.2)) + vue-router: + specifier: ^4.2.5 + version: 4.2.5(vue@3.5.8(typescript@5.6.2)) + vue3-gettext: + specifier: ^2.4.0 + version: 2.4.0(patch_hash=x32qkm4z6srz5xuveescagpdyu)(@vue/compiler-sfc@3.5.8)(vue@3.5.8(typescript@5.6.2)) + devDependencies: + web-test-helpers: + specifier: workspace:* + version: link:../web-test-helpers + packages/web-app-admin-settings: dependencies: '@ownclouders/web-client': @@ -588,6 +619,9 @@ importers: vue-router: specifier: 4.2.5 version: 4.2.5(vue@3.5.8(typescript@5.6.2)) + vue3-gettext: + specifier: 2.4.0 + version: 2.4.0(patch_hash=x32qkm4z6srz5xuveescagpdyu)(@vue/compiler-sfc@3.5.8)(vue@3.5.8(typescript@5.6.2)) zod: specifier: 3.23.8 version: 3.23.8 @@ -4875,7 +4909,7 @@ packages: resolution: {integrity: sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==} engines: {node: '>= 4.0'} os: [darwin] - deprecated: Upgrade to fsevents v2 to mitigate potential security issues + deprecated: The v1 package contains DANGEROUS / INSECURE binaries. Upgrade to safe fsevents v2 fsevents@2.3.2: resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} @@ -10248,7 +10282,7 @@ snapshots: '@cucumber/ci-environment': 9.1.0 '@cucumber/cucumber-expressions': 16.1.1 '@cucumber/gherkin': 26.0.3 - '@cucumber/gherkin-streams': 5.0.1(@cucumber/gherkin@26.0.3)(@cucumber/message-streams@4.0.1(@cucumber/messages@21.0.1))(@cucumber/messages@21.0.1) + '@cucumber/gherkin-streams': 5.0.1(@cucumber/gherkin@26.0.3)(@cucumber/message-streams@4.0.1(@cucumber/messages@26.0.1))(@cucumber/messages@21.0.1) '@cucumber/gherkin-utils': 8.0.2 '@cucumber/html-formatter': 20.2.1(@cucumber/messages@21.0.1) '@cucumber/message-streams': 4.0.1(@cucumber/messages@21.0.1) @@ -10286,7 +10320,7 @@ snapshots: yaml: 2.5.1 yup: 0.32.11 - '@cucumber/gherkin-streams@5.0.1(@cucumber/gherkin@26.0.3)(@cucumber/message-streams@4.0.1(@cucumber/messages@21.0.1))(@cucumber/messages@21.0.1)': + '@cucumber/gherkin-streams@5.0.1(@cucumber/gherkin@26.0.3)(@cucumber/message-streams@4.0.1(@cucumber/messages@26.0.1))(@cucumber/messages@21.0.1)': dependencies: '@cucumber/gherkin': 26.0.3 '@cucumber/message-streams': 4.0.1(@cucumber/messages@21.0.1)