Skip to content

Commit

Permalink
Merge branch 'sync'
Browse files Browse the repository at this point in the history
  • Loading branch information
Knkajfw committed Apr 21, 2020
2 parents 58614e7 + e3cf7c9 commit d51a4ce
Show file tree
Hide file tree
Showing 9 changed files with 349 additions and 69 deletions.
20 changes: 16 additions & 4 deletions assets/html/door.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@
<title>记闪现PasteLikeDoinb</title>
</head>
<body style="font-family: 微软雅黑;">

<div id='top-info-bar' class="container-fluid bg-dark text-white text-center" style="font-size: 0.8rem;"></div>
<div id='top-info-bar-2' class="container-fluid text-white text-center" style="font-size: 0.8rem; background-color: #3FA5FF;"></div>

<button type="button" id="door-reload-button" class="btn btn-outline-danger" onclick="doorReload()" style="position: absolute; top: 40px; left: 20px; width: 24px; height: 24px; padding: 0px;">
<img src="../img/reload.png" style="width: 15px; height: 15px; position: relative; top: -2px; left: 1px;">
</button>

<button type="button" id="open-devtools-button" class="btn btn-outline-dark" onclick="sendOpenDevTools()" style="position: absolute; top: 40px; left: 48px; width: 24px; height: 24px; padding: 0px;">
<img src="../img/console.png" style="width: 15px; height: 15px; position: relative; top: -2px; left: 1px;">
</button>

<div class="mt-5 mb-3 mx-0 row justify-content-center">
<img src="../img/signal.svg" style="max-width: 30%; max-height: 30%;">
</div>
Expand All @@ -15,7 +27,7 @@
</div>

<div class="row mx-0 justify-content-center">
<span class="text-muted" style="font-size: small; padding-right: 185px;">移动端地址</span>
<span class="text-muted" style="font-size: small; padding-right: 160px;">移动端地址</span>
<div id="copy-link-div" style="margin: 0px; padding: 0px;">
<a id="copy-link" href="#" style="font-size: small;">复制链接</a>
</div>
Expand All @@ -32,15 +44,15 @@
</div>

<div class="row mx-0 mb-0 justify-content-center">
<p style="font-size: 10px;" class="text-muted">二维码即为上方链接,微信扫无效</p>
<img src="../img/question.svg" alt="?" data-toggle="tooltip" data-placement="bottom" title="微信屏蔽过于严格,可用支付宝/相机/浏览器等扫码,建议使用谷歌/火狐/Safari打开链接" style="transform: translate(2px, -8px);">
<p style="font-size: 10px;" class="text-muted">二维码即为上方链接</p>
<img src="../img/question.svg" alt="?" data-toggle="tooltip" data-placement="bottom" title="建议使用谷歌/火狐/Safari打开链接" style="transform: translate(2px, -8px);">
</div>


<div class="mx-5">
<div id="qrerror"></div>
</div>

</body >
<script src="http://indienost.gitee.io/paste-like-doinb/serverinfo.js"></script>
<script src="../../renderer.js"></script>
</html>
3 changes: 2 additions & 1 deletion assets/html/loading-page.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
</div>
<div class="container-fluid text-center text-muted" id="status-block">正在获取服务器地址</div>
</div>
<button type="button" id="loading-page-reload-button" class="btn btn-outline-danger" style="position: absolute; top: 80%; left: 50%; transform: translateX(-50%);" onclick="reload()">重新连接</button>
<a id="icon-link" href="https://loading.io/spinner/ellipsis/" style="position: absolute; top: 90%; left: 50%; transform: translate(-50%);"><small>icon 'Ellipsis' from loading.io</small></a>
<script src="https://knkajfw.github.io/paste-like-doinb/serverinfo.js"></script>
<script src="http://indienost.gitee.io/paste-like-doinb/serverinfo.js"></script>
<script src="../../loading-page.js"></script>
</body>
</html>
Binary file added assets/img/console.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/img/reload.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 6 additions & 2 deletions loading-page.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { ipcRenderer, shell } = require('electron');
const pldVersion = 440389;
const pldVersion = 440921;
var statusBlock = document.getElementById('status-block');
var iconLink = document.getElementById('icon-link');
var infobar = document.getElementById('top-info-bar');
Expand All @@ -15,11 +15,15 @@ function openCannotConnectHelpExternally(event) {
shell.openExternal('https://knkajfw.github.io/paste-like-doinb/cannot-connect.html');
}
function replaceIconLinkWithCannotConnectHelp() {
iconLink.innerHTML = '<small>不能连接请点我</small>';
iconLink.innerHTML = "<small>Can't get connected? See help</small>";
iconLink.removeEventListener('click', openIconLinkExternally);
iconLink.addEventListener('click', openCannotConnectHelpExternally);
}

function reload(){
ipcRenderer.send('reload');
}

ipcRenderer.on('loadStatus_SocketLinked', () => {
statusBlock.innerText = "已建立连接,等待Check-in";
})
Expand Down
Loading

0 comments on commit d51a4ce

Please sign in to comment.