Skip to content

Commit 6e3f9a0

Browse files
feat(external): add dedicated ExternalApp without NcContent and reset server.css layout
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent d6d0782 commit 6e3f9a0

3 files changed

Lines changed: 57 additions & 1 deletion

File tree

src/ExternalApp.vue

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<!--
2+
- SPDX-FileCopyrightText: 2024 LibreCode coop and LibreCode contributors
3+
- SPDX-License-Identifier: AGPL-3.0-or-later
4+
-->
5+
6+
<template>
7+
<div class="external-app">
8+
<router-view />
9+
<RightSidebar />
10+
</div>
11+
</template>
12+
13+
<script setup lang="ts">
14+
import { defineOptions } from 'vue'
15+
16+
defineOptions({ name: 'LibreSignExternal' })
17+
18+
import RightSidebar from './components/RightSidebar/RightSidebar.vue'
19+
</script>
20+
21+
<style lang="scss" scoped>
22+
.external-app {
23+
position: absolute;
24+
inset: 0;
25+
display: flex;
26+
background-color: var(--color-main-background);
27+
// On mobile, NcAppSidebar relies on NcContent to overlay content.
28+
// Without it, force the sidebar to cover the viewport as a full-screen overlay.
29+
@media (max-width: 512px) {
30+
:deep(#app-sidebar) {
31+
position: fixed;
32+
inset: 0;
33+
width: 100vw !important;
34+
max-width: 100vw !important;
35+
height: 100vh;
36+
z-index: 2000;
37+
}
38+
}
39+
}
40+
</style>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/**
2+
* SPDX-FileCopyrightText: 2026 LibreCode coop and LibreCode contributors
3+
* SPDX-License-Identifier: AGPL-3.0-or-later
4+
*/
5+
6+
// Override server.css layout rules that assume authenticated header layout.
7+
// `html body #content` beats the specificity of server.css selectors.
8+
html body #content {
9+
position: fixed;
10+
inset: 0;
11+
margin: 0;
12+
width: 100vw;
13+
height: 100vh;
14+
border-radius: 0;
15+
}

src/external.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ import { createApp } from 'vue'
77
import { createPinia } from 'pinia'
88
import { translate as t, translatePlural as n } from '@nextcloud/l10n'
99

10-
import App from './App.vue'
10+
import App from './ExternalApp.vue'
1111
import router from './router/router'
12+
import './assets/styles/external-page.scss'
1213

1314
if (window.OCA && !window.OCA.LibreSign) {
1415
Object.assign(window.OCA, { LibreSign: {} })

0 commit comments

Comments
 (0)