Skip to content

Commit

Permalink
Update github repo package
Browse files Browse the repository at this point in the history
  • Loading branch information
underpostnet committed Dec 12, 2024
1 parent e2b9681 commit 17ad21e
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const globalBinFolder = `${shellExec(`npm root -g`, {

const program = new Command();

const version = '2.7.92';
const version = '2.7.93';

program.name('underpost').description(`underpost.net ci/cd cli ${version}`).version(version);

Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ services:
cpus: '0.25'
memory: 20M
labels: # labels in Compose file instead of Dockerfile
engine.version: '2.7.92'
engine.version: '2.7.93'
networks:
- load-balancer

Expand Down
3 changes: 2 additions & 1 deletion src/client/Default.index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import { SignUpDefault } from './components/default/SignUpDefault.js';
import { MenuDefault } from './components/default/MenuDefault.js';
import { RouterDefault } from './components/default/RoutesDefault.js';
import { TranslateDefault } from './components/default/TranslateDefault.js';
import { getProxyPath } from './components/core/VanillaJs.js';
import { Worker } from './components/core/Worker.js';
import { Keyboard } from './components/core/Keyboard.js';
import { DefaultParams } from './components/default/CommonDefault.js';
import { SocketIo } from './components/core/SocketIo.js';
import { SocketIoDefault } from './components/default/SocketIoDefault.js';
import { ElementsDefault } from './components/default/ElementsDefault.js';
import { Scroll } from './components/core/Scroll.js';

const htmlMainBody = async () => {
return html`<span style="color: black; padding: 5px">Hello World!!</span>`;
Expand All @@ -35,6 +35,7 @@ window.onload = () =>
await LogInDefault();
await LogOutDefault();
await SignUpDefault();
await Scroll.pullTopRefresh();
await Keyboard.Init({ callBackTime: DefaultParams.EVENT_CALLBACK_TIME });
},
});
2 changes: 1 addition & 1 deletion src/client/components/core/Docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const Docs = {
icon: html`<i class="fa-brands fa-osi"></i>`,
text: 'Source Docs',
url: function () {
return `${getProxyPath()}docs/engine/2.7.92`;
return `${getProxyPath()}docs/engine/2.7.93`;
},
},
{
Expand Down
66 changes: 65 additions & 1 deletion src/client/components/core/Scroll.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { s } from './VanillaJs.js';
import { borderChar } from './Css.js';
import { append, s } from './VanillaJs.js';

const Scroll = {
data: {},
Expand Down Expand Up @@ -29,6 +30,69 @@ const Scroll = {
behavior: options.behavior || 'smooth',
});
},
pullTopRefresh: function () {
append(
'body',
html` <style>
.pull-refresh-icon-container {
height: 60px;
width: 100%;
z-index: 10;
transition: 0.3s;
left: 0px;
}
.pull-refresh-icon {
width: 60px;
height: 60px;
margin: auto;
color: white;
font-size: 30px;
}
</style>
${borderChar(2, 'black', [' .pull-refresh-icon-container'])}
<div style="top: -60px" class="abs pull-refresh-icon-container">
<div class="in pull-refresh-icon">
<div class="abs center"><i class="fa-solid fa-arrows-rotate"></i></div>
</div>
</div>`,
);

let touchstartY = 0;
let reload = false;
const minHeightDragReload = 3;
const maxHeightDragReload = 20;

document.addEventListener('touchstart', (e) => {
touchstartY = e.touches[0].clientY;
// console.warn('touchstart', touchstartY);
});

document.addEventListener('touchmove', (e) => {
const touchY = e.touches[0].clientY;
const touchDiff = touchY - touchstartY;

// console.warn('touchDiff', touchDiff, maxHeightDragReload);

if (touchDiff > maxHeightDragReload)
s(`.pull-refresh-icon-container`).style.top = 60 + maxHeightDragReload + 'px';
else s(`.pull-refresh-icon-container`).style.top = 60 + touchDiff + 'px';

if (touchDiff > minHeightDragReload && window.scrollY === 0) {
reload = true;
} else {
reload = false;
}
});
document.addEventListener('touchend', (e) => {
// console.warn('touchend');
s(`.pull-refresh-icon-container`).style.top = '-60px';
if (reload) {
location.reload();
// console.warn('reload');
}
reload = false;
});
},
};

export { Scroll };
2 changes: 1 addition & 1 deletion src/client/ssr/body/CacheControl.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,6 @@ SrrComponent = ({ ttiLoadTimeLimit }) => {
const CacheControl = ${CacheControl};
CacheControl({ ttiLoadTimeLimit: ${ttiLoadTimeLimit ? ttiLoadTimeLimit : 1000 * 70 * 1} });
</script>
<div class="clean-cache-container">v2.7.92</div>
<div class="clean-cache-container">v2.7.93</div>
`;
};

0 comments on commit 17ad21e

Please sign in to comment.