Skip to content

Commit

Permalink
@saulotarsobc 🔥ajuste no tamanho das imagens para melhorar a identifi…
Browse files Browse the repository at this point in the history
…cação da pessoal
  • Loading branch information
saulotarsobc committed Jan 6, 2024
1 parent 5ecaf3f commit cf73131
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 21 deletions.
7 changes: 4 additions & 3 deletions backend/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ const createWindow = () => {
height: 765,
minHeight: 563,

width: 563,
minWidth: 563,
width: 640,
minWidth: 640,

webPreferences: {
nodeIntegration: false,
Expand All @@ -38,7 +38,7 @@ const createWindow = () => {

// open devtools
// abre o devtools se estiver em modo de desenvolvimento
if (isDev) mainWindow.webContents.openDevTools();
// if (isDev) mainWindow.webContents.openDevTools();

mainWindow.loadURL(
isDev
Expand All @@ -65,6 +65,7 @@ app.on("window-all-closed", app.quit);
/* ++++++++++ code ++++++++++ */
ipcMain.on("GotoPreset", (event: IpcMainEvent, presetId: number) => {
const { device, username, password, channel }: any = getDeviceConfigs();
console.log({ device, username, password, channel })
const auth = "Digest " + Buffer.from(`${username}:${password}`).toString("base64");
request(
{
Expand Down
2 changes: 1 addition & 1 deletion backend/mock/index.ts

Large diffs are not rendered by default.

37 changes: 21 additions & 16 deletions frontend/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,33 +79,38 @@ export default function versao2() {
};

return (
<div className="w-full h-svh bg-[#aca4a4] grid justify-items-center overflow-y-scroll">
<div className="my-8 w-[466px] h-[472px] grid grid-cols-4 grid-rows-5 gap-3">
<div className="w-full h-svh bg-gray-300 grid justify-items-center overflow-y-scroll">
<div className="my-1 w-[600px] h-[580px] grid grid-cols-4 grid-rows-5 gap-1">
{presets.map((preset) => (
<div
className="bg-slate-400 w-[106px] h-[67px] rounded-md relative flex justify-between border-2 border-gray-500 hover:scale-125 hover:z-50 transition-all"
// hover:scale-125 hover:z-50 transition-all
className=" w-[147px] h-[95px] bg-white overflow-hidden rounded-md relative flex justify-between border-2 border-gray-500"
key={preset.id}
>
<div className="absolute bg-white w-6 text-center aspect-square rounded-full m-[-10px]">
<div className="absolute bg-[#3f3f3f] text-white w-6 text-center aspect-square rounded-full">
{preset.id}
</div>

<div className="w-[100%] flex flex-col justify-center rounded-md">
<img
className="h-[46px] w-100%] mx-[1px] rounded-md border-2 border-gray-500"
src={preset.img}
alt="avatar"
/>
</div>

<div className="flex flex-col justify-around cursor-pointer bg-white rounded-r-md">
<IconPlayerPlay
className="fill-green-500 h-6 hover:h-6 transition-all"
<div className="h-full w-ful flex flex-col justify-center">
<div
className="w-[119px] h-[70px] cursor-pointer overflow-hidden rounded-md border-2 border-gray-200"
onClick={() => {
GotoPreset(preset.id);
}}
/>
>
{preset.id != 1 ? (
<img
className="h-[170px] mt-[-20px] aspect-video object-cover"
src={preset.img}
alt="avatar"
/>
) : (
<img className="aspect-video" src={preset.img} alt="avatar" />
)}
</div>
</div>

<div className="flex flex-col justify-around cursor-pointer bg-white rounded-r-md">
<IconCameraOff
className="fill-red-500 h-6 hover:h-6 transition-all"
onClick={() => {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sc-ptz-control-intelbras",
"version": "2.1.2",
"version": "2.2.0",
"main": "main/index.js",
"icon": "build/icon.png",
"description": "App feito com electron e Next para controlar camera ptz usando a api do DVR/NVR da Intelbras",
Expand Down

0 comments on commit cf73131

Please sign in to comment.