-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathfilters.html
More file actions
863 lines (750 loc) · 45.4 KB
/
filters.html
File metadata and controls
863 lines (750 loc) · 45.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>FIlters Page</title>
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/css/bootstrap.min.css"
integrity="sha512-jnSuA4Ss2PkkikSOLtYs8BlYIeeIK1h99ty4YfvRPAlzr377vr3CXDb7sb7eEEBYjDtcYj+AjBH3FLv5uSJuXg=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- Icon 1 -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/coswise/hicon-css@latest/web-fonts/hicon.min.css">
<link href='https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css' rel='stylesheet'>
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.11.3/font/bootstrap-icons.min.css"
integrity="sha512-dPXYcDub/aeb08c63jRq/k6GaKccl256JQy/AnOq7CAnEZ9FzSL9wSbcZkMp4R26vBsMLFYH4kQ67/bbV8XaCQ=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- Custom CSS -->
<link rel="stylesheet" href="/assets/css/filters.css">
</head>
<body class="position-relative">
<div class="base__container d-flex flex-column-reverse flex-lg-row">
<div class="menu__container magic-t-line">
<!-- Mobile -->
<ul class="p-0 m-0 d-flex align-items-center justify-content-around d-lg-none" id="sidebar-menu">
<li> <a href="/home.html" class="menu-link">
<i class="bi bi-grid"></i>
</a></li>
<li> <a href="/folder.html" class="menu-link">
<i class="bi bi-folder"></i>
</a></li>
<li> <a href="/contacts.html" class="menu-link">
<i class="bi bi-people"></i>
</a></li>
<li> <a href="/info.html" class="menu-link">
<i class="bi bi-exclamation-diamond"></i>
</a></li>
<li id="setting-btn" class="d-md-none"> <a class="menu-link sidebar_active" href="#">
<i class="bi bi-gear-fill"></i>
</a></li>
<li class="d-none d-md-flex"> <a class="menu-link" href="/site.html">
<i class="bi bi-diagram-2"></i>
</a></li>
<li class="d-none d-md-flex" style="padding-top: 5px;"> <a href="/server.html" class="sidebar_active">
<i class='bx bxs-card'></i>
</a></li>
</ul>
<div id="setting-menu"
class="position-absolute setting__container align-items-end justify-content-end me-3 d-lg-none">
<ul class="d-flex align-items-center justify-content-start column-gap-3 mb-2 py-0 px-3">
<li class=""> <a href="/site.html" class="menu-link">
<i class="bi bi-diagram-2-fill" style="font-size: 1.2rem;"></i>
</i>Site
</a></li>
<li class=""> <a href="/server.html" class="menu-link">
<i class='bx bxs-card'></i>Server
</a></li>
</ul>
</div>
<!-- </nav> -->
<nav class="d-none d-lg-flex flex-column justify-content-between magic-r-line py-2">
<div class="d-flex flex-column align-items-center gap-4 justify-content-center">
<div class="d-flexalign-items-center logo_content">
<img class="object-fit-cover" src="/assets/images/svg/logo.svg" />
</div>
<div class="menu_group">
<ul class="">
<li><a href="/home.html">
<i class="bi bi-grid-fill"></i>
</a></li>
<li><a href="/folder.html">
<i class="bi bi-folder"></i>
</a></li>
<li><a href="/contacts.html">
<i class="bi bi-people"></i>
</a></li>
<li><a href="/info.html">
<i class='bi bi-exclamation-diamond'></i>
</a></li>
</ul>
</div>
</div>
<div class="button_group align-items-center gap-3 d-flex flex-column justify-content-end ">
<a href="/site.html"><i class="bi bi-diagram-2"></i></a>
<a href="/server.html" class="sidebar_active"><i class="bi bi-hdd-network-fill"></i></a>
<div>
<div class="rounded_circle">
<img src="/assets/images/avatar.jpg" alt="" class="rounded-circle avatar">
</div>
</div>
</div>
</nav>
</div>
<div class="flex-1 position-relative d-flex flex-column px-lg-4 px-xxl-5"
style="background-color: var(--background-3);">
<!-- Mobile -->
<div class="d-flex flex-column d-lg-none">
<div class="d-flex align-items-center justify-content-between column-gap-2 top__menu px-3 px-md-4 ">
<div class="pt-2 mobile_menu_title d-flex align-items-center ">
<button data-bs-toggle="offcanvas" data-bs-target="#off-home-menu"
aria-controls="offcanvasExample"
class="d-flex align-items-center justify-content-center p-1">
<i class='bx bx-menu' style="font-size: 1.5rem;"></i>
</button>
<span class="ms-2">Server
Settings</span>
</div>
<div>
<div class="rounded_circle">
<img src="/assets/images/avatar.jpg" alt="" class="rounded-circle avatar">
</div>
</div>
</div>
</div>
<!-- Desktop -->
<div class="flex-1 d-flex flex-column">
<div class="d-none d-lg-flex align-items-center server_title_card mt-4">
<h4 class="fw-semibold">Settings</h4>
</div>
<div class="flex-1 d-flex d-lg-flex flex-1 magic-t-line column-gap-5 mb-2">
<div class="d-none d-lg-block parameter_menu_card">
<ul>
<li><a href="/server.html"><i class="bi bi-app-indicator"></i>General</a></li>
<li><a href="/filters.html" class="parameter_active_menu"><i
class='bx bx-collection'></i>Filters</a></li>
<li><a href="/block_list.html"><i class="bi bi-view-list"></i>Block List</a></li>
<li><a href="/feed.html"><i class='bx bx-candles'></i>Feeds</a></li>
<li><a href="/dev.html"><i class="bi bi-cpu-fill"></i>Dev</a>
</li>
<li><a href="/shortcuts.html"><i class="bi bi-command"></i>Shortcuts</a></li>
<li><a href="/profile.html">
<i class='bx bx-user'></i>
Profile</a></li>
</ul>
</div>
<div class="flex-1 d-flex flex-column position-relative parameter_view_card">
<div class="d-flex column-gap-3 pt-3 py-2 parameter_title_card ps-4">
<div>
<div class="param_icon_card d-flex">
<i class="bx bx-collection"></i>
</div>
</div>
<div class="d-flex flex-column">
<span class="parameter_title">Filters</span>
<small class="param_description">Filters lorem ipsum dolor sit amet consectetur
adipisicing elit.</small>
</div>
</div>
<div class="parameter_content flex-1 d-flex flex-column mx-lg-0 position-relative">
<div
class="position-absolute fw-medium pb-2 pt-3 desktop_scroll end-0 start-0 overflow-y-auto bottom-0 top-0 align-items-center d-flex flex-column">
<div class="flex-1 w-100 px-4 d-flex flex-column gap-2">
<div class="d-flex justify-content-center">
<div class="d-flex flex-column parameter_view_menu_card">
<div class="d-flex gap-1 mb-1 param_server_list_card">
<div>
<div>
<i class='bx bx-card' style="font-size: 1rem;"></i>
</div>
</div>
<div class="d-flex flex-column">
<small
class="d-flex align-items-center column-gap-2 server_list_card_title">Server
List</small>
<small class="description__text">
Server list Lorem ipsum dolor sit amet consectetur
adipisicing elit.
</small>
</div>
</div>
<div
class="col-xl-11 col-xxl-9 mt-2 ps-3 d-flex gap-1 gap-md-2 gap-lg-3 flex-wrap">
<div class="d-flex gap-3">
<div class="option-card active" onclick="selectOption(this)">
<div class="radio-circle active"></div>
<span>
server@example.gik
</span>
</div>
</div>
<div class="d-flex gap-3">
<div class="option-card" onclick="selectOption(this)">
<div class="radio-circle"></div>
<span>
binsrh@example.
</span>
</div>
</div>
</div>
<!-- </div> -->
</div>
</div>
<div
class="col-xl-11 col-xxl-9 d-flex flex-column pb-0 row-gap-2 mt-3 flex-1 parameter_view_menu_card">
<div
class="d-flex flex-column gap-3 flex-md-row align-items-md-center justify-content-md-between">
<div class="clear_space d-flex flex-column description__text"
style="font-size: .88rem;">
<small>Quickly add an account from popular E-mail providers</small>
<small class="mt-1">
To manually configure an account,
use the <a href="" class="label_action fw-medium">IMAP/SMTP</a>
section.
</small>
</div>
<div
class="smtp__action__card d-flex justify-content-lg-end column-gap-3 col-9 col-md-4 col-lg-5 col-xl-4">
<button id="config_btn" type="button" data-bs-toggle="offcanvas"
data-bs-target="#filterModal" aria-controls="offcanvasRight"
class="btn btn-sm new_config_btn">
<i class='bx bxs-filter-alt'></i>Add
Filter
</button>
<button id="script_btn" type="button" data-bs-toggle="offcanvas"
data-bs-target="#filterScript" aria-controls="offcanvasRight"
class="btn btn-sm new_config_btn">
<i class='bx bx-code-block'></i>Add Script</button>
</div>
</div>
<!-- Table -->
<div class="d-flex flex-column mt-3 table__card mb-3">
<div class="d-flex table__card__title fw-semibold">
<span class="flex-1" style="width: 50%;"><i
class='bx bx-user'></i>Sender</span>
<span class="table_left_line_card" style="width: 30%;"><i
class='bx bx-layer'></i>Behavior</span>
<span class="table_left_line_card" style="width: 20%;"><i
class='bx bx-dots-vertical-rounded'></i>Actions</span>
</div>
<!-- Table Items -->
<div class="flex-1 position-relative flex flex-column">
<div class="d-flex justify-content-between table__card__item">
<div class="d-flex items-center" style="width: 50%;">
<span id="feed_name px-1">
Demo
</span>
</div>
<div id="table-modal"
class="table_left_line_card fw-medium table-dropdown-container"
style="width: 30%;">
<span id="feed_name"
class="d-flex column-gap-1 table-dropdown-btn w-100 justify-content-center"
style="width: 60%;">
Default <i class='bx bx-pen' style="font-size: 1rem;">
</i>
</span>
<div class="table-dropdown-menu-custom p-2">
<div
class=" d-inline-flex flex-column justify-content-start mt-3 row-gap-1 w-100">
<small class="fw-medium w-75 text-start"
style="font-size: .8rem;">Action</small>
<div class="table-dropdown-container">
<div id="table-modal"
class="dropdown-btn d-flex align-items-center justify-content-between px-2 position-relative">
<span style="font-size: .8rem;">Select
Options</span>
<button
class="clear__btn border-0 bg-transparent"
style="font-size: 1.1rem;">
<i class='bx bx-chevron-down icon'></i>
</button>
</div>
<div class="table-dropdown-menu-custom">
<a href="#">Option 1</a>
<a href="#">Option 2</a>
<a href="#">Option 3</a>
</div>
</div>
</div>
<div class="w-100 d-flex justify-content-end pt-3">
<div class="" style="width: 30%;">
<button class="btn-connect w-100">Save
<i class='bx bx-transfer-alt'></i></button>
</div>
</div>
</div>
</div>
<div id="feed__actions" class="table_left_line_card"
style="width: 20%;">
<button class="update_btn clear__btn" data-bs-toggle="tooltip"
data-bs-placement="top" title="Test"><i
class='bx bx-candles'>
</i></button>
<button class="delete_btn clear__btn" data-bs-toggle="tooltip"
data-bs-placement="top" title="Delete"><i
class='bx bx-trash'></i></button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Modal -->
<!-- 1. Menu -->
<div class="offcanvas offcanvas-start my-1 ms-1 rounded d-flex flex-column d-lg-none" tabindex="-1"
id="off-home-menu" aria-labelledby="offcanvasExampleLabel" style="width: 330px; ">
<div class="offcanvas-body">
<div class="mt-2" style="width: 90px;">
<img src="/assets/images/svg/logo_dark.svg" class="" alt="Logo">
</div>
<div class="d-flex flex-column menu_modal mb-2 mt-5 scrollable "
style="max-height: calc(97dvh - 120px); overflow-y: auto;">
<div class="group_menu">
<div class="group_menu_item">
<ul class="p-0">
<li><a href="/server.html"><i class="bi bi-app-indicator"></i>General</a></li>
<li><a href="/filters.html" class="parameter_active_menu"><i
class='bx bx-collection'></i>Filters</a></li>
<li><a href="/block_list.html"><i class="bi bi-view-list"></i>Block List</a></li>
<li><a href="/feed.html"><i class='bx bx-candles'></i>Feeds</a></li>
<li><a href="/dev.html"><i class="bi bi-cpu-fill"></i>Dev</a></li>
<li><a href="/shortcuts.html"><i class="bi bi-command"></i>Shortcuts</a></li>
<li><a href="/profile.html"><i class='bx bx-user'></i>Profile</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<!-- Filter -->
<div class="offcanvas offcanvas-end my-2 mx-2 rounded scrollable overflow-y-auto" tabindex="-1" id="filterModal"
aria-labelledby="offcanvasRightLabel">
<div class="offcanvas-header">
<div class="w-100">
<div class="d-flex justify-content-between align-items-center">
<h6 id="offcanvasRightLabel" class="fw-semibold">Add new Filter</h6>
<div class="d-flex align-items-center">
<button type="button" class=" text-reset clear__btn type__two__btn" style="font-size: 1.4rem;"
data-bs-dismiss="offcanvas" aria-label="Close"><i class='bx bx-x'></i></button>
</div>
</div>
<small class="fw-normal d-flex description__text" style="width: 80%;">
Step
of
Lorem,
ipsum
dolor sit amet
consectetur adipisicing elit.
</small>
</div>
</div>
<div class="offcanvas-body mt-2 mb-4">
<div class="">
<div class="d-flex flex-column row-gap-0">
<div class="d-flex flex-column mb-3">
<small class="fw-semibold d-flex align-items-center gap-1"
style="color: var(--menu-primary); font-size: .8rem;">
<i class='bx bx-plug' style="font-size: 1rem;"></i>General
</small>
<small class="description__text fw-normal">
Lorem ipsum dolor sit, amet consectetur adipisicing elit.
</small>
</div>
<div class="mx-2 mt-2 d-flex flex-column" style="width: 93%">
<div class="mb-3">
<div
class=" mt-2 d-flex flex-column flex-lg-row align-items-lg-center justify-content-lg-between">
<div class="filed__card input_large_card">
<small class="field__label">Filter Name</small>
<input id="provider" type="text" class="base__field" style="font-size: .8rem; "
placeholder="Enter filter name">
</div>
<div class="filed__card mt-3 mt-lg-0">
<small class="field__label">Priority</small>
<input id="script_priority" type="number"
class="base__field fw-semibold text-center"
style="font-size: .8rem; width: 80px; " placeholder="">
</div>
</div>
</div>
<div class="filed__card mb-3">
<small class="field__label">Test</small>
<input id="test" type="text" class="param__field w-100" style="font-size: .8rem;"
placeholder="ALLOF (AND)">
</div>
</div>
</div>
</div>
<!-- Tab Menu Header-->
<div class="menu__card mt-3">
<ul class="nav nav-pills mb-3 column-gap-4" id="imap-tab" role="tablist">
<li class="nav-item" role="presentation">
<button class="active clear__btn" id="pills_condition-tab" data-bs-toggle="pill"
data-bs-target="#pills_condition" type="button" role="tab" aria-controls="pills_condition"
aria-selected="true">
Conditions
</button>
</li>
<li class="nav-item" role="presentation">
<button class="clear__btn" id="pills_script-tab" data-bs-toggle="pill"
data-bs-target="#pills_script" type="button" role="tab" aria-controls="pills_script"
aria-selected="false">
Actions
</button>
</li>
</ul>
</div>
<!-- Tab Children-->
<div class="tab-content scrolbale pt-4 px-2" id="pills-tabContent" style="width: 96%;">
<!-- 1 -->
<div class="tab-pane fade show active " id="pills_condition" role="tabpanel"
aria-labelledby="pills-condition-tab">
<div class="filed__card mb-3">
<small class="field__label">Select a Category</small>
<select class="form-select no-focus" id="categorySelect">
<optgroup label="Message">
<option value="subject">Subject</option>
<option value="body">Body</option>
<option value="size">Size (KB)</option>
</optgroup>
<optgroup label="Header">
<option value="to">To</option>
<option value="from">From</option>
<option value="cc">CC</option>
<option value="to_or_cc">To or CC</option>
<option value="bcc">BCC</option>
<option value="custom">Custom</option>
</optgroup>
</select>
</div>
<div id="customer-input" class="filed__card mb-3">
<small class="field__label">Customer</small>
<input id="address" type="text" class="param__field w-100" style="font-size: .8rem;"
placeholder="ALLOF (AND)">
</div>
<div class="d-flex flex-column row-gap-2">
<small class="field__label">Select a
Condition</small>
<select class="form-select" id="conditionSelect" disabled>
<option value="">Select a category first</option>
</select>
</div>
<div class="filed__card mt-3">
<small class="field__label">Address</small>
<input id="address" type="text" class="param__field w-100" style="font-size: .8rem;"
placeholder="ALLOF (AND)">
</div>
</div>
<!-- 2 -->
<div class="tab-pane fade" id="pills_script" role="tabpanel" aria-labelledby="pills-mail-server-tab">
<div class="d-flex flex-column row-gap-2 mb-3">
<small class="field__label">Select an Action</small>
<select class="form-select" id="actionSelect">
<option value="deliver">Deliver (Keep)</option>
<option value="copy_email">Copy email to mailbox</option>
<option value="move_email">Move email to mailbox</option>
<option value="flag">Flag</option>
<option value="add_flag">Add Flag</option>
<option value="remove_flag">Remove Flag</option>
<option value="redirect">Redirect</option>
<option value="forward">Forward</option>
<option value="reject">Reject</option>
<option value="discard">Discard</option>
<option value="reply_message">Reply Message</option>
</select>
</div>
<div id="dynamicFields" class="" style="display: none;"></div>
<!-- ------------------------------- Actions ------------------------------- -->
<div class="my-4 w-100">
<div class="w-100 d-flex column-gap-2" style="margin-top: 1.15rem;">
<button class="btn-reset px-4">Reset<i class='bx bx-reset'></i></button>
<button class="btn-connect">Save <i class='bx bx-transfer-alt'></i></button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- <div class="offcanvas offcanvas-start" tabindex="-1" id="offcanvasExample" aria-labelledby="offcanvasExampleLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="offcanvasExampleLabel">Offcanvas</h5>
<button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<div>
Some text as placeholder. In real life you can have the elements you have chosen. Like, text, images,
lists, etc.
</div>
<div class="dropdown mt-3">
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton"
data-bs-toggle="dropdown">
Dropdown button
</button>
<ul class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<li><a class="dropdown-item" href="#">Action</a></li>
<li><a class="dropdown-item" href="#">Another action</a></li>
<li><a class="dropdown-item" href="#">Something else here</a></li>
</ul>
</div>
</div>
</div> -->
<!-- Script Modal -->
<div class="offcanvas offcanvas-end my-2 mx-2 rounded scrollable overflow-y-auto" tabindex="-1" id="filterScript"
aria-labelledby="offcanvasRightLabel">
<!-- Header -->
<div class="offcanvas-header" style="min-height: 10%;">
<div class="w-100">
<div class="d-flex justify-content-between align-items-center">
<h6 id="offcanvasRightLabel" class="fw-semibold">Add Script</h6>
<div class="d-flex align-items-center">
<button type="button" class="text-reset clear__btn type__two__btn" style="font-size: 1.4rem;"
data-bs-dismiss="offcanvas" aria-label="Close">
<i class='bx bx-x'></i>
</button>
</div>
</div>
<small class="fw-normal d-flex description__text" style="width: 80%;">
Step of Lorem, ipsum dolor sit amet consectetur adipisicing elit. Molestias, officia.
</small>
</div>
</div>
<div class="position-relative" style="min-height: 80%;">
<div class="position-absolute start-0 end-0 top-0 bottom-0">
<div class="offcanvas-body position-relative d-flex flex-column">
<div class="d-flex flex-column row-gap-2">
<div class="mb-3">
<div
class=" mt-2 d-flex flex-column flex-lg-row align-items-lg-center justify-content-lg-between">
<div class="filed__card input_large_card">
<small class="field__label">Filter Name</small>
<input id="provider" type="text" class="base__field" style="font-size: .8rem; "
placeholder="Enter filter name">
</div>
<div class="filed__card mt-3 mt-lg-0">
<small class="field__label">Priority</small>
<input id="script_priority" type="number"
class="base__field fw-semibold text-center"
style="font-size: .8rem; width: 80px; " placeholder="">
</div>
</div>
</div>
<!-- <div> -->
<div class="d-flex flex-column mb-3">
<small class="fw-semibold d-flex align-items-center gap-1 mb-1"
style="color: var(--menu-primary); font-size: .8rem;">
<i class='bx bx-plug' style="font-size: 1rem;"></i>Sieve Script
</small>
<small class="description__text fw-normal"
style="font-size: .78rem; opacity: .7; font-size: .76rem; padding-left: 2px;">
Past the Sieve script in the field below. Manualy added scripts cannot
be edited
with
the filters interface
</small>
<textarea name="" id="" type="text" class="param__field scrollable w-100 mt-3"
style="font-size: .8rem; min-height: 100px"></textarea>
</div>
<!-- -->
<div class="d-flex justify-content-end">
<div class=" w-25">
<button class="submit_btn w-100" style="font-size: .9rem;">Save <i
class='bx bx-transfer-alt'></i></button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- JS -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js"
integrity="sha512-v2CJ7UaYy4JwqLDIrZUI/4hqeoQieOmAZNXBeQyjo21dadnwR+8ZaIJVT8EE2iyI61OV8e6M8PP2/4hpQINQ/g=="
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/js/bootstrap.min.js"
integrity="sha512-ykZ1QQr0Jy/4ZkvKuqWn4iF3lqPZyij9iRv6sGqLRdTPkY69YX6+7wvVGmsdBbiIfN/8OdsI7HABjvEok6ZopQ=="
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="/assets/js/utils.js"></script>
<script>
function selectOption(selected) {
document.querySelectorAll('.option-card').forEach(el => {
el.classList.remove('active');
el.querySelector('.radio-circle').classList.remove('active');
});
selected.classList.add('active');
selected.querySelector('.radio-circle').classList.add('active');
}
document.addEventListener("DOMContentLoaded", function () {
const categorySelect = document.getElementById("categorySelect");
const conditionSelect = document.getElementById("conditionSelect");
// Mapping des conditions par catégorie
const conditions = {
subject: ["Contains", "Not Contains", "Not Matches", "Regex", "Not Regex"],
body: ["Contains", "Not Contains", "Not Matches", "Regex", "Not Regex"],
size: ["Over", "Not Over", "Under", "Not Under"],
to: ["Contains", "Not Contains", "Not Matches", "Regex", "Not Regex"],
from: ["Contains", "Not Contains", "Not Matches", "Regex", "Not Regex"],
cc: ["Contains", "Not Contains", "Not Matches", "Regex", "Not Regex"],
to_or_cc: ["Contains", "Not Contains", "Not Matches", "Regex", "Not Regex"],
bcc: ["Contains", "Not Contains", "Not Matches", "Regex", "Not Regex"],
custom: ["Contains", "Not Contains", "Not Matches", "Regex", "Not Regex"]
};
// Mise à jour du deuxième select en fonction du premier
categorySelect.addEventListener("change", function () {
const selectedValue = categorySelect.value;
conditionSelect.innerHTML = "";
if (selectedValue) {
conditions[selectedValue].forEach(condition => {
let option = document.createElement("option");
option.value = condition.toLowerCase().replace(/\s/g, "_");
option.textContent = condition;
conditionSelect.appendChild(option);
});
conditionSelect.disabled = false;
} else {
conditionSelect.innerHTML = "<option value=''>Select a category first</option>";
conditionSelect.disabled = true;
}
});
});
$("#bloack-option-list").click(function () {
$(".dropdown-menu-custom").toggleClass("show");
$(".icon").toggleClass("rotate-icon");
});
$(document).click(function (e) {
if (!$(e.target).closest(".dropdown-container").length) {
$(".dropdown-menu-custom").removeClass("show");
$(".icon").removeClass("rotate-icon");
}
});
// 2
$("#table-modal").click(function () {
console.log(`+- Hello`)
$(".table-dropdown-menu-custom").toggleClass("show");
// $(".icon").toggleClass("rotate-icon");
});
$(document).click(function (e) {
if (!$(e.target).closest(".table-dropdown-container").length) {
$(".table-dropdown-menu-custom").removeClass("show");
// $(".icon").removeClass("rotate-icon");
}
});
//
const categorySelect = document.getElementById("categorySelect");
const customerInput = document.getElementById("customer-input");
// Masquer le champ "customer-input" au départ
customerInput.style.display = "none";
categorySelect.addEventListener("change", function () {
if (categorySelect.value === "custom") {
customerInput.style.display = "flex"; // Afficher l'input
} else {
customerInput.style.display = "none"; // Cacher l'input
}
});
// Actions
document.getElementById("actionSelect").addEventListener("change", function () {
const selectedAction = this.value;
const dynamicFields = document.getElementById("dynamicFields");
// Réinitialiser le contenu et cacher le div
dynamicFields.innerHTML = "";
dynamicFields.style.display = "none";
if (!selectedAction) return; // Si aucune sélection, on quitte
// On affiche le div
// dynamicFields.classList.add("d-flex", "flex-column", "column-gap-2", "my-2");
dynamicFields.classList.add("d-flex", "flex-column", "mt-2");
// dynamicFields.toggleClass("dynamic__div");
// Fonction pour créer et ajouter un label
const createLabel = (text) => {
let label = document.createElement("small");
label.className = "field__label mb-2";
label.textContent = text;
return label;
};
// Effacer les champs dynamiques avant d'ajouter de nouveaux
dynamicFields.innerHTML = "";
if (selectedAction === "copy_email" || selectedAction === "move_email") {
// Label
dynamicFields.appendChild(createLabel("Select a Mailbox"));
// Select pour les boîtes mail
const mailboxes = ["Inbox", "Spam", "Important", "Archives", "Work", "Personal"];
let select = document.createElement("select");
select.className = "form-select";
mailboxes.forEach(mailbox => {
let option = document.createElement("option");
option.value = mailbox.toLowerCase();
option.textContent = mailbox;
select.appendChild(option);
});
dynamicFields.appendChild(select);
} else if (["flag", "add_flag", "remove_flag"].includes(selectedAction)) {
// Label
dynamicFields.appendChild(createLabel("Select a Flag"));
// Select pour les flags
const flags = ["Seen", "Answered", "Flagged", "Deleted", "Draft", "Recent"];
let select = document.createElement("select");
select.className = "form-select";
flags.forEach(flag => {
let option = document.createElement("option");
option.value = flag.toLowerCase();
option.textContent = flag;
select.appendChild(option);
});
dynamicFields.appendChild(select);
} else if (selectedAction === "redirect" || selectedAction === "forward") {
// Label
dynamicFields.appendChild(createLabel("Email"));
// Input pour l'email
let input = document.createElement("input");
input.id = "email";
input.type = "email";
input.className = "param__field px-2";
input.style.fontSize = ".8rem";
input.style.width = "100%";
input.placeholder = "Enter email";
// input.type = "email";
// input.className = "form-control";
// input.placeholder = "Enter email address";
dynamicFields.appendChild(input);
} else if (selectedAction === "reject") {
// Label
dynamicFields.appendChild(createLabel("Reason for Rejection"));
// Input pour le rejet
let input = document.createElement("input");
input.type = "text";
input.className = "form-control";
input.placeholder = "Reason for rejection";
dynamicFields.appendChild(input);
} else if (selectedAction === "reply_message") {
// Label pour le sujet
dynamicFields.appendChild(createLabel("Enter Subject"));
let subjectInput = document.createElement("input");
subjectInput.id = "provider";
subjectInput.type = "text";
subjectInput.className = "param__field w-100 px-2 mb-3";
subjectInput.style.fontSize = ".8rem";
subjectInput.style.width = "280px";
subjectInput.placeholder = "Enter subject";
// Label pour le message
// Textarea pour le message
let messageTextarea = document.createElement("textarea");
messageTextarea.className = "param__field scrollable w-100 mb-3"; // Ajout des classes
messageTextarea.style.fontSize = ".8rem";
messageTextarea.style.height = "200px";
messageTextarea.placeholder = "Enter your reply message";
dynamicFields.appendChild(subjectInput);
dynamicFields.appendChild(createLabel("Enter Your Reply Message"));
dynamicFields.appendChild(messageTextarea);
}
});
</script>
</body>
</html>