Skip to content

Commit d660482

Browse files
committedMar 4, 2025
fix bad px that did by AI
1 parent 42543a8 commit d660482

File tree

4 files changed

+206
-24
lines changed

4 files changed

+206
-24
lines changed
 

‎src/style_injection.ts

+24-24
Original file line numberDiff line numberDiff line change
@@ -192,99 +192,99 @@ export function addFrontLine(
192192
}
193193
194194
.b3-list ul ul::before {
195-
left: 38px;
195+
left: 34px;
196196
}
197197
198198
.b3-list ul ul ul::before {
199-
left: 56px;
199+
left: 52px;
200200
}
201201
202202
.b3-list ul ul ul ul::before {
203-
left: 74px;
203+
left: 70px;
204204
}
205205
206206
.b3-list ul ul ul ul ul::before {
207-
left: 92px;
207+
left: 88px;
208208
}
209209
210210
.b3-list ul ul ul ul ul ul::before {
211-
left: 110px;
211+
left: 106px;
212212
}
213213
214214
.b3-list ul ul ul ul ul ul ul::before {
215-
left: 128px;
215+
left: 124px;
216216
}
217217
218218
.b3-list ul ul ul ul ul ul ul ul::before {
219-
left: 146px;
219+
left: 142px;
220220
}
221221
222222
.b3-list ul ul ul ul ul ul ul ul ul::before {
223-
left: 164px;
223+
left: 160px;
224224
}
225225
226226
.b3-list ul ul ul ul ul ul ul ul ul ul::before {
227-
left: 182px;
227+
left: 178px;
228228
}
229229
230230
.b3-list ul ul ul ul ul ul ul ul ul ul ul::before {
231-
left: 200px;
231+
left: 196px;
232232
}
233233
234234
.b3-list ul ul ul ul ul ul ul ul ul ul ul ul::before {
235-
left: 218px;
235+
left: 214px;
236236
}
237237
238238
.b3-list ul ul ul ul ul ul ul ul ul ul ul ul ul::before {
239-
left: 236px;
239+
left: 232px;
240240
}
241241
242242
.b3-list ul ul ul ul ul ul ul ul ul ul ul ul ul ul::before {
243-
left: 254px;
243+
left: 250px;
244244
}
245245
246246
.b3-list ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul::before {
247-
left: 272px;
247+
left: 268px;
248248
}
249249
250250
.b3-list ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul::before {
251-
left: 290px;
251+
left: 286px;
252252
}
253253
254254
.b3-list ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul::before {
255-
left: 308px;
255+
left: 304px;
256256
}
257257
258258
.b3-list ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul::before {
259-
left: 326px;
259+
left: 322px;
260260
}
261261
262262
.b3-list ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul::before {
263-
left: 344px;
263+
left: 340px;
264264
}
265265
266266
.b3-list ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul::before {
267-
left: 362px;
267+
left: 358px;
268268
}
269269
270270
.b3-list ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul::before {
271-
left: 380px;
271+
left: 376px;
272272
}
273273
274274
.b3-list ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul::before {
275-
left: 398px;
275+
left: 394px;
276276
}
277277
278278
.b3-list ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul::before {
279-
left: 416px;
279+
left: 412px;
280280
}
281281
282282
.b3-list ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul::before {
283-
left: 434px;
283+
left: 430px;
284284
}
285285
286286
.b3-list ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul ul::before {
287-
left: 452px;
287+
left: 448px;
288288
}
289289
`;
290290
break;

‎tools/archived/hello.svelte

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
<script lang="ts">
2+
import { onDestroy, onMount } from "svelte";
3+
import { version, sql as query } from "@/api";
4+
import { showMessage, fetchPost, Protyle } from "siyuan";
5+
6+
export let app;
7+
8+
let time: string = "";
9+
let ver: string = "";
10+
11+
let divProtyle: HTMLDivElement;
12+
let protyle: any;
13+
let blockID: string = '';
14+
15+
onMount(async () => {
16+
ver = await version();
17+
fetchPost("/api/system/currentTime", {}, (response) => {
18+
time = new Date(response.data).toString();
19+
});
20+
protyle = await initProtyle();
21+
});
22+
23+
onDestroy(() => {
24+
showMessage("Hello panel closed");
25+
protyle.destroy();
26+
});
27+
28+
async function initProtyle() {
29+
let sql = "SELECT * FROM blocks ORDER BY RANDOM () LIMIT 1;";
30+
let blocks: Block[] = await query(sql);
31+
blockID = blocks[0].id;
32+
return new Protyle(app, divProtyle, {
33+
blockId: blockID
34+
});
35+
}
36+
</script>
37+
38+
<div class="b3-dialog__content">
39+
<div>appId:</div>
40+
<div class="fn__hr"></div>
41+
<div class="plugin-sample__time">${app?.appId}</div>
42+
<div class="fn__hr"></div>
43+
<div class="fn__hr"></div>
44+
<div>API demo:</div>
45+
<div class="fn__hr" />
46+
<div class="plugin-sample__time">
47+
System current time: <span id="time">{time}</span>
48+
</div>
49+
<div class="fn__hr" />
50+
<div class="fn__hr" />
51+
<div>Protyle demo: id = {blockID}</div>
52+
<div class="fn__hr" />
53+
<div id="protyle" style="height: 360px;" bind:this={divProtyle}/>
54+
</div>
55+

‎tools/archived/index.scss

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#helloPanel {
2+
border: 1px rgb(189, 119, 119) dashed;
3+
}
4+
5+
.plugin-sample {
6+
&__custom-tab {
7+
background-color: var(--b3-theme-background);
8+
height: 100%;
9+
width: 100%;
10+
display: flex;
11+
justify-content: center;
12+
align-items: center;
13+
}
14+
15+
&__custom-dock {
16+
display: flex;
17+
justify-content: center;
18+
align-items: center;
19+
}
20+
21+
&__time {
22+
background: var(--b3-card-info-background);
23+
border-radius: 4px;
24+
padding: 2px 8px;
25+
}
26+
}

‎tools/archived/setting-example.svelte

+101
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
<script lang="ts">
2+
import SettingPanel from "./libs/setting-panel.svelte";
3+
4+
let groups: string[] = ["🌈 Default"];
5+
let focusGroup = groups[0];
6+
7+
const SettingItems: ISettingItem[] = [
8+
{
9+
type: 'checkbox',
10+
title: 'checkbox',
11+
description: 'checkbox',
12+
key: 'a',
13+
value: true
14+
},
15+
{
16+
type: 'textinput',
17+
title: 'text',
18+
description: 'This is a text',
19+
key: 'b',
20+
value: 'This is a text',
21+
placeholder: 'placeholder'
22+
},
23+
{
24+
type: 'select',
25+
title: 'select',
26+
description: 'select',
27+
key: 'c',
28+
value: 'x',
29+
options: {
30+
x: 'x',
31+
y: 'y',
32+
z: 'z'
33+
}
34+
},
35+
{
36+
type: 'slider',
37+
title: 'slider',
38+
description: 'slider',
39+
key: 'd',
40+
value: 50,
41+
slider: {
42+
min: 0,
43+
max: 100,
44+
step: 1
45+
}
46+
}
47+
];
48+
49+
/********** Events **********/
50+
interface ChangeEvent {
51+
group: string;
52+
key: string;
53+
value: any;
54+
}
55+
56+
const onChanged = ({ detail }: CustomEvent<ChangeEvent>) => {
57+
if (detail.group === groups[0]) {
58+
// setting.set(detail.key, detail.value);
59+
}
60+
};
61+
</script>
62+
63+
<div class="fn__flex-1 fn__flex config__panel">
64+
<ul class="b3-tab-bar b3-list b3-list--background">
65+
{#each groups as group}
66+
<li
67+
data-name="editor"
68+
class:b3-list-item--focus={group === focusGroup}
69+
class="b3-list-item"
70+
on:click={() => {
71+
focusGroup = group;
72+
}}
73+
on:keydown={() => {}}
74+
>
75+
<span class="b3-list-item__text">{group}</span>
76+
</li>
77+
{/each}
78+
</ul>
79+
<div class="config__tab-wrap">
80+
<SettingPanel
81+
group={groups[0]}
82+
settingItems={SettingItems}
83+
display={focusGroup === groups[0]}
84+
on:changed={onChanged}
85+
>
86+
<div class="fn__flex b3-label">
87+
💡 This is our default settings.
88+
</div>
89+
</SettingPanel>
90+
</div>
91+
</div>
92+
93+
<style lang="scss">
94+
.config__panel {
95+
height: 100%;
96+
}
97+
.config__panel > ul > li {
98+
padding-left: 1rem;
99+
}
100+
</style>
101+

0 commit comments

Comments
 (0)
Please sign in to comment.