-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add keyboard command #369
add keyboard command #369
Conversation
チャット欄フォーカス |
refをChatInput内で定義しているため、liftupするか、ref合成の必要ありそう? |
綺麗ではないけどText Areaに個別にEffect追加 |
Lint修正 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PRありがとうございます!
コメントをご確認くださいmm
@wadabee |
sample code var ua = window.navigator.userAgent.toLowerCase();
if(ua.indexOf("windows nt") !== -1) {
console.log("「Microsoft Windows」をお使いですね!");
} else if(ua.indexOf("android") !== -1) {
console.log("「Android」をお使いですね!");
} else if(ua.indexOf("iphone") !== -1 || ua.indexOf("ipad") !== -1) {
console.log("「iOS」をお使いですね!");
} else if(ua.indexOf("mac os x") !== -1) {
console.log("「macOS」をお使いですね!");
} else {
console.log("何をお使いなのですか?");
} |
Premise : macOS
|
window.navigator?.userAgentData
?.getHighEntropyValues(['platformVersion'])
?.then((ua) => {
if (navigator.userAgentData.platform === 'Windows') {
const majorPlatformVersion = parseInt(
ua.platformVersion.split('.')[0]
);
if (majorPlatformVersion >= 13) {
console.log('Windows 11 or later');
} else if (majorPlatformVersion > 0) {
console.log('Windows 10');
} else {
console.log('Before Windows 10');
}
} else {
console.log('Not running on Windows');
}
}); See : https://learn.microsoft.com/ja-jp/microsoft-edge/web-platform/how-to-detect-win11 |
import Bowser from 'bowser';
...
const browser = Bowser.getParser(window.navigator.userAgent);
const os = browser.getOSName(); build-in |
ありがとうございます! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ご対応ありがとうございます!
コメントのご確認お願いしますmm
@@ -0,0 +1,58 @@ | |||
import { useState } from 'react'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
すみません、見逃していました!
フォルダ名がtypoしています!(heler -> helper)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
指摘ありがとうございます!
失礼しましたmm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM !!
Thanks for your contribution!
Issue #, if available:
#370
#368
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.