Skip to content

Commit

Permalink
Merge pull request #116 from intechstudio/SUKU-dev
Browse files Browse the repository at this point in the history
Suku dev ED-80
  • Loading branch information
SukuWc authored Jul 18, 2022
2 parents 66cb3b5 + d311c46 commit 61db5c3
Show file tree
Hide file tree
Showing 6 changed files with 78 additions and 15 deletions.
17 changes: 13 additions & 4 deletions configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,28 @@
"YOUTUBE_RELEASENOTES_PLAYLIST_ID": "PLtMbdpAm17zdDZ9jkStSFvdWJdVi3skVu",
"YOUTUBE_RELEASENOTES_FALLBACK_URL": "https://www.youtube.com/playlist?list=PLtMbdpAm17zdDZ9jkStSFvdWJdVi3skVu",

"FIRMWARE_REQUIRED_MAJOR":1,
"FIRMWARE_REQUIRED_MINOR":2,
"FIRMWARE_REQUIRED_PATCH":18,

"USB_VID_0": "0x03eb",
"USB_PID_0": "0xecac",

"USB_VID_1": "0x03eb",
"USB_PID_1": "0xecad",

"FIRMWARE_REQUIRED_MAJOR":1,
"FIRMWARE_REQUIRED_MINOR":2,
"FIRMWARE_REQUIRED_PATCH":18,

"FIRMWARE_URL_BEGINING":"https://github.com/intechstudio/grid-fw/releases/download/",
"FIRMWARE_URL_END":"/grid_release.zip",

"UXP_PHOTOSHOP_REQUIRED_MAJOR":0,
"UXP_PHOTOSHOP_REQUIRED_MINOR":0,
"UXP_PHOTOSHOP_REQUIRED_PATCH":1,

"UXP_PHOTOSHOP_URL_BEGINING":"https://github.com/intechstudio/grid-photoshop-plugin/releases/download/",
"UXP_PHOTOSHOP_URL_END":"/uxp_photoshop_release.zip",



"LIBRARY_GITHUB_URL": "https://github.com/intechstudio/grid-profiles/archive/refs/heads/main.zip",

"EDITOR_DOWNLOAD_URL": "https://intech.studio/grid-editor/downloads",
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions src/app/config-blocks/SettingsEncoder.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
category: 'element settings',
color: '#5F416D',
desc: 'Encoder Mode',
defaultLua: 'self:emo(0) self:ev0(100)',
defaultLua: 'self:emo(0) self:ev0(50)',
icon: `<span class="block w-full text-center italic font-gt-pressura">EC</span>`,
}
Expand Down Expand Up @@ -91,7 +91,8 @@
[
{value: '0', info: 'No velocity (0%)'},
{value: '100', info: 'Default (100%)'},
{value: '50', info: 'Default (50%)'},
{value: '100', info: 'Maximum (100%)'},
]
]
Expand Down
17 changes: 10 additions & 7 deletions src/app/main/_actions/move.action.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ export function changeOrder(node, {configs}) {
detail: {id: _configIds}
}));

}
}

// drag over section
if(drag >= 2 && !moveDisabled){
Expand All @@ -194,13 +194,16 @@ export function changeOrder(node, {configs}) {
if(id){
let drop_target = '';
// if its a modifier, the below helper shouldn't be used!
if(id.startsWith('cfg-') && (!e.target.getAttribute('config-component').endsWith('_If')) && e.target.getAttribute('config-component') !== 'Then'){
if((clientHeight / 2) < e.offsetY){
drop_target = Number(id.substr(4,));
} else {
drop_target = Number(id.substr(4,)) - 1;

if (e.target.getAttribute('config-component') !== null ){
if(id.startsWith('cfg-') && (!e.target.getAttribute('config-component').endsWith('_If')) && e.target.getAttribute('config-component') !== 'Then'){
if((clientHeight / 2) < e.offsetY){
drop_target = Number(id.substr(4,));
} else {
drop_target = Number(id.substr(4,)) - 1;
}
}
} else if(id.substr(0,3) == 'dz-'){
}else if(id.substr(0,3) == 'dz-'){
drop_target = Number(id.substr(3,));
} else if(id == 'config-bin'){
drop_target = 'bin';
Expand Down
49 changes: 49 additions & 0 deletions src/app/main/panels/preferences/Preferences.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,48 @@
}
function delay(time) {
return new Promise((resolve) => {
setTimeout(() => resolve(), time);
});
}
async function uxpPhotoshopDownload(){
const version = "v"+process.env.UXP_PHOTOSHOP_REQUIRED_MAJOR+"."+process.env.UXP_PHOTOSHOP_REQUIRED_MINOR+"."+process.env.UXP_PHOTOSHOP_REQUIRED_PATCH
let link = process.env.UXP_PHOTOSHOP_URL_BEGINING + version + process.env.UXP_PHOTOSHOP_URL_END
console.log(link)
let result = ipcRenderer.sendSync('download', {url: link, folder: "temp"});
download_status = "Download completed!"
let zip = new AdmZip(result);
let zipEntries = zip.getEntries(); // an array of ZipEntry records
let pluginFilePaths = [];
zipEntries.forEach(function (zipEntry) {
console.log(zipEntry.entryName)
if (zipEntry.entryName.endsWith(".ccx")) {
pluginFilePaths.push(zipEntry.entryName);
}
});
let folder = get(appSettings).persistant.profileFolder;
zip.extractAllTo(folder + "/temp", /*overwrite*/ true);
shell.showItemInFolder(folder + "/temp/" +pluginFilePaths[0])
}
function resetAppSettings(){
ipcRenderer.sendSync('resetAppSettings', 'foo');
Expand Down Expand Up @@ -328,6 +370,13 @@
Download Library
</button>

<div class="text-gray-400 py-1 mt-1 text-sm"><b>Photoshop Plugin</b></div>
<button
on:click={()=>{uxpPhotoshopDownload()}}
class="w-1/2 px-2 py-1 rounded bg-select text-white hover:bg-select-saturate-10 focus:outline-none relative">
Download UXP Plugin
</button>

</div>


Expand Down
1 change: 1 addition & 0 deletions src/electron.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ ipcMain.on('download', async (event, arg) => {

}catch(e){

console.log("Download Error", e)
event.returnValue = undefined;
}

Expand Down

0 comments on commit 61db5c3

Please sign in to comment.