Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
105
Merge Requests
105
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos
Commits
e324de96
Commit
e324de96
authored
Jan 18, 2023
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master' into zope4py2
parents
fcff86de
7aaeacac
Pipeline
#25960
failed with stage
in 0 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
59 additions
and
9 deletions
+59
-9
component/theia/buildout.hash.cfg
component/theia/buildout.hash.cfg
+1
-1
component/theia/preloadTemplate.html
component/theia/preloadTemplate.html
+17
-4
software/theia/buildout.hash.cfg
software/theia/buildout.hash.cfg
+1
-1
software/theia/instance-theia.cfg.jinja.in
software/theia/instance-theia.cfg.jinja.in
+40
-3
No files found.
component/theia/buildout.hash.cfg
View file @
e324de96
...
...
@@ -15,7 +15,7 @@
[preloadTemplate.html]
_update_hash_filename_ = preloadTemplate.html
md5sum =
8157c22134200bd862a07c6521ebf799
md5sum =
6343592161a349bb40e0de16ce67aa51
[yarn.lock]
_update_hash_filename_ = yarn.lock
...
...
component/theia/preloadTemplate.html
View file @
e324de96
<script>
let
link
=
document
.
createElement
(
'
link
'
);
link
.
rel
=
"
stylesheet
"
;
link
.
href
=
"
/css/slapos.css
"
;
document
.
head
.
appendChild
(
link
);
let
link
=
document
.
createElement
(
'
link
'
);
link
.
rel
=
"
stylesheet
"
;
link
.
href
=
"
/css/slapos.css
"
;
document
.
head
.
appendChild
(
link
);
link
=
document
.
createElement
(
'
link
'
);
link
.
rel
=
"
manifest
"
;
link
.
href
=
"
/theia.webmanifest
"
;
document
.
head
.
appendChild
(
link
);
if
(
'
serviceWorker
'
in
navigator
)
{
navigator
.
serviceWorker
.
register
(
'
/theia-serviceworker.js
'
).
then
(
function
(
reg
)
{
console
.
log
(
'
Successfully registered service worker
'
,
reg
);
}).
catch
(
function
(
err
)
{
console
.
warn
(
'
Error whilst registering service worker
'
,
err
);
});
}
</script>
\ No newline at end of file
software/theia/buildout.hash.cfg
View file @
e324de96
...
...
@@ -15,7 +15,7 @@
[instance-theia]
_update_hash_filename_ = instance-theia.cfg.jinja.in
md5sum =
937f8ebdfa8112aafe11235a23fb85a9
md5sum =
ca0f353d00131851a992cd3519bec5b0
[instance]
_update_hash_filename_ = instance.cfg.in
...
...
software/theia/instance-theia.cfg.jinja.in
View file @
e324de96
...
...
@@ -324,7 +324,9 @@ inline =
bind $${:ip}:$${:port} ssl crt $${frontend-instance-certificate:cert-file} alpn h2,http/1.1
# writing twice the same ACL is doing OR
acl is_public path_beg /public/
acl is_public path /$${favicon.ico:filename}
acl is_public path /$${frontend-instance-favicon.ico:filename}
acl is_public path /$${frontend-instance-theia.webmanifest:filename}
acl is_public path /$${frontend-instance-theia-serviceworker.js:filename}
acl auth_ok http_auth(basic-auth-list)
# No authentication for public folder
http-request auth unless auth_ok || is_public
...
...
@@ -386,7 +388,42 @@ folder-name = css
context =
key logo_image frontend-instance-logo:filename
[favicon.ico]
[frontend-instance-theia.webmanifest]
recipe = slapos.recipe.build
short-name = {{ root_title }}
name = Theia SlapOS $${:short-name}
background-color = #3c3c3c
install =
import json
with open(options['location'], 'w') as f:
json.dump({
"name": options["name"],
"short_name": options["short-name"],
"icons": [
{
"src": "/" + self.buildout["frontend-instance-favicon.ico"]["filename"],
"sizes": "256x256",
"type": "image/png"
},
],
"start_url": "/",
"display": "fullscreen",
"background_color": options["background-color"]
}, f)
location = $${directory:frontend-static}/$${:filename}
filename = theia.webmanifest
[frontend-instance-theia-serviceworker.js]
recipe = slapos.recipe.template
inline =
/* minimal service worker for A2HS */
self.addEventListener("fetch", function(event) { });
output = $${directory:frontend-static}/$${:filename}
filename = theia-serviceworker.js
[frontend-instance-favicon.ico]
# generate a pseudo random favicon, different for each instance name.
recipe = slapos.recipe.build
seed = {{ root_title }}
...
...
@@ -408,7 +445,7 @@ install =
self.buildout['buildout']['offline'] = buildout_offline
location = $${directory:frontend-static}/$${:filename}
filename =
$${:_buildout_section_name_}
filename =
favicon.ico
# Local Python Server
# -------------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment