Skip to content

Commit

Permalink
Merge pull request #6401 from owncloud/enforce-extention-header
Browse files Browse the repository at this point in the history
[full-ci] Enforce extensions to always display the ui-header
  • Loading branch information
kulmann authored Feb 11, 2022
2 parents 7a55ccd + 396ba0f commit e09700e
Show file tree
Hide file tree
Showing 32 changed files with 395 additions and 414 deletions.
6 changes: 6 additions & 0 deletions changelog/unreleased/change-enforce-ui-header
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Change: Enforce extensions to always display the ui-header

We've enforced the ui to always render the header for third party extensions.
From now on extensions are not able to disable the header anymore.

https://github.com/owncloud/web/pull/6401
5 changes: 0 additions & 5 deletions packages/web-app-draw-io/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,6 @@ export default {
</script>
<style scoped>
#drawio-editor {
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 0;
width: 100%;
height: 100%;
border: none;
Expand Down
5 changes: 1 addition & 4 deletions packages/web-app-draw-io/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,9 @@ const routes = [
{
name: 'draw-io',
path: '/:contextRouteName/:filePath*',
components: {
fullscreen: App
},
component: App,
meta: {
auth: false,
hideHeadbar: true,
patchCleanPath: true
}
}
Expand Down
4 changes: 1 addition & 3 deletions packages/web-app-external/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ const routes = [
{
name: 'apps',
path: '/:contextRouteName/:fileId/:appName?',
components: {
app: App
},
component: App,
meta: {
auth: false,
title: $gettext('External app')
Expand Down
1 change: 0 additions & 1 deletion packages/web-app-files/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ export default {
main {
height: 100%;
max-height: 100%;
overflow: hidden;
}
.files-list-wrapper {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ export default {
}
@media only screen and (min-width: 640px) {
.oc-dropzone-navigation-collapsed > .oc-dropzone-container {
left: calc(67px + var(--oc-space-small));
width: calc(100% - 67px - (2 * var(--oc-space-small)));
left: calc(64px + var(--oc-space-small));
width: calc(100% - 64px - (2 * var(--oc-space-small)));
}
.oc-dropzone-navigation-expanded > .oc-dropzone-container {
left: calc(250px + var(--oc-space-small));
Expand Down
8 changes: 2 additions & 6 deletions packages/web-app-files/src/router/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ export const isLocationCommonActive = isLocationActiveDirector<commonTypes>(
export const buildRoutes = (components: RouteComponents): RouteConfig[] => [
{
path: '/trash',
components: {
app: components.App
},
component: components.App,
children: [
{
name: locationTrash.name,
Expand All @@ -36,9 +34,7 @@ export const buildRoutes = (components: RouteComponents): RouteConfig[] => [
},
{
path: '/favorites',
components: {
app: components.App
},
component: components.App,
children: [
{
name: locationFavorites.name,
Expand Down
15 changes: 4 additions & 11 deletions packages/web-app-files/src/router/operations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ export const buildRoutes = (components: RouteComponents): RouteConfig[] => [
{
name: locationLocationPicker.name,
path: '/ops/location-picker/:context/:action/:item*',
components: {
app: components.LocationPicker
},
component: components.LocationPicker,
meta: {
verbose: true,
auth: false,
Expand All @@ -38,21 +36,16 @@ export const buildRoutes = (components: RouteComponents): RouteConfig[] => [
{
name: locationResolverPublicLink.name,
path: '/ops/resolver/public-link/:token',
components: {
fullscreen: components.PublicLink
},
component: components.PublicLink,
meta: {
auth: false,
hideHeadbar: true,
title: $gettext('Resolving public link')
}
},
{
name: locationResolverPrivateLink.name,
path: '/ops/resolver/private-link/:fileId',
components: {
fullscreen: components.PrivateLink
},
meta: { hideHeadbar: true, title: $gettext('Resolving private link') }
component: components.PrivateLink,
meta: { title: $gettext('Resolving private link') }
}
]
8 changes: 2 additions & 6 deletions packages/web-app-files/src/router/public.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ export const isLocationPublicActive = isLocationActiveDirector<shareTypes>(
export const buildRoutes = (components: RouteComponents): RouteConfig[] => [
{
path: '/public',
components: {
app: components.App
},
component: components.App,
meta: {
auth: false
},
Expand All @@ -41,9 +39,7 @@ export const buildRoutes = (components: RouteComponents): RouteConfig[] => [
{
name: locationPublicDrop.name,
path: '/public/drop/:token',
components: {
app: components.FilesDrop
},
component: components.FilesDrop,
meta: { auth: false, title: $gettext('Public file upload') }
}
]
4 changes: 1 addition & 3 deletions packages/web-app-files/src/router/shares.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ export const isLocationSharesActive = isLocationActiveDirector<shareTypes>(
export const buildRoutes = (components: RouteComponents): RouteConfig[] => [
{
path: '/shares',
components: {
app: components.App
},
component: components.App,
redirect: locationSharesWithMe,
children: [
{
Expand Down
4 changes: 1 addition & 3 deletions packages/web-app-files/src/router/spaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ export const isLocationSpacesActive = isLocationActiveDirector<spaceTypes>(
export const buildRoutes = (components: RouteComponents): RouteConfig[] => [
{
path: '/spaces',
components: {
app: components.App
},
component: components.App,
children: [
{
path: 'projects',
Expand Down
58 changes: 33 additions & 25 deletions packages/web-app-files/src/views/PrivateLink.vue
Original file line number Diff line number Diff line change
@@ -1,22 +1,31 @@
<template>
<div
class="oc-login oc-height-viewport"
:style="{ backgroundImage: 'url(' + backgroundImg + ')' }"
>
<div class="oc-height-1-1">
<h1 class="oc-invisible-sr">{{ pageTitle }}</h1>
<div class="oc-login-card oc-position-center">
<img class="oc-login-logo" :src="logoImg" alt="" :aria-hidden="true" />
<div v-if="loading" class="oc-login-card-body">
<h2 class="oc-login-card-title">
<translate>Resolving private link…</translate>
</h2>
<oc-spinner :aria-hidden="true" />
</div>
<div v-if="errorMessage" class="oc-login-card-body">
<h2 class="oc-login-card-title">
<translate>An error occurred while resolving the private link</translate>
</h2>
<span>{{ errorMessage }}</span>
<div class="oc-card oc-border oc-rounded oc-position-center oc-text-center oc-width-large">
<template v-if="loading">
<div class="oc-card-header">
<h2 key="private-link-loading">
<translate>Resolving private link…</translate>
</h2>
</div>
<div class="oc-card-body">
<oc-spinner :aria-hidden="true" />
</div>
</template>
<template v-else-if="errorMessage">
<div class="oc-card-header oc-link-resolve-error-title">
<h2 key="private-link-error">
<translate>An error occurred while resolving the private link</translate>
</h2>
</div>
<div class="oc-card-body oc-link-resolve-error-message">
<p class="oc-text-lead">{{ errorMessage }}</p>
</div>
</template>
<div class="oc-card-footer">
<p>
{{ configuration.currentTheme.general.slogan }}
</p>
</div>
</div>
</div>
Expand All @@ -38,14 +47,6 @@ export default {
pageTitle() {
return this.$gettext(this.$route.meta.title)
},
backgroundImg() {
return this.configuration.currentTheme.loginPage.backgroundImg
},
logoImg() {
return this.configuration.currentTheme.logo.login
}
},
mounted() {
Expand Down Expand Up @@ -77,3 +78,10 @@ export default {
}
}
</script>

<style lang="scss">
.oc-card-header h2,
.oc-card-footer p {
margin: 0;
}
</style>
70 changes: 39 additions & 31 deletions packages/web-app-files/src/views/PublicLink.vue
Original file line number Diff line number Diff line change
@@ -1,37 +1,43 @@
<template>
<div
class="oc-login oc-height-viewport"
:style="{ backgroundImage: 'url(' + backgroundImg + ')' }"
>
<div class="oc-height-1-1">
<h1 class="oc-invisible-sr">{{ pageTitle }}</h1>
<div class="oc-login-card oc-position-center">
<img class="oc-login-logo" :src="logoImg" alt="" :aria-hidden="true" />
<div class="oc-login-card-body">
<template v-if="loading">
<h2 class="oc-login-card-title">
<div class="oc-card oc-border oc-rounded oc-position-center oc-text-center oc-width-large">
<template v-if="loading">
<div class="oc-card-header">
<h2 key="public-link-loading">
<translate>Loading public link…</translate>
</h2>
</div>
<div class="oc-card-body">
<oc-spinner :aria-hidden="true" />
</template>
<template v-else-if="errorMessage">
<h2 class="oc-login-card-title oc-login-card-error">
</div>
</template>
<template v-else-if="errorMessage">
<div class="oc-card-header oc-link-resolve-error-title">
<h2 key="public-link-error">
<translate>An error occurred while loading the public link</translate>
</h2>
</div>
<div class="oc-card-body oc-link-resolve-error-message">
<p class="oc-text-lead">{{ errorMessage }}</p>
</template>
<template v-else-if="passwordRequired">
<form @submit.prevent="resolvePublicLink">
<h2 class="oc-login-card-title">
<translate>This resource is password-protected.</translate>
</div>
</template>
<template v-else-if="passwordRequired">
<form @submit.prevent="resolvePublicLink">
<div class="oc-card-header">
<h2>
<translate>This resource is password-protected</translate>
</h2>
</div>
<div class="oc-card-body">
<oc-text-input
ref="passwordInput"
v-model="password"
:error-message="inputErrorMessage"
:label="passwordFieldLabel"
type="password"
class="oc-mb-s"
></oc-text-input>
/>
<oc-button
variation="primary"
appearance="filled"
Expand All @@ -40,10 +46,10 @@
>
<translate>Continue</translate>
</oc-button>
</form>
</template>
</div>
<div class="oc-login-card-footer">
</div>
</form>
</template>
<div class="oc-card-footer">
<p>
{{ configuration.currentTheme.general.slogan }}
</p>
Expand Down Expand Up @@ -80,17 +86,9 @@ export default {
passwordFieldLabel() {
return this.$gettext('Enter password for public link')
},
backgroundImg() {
return this.configuration.currentTheme.loginPage.backgroundImg
},
logoImg() {
return this.configuration.currentTheme.logo.login
}
},
mounted() {
created() {
this.resolvePublicLink()
},
methods: {
Expand Down Expand Up @@ -141,3 +139,13 @@ export default {
}
}
</script>

<style lang="scss">
.oc-text-input-message {
justify-content: center;
}
.oc-card-header h2,
.oc-card-footer p {
margin: 0;
}
</style>
Loading

0 comments on commit e09700e

Please sign in to comment.