mirror of
https://github.com/nekename/OpenDeck.git
synced 2026-10-28 09:44:01 +00:00
Remove references to my (old) domain name
This commit is contained in:
1 parent
33cd7abd90
commit
f9639be6fe
13 files changed
+65
-40
No files matched your search
@@ -52,12 +52,16 @@ jobs:
|
||||
if: matrix.platform == 'ubuntu-22.04'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf libudev-dev
|
||||
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf libudev-dev
|
||||
|
||||
- name: install Tauri v2 CLI
|
||||
run: npm install -g @tauri-apps/cli@~2.0.0-rc
|
||||
|
||||
- uses: tauri-apps/tauri-action@v0
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tauriScript: tauri
|
||||
tagName: v__VERSION__
|
||||
releaseName: "OpenDeck v__VERSION__"
|
||||
releaseBody: "See the assets to download this version. See the README for installation instructions."
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# OpenDeck
|
||||
|
||||
OpenDeck is a desktop application for interfacing between human interface devices with keys or encoders and plugins, which provide actions to be carried out when the user interacts with the device. OpenDeck conforms to the [OpenAction](https://openaction.amansprojects.com/) API, which is cross-compatible with the Stream Deck SDK, allowing a wide range of pre-existing plugins to be used.
|
||||
OpenDeck is a desktop application for interfacing between human interface devices with keys or encoders and plugins, which provide actions to be carried out when the user interacts with the device. OpenDeck conforms to the [OpenAction](https://openaction.amankhanna.me/) API, which is cross-compatible with the Stream Deck SDK, allowing a wide range of pre-existing plugins to be used.
|
||||
|
||||
OpenDeck supports ProntoKey, Elgato Stream Deck and AKP153 (not AKP153e) hardware on all three major desktop platforms. If you would like to contribute support for additional hardware (e.g. Loupedeck) feel free to reach out on any of the support forums and make a pull request!
|
||||
|
||||
@@ -49,9 +49,9 @@ To enable automatic launch on startup, the light theme, or to change the languag
|
||||
### Solutions to frequent problems
|
||||
|
||||
- Check the OpenDeck log file for any important messages. This file should be included with any support request.
|
||||
- GNU+Linux: `~/config/com.amansprojects.opendeck/logs/`
|
||||
- Windows: `%appdata%\com.amansprojects.opendeck\logs\`
|
||||
- macOS: `~/Library/Application Support/com.amansprojects.opendeck/logs/`
|
||||
- GNU+Linux: `~/.config/opendeck/logs/`
|
||||
- Windows: `%appdata%\opendeck\logs\`
|
||||
- macOS: `~/Library/Application Support/opendeck/logs/`
|
||||
- For issues with plugins, you can also check the plugin's logs (in the same folder as above, sometimes as well as a file named `plugin.log` or similar in the plugin's own folder).
|
||||
- When trying to run Windows-only plugins (which are the majority of plugins) on GNU+Linux or macOS, please ensure you have the latest version of Wine (and Wine Mono) installed on your system.
|
||||
- If your device isn't showing up, ensure you have the correct permissions to access it, and that you have restarted OpenDeck since connecting it.
|
||||
@@ -59,7 +59,7 @@ To enable automatic launch on startup, the light theme, or to change the languag
|
||||
### Support forums
|
||||
|
||||
- [Discord](https://discord.gg/26Nf8rHvaj)
|
||||
- [Matrix](https://matrix.to/#/#opendeck:amansprojects.com)
|
||||
- [Matrix](https://matrix.to/#/#opendeck:amankhanna.me)
|
||||
- [GitHub Issues](https://github.com/ninjadev64/OpenDeck/issues)
|
||||
|
||||
### Building from source / contributing
|
||||
|
||||
@@ -31,7 +31,7 @@ pub async fn create_instance(app: AppHandle, action: Action, context: Context) -
|
||||
};
|
||||
children.push(instance.clone());
|
||||
|
||||
if parent.action.uuid == "com.amansprojects.opendeck.toggleaction" && parent.states.len() < children.len() {
|
||||
if parent.action.uuid == "opendeck.toggleaction" && parent.states.len() < children.len() {
|
||||
parent.states.push(crate::shared::ActionState {
|
||||
image: "opendeck/toggle-action.png".to_owned(),
|
||||
..Default::default()
|
||||
@@ -50,7 +50,7 @@ pub async fn create_instance(app: AppHandle, action: Action, context: Context) -
|
||||
states: action.states.clone(),
|
||||
current_state: 0,
|
||||
settings: serde_json::Value::Object(serde_json::Map::new()),
|
||||
children: if matches!(action.uuid.as_str(), "com.amansprojects.opendeck.multiaction" | "com.amansprojects.opendeck.toggleaction") {
|
||||
children: if matches!(action.uuid.as_str(), "opendeck.multiaction" | "opendeck.toggleaction") {
|
||||
Some(vec![])
|
||||
} else {
|
||||
None
|
||||
@@ -132,7 +132,7 @@ pub async fn remove_instance(context: ActionContext) -> Result<(), Error> {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if instance.action.uuid == "com.amansprojects.opendeck.toggleaction" {
|
||||
if instance.action.uuid == "opendeck.toggleaction" {
|
||||
if instance.current_state as usize >= children.len() {
|
||||
instance.current_state = if children.is_empty() { 0 } else { children.len() as u16 - 1 };
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ pub async fn list_plugins() -> Result<Vec<PluginInfo>, Error> {
|
||||
|
||||
#[command]
|
||||
pub async fn install_plugin(app: AppHandle, id: String, url: Option<String>) -> Result<(), Error> {
|
||||
let resp = match reqwest::get(url.unwrap_or(format!("https://plugins.amansprojects.com/rezipped/{id}.zip"))).await {
|
||||
let resp = match reqwest::get(url.unwrap_or(format!("https://plugins.amankhanna.me/rezipped/{id}.zip"))).await {
|
||||
Ok(resp) => resp,
|
||||
Err(error) => return Err(anyhow::Error::from(error).into()),
|
||||
};
|
||||
|
||||
@@ -32,7 +32,7 @@ pub async fn set_selected_profile(device: String, id: String) -> Result<(), Erro
|
||||
if selected_profile != id {
|
||||
let old_profile = &profile_stores.get_profile_store(devices.get(&device).unwrap(), &selected_profile)?.value;
|
||||
for instance in old_profile.keys.iter().flatten().chain(&mut old_profile.sliders.iter().flatten()) {
|
||||
if !matches!(instance.action.uuid.as_str(), "com.amansprojects.opendeck.multiaction" | "com.amansprojects.opendeck.toggleaction") {
|
||||
if !matches!(instance.action.uuid.as_str(), "opendeck.multiaction" | "opendeck.toggleaction") {
|
||||
let _ = crate::events::outbound::will_appear::will_disappear(instance, false).await;
|
||||
} else {
|
||||
for child in instance.children.as_ref().unwrap() {
|
||||
@@ -46,7 +46,7 @@ pub async fn set_selected_profile(device: String, id: String) -> Result<(), Erro
|
||||
let store = profile_stores.get_profile_store_mut(devices.get(&device).unwrap(), &id).await?;
|
||||
let new_profile = &store.value;
|
||||
for instance in new_profile.keys.iter().flatten().chain(&mut new_profile.sliders.iter().flatten()) {
|
||||
if !matches!(instance.action.uuid.as_str(), "com.amansprojects.opendeck.multiaction" | "com.amansprojects.opendeck.toggleaction") {
|
||||
if !matches!(instance.action.uuid.as_str(), "opendeck.multiaction" | "opendeck.toggleaction") {
|
||||
let _ = crate::events::outbound::will_appear::will_appear(instance, false).await;
|
||||
} else {
|
||||
for child in instance.children.as_ref().unwrap() {
|
||||
|
||||
@@ -30,7 +30,7 @@ pub async fn key_down(device: &str, key: u8) -> Result<(), anyhow::Error> {
|
||||
let _ = key_moved(crate::APP_HANDLE.get().unwrap(), context.clone(), true).await;
|
||||
|
||||
let Some(instance) = get_slot_mut(&context, &mut locks).await? else { return Ok(()) };
|
||||
if instance.action.uuid == "com.amansprojects.opendeck.multiaction" {
|
||||
if instance.action.uuid == "opendeck.multiaction" {
|
||||
for child in instance.children.as_mut().unwrap() {
|
||||
send_to_plugin(
|
||||
&child.action.plugin,
|
||||
@@ -71,7 +71,7 @@ pub async fn key_down(device: &str, key: u8) -> Result<(), anyhow::Error> {
|
||||
}
|
||||
|
||||
save_profile(device, &mut locks).await?;
|
||||
} else if instance.action.uuid == "com.amansprojects.opendeck.toggleaction" {
|
||||
} else if instance.action.uuid == "opendeck.toggleaction" {
|
||||
let children = instance.children.as_ref().unwrap();
|
||||
if children.is_empty() {
|
||||
return Ok(());
|
||||
@@ -120,7 +120,7 @@ pub async fn key_up(device: &str, key: u8) -> Result<(), anyhow::Error> {
|
||||
let slot = get_slot_mut(&context, &mut locks).await?;
|
||||
let Some(instance) = slot else { return Ok(()) };
|
||||
|
||||
if instance.action.uuid == "com.amansprojects.opendeck.toggleaction" {
|
||||
if instance.action.uuid == "opendeck.toggleaction" {
|
||||
let index = instance.current_state as usize;
|
||||
let children = instance.children.as_ref().unwrap();
|
||||
if children.is_empty() {
|
||||
@@ -139,7 +139,7 @@ pub async fn key_up(device: &str, key: u8) -> Result<(), anyhow::Error> {
|
||||
)
|
||||
.await?;
|
||||
instance.current_state = ((index + 1) % instance.children.as_ref().unwrap().len()) as u16;
|
||||
} else if instance.action.uuid != "com.amansprojects.opendeck.multiaction" {
|
||||
} else if instance.action.uuid != "opendeck.multiaction" {
|
||||
if instance.states.len() == 2 && !instance.action.disable_automatic_states {
|
||||
instance.current_state = (instance.current_state + 1) % (instance.states.len() as u16);
|
||||
}
|
||||
|
||||
@@ -63,6 +63,7 @@ async fn main() {
|
||||
let menu = MenuBuilder::new(app).items(&[&open, &hide, &separator, &quit]).build()?;
|
||||
let _tray = TrayIconBuilder::new()
|
||||
.menu(&menu)
|
||||
.icon(app.default_window_icon().unwrap().clone())
|
||||
.on_menu_event(move |app, event| {
|
||||
let window = app.get_webview_window("main").unwrap();
|
||||
let _ = match event.id().as_ref() {
|
||||
@@ -110,6 +111,11 @@ async fn main() {
|
||||
|
||||
APP_HANDLE.set(app.handle().clone()).unwrap();
|
||||
|
||||
let old = app.path().config_dir().unwrap().join("com.amansprojects.opendeck");
|
||||
if old.exists() {
|
||||
let _ = std::fs::rename(old, app.path().app_config_dir().unwrap());
|
||||
}
|
||||
|
||||
devices::initialise_devices();
|
||||
plugins::initialise_plugins();
|
||||
|
||||
|
||||
@@ -221,8 +221,8 @@ pub static CATEGORIES: Lazy<RwLock<HashMap<String, Vec<Action>>>> = Lazy::new(||
|
||||
r#"{
|
||||
"name": "Multi Action",
|
||||
"icon": "opendeck/multi-action.png",
|
||||
"plugin": "com.amansprojects.opendeck",
|
||||
"uuid": "com.amansprojects.opendeck.multiaction",
|
||||
"plugin": "opendeck",
|
||||
"uuid": "opendeck.multiaction",
|
||||
"tooltip": "Execute multiple actions",
|
||||
"controllers": [ "Keypad" ],
|
||||
"states": [ { "image": "opendeck/multi-action.png" } ],
|
||||
@@ -234,8 +234,8 @@ pub static CATEGORIES: Lazy<RwLock<HashMap<String, Vec<Action>>>> = Lazy::new(||
|
||||
r#"{
|
||||
"name": "Toggle Action",
|
||||
"icon": "opendeck/toggle-action.png",
|
||||
"plugin": "com.amansprojects.opendeck",
|
||||
"uuid": "com.amansprojects.opendeck.toggleaction",
|
||||
"plugin": "opendeck",
|
||||
"uuid": "opendeck.toggleaction",
|
||||
"tooltip": "Cycle through multiple actions",
|
||||
"controllers": [ "Keypad" ],
|
||||
"states": [ { "image": "opendeck/toggle-action.png" } ],
|
||||
|
||||
@@ -9,6 +9,7 @@ use std::fs;
|
||||
use std::path::PathBuf;
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json::Value;
|
||||
|
||||
use anyhow::Context;
|
||||
use once_cell::sync::Lazy;
|
||||
@@ -164,8 +165,8 @@ impl From<ProfileV1> for DiskProfile {
|
||||
keys.push(Some(DiskActionInstance {
|
||||
action: Action {
|
||||
name: "Multi Action".to_owned(),
|
||||
uuid: "com.amansprojects.opendeck.multiaction".to_owned(),
|
||||
plugin: "com.amansprojects.opendeck".to_owned(),
|
||||
uuid: "opendeck.multiaction".to_owned(),
|
||||
plugin: "opendeck".to_owned(),
|
||||
tooltip: "Execute multiple actions".to_owned(),
|
||||
icon: "opendeck/multi-action.png".to_owned(),
|
||||
disable_automatic_states: false,
|
||||
@@ -185,7 +186,7 @@ impl From<ProfileV1> for DiskProfile {
|
||||
..Default::default()
|
||||
}],
|
||||
current_state: 0,
|
||||
settings: serde_json::Value::Object(serde_json::Map::new()),
|
||||
settings: Value::Object(serde_json::Map::new()),
|
||||
children: Some(children.into_iter().map(|v| v.into()).collect()),
|
||||
}));
|
||||
} else {
|
||||
@@ -215,13 +216,30 @@ enum ProfileVersions {
|
||||
|
||||
fn migrate_profile(path: PathBuf) -> Result<(), anyhow::Error> {
|
||||
let profile = serde_json::from_slice(&fs::read(&path)?)?;
|
||||
if let ProfileVersions::V1(v1) = profile {
|
||||
let migrated: DiskProfile = v1.into();
|
||||
fs::write(path, serde_json::to_string_pretty(&migrated)?)?;
|
||||
} else if let ProfileVersions::V2(v2) = profile {
|
||||
let migrated: DiskProfile = (&v2).into();
|
||||
fs::write(path, serde_json::to_string_pretty(&migrated)?)?;
|
||||
let migrated: DiskProfile = match profile {
|
||||
ProfileVersions::V1(v1) => v1.into(),
|
||||
ProfileVersions::V2(v2) => (&v2).into(),
|
||||
ProfileVersions::V3(v3) => v3,
|
||||
};
|
||||
let mut as_value = serde_json::to_value(migrated)?;
|
||||
fn replace_old_identifier(value: &mut Value) {
|
||||
match value {
|
||||
Value::String(v) => *v = v.replace("com.amansprojects.opendeck", "opendeck"),
|
||||
Value::Object(v) => {
|
||||
for value in v.values_mut() {
|
||||
replace_old_identifier(value);
|
||||
}
|
||||
}
|
||||
Value::Array(v) => {
|
||||
for value in v.iter_mut() {
|
||||
replace_old_identifier(value);
|
||||
}
|
||||
}
|
||||
_ => (),
|
||||
}
|
||||
}
|
||||
replace_old_identifier(&mut as_value);
|
||||
fs::write(path, serde_json::to_string_pretty(&as_value)?)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
"productName": "OpenDeck",
|
||||
"mainBinaryName": "opendeck",
|
||||
"version": "2.0.0",
|
||||
"identifier": "com.amansprojects.opendeck",
|
||||
"identifier": "opendeck",
|
||||
"plugins": {},
|
||||
"app": {
|
||||
"windows": [
|
||||
@@ -53,9 +53,6 @@
|
||||
"center": true
|
||||
}
|
||||
],
|
||||
"trayIcon": {
|
||||
"iconPath": "icons/icon.png"
|
||||
},
|
||||
"security": {
|
||||
"csp": "default-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data: http://localhost:57118 https://ninjadev64.github.io https://plugins.amankhanna.me; frame-src http://localhost:57118; connect-src ipc: http://ipc.localhost https://ninjadev64.github.io https://api.github.com https://plugins.amankhanna.me;"
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
function select() {
|
||||
if (!slot) return;
|
||||
if (slot.action.uuid == "com.amansprojects.opendeck.multiaction" || slot.action.uuid == "com.amansprojects.opendeck.toggleaction") {
|
||||
if (slot.action.uuid == "opendeck.multiaction" || slot.action.uuid == "opendeck.toggleaction") {
|
||||
inspectedParentAction.set(context);
|
||||
} else {
|
||||
inspectedInstance.set(slot.context);
|
||||
|
||||
@@ -25,10 +25,10 @@
|
||||
if (dataTransfer?.getData("action")) {
|
||||
let action = JSON.parse(dataTransfer?.getData("action"));
|
||||
if (
|
||||
(parentUuid == "com.amansprojects.opendeck.multiaction" && !action.supported_in_multi_actions) ||
|
||||
(parentUuid == "opendeck.multiaction" && !action.supported_in_multi_actions) ||
|
||||
(
|
||||
parentUuid == "com.amansprojects.opendeck.toggleaction" &&
|
||||
(action.uuid == "com.amansprojects.opendeck.multiaction" || action.uuid == "com.amansprojects.opendeck.toggleaction")
|
||||
parentUuid == "opendeck.toggleaction" &&
|
||||
(action.uuid == "opendeck.multiaction" || action.uuid == "opendeck.toggleaction")
|
||||
)
|
||||
) {
|
||||
return;
|
||||
@@ -50,7 +50,7 @@
|
||||
|
||||
<div class="px-6 pt-6 pb-4 dark:text-neutral-300">
|
||||
<button class="float-right text-xl" on:click={() => $inspectedParentAction = null}> ✕ </button>
|
||||
<h1 class="font-semibold text-2xl"> {parentUuid == "com.amansprojects.opendeck.toggleaction" ? "Toggle Action" : "Multi Action"} </h1>
|
||||
<h1 class="font-semibold text-2xl"> {parentUuid == "opendeck.toggleaction" ? "Toggle Action" : "Multi Action"} </h1>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col h-80 overflow-scroll">
|
||||
|
||||
@@ -216,7 +216,7 @@
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{#await fetch("https://plugins.amansprojects.com/catalogue.json")}
|
||||
{#await fetch("https://plugins.amankhanna.me/catalogue.json")}
|
||||
<h2 class="mx-2 mt-6 mb-2 text-md dark:text-neutral-400"> Loading plugin list... </h2>
|
||||
{:then res}
|
||||
{#await res.json() then entries}
|
||||
@@ -227,7 +227,7 @@
|
||||
<div class="grid grid-cols-2 lg:grid-cols-3 xl:grid-cols-4">
|
||||
{#each entries as plugin}
|
||||
<ListedPlugin
|
||||
icon="https://plugins.amansprojects.com/icons/{plugin.id}.png"
|
||||
icon="https://plugins.amankhanna.me/icons/{plugin.id}.png"
|
||||
name={plugin.name}
|
||||
subtitle={plugin.author}
|
||||
hidden={!plugin.name.toUpperCase().includes(search.toUpperCase())}
|
||||
|
||||
Reference in new issue
Block a user