-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: include missing files feat: add zoomable images
- Loading branch information
1 parent
e6b1c5b
commit b7d3fe2
Showing
36 changed files
with
3,524 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ARGON_MAINCHAIN_URL=wss://rpc.testnet.argonprotocol.org |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ out | |
.DS_Store | ||
*.log* | ||
packages | ||
ui | ||
main | ||
./ui | ||
./main | ||
.idea | ||
scripts/*.js |
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
"use strict"; | ||
const { ipcRenderer } = require("electron"); | ||
document.addEventListener("chromealive:event", (e) => { | ||
const message = e.detail; | ||
console.debug(message.eventType, message.data); | ||
}); | ||
const caMessagesById = /* @__PURE__ */ new Map(); | ||
document.addEventListener("chromealive:api", (e) => { | ||
const message = e.detail; | ||
caMessagesById.set(`${message.clientId}_${message.messageId}`, message); | ||
ipcRenderer.send("chromealive:api", message.command, message.args); | ||
}); | ||
document.addEventListener("chromealive:api:response", (e) => { | ||
var _a; | ||
const message = e.detail; | ||
const key = `${message.clientId}_${message.responseId}`; | ||
const original = caMessagesById.get(key); | ||
caMessagesById.delete(key); | ||
console.debug(original == null ? void 0 : original.command, { args: (_a = original == null ? void 0 : original.args) == null ? void 0 : _a[0], result: message.data }); | ||
}); | ||
document.addEventListener("App:changeHeight", (e) => { | ||
const message = e.detail; | ||
console.debug("App:changeHeight", message.height); | ||
ipcRenderer.send("App:changeHeight", message.height); | ||
}); | ||
document.addEventListener("App:showChildWindow", (e) => { | ||
const message = e.detail; | ||
console.debug("App:showChildWindow", message.frameName); | ||
ipcRenderer.send("App:showChildWindow", message.frameName); | ||
}); | ||
document.addEventListener("App:hideChildWindow", (e) => { | ||
const message = e.detail; | ||
console.debug("App:hideChildWindow", message.frameName); | ||
ipcRenderer.send("App:hideChildWindow", message.frameName); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
"use strict"; | ||
const { contextBridge, ipcRenderer, webUtils } = require("electron"); | ||
contextBridge.exposeInMainWorld("appBridge", { | ||
async send(api, args = {}) { | ||
try { | ||
const result = await ipcRenderer.invoke("desktop:api", { api, args }); | ||
console.log(api, { | ||
args, | ||
result | ||
}); | ||
return result; | ||
} catch (error) { | ||
console.error("ERROR in api", { api, args, error }); | ||
throw error; | ||
} | ||
}, | ||
getPrivateApiHost() { | ||
return ipcRenderer.sendSync("getPrivateApiHost"); | ||
}, | ||
getFilePath(file) { | ||
return webUtils.getPathForFile(file); | ||
} | ||
}); | ||
document.addEventListener("desktop:api", (e) => { | ||
console.log("desktop:api", e); | ||
const message = e.detail; | ||
ipcRenderer.send("desktop:api", message.api, message.args); | ||
}); | ||
document.addEventListener("chromealive:event", (e) => { | ||
const message = e.detail; | ||
console.log(message.eventType, message.data); | ||
}); | ||
const messagesById = /* @__PURE__ */ new Map(); | ||
document.addEventListener("chromealive:api", (e) => { | ||
const message = e.detail; | ||
messagesById.set(`${message.clientId}_${message.messageId}`, message); | ||
}); | ||
document.addEventListener("chromealive:api:response", (e) => { | ||
var _a; | ||
const message = e.detail; | ||
const key = `${message.clientId}_${message.responseId}`; | ||
const original = messagesById.get(key); | ||
messagesById.delete(key); | ||
console.log(original == null ? void 0 : original.command, { args: (_a = original == null ? void 0 : original.args) == null ? void 0 : _a[0], result: message.data }); | ||
}); | ||
document.addEventListener("App:changeHeight", (e) => { | ||
const message = e.detail; | ||
console.debug("App:changeHeight", message.height); | ||
ipcRenderer.send("App:changeHeight", message.height); | ||
}); | ||
document.addEventListener("App:showChildWindow", (e) => { | ||
const message = e.detail; | ||
console.debug("App:showChildWindow", message.frameName); | ||
ipcRenderer.send("App:showChildWindow", message.frameName); | ||
}); | ||
document.addEventListener("App:hideChildWindow", (e) => { | ||
const message = e.detail; | ||
console.debug("App:hideChildWindow", message.frameName); | ||
ipcRenderer.send("App:hideChildWindow", message.frameName); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
"use strict"; | ||
const { ipcRenderer } = require("electron"); | ||
document.addEventListener("desktop:api", (e) => { | ||
console.log("desktop:api", e); | ||
const message = e.detail; | ||
ipcRenderer.send("desktop:api", message.api, message.args); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<template> | ||
<img | ||
:src="imageUrl" | ||
v-bind="$attrs" | ||
@click="toggleZoom" | ||
:class="{ 'fullscreen-image': isZoomed }" | ||
/> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import * as Vue from 'vue'; | ||
export default Vue.defineComponent({ | ||
name: 'ZoomableImage', | ||
props: { | ||
name: { | ||
type: String, | ||
required: true, | ||
}, | ||
}, | ||
setup(props) { | ||
const images = import.meta.glob('@/assets/images/*.png'); | ||
const imageUrl = Vue.ref(''); | ||
Object.entries(images) | ||
.find(([path]) => path.includes(props.name))?.[1]() | ||
.then(image => { | ||
imageUrl.value = (image as any).default; | ||
}); | ||
return { | ||
imageUrl, | ||
isZoomed: Vue.ref(false), | ||
}; | ||
}, | ||
methods: { | ||
toggleZoom() { | ||
this.isZoomed = !this.isZoomed; | ||
}, | ||
}, | ||
}); | ||
</script> | ||
<style scoped> | ||
img { | ||
height: auto; | ||
cursor: pointer; | ||
transition: transform 0.3s ease-in-out; /* Smooth transition */ | ||
} | ||
.fullscreen-image { | ||
position: fixed; | ||
top: 0; | ||
left: 0; | ||
width: 100vw; /* Full viewport width */ | ||
height: 100vh; /* Full viewport height */ | ||
object-fit: contain; | ||
z-index: 9999; | ||
cursor: zoom-out; | ||
background-color: rgba(0, 0, 0, 0.8); | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.