Skip to content

Commit

Permalink
update hydrogen
Browse files Browse the repository at this point in the history
  • Loading branch information
bwindels committed Aug 14, 2020
1 parent 574c0f5 commit b0cfd56
Show file tree
Hide file tree
Showing 30 changed files with 25,174 additions and 0 deletions.
469 changes: 469 additions & 0 deletions hydrogen-465980817.css

Large diffs are not rendered by default.

23,914 changes: 23,914 additions & 0 deletions hydrogen-legacy-907456704.js

Large diffs are not rendered by default.

Binary file added icon-192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!DOCTYPE html><html manifest="manifest.appcache"><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no">
<meta name="application-name" content="Hydrogen Chat">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="Hydrogen Chat">
<meta name="description" content="A matrix chat application">
<link rel="stylesheet" type="text/css" href="hydrogen-465980817.css">
<link rel="stylesheet" type="text/css" href="themes/element/bundle-1467704481.css" title="Element Theme">
<link rel="alternate stylesheet" type="text/css" href="themes/bubbles/bundle-2682099160.css" title="Bubbles Theme">
<link rel="manifest" href="manifest-2714077836.json"></head>
<body class="hydrogen">
<script id="version" type="text/javascript">
window.HYDROGEN_VERSION = "0.0.27";
</script>
<script type="text/javascript" src="hydrogen-legacy-907456704.js"></script><script type="text/javascript">hydrogenBundle.main(document.body);</script>
<script id="service-worker" type="text/javascript">
if('serviceWorker' in navigator) {
navigator.serviceWorker.register('sw.js')
.then(function() { console.log("Service Worker registered"); });
}
</script>


</body></html>
1 change: 1 addition & 0 deletions manifest-2714077836.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"name":"Hydrogen Chat","short_name":"Hydrogen","display":"fullscreen","start_url":"index.html","icons":[{"src":"icon-192.png","sizes":"192x192","type":"image/png"}]}
11 changes: 11 additions & 0 deletions manifest.appcache
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
CACHE MANIFEST
# v0.0.27
NETWORK
"*"
CACHE
hydrogen-legacy-907456704.js
hydrogen-465980817.css
index.html
icon-192.png
themes/element/bundle-1467704481.css
themes/bubbles/bundle-2682099160.css
51 changes: 51 additions & 0 deletions sw.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/*
Copyright 2020 Bruno Windels <[email protected]>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

const VERSION = "0.0.27";
const OFFLINE_FILES = ["hydrogen-legacy-907456704.js","hydrogen-465980817.css","index.html","icon-192.png","themes/element/bundle-1467704481.css","themes/bubbles/bundle-2682099160.css"];
// TODO: cache these files when requested
// The difficulty is that these are relative filenames, and we don't have access to document.baseURI
// Clients.match({type: "window"}).url and assume they are all the same? they really should be ... safari doesn't support this though
const CACHE_FILES = ["themes/element/element-logo-2959259787.svg","themes/element/icons/chevron-right-787082136.svg","themes/element/icons/send-4065347741.svg","themes/element/inter/Inter-Black-276207522.woff","themes/element/inter/Inter-BlackItalic-3159247813.woff","themes/element/inter/Inter-Bold-4187626158.woff","themes/element/inter/Inter-BoldItalic-641187949.woff","themes/element/inter/Inter-ExtraBold-3888913940.woff","themes/element/inter/Inter-ExtraBoldItalic-2880676406.woff","themes/element/inter/Inter-ExtraLight-3277895962.woff","themes/element/inter/Inter-ExtraLightItalic-3022762143.woff","themes/element/inter/Inter-Italic-4024721388.woff","themes/element/inter/Inter-Light-3990448997.woff","themes/element/inter/Inter-LightItalic-412813693.woff","themes/element/inter/Inter-Medium-2285329551.woff","themes/element/inter/Inter-MediumItalic-1722521156.woff","themes/element/inter/Inter-Regular-2779214592.woff","themes/element/inter/Inter-SemiBold-1906312195.woff","themes/element/inter/Inter-SemiBoldItalic-3778207334.woff","themes/element/inter/Inter-Thin-1593561269.woff","themes/element/inter/Inter-ThinItalic-1888295987.woff"];
const cacheName = `hydrogen-${VERSION}`;

self.addEventListener('install', function(e) {
e.waitUntil(
caches.open(cacheName).then(function(cache) {
return cache.addAll(OFFLINE_FILES);
})
);
});

self.addEventListener('activate', (event) => {
event.waitUntil(
caches.keys().then((keyList) => {
return Promise.all(keyList.map((key) => {
if (key !== cacheName) {
return caches.delete(key);
}
}));
})
);
});

self.addEventListener('fetch', (event) => {
event.respondWith(
caches.open(cacheName)
.then(cache => cache.match(event.request))
.then((response) => response || fetch(event.request))
);
});
184 changes: 184 additions & 0 deletions themes/bubbles/bundle-2682099160.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
/*
Copyright 2020 Bruno Windels <[email protected]>
Copyright 2020 The Matrix.org Foundation C.I.C.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

.hydrogen {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Cantarell, sans-serif, 'emoji';
background-color: black;
color: white;
}

.avatar {
border-radius: 100%;
background: white;
color: black;
}

.LeftPanel {
background: #333;
color: white;
}

.LeftPanel ul {
padding: 0;
margin: 0;
}

.LeftPanel li {
margin: 5px;
padding: 10px;
/* vertical align */
align-items: center;
}

.LeftPanel li {
border-bottom: 1px #555 solid;
}

.LeftPanel li:last-child {
border-bottom: none;
}

.LeftPanel li > * {
margin-right: 10px;
}

.LeftPanel .description .last-message {
font-size: 0.8em;
}

a {
color: white;
}

.SessionStatusView {
padding: 5px;
background-color: #555;
}

.RoomPlaceholderView {
align-items: center;
justify-content: center;
}

.SessionPickerView li {
font-size: 1.2em;
background-color: grey;
}

.RoomHeader {
padding: 10px;
background-color: #333;
}

.RoomHeader button {
width: 40px;
height: 40px;
font-size: 1.5em;
padding: 0;
background: white;
border: none;
font-weight: bolder;
line-height: 40px;
}

.back::before {
content: "☰";
}

.more::before {
content: "⋮";
}

.RoomHeader .topic {
font-size: 0.8em;
}

.RoomHeader {
padding: 10px;
background-color: #333;
}

.RoomView_error {
color: red;
}

.MessageComposer > input {
padding: 0.8em;
border: none;
}

.message-container {
max-width: 80%;
padding: 5px 10px;
margin: 5px 10px;
background: blue;
}

.message-container .sender {
margin: 5px 0;
font-size: 0.9em;
font-weight: bold;
}

.TextMessageView .message-container time {
padding: 2px 0 0px 20px;
font-size: 0.9em;
color: lightblue;
}

.message-container time {
font-size: 0.9em;
color: lightblue;
}

.own time {
color: lightgreen;
}

.own .message-container {
background-color: darkgreen;
}

.TextMessageView.own .message-container {
margin-left: auto;
}

.TextMessageView.pending .message-container {
background-color: #333;
}

.TextMessageView .message-container time {
float: right;
}

.message-container p {
margin: 5px 0;
}

.AnnouncementView {
margin: 5px 0;
padding: 5px 10%;
}

.AnnouncementView > div {
margin: 0 auto;
padding: 10px 20px;
background-color: #333;
font-size: 0.9em;
color: #CCC;
text-align: center;
}
Loading

0 comments on commit b0cfd56

Please sign in to comment.