Skip to content

Commit

Permalink
Merge pull request #112 from duhrer/GH-101
Browse files Browse the repository at this point in the history
Add "Action Launcher" (resolves #101)
  • Loading branch information
duhrer authored Nov 10, 2023
2 parents 5620e57 + 47bf55c commit 104c12c
Show file tree
Hide file tree
Showing 15 changed files with 620 additions and 19 deletions.
9 changes: 8 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,12 @@
"env": {
"browser": true
},
"extends": "eslint-config-fluid"
"extends": "eslint-config-fluid",
"rules": {
"indent": [
"error",
4,
{ "SwitchCase": 1}
]
}
}
36 changes: 32 additions & 4 deletions audit-resolve.json
Original file line number Diff line number Diff line change
Expand Up @@ -370,23 +370,51 @@
},
"1094304|fluid-lint-all>eslint-plugin-markdown>remark-parse>trim>markdownlint-config-fluid>markdownlint>markdown-it>stylelint>autoprefixer>postcss": {
"decision": "ignore",
"madeAt": 1697531759856
"madeAt": 1698935247034
},
"1094304|stylelint-config-fluid>stylelint>autoprefixer>postcss": {
"decision": "ignore",
"madeAt": 1697531759856
"madeAt": 1698935247034
},
"1094304|stylelint-order>postcss": {
"decision": "ignore",
"madeAt": 1697531759856
"madeAt": 1698935247034
},
"1094304|stylelint-scss>stylelint>autoprefixer>postcss": {
"decision": "ignore",
"madeAt": 1697531759856
"madeAt": 1698935247034
},
"1094304|sugarss>postcss": {
"decision": "ignore",
"madeAt": 1697531759856
},
"1094446|@babel/traverse": {
"decision": "ignore",
"madeAt": 1698935245343
},
"1094304|postcss-less>postcss": {
"decision": "ignore",
"madeAt": 1698935247034
},
"1094450|grunt-prompt>lodash": {
"decision": "ignore",
"madeAt": 1698935249521
},
"1094493|grunt-prompt>lodash": {
"decision": "ignore",
"madeAt": 1698935251197
},
"1094498|grunt-prompt>lodash": {
"decision": "ignore",
"madeAt": 1698935253548
},
"1094499|grunt-prompt>lodash": {
"decision": "ignore",
"madeAt": 1698935255621
},
"1094500|grunt-prompt>lodash": {
"decision": "ignore",
"madeAt": 1698935257541
}
},
"rules": {},
Expand Down
21 changes: 21 additions & 0 deletions src/css/action-launcher.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.actionLauncher-actions {
display: flex;
flex-direction: column;
gap: 0.5rem;
margin: 1rem;
}

.actionLauncher-actions-action {
font-size: 1.25rem;
padding: 0.75rem;
}

.actionLauncher-actions-action:hover {
outline: aquamarine;
}

.actionLauncher-actions-action:focus {
background-color: aquamarine;
font-size: 1.4rem;
outline: none;
}
12 changes: 12 additions & 0 deletions src/css/common.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
@font-face {
font-family: ubuntu, sans-serif;
src: url("../fonts/Ubuntu-Medium.ttf");
}

* {
font-family: ubuntu, sans-serif;
}

.hidden {
display: none;
}
9 changes: 0 additions & 9 deletions src/css/configuration-panel.css
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
@font-face {
font-family: ubuntu, sans-serif;
src: url("../fonts/Ubuntu-Medium.ttf");
}

* {
font-family: ubuntu, sans-serif;
}

:root {
--width: 465px;
}
Expand Down
46 changes: 46 additions & 0 deletions src/css/modal.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
.modal-outer-container {
align-content: center;
background-color: #000c;
height: 100%;
left: 0;
position: fixed;
top: 0;
width: 100%;
z-index: 998;
}

.modal-inner-container {
background-color: white;
border-radius: 1rem;
display: flex;
flex-direction: column;
height: 75%;
left: 12.5%;
position: fixed;
top: 12.5%;
width: 75%;
z-index: 997;
}

.modal-header {
align-self: center;
}

.modal-header h3 {
font-size: 2rem;
font-weight: bold;
}

.modal-body {
border: 1px solid #ccc;
overflow-y: scroll;
}

.modal-footer {
align-self: center;
}

.modal-footer button {
font-size: 2rem;
margin: 1rem;
}
2 changes: 1 addition & 1 deletion src/html/configuration-panel.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<!DOCTYPE html>
<html>
<head>
<!-- Configuration panel stylesheet -->
<link rel="stylesheet" href="../css/common.css">
<link rel="stylesheet" href="../css/configuration-panel.css">

<!-- Infusion and other javascript files -->
Expand Down
3 changes: 3 additions & 0 deletions src/js/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,9 @@ https://github.com/fluid-lab/gamepad-navigator/blob/master/LICENSE
},
reopenTabOrWindow: function () {
chrome.sessions.restore();
},
openActionLauncher: function () {
gamepad.messageListenerUtils.openActionLauncher();
}
};

Expand Down
3 changes: 2 additions & 1 deletion src/js/configuration_panel/configuration-panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ https://github.com/fluid-lab/gamepad-navigator/blob/master/LICENSE
sendArrowLeft: "Send left arrow to the focused element.",
sendArrowRight: "Send right arrow to the focused element.",
sendArrowUp: "Send up arrow to the focused element.",
sendArrowDown: "Send down arrow to the focused element."
sendArrowDown: "Send down arrow to the focused element.",
openActionLauncher: "Open Action Launcher"
},
axes: {
null: "None",
Expand Down
Loading

0 comments on commit 104c12c

Please sign in to comment.