From 18d3605c51987cddf2f18092a19a21799d905966 Mon Sep 17 00:00:00 2001 From: Pascal Wengerter Date: Fri, 2 Feb 2024 14:18:01 +0000 Subject: [PATCH 1/6] Create more ODS color variant classes for text and background --- packages/design-system/src/styles/theme/background.scss | 5 +++++ packages/design-system/src/styles/theme/oc-text.scss | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/packages/design-system/src/styles/theme/background.scss b/packages/design-system/src/styles/theme/background.scss index 3015138bdcc..d07d9025356 100644 --- a/packages/design-system/src/styles/theme/background.scss +++ b/packages/design-system/src/styles/theme/background.scss @@ -48,6 +48,11 @@ background-color: var(--oc-color-background-highlight) !important; } +.oc-background-warning { + background-color: var(--oc-color-swatch-warning-default) !important; + color: var(--oc-color-text-inverse) !important; +} + .oc-background-contain { background-size: contain; } diff --git a/packages/design-system/src/styles/theme/oc-text.scss b/packages/design-system/src/styles/theme/oc-text.scss index 909eca13963..f5b926de66d 100644 --- a/packages/design-system/src/styles/theme/oc-text.scss +++ b/packages/design-system/src/styles/theme/oc-text.scss @@ -192,6 +192,13 @@ td.oc-text-break { color: var(--oc-color-text-muted); } +/* + * Give text the brand contrast color. + */ +.oc-text-brand-contrast { + color: var(--oc-color-swatch-brand-contrast) ; +} + /* * Transform text to all uppercase */ From 9401377d4723d54bb3ceee5441e30c83ab4b6bb8 Mon Sep 17 00:00:00 2001 From: Pascal Wengerter Date: Fri, 2 Feb 2024 14:18:31 +0000 Subject: [PATCH 2/6] Expose ownerDisplayName for PublicSpaceResources --- packages/web-client/src/helpers/space/functions.ts | 4 +++- packages/web-client/src/helpers/space/types.ts | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/web-client/src/helpers/space/functions.ts b/packages/web-client/src/helpers/space/functions.ts index 1c1e13a58b6..5b3442d5eb3 100644 --- a/packages/web-client/src/helpers/space/functions.ts +++ b/packages/web-client/src/helpers/space/functions.ts @@ -49,6 +49,7 @@ export function buildPublicSpaceResource( const publicLinkExpiration = data.props?.[DavProperty.PublicLinkExpiration] const publicLinkShareDate = data.props?.[DavProperty.PublicLinkShareDate] const publicLinkShareOwner = data.props?.[DavProperty.PublicLinkShareOwner] + const publicLinkShareOwnerDisplayName = data.props?.[DavProperty.OwnerDisplayName] let driveAlias let webDavPath @@ -74,7 +75,8 @@ export function buildPublicSpaceResource( ...(publicLinkPermission && { publicLinkPermission: parseInt(publicLinkPermission) }), ...(publicLinkExpiration && { publicLinkExpiration }), ...(publicLinkShareDate && { publicLinkShareDate }), - ...(publicLinkShareOwner && { publicLinkShareOwner }) + ...(publicLinkShareOwner && { publicLinkShareOwner }), + ...(publicLinkShareOwnerDisplayName && { publicLinkShareOwnerDisplayName }) } ) } diff --git a/packages/web-client/src/helpers/space/types.ts b/packages/web-client/src/helpers/space/types.ts index 6f1d791a48a..056fab13b70 100644 --- a/packages/web-client/src/helpers/space/types.ts +++ b/packages/web-client/src/helpers/space/types.ts @@ -94,6 +94,7 @@ export interface PublicSpaceResource extends SpaceResource { publicLinkExpiration?: string publicLinkShareDate?: string publicLinkShareOwner?: string + publicLinkShareOwnerDisplayName?: string } export const isPublicSpaceResource = (resource: Resource): resource is PublicSpaceResource => { return (resource as SpaceResource)?.driveType === 'public' From e207ff06f3bef4779a3dc824a34d4323dfe7030b Mon Sep 17 00:00:00 2001 From: Pascal Wengerter Date: Tue, 27 Feb 2024 14:13:17 +0100 Subject: [PATCH 3/6] Rename UploadInfo to UploadBar and make hide-able via route meta --- packages/web-pkg/src/router/public.ts | 1 + .../web-runtime/src/components/UploadBar.vue | 700 ++++++++++++++++++ .../web-runtime/src/layouts/Application.vue | 27 +- .../{UploadInfo.spec.ts => UploadBar.spec.ts} | 0 4 files changed, 723 insertions(+), 5 deletions(-) create mode 100644 packages/web-runtime/src/components/UploadBar.vue rename packages/web-runtime/tests/unit/components/{UploadInfo.spec.ts => UploadBar.spec.ts} (100%) diff --git a/packages/web-pkg/src/router/public.ts b/packages/web-pkg/src/router/public.ts index 911537f1e18..f49079e699a 100644 --- a/packages/web-pkg/src/router/public.ts +++ b/packages/web-pkg/src/router/public.ts @@ -47,6 +47,7 @@ export const buildRoutes = (components: RouteComponents): RouteRecordRaw[] => [ component: components.FilesDrop, meta: { authContext: 'publicLink', + isUploadSnackbarHidden: true, title: $gettext('Public file upload') } } diff --git a/packages/web-runtime/src/components/UploadBar.vue b/packages/web-runtime/src/components/UploadBar.vue new file mode 100644 index 00000000000..434ca225f18 --- /dev/null +++ b/packages/web-runtime/src/components/UploadBar.vue @@ -0,0 +1,700 @@ + + + + + diff --git a/packages/web-runtime/src/layouts/Application.vue b/packages/web-runtime/src/layouts/Application.vue index ac933d76c39..49c1d4a90dd 100644 --- a/packages/web-runtime/src/layouts/Application.vue +++ b/packages/web-runtime/src/layouts/Application.vue @@ -36,7 +36,7 @@
- +
@@ -57,7 +57,7 @@ import { import TopBar from '../components/Topbar/TopBar.vue' import MessageBar from '../components/MessageBar.vue' import SidebarNav from '../components/SidebarNav/SidebarNav.vue' -import UploadInfo from '../components/UploadInfo.vue' +import UploadBar from '../components/UploadBar.vue' import MobileNav from '../components/MobileNav.vue' import { NavItem, getExtensionNavItems } from '../helpers/navItems' import { LoadingIndicator } from '@ownclouders/web-pkg' @@ -80,7 +80,9 @@ export default defineComponent({ MobileNav, TopBar, SidebarNav, - UploadInfo + UploadInfo, + UploadBar, + LoadingIndicator }, setup() { const router = useRouter() @@ -117,6 +119,11 @@ export default defineComponent({ { immediate: true } ) + const uploadSnackbarRouteMeta = useRouteMeta('isUploadSnackbarHidden', 'false') + const isUploadSnackbarHidden = computed(() => { + return JSON.parse(unref(uploadSnackbarRouteMeta)) + }) + const requiredAuthContext = useRouteMeta('authContext') const { areSpacesLoading } = useSpacesLoading() const isLoading = computed(() => { @@ -202,11 +209,12 @@ export default defineComponent({ apps, defaultProgressBarExtension, progressBarExtensionPoint, - isSidebarVisible, isLoading, + isMobileWidth, + isSidebarVisible, + isUploadSnackbarHidden, navItems, onResize, - isMobileWidth, navBarClosed, setNavBarClosed } @@ -307,6 +315,15 @@ export default defineComponent({ width: 100%; max-width: 500px; } + + #upload-info-snackbar { + width: 400px; + + @media (max-width: 640px) { + width: 100%; + max-width: 500px; + } + } } } diff --git a/packages/web-runtime/tests/unit/components/UploadInfo.spec.ts b/packages/web-runtime/tests/unit/components/UploadBar.spec.ts similarity index 100% rename from packages/web-runtime/tests/unit/components/UploadInfo.spec.ts rename to packages/web-runtime/tests/unit/components/UploadBar.spec.ts From 3a94a9a06a419323053be6a72ddf041bc8080983 Mon Sep 17 00:00:00 2001 From: Pascal Wengerter Date: Tue, 27 Feb 2024 14:14:34 +0100 Subject: [PATCH 4/6] Move upload trigger button into slot in ResourceUpload component --- .../AppBar/Upload/ResourceUpload.vue | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/packages/web-app-files/src/components/AppBar/Upload/ResourceUpload.vue b/packages/web-app-files/src/components/AppBar/Upload/ResourceUpload.vue index 7b75fbbb63f..574dfbc0d09 100644 --- a/packages/web-app-files/src/components/AppBar/Upload/ResourceUpload.vue +++ b/packages/web-app-files/src/components/AppBar/Upload/ResourceUpload.vue @@ -4,16 +4,20 @@ isRemoteUploadInProgress ? $gettext('Please wait until all imports have finished') : null " > - - - {{ buttonLabel }} - + +
+ + + {{ buttonLabel }} + +
+
Date: Wed, 10 Apr 2024 22:28:43 +0200 Subject: [PATCH 5/6] Further design enhancements --- .../web-app-files/src/views/FilesDrop.vue | 250 ++++++++++++------ .../web-runtime/src/components/UploadInfo.vue | 36 ++- .../web-runtime/src/layouts/Application.vue | 4 +- 3 files changed, 197 insertions(+), 93 deletions(-) diff --git a/packages/web-app-files/src/views/FilesDrop.vue b/packages/web-app-files/src/views/FilesDrop.vue index 555b98484bf..f7abbaa8f16 100644 --- a/packages/web-app-files/src/views/FilesDrop.vue +++ b/packages/web-app-files/src/views/FilesDrop.vue @@ -1,45 +1,83 @@