Skip to content

Commit dffeb6b

Browse files
committed
Adapt to latest upstream
Small bug fixes All apps with header/branding
1 parent 9387fa1 commit dffeb6b

File tree

10 files changed

+77
-135
lines changed

10 files changed

+77
-135
lines changed

ifc-js/package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,6 @@
6363
"vue-template-compiler": "^2.6.12",
6464
"vuex": "^3.6.2"
6565
},
66-
"engines": {
67-
"node": ">=14 <=16"
68-
},
6966
"dependencies": {
7067
"three": "^0.134.0",
7168
"web-ifc-three": "^0.0.75"

ifc-js/src/App.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<main>
3-
<div class="uk-position-center" v-if="loading">
3+
<div class="oc-position-center" v-if="loading">
44
<oc-spinner size="xlarge" />
55
<p v-translate class="oc-invisible">Loading app</p>
66
</div>
@@ -85,7 +85,7 @@ export default {
8585
requestAnimationFrame(this.animate)
8686
},
8787
addIFCModel: function () {
88-
const isPublic = this.$route.name === 'ifc-js-public'
88+
const isPublic = this.$route.params.contextRouteName === 'files-public-files'
8989
const ifcLoader = new IFCLoader()
9090
// FIXME hack to load the wasm... should not be needed
9191
ifcLoader.ifcManager.setWasmPath(
@@ -109,6 +109,10 @@ export default {
109109
</script>
110110

111111
<style>
112+
.app-container {
113+
/* FIXME make app compatible with dark mode */
114+
background-color: white !important;
115+
}
112116
main {
113117
width: 100%;
114118
height: 100%;

ifc-js/src/index.js

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,13 @@ const name = 'IFC Viewer'
66
const routes = [
77
{
88
name: 'view',
9-
path: '/view/:filePath*',
9+
path: '/:contextRouteName/:filePath*',
1010
components: {
11-
fullscreen: App
12-
},
13-
meta: {
14-
title: name,
15-
hideHeadbar: true,
16-
patchCleanPath: true
17-
}
18-
},
19-
{
20-
name: 'public',
21-
path: '/public/:filePath*',
22-
components: {
23-
fullscreen: App
11+
app: App
2412
},
2513
meta: {
2614
title: name,
2715
patchCleanPath: true,
28-
hideHeadbar: true,
2916
auth: false
3017
}
3118
}
@@ -40,20 +27,7 @@ const appInfo = {
4027
extension: 'ifc',
4128
newTab: true,
4229
routeName: 'ifc-js-view',
43-
canBeDefault: true,
44-
routes: [
45-
'files-personal',
46-
'files-favorites',
47-
'files-shared-with-others',
48-
'files-shared-with-me'
49-
]
50-
},
51-
{
52-
extension: 'ifc',
53-
newTab: true,
54-
routeName: 'ifc-js-public',
55-
canBeDefault: true,
56-
routes: ['files-public-list']
30+
canBeDefault: true
5731
}
5832
]
5933
}

jupyter/package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,5 @@
6363
"vue-template-compiler": "^2.6.12",
6464
"vuex": "^3.6.2"
6565
},
66-
"engines": {
67-
"node": ">=14 <=16"
68-
},
6966
"dependencies": {}
7067
}

jupyter/src/App.vue

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<main id="jupyter">
3-
<div class="uk-position-center" v-if="loading">
3+
<div class="oc-position-center" v-if="isLoading">
44
<oc-spinner size="xlarge" />
55
<p v-translate class="oc-invisible">Loading app</p>
66
</div>
@@ -13,7 +13,7 @@
1313
@close="clearLastError"
1414
/>
1515
</oc-notifications>
16-
<div class="uk-container uk-width-1-1" v-if="!loading">
16+
<div class="oc-container oc-width-1-1" v-if="!isLoading">
1717
<!-- eslint-disable-next-line vue/no-v-html -->
1818
<div id="notebook">
1919
<div id="notebook-container" class="container" v-html="renderedNotebook"></div>
@@ -36,7 +36,7 @@ export default {
3636
this.loadFile({
3737
filePath: filePath,
3838
client: this.$client,
39-
public: this.$route.name === 'jupyter-public',
39+
public: this.$route.params.contextRouteName === 'files-public-files',
4040
publicLinkPassword: this.publicLinkPassword
4141
})
4242
},
@@ -46,14 +46,17 @@ export default {
4646
}
4747
</script>
4848
<style>
49+
#jupyter {
50+
overflow: scroll !important;
51+
}
4952
#notebook {
5053
padding-top: 40px;
5154
padding-bottom: 40px;
5255
}
5356
5457
#notebook-container {
5558
padding: 30px 28px 30px 130px;
56-
background-color: #fff;
59+
background-color: var(--oc-color-background-default);
5760
min-height: 0;
5861
-webkit-box-shadow: 0px 0px 12px 1px rgb(87 87 87 / 20%);
5962
box-shadow: 0px 0px 12px 1px rgb(87 87 87 / 20%);
@@ -76,4 +79,33 @@ export default {
7679
width: 768px;
7780
}
7881
}
82+
pre {
83+
background: var(--oc-color-background-muted);
84+
border: 1px solid #e5e5e5;
85+
border-radius: 3px;
86+
color: var(--oc-color-text-default);
87+
font: 0.875rem/1.5 Consolas,monaco,monospace;
88+
overflow: auto;
89+
padding: 10px;
90+
-moz-tab-size: 4;
91+
tab-size: 4;
92+
}
93+
94+
address,
95+
dl,
96+
fieldset,
97+
figure,
98+
ol,
99+
p,
100+
pre,
101+
ul {
102+
margin: 0 0 20px;
103+
}
104+
user agent stylesheet
105+
pre {
106+
display: block;
107+
font-family: monospace;
108+
white-space: pre;
109+
margin: 1em 0px;
110+
}
79111
</style>

jupyter/src/index.js

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,7 @@ const name = 'Jupyter Viewer'
1111
const routes = [
1212
{
1313
name: 'view',
14-
path: '/view/:filePath*',
15-
components: {
16-
app: App
17-
},
18-
meta: {
19-
title: name,
20-
patchCleanPath: true
21-
}
22-
},
23-
{
24-
name: 'public',
25-
path: '/public/:filePath*',
14+
path: '/:contextRouteName/:filePath*',
2615
components: {
2716
app: App
2817
},
@@ -43,20 +32,7 @@ const appInfo = {
4332
extension: 'ipynb',
4433
newTab: true,
4534
routeName: 'jupyter-view',
46-
canBeDefault: true,
47-
routes: [
48-
'files-personal',
49-
'files-favorites',
50-
'files-shared-with-others',
51-
'files-shared-with-me'
52-
]
53-
},
54-
{
55-
extension: 'ipynb',
56-
newTab: true,
57-
routeName: 'jupyter-public',
58-
canBeDefault: true,
59-
routes: ['files-public-list']
35+
canBeDefault: true
6036
}
6137
]
6238
}

open-in-swan/package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,5 @@
6060
"vue-jest": "^3.0.7",
6161
"vue-template-compiler": "^2.6.12"
6262
},
63-
"engines": {
64-
"node": ">=14 <=16"
65-
},
6663
"dependencies": {}
6764
}

rootjs/package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,5 @@
6262
"vue-template-compiler": "^2.6.12",
6363
"vuex": "^3.6.2"
6464
},
65-
"engines": {
66-
"node": ">=14 <=16"
67-
},
6865
"dependencies": {}
6966
}

rootjs/src/App.vue

Lines changed: 27 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
<template>
22
<main>
3-
<div class="uk-position-center" v-if="loading">
3+
<div class="oc-position-center" v-if="loading">
44
<oc-spinner size="xlarge" />
55
<p v-translate class="oc-invisible">Loading app</p>
66
</div>
7-
<div id="leftBar">
8-
<select id="mode-select" v-model="viewMode" @change="renderViewer">
9-
<option v-for="item in items" :key="item" :value="item">
10-
{{ item }}
11-
</option>
12-
</select>
13-
<button @click="exit">Exit</button>
14-
<div id="treeViewer"></div>
7+
<div class="oc-flex root-viewer">
8+
<div id="web-nav-sidebar" class="root-sidebar app-navigation oc-app-navigation-expanded">
9+
<select id="mode-select" v-model="viewMode" @change="renderViewer">
10+
<option v-for="item in items" :key="item" :value="item">
11+
{{ item }}
12+
</option>
13+
</select>
14+
<button @click="exit">Exit</button>
15+
<div id="treeViewer"></div>
16+
</div>
17+
<div id="mainViewer" class="oc-flex oc-height-1-1 app-content oc-width-1-1"></div>
1518
</div>
16-
<div id="mainViewer"></div>
1719
</main>
1820
</template>
1921
<script>
@@ -43,7 +45,7 @@ export default {
4345
}
4446
},
4547
created() {
46-
this.isPublic = this.$route.name === 'rootjs-public'
48+
this.isPublic = this.$route.params.contextRouteName === 'files-public-files'
4749
const filePath = `/${this.$route.params.filePath.split('/').filter(Boolean).join('/')}`
4850
this.url = getFileUrl(this.$client, this.isPublic, filePath)
4951
this.viewMode = this.items[0]
@@ -76,30 +78,22 @@ export default {
7678
</script>
7779

7880
<style>
79-
#leftBar {
80-
position: fixed;
81-
top: 0;
82-
left: 0;
83-
bottom: 0;
84-
width: 250px;
81+
.app-container {
82+
/* FIXME make app compatible with dark mode */
83+
background-color: white !important;
84+
}
85+
.root-viewer {
8586
height: 100%;
86-
border: none;
87-
margin: 0;
88-
padding: 0;
89-
overflow: hidden;
90-
float: left;
87+
}
88+
.root-sidebar {
89+
/* FIXME make app compatible with dark mode */
90+
background-color: white !important;
91+
display: block !important;
92+
padding: 10px;
93+
overflow: scroll !important;
94+
box-sizing: border-box;
9195
}
9296
#mainViewer {
93-
position: fixed;
94-
top: 0;
95-
bottom: 0;
96-
right: 0;
97-
width: calc(100% - 250px);
98-
height: 100%;
99-
border: none;
100-
margin: 0;
101-
padding: 0;
102-
overflow: hidden;
103-
float: right;
97+
padding: 10px;
10498
}
10599
</style>

rootjs/src/index.js

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,13 @@ const name = 'ROOT Viewer'
66
const routes = [
77
{
88
name: 'view',
9-
path: '/view/:filePath*',
9+
path: '/:contextRouteName/:filePath*',
1010
components: {
11-
fullscreen: App
11+
app: App
1212
},
1313
meta: {
1414
title: name,
1515
patchCleanPath: true,
16-
hideHeadbar: true
17-
}
18-
},
19-
{
20-
path: '/public/:filePath*',
21-
components: {
22-
fullscreen: App
23-
},
24-
name: 'public',
25-
meta: {
26-
title: name,
27-
patchCleanPath: true,
28-
hideHeadbar: true,
2916
auth: false
3017
}
3118
}
@@ -40,20 +27,7 @@ const appInfo = {
4027
extension: 'root',
4128
newTab: true,
4229
routeName: 'rootjs-view',
43-
canBeDefault: true,
44-
routes: [
45-
'files-personal',
46-
'files-favorites',
47-
'files-shared-with-others',
48-
'files-shared-with-me'
49-
]
50-
},
51-
{
52-
extension: 'root',
53-
newTab: true,
54-
routeName: 'rootjs-public',
55-
canBeDefault: true,
56-
routes: ['files-public-list']
30+
canBeDefault: true
5731
}
5832
]
5933
}

0 commit comments

Comments
 (0)