Skip to content

Commit

Permalink
Merge pull request #11 from ciderapp/next
Browse files Browse the repository at this point in the history
Cider 2.5.x
  • Loading branch information
cryptofyre authored Aug 13, 2024
2 parents 137e971 + dce9171 commit 73bef02
Show file tree
Hide file tree
Showing 7 changed files with 379 additions and 485 deletions.
8 changes: 8 additions & 0 deletions .hintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": [
"development"
],
"hints": {
"axe/forms": "off"
}
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Using CiderDeck you can do the following
- Cross-Platform (macOS, Windows)

## Requirements
- [Cider 2.3+ (Sabiiro)](https://cider.sh)
- [Cider 2.5+](https://cider.sh)
- Stream Deck (MK.1, MK.2, SD+, XL)
- Computer running Windows or macOS

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<!DOCTYPE html>
<html>

<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no,minimal-ui,viewport-fit=cover" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<title>CiderDeck Settings</title>
<link rel="stylesheet" href="../../libs/css/sdpi.css" />
</head>

<body>
<div class="sdpi-wrapper">
<hr class="tab-separator">
<form id="property-inspector">
<div id="tab1" class="tab-container">
<div class="sdpi-item">
<div data-localize class="sdpi-item-label" title="RPC Key">RPC Key</div>
<input data-localize class="sdpi-item-value" name="authkey" id="authKey" type="password" />
</div>
</div>
</form>
<div class="sdpi-item">
<button
class="sdpi-item-value"
value="authorize"
data-localize
id="authorize">
Authorize
</button>
</div>
</div>

<div class="sdpi-info-label hidden" style="top: -1000" value=""></div>

<!-- Stream Deck Libs -->
<script src="../../libs/js/constants.js"></script>
<script src="../../libs/js/prototypes.js"></script>
<script src="../../libs/js/timers.js"></script>
<script src="../../libs/js/utils.js"></script>
<script src="../../libs/js/events.js"></script>
<script src="../../libs/js/api.js"></script>
<script src="../../libs/js/property-inspector.js"></script>
<script src="../../libs/js/dynamic-styles.js"></script>

<!-- Property Inspector Source -->
<script src="inspector.js"></script>
</body>

</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/// <reference path="../../libs/js/property-inspector.js" />
/// <reference path="../../libs/js/utils.js" />

$PI.onConnected((jsn) => {
const {actionInfo, appInfo, connection, messageType, port, uuid} = jsn;
const {payload, context} = actionInfo;
const {settings} = payload;
$PI.getGlobalSettings();
});

let form = document.querySelector('#property-inspector');

$PI.onDidReceiveGlobalSettings(({payload}) => {
console.log('onDidReceiveGlobalSettings', payload);
form.querySelector('#authKey').value = payload.settings.authkey;
})

document.querySelector('#authorize').addEventListener('click', () => {
let authKey = Utils.getFormValue(form);
$PI.setGlobalSettings(authKey);
console.log('button clicked yo!', authKey);
});
2 changes: 2 additions & 0 deletions src/sh.cider.streamdeck.sdPlugin/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@
<script src="libs/js/api.js"></script>
<script src="libs/js/stream-deck.js"></script>
<script src="libs/js/action.js"></script>
<script src="https://cdn.socket.io/4.7.5/socket.io.min.js" integrity="sha384-2huaZvOR9iDzHqslqwpR87isEmrfxqyWOF7hr7BY6KG0+hVKLoEXMPUJw3ynWuhO" crossorigin="anonymous"></script>

<!-- Plugin Source -->
<script src="app.js"></script>

</body>

</html>
Loading

0 comments on commit 73bef02

Please sign in to comment.