Skip to content

Commit deadcd7

Browse files
authored
Merge pull request #14 from webduinoio/bug/5899
Bug/5899
2 parents 094c4e9 + a2a1e12 commit deadcd7

File tree

5 files changed

+41
-24
lines changed

5 files changed

+41
-24
lines changed

Diff for: CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
88

99
### Fixed
1010

11+
- 平板開啟萬用遙控器時,訊息傳送輸入框消失
1112
- 平板或手機旋轉後,刷新萬用遙控器
1213

1314
### Added

Diff for: css/main.css

+8
Original file line numberDiff line numberDiff line change
@@ -524,4 +524,12 @@ body {
524524
-ms-user-select: none; /* Internet Explorer/Edge */
525525
user-select: none; /* Non-prefixed version, currently
526526
supported by Chrome, Edge, Opera and Firefox */
527+
}
528+
529+
input {
530+
/* Safari 和 Chrome,常用於iOS下移除內建樣式 */
531+
-webkit-appearance: none;
532+
/* FireFox */
533+
-moz-appearance: none;
534+
appearance: none;
527535
}

Diff for: index-en.html

+11-22
Original file line numberDiff line numberDiff line change
@@ -6,39 +6,28 @@
66
name="viewport"
77
content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
88
/>
9-
<meta name="author" content="oxxo.studio" />
10-
<meta name="copyright" content="oxxo.studio" />
9+
<meta name="author" content="webduino" />
10+
<meta name="copyright" content="webduino" />
1111
<title>Webduino Remote Control</title>
1212

1313
<meta
1414
name="description"
15-
content="這是針對 Webduino 所設計的萬用遙控器,可以透過虛擬機器人搖桿或十顆按鈕發送網路廣播訊號,輕鬆串連物聯網的各種生活體驗。"
15+
content="Webduino Remote Control,loved by teachers and students, it can send Internet broadcast signals through the joystick and multiple buttons, and easily remote control bicycles and control IoT devices!"
1616
/>
1717
<meta
1818
itemprop="description"
19-
content="這是針對 Webduino 所設計的萬用遙控器,可以透過虛擬機器人搖桿或十顆按鈕發送網路廣播訊號,輕鬆串連物聯網的各種生活體驗。"
20-
/>
21-
<meta
22-
itemprop="image"
23-
content="https://www.oxxostudio.tw/webduino-remote/media/snapshot.jpg"
19+
content="Webduino Remote Control,loved by teachers and students, it can send Internet broadcast signals through the joystick and multiple buttons, and easily remote control bicycles and control IoT devices!"
2420
/>
21+
<meta itemprop="image" content="" />
2522
<meta
2623
property="og:description"
27-
content="這是針對 Webduino 所設計的萬用遙控器,可以透過虛擬機器人搖桿或十顆按鈕發送網路廣播訊號,輕鬆串連物聯網的各種生活體驗。"
28-
/>
29-
<meta property="og:title" content="Webduino 遙控器" />
30-
<meta
31-
property="og:url"
32-
content="https://www.oxxostudio.tw/webduino-remote/index.html"
33-
/>
34-
<meta
35-
property="og:image"
36-
content="https://www.oxxostudio.tw/webduino-remote/media/snapshot.jpg"
37-
/>
38-
<link
39-
rel="canonical"
40-
href="https://www.oxxostudio.tw/webduino-remote/index.html"
24+
content="Webduino Remote Control,loved by teachers and students, it can send Internet broadcast signals through the joystick and multiple buttons, and easily remote control bicycles and control IoT devices!"
4125
/>
26+
<meta property="og:title" content="Webduino Remote Control" />
27+
<meta property="og:url" content="https://webduino.io" />
28+
<meta property="og:image" content="" />
29+
<link rel="icon" href="webduino.ico" type="image/x-icon" />
30+
<link rel="canonical" href="https://webduino.io/" />
4231

4332
<link rel="stylesheet" href="css/main.css" />
4433
</head>

Diff for: js/main-en.js

+20-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@
167167
let m = self.getAttribute('m');
168168
self.value = list[m];
169169
self.addEventListener('input', () => {
170-
window.history.pushState({}, 0, urlOrigin);
170+
window.history.pushState({}, 0, `${urlOrigin}${urlPath}`);
171171
list[m] = self.value;
172172
if (btnObj[m]) {
173173
btnObj[m].innerHTML = `<span>${self.value}</span>`;
@@ -378,4 +378,23 @@
378378
kebbi.addEventListener('touchstart', target);
379379
}
380380

381+
// 處理中間圖片跟隨視窗大小移動位置
382+
function screenRotate() {
383+
const kebbi = document.getElementById('svgKebbi');
384+
const circle = document.querySelector('.circle');
385+
const ww = content.offsetWidth;
386+
const wh = content.offsetHeight;
387+
const ox = (ww - kebbi.offsetWidth) / 2;
388+
const oy = (wh * 0.8 - kebbi.offsetHeight) / 2;
389+
kebbi.style.left = `${ox}px`;
390+
kebbi.style.top = `${oy}px`;
391+
circle.style.width = `${ww * 0.4}px`;
392+
circle.style.height = `${ww * 0.4}px`;
393+
circle.style.left = `${(ww - circle.offsetWidth) / 2}px`;
394+
circle.style.top = `${(wh * 0.8 - circle.offsetHeight) / 2}px`;
395+
}
396+
397+
window.addEventListener('resize', screenRotate);
398+
screenRotate();
399+
381400
}();

Diff for: js/main.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@
167167
let m = self.getAttribute('m');
168168
self.value = list[m];
169169
self.addEventListener('input', () => {
170-
window.history.pushState({}, 0, urlOrigin);
170+
window.history.pushState({}, 0, `${urlOrigin}${urlPath}`);
171171
list[m] = self.value;
172172
if (btnObj[m]) {
173173
btnObj[m].innerHTML = `<span>${self.value}</span>`;

0 commit comments

Comments
 (0)