Skip to content

Commit 6ae7747

Browse files
authored
Merge pull request #130 from fosslife/master
2 parents 983520d + 84309e8 commit 6ae7747

File tree

10 files changed

+42
-29
lines changed

10 files changed

+42
-29
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ So here's DevTools-X -- an x-platform non-electron, collection of dev-tools that
1919

2020
<img width="1317" alt="Screenshot 2024-04-01 at 12 20 37 PM" src="https://github.com/fosslife/devtools-x/assets/24642451/4ab136a2-e8df-448e-96c2-e6525a35b393">
2121

22+
### NOTE
23+
24+
After migrating to tauri v2, app is facing minor bugs again, (because of tauri) You might see basic css breaking or app not working on specific platform. Please
25+
open a bug in issue tracker if you do. I will fix it if anything I can fix on my side.
26+
2227
## Installation
2328

2429
### Download prebuilt binaries

src-tauri/src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ fn main() {
181181
.title("DevTools-X")
182182
.inner_size(1000.0, 850.0)
183183
.resizable(true)
184+
.min_inner_size(900.0, 800.0)
184185
.fullscreen(false)
185186
.build()?;
186187
// #[cfg(debug_assertions)]

src-tauri/tauri.conf.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
},
6666
"dangerousDisableAssetCspModification": ["style-src"],
6767
"csp": {
68+
"connect-src": ["ipc:", "http://ipc.localhost"],
6869
"default-src": [
6970
"'self'",
7071
"blob:",

src/App.tsx

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ import { Settings } from "./Layout/Settings";
3737
import { useDisclosure, useWindowEvent } from "@mantine/hooks";
3838
import { trackOtherEvent, trackPageView } from "./utils/analytics";
3939
import { db } from "./utils";
40-
import { ask, message } from "@tauri-apps/plugin-dialog";
40+
import { ask } from "@tauri-apps/plugin-dialog";
4141
import { relaunch } from "@tauri-apps/plugin-process";
4242

4343
// Lazy load components
@@ -159,12 +159,8 @@ function App() {
159159
async function init() {
160160
const update = await check();
161161
if (update === null) {
162-
await message("Failed to check for updates.\nPlease try again later.", {
163-
title: "Error",
164-
kind: "error",
165-
okLabel: "OK",
166-
});
167-
return;
162+
console.log("no update");
163+
// can re use this logic to manually check for updates
168164
} else if (update?.available) {
169165
const yes = await ask(
170166
`Update to ${update.version} is available!\n\nRelease notes: ${update.body}`,
@@ -247,9 +243,9 @@ function App() {
247243
id="navbar"
248244
defaultSize={5}
249245
maxSize={20}
250-
minSize={5}
246+
minSize={8}
251247
collapsible
252-
collapsedSize={4}
248+
collapsedSize={5}
253249
ref={panelRef}
254250
onCollapse={() => {
255251
setIconMode(true);

src/Features/url/UrlParser.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export default function UrlParser() {
2323
const onSubmit: FormEventHandler<HTMLFormElement> = (e) => {
2424
e.preventDefault();
2525
if (!key || !value) return;
26-
searchParams.set(key, value);
26+
searchParams.append(key, value);
2727
setSearchParams(searchParams);
2828
setUrl(
2929
url.split("?")[0] +
@@ -76,23 +76,24 @@ export default function UrlParser() {
7676
</Table>
7777

7878
<Divider />
79-
<Table w="100%" withColumnBorders>
79+
<Table w="100%" withColumnBorders striped>
8080
<Table.Thead>
8181
<Table.Tr>
8282
<Table.Th>Key</Table.Th>
8383
<Table.Th>Value</Table.Th>
8484
</Table.Tr>
8585
</Table.Thead>
8686
<Table.Tbody>
87-
{Array.from(searchParams.keys()).map((key, i) => (
87+
{[...new Set(searchParams.keys())].map((key, i) => (
8888
<Table.Tr key={key + i}>
8989
<Table.Td>{key}</Table.Td>
90-
<Table.Td>{searchParams.get(key)}</Table.Td>
90+
<Table.Td>{searchParams.getAll(key).join(", ")}</Table.Td>
9191
</Table.Tr>
9292
))}
9393
<Table.Tr>
9494
<Table.Td>
9595
<TextInput
96+
autoComplete="off"
9697
value={key}
9798
onChange={(e) => {
9899
let key = e.currentTarget.value;
@@ -103,6 +104,7 @@ export default function UrlParser() {
103104
</Table.Td>
104105
<Table.Td>
105106
<TextInput
107+
autoComplete="off"
106108
value={value}
107109
onChange={(e) => {
108110
let value = e.currentTarget.value;

src/Layout/Navbar/ColorIcons.tsx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ export const Package = () => (
44
xmlns="http://www.w3.org/2000/svg"
55
viewBox="0 0 48 48"
66
enableBackground="new 0 0 48 48"
7+
height={20}
8+
width={20}
79
>
810
<path
911
fill="#FF9800"
@@ -22,6 +24,8 @@ export const Transit = () => (
2224
xmlns="http://www.w3.org/2000/svg"
2325
viewBox="0 0 48 48"
2426
enableBackground="new 0 0 48 48"
27+
height={20}
28+
width={20}
2529
>
2630
<path
2731
fill="#FFC107"
@@ -61,6 +65,8 @@ export const DataProtection = () => (
6165
xmlns="http://www.w3.org/2000/svg"
6266
viewBox="0 0 48 48"
6367
enableBackground="new 0 0 48 48"
68+
height={20}
69+
width={20}
6470
>
6571
<g fill="#D1C4E9">
6672
<path d="M38,7H10C8.9,7,8,7.9,8,9v6c0,1.1,0.9,2,2,2h28c1.1,0,2-0.9,2-2V9C40,7.9,39.1,7,38,7z" />
@@ -80,6 +86,8 @@ export const Safe = () => (
8086
xmlns="http://www.w3.org/2000/svg"
8187
viewBox="0 0 48 48"
8288
enableBackground="new 0 0 48 48"
89+
height={20}
90+
width={20}
8391
>
8492
<rect x="8" y="39" fill="#455A64" width="6" height="3" />
8593
<rect x="34" y="39" fill="#455A64" width="6" height="3" />
@@ -122,6 +130,8 @@ export const Picture = () => (
122130
xmlns="http://www.w3.org/2000/svg"
123131
viewBox="0 0 48 48"
124132
enableBackground="new 0 0 48 48"
133+
height={20}
134+
width={20}
125135
>
126136
<path
127137
fill="#F57C00"
@@ -139,6 +149,8 @@ export const Shop = () => (
139149
xmlns="http://www.w3.org/2000/svg"
140150
viewBox="0 0 48 48"
141151
enableBackground="new 0 0 48 48"
152+
height={20}
153+
width={20}
142154
>
143155
<rect x="5" y="19" fill="#CFD8DC" width="38" height="19" />
144156
<rect x="5" y="38" fill="#B0BEC5" width="38" height="4" />
@@ -182,6 +194,8 @@ export const MindMap = () => (
182194
xmlns="http://www.w3.org/2000/svg"
183195
viewBox="0 0 48 48"
184196
enableBackground="new 0 0 48 48"
197+
height={20}
198+
width={20}
185199
>
186200
<polygon
187201
fill="#CFD8DC"
@@ -204,6 +218,8 @@ export const Binoculars = () => (
204218
xmlns="http://www.w3.org/2000/svg"
205219
viewBox="0 0 48 48"
206220
enableBackground="new 0 0 48 48"
221+
height={20}
222+
width={20}
207223
>
208224
<g fill="#37474F">
209225
<circle cx="33" cy="16" r="6" />
@@ -231,6 +247,8 @@ export const Electricity = () => (
231247
xmlns="http://www.w3.org/2000/svg"
232248
viewBox="0 0 48 48"
233249
enableBackground="new 0 0 48 48"
250+
height={20}
251+
width={20}
234252
>
235253
<path
236254
fill="#00BCD4"
@@ -245,6 +263,8 @@ export const SerialTask = () => (
245263
xmlns="http://www.w3.org/2000/svg"
246264
viewBox="0 0 48 48"
247265
enableBackground="new 0 0 48 48"
266+
height={20}
267+
width={20}
248268
>
249269
<path
250270
fill="#90CAF9"

src/Layout/Navbar/components/GroupedView.tsx

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,7 @@ export const GroupedView = ({
4848
.map((group) => {
4949
return (
5050
<Accordion.Item key={group.group} value={group.group}>
51-
<Accordion.Control
52-
icon={cloneElement(groupIcons[group.group], {
53-
size: "16px",
54-
})}
55-
styles={{
56-
icon: {
57-
height: "20px",
58-
width: "20px",
59-
},
60-
}}
61-
>
51+
<Accordion.Control icon={cloneElement(groupIcons[group.group])}>
6252
<Text size="sm">{group.group}</Text>
6353
</Accordion.Control>
6454
<Accordion.Panel>

src/Layout/Navbar/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ export const Navbar = ({ iconMode, setIconMode }: Props) => {
167167
<Stack
168168
className={classes.navbar}
169169
id="navbar"
170-
w={iconMode ? 50 : "fit-content"}
170+
w={"auto"}
171171
align={iconMode ? "center" : undefined}
172172
>
173173
<Stack

src/Layout/Navbar/styles.module.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
}
4141

4242
.iconsBarRow {
43-
font-size: 18px;
4443
cursor: pointer;
4544
display: flex;
4645
justify-content: start;

src/index.css

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,10 @@ code {
2121

2222
/* hide scrollbar on left nav */
2323
::-webkit-scrollbar {
24-
width: 2px; /* Remove scrollbar space */
25-
height: 2px;
26-
border-radius: 10px;
24+
display: none;
2725
}
2826

27+
/* this won't have any effect but keeping it here */
2928
::-webkit-scrollbar-track {
3029
background: transparent; /* color of the tracking area */
3130
}

0 commit comments

Comments
 (0)