Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 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 | 117x 117x 117x 117x | import { DateTime } from 'luxon';
import { Plugin } from '../../model/plugin';
import { Mod } from '../../model/tag';
import { Template } from '../../model/template';
export const todoPlugin: Plugin = {
tag: 'plugin/todo',
name: $localize`📑️ To Do List`,
config: {
mod: $localize`📑️ To Do List`,
type: 'plugin',
experimental: true,
submitText: true,
editingViewer: true,
generated: $localize`Generated by jasper-ui ${DateTime.now().toISO()}`,
description: $localize`Create a To Do list.`,
aiInstructions: ` # plugin/todo
The todo plugin formats the comment of a ref as an editable TODO list.
A TODO list should be of the form:
- [ ] go-micro: Pluggable RPC framework
- [ ] negroni: Idiomatic HTTP middleware
- [ ] gorilla/mux: Powerful URL router
- [ ] grpc-go: gRPC library
- [ ] gin-gonic/gin: HTTP web framework
- [ ] go-kit/kit: Tool for microservices
Where lines starting with - [ ] are unchecked items, and lines starting
with - [X] are checked items.
When the user asks you to create a TODO list, add the plugin/todo tag and
format the list as such. Remember to not include extra text in the comment
field, as this will also be interpreted as a TODO list item. If mixing
TODOs and other content is required, instead create a separate TODO list
and embed it in another Ref using the embed link, such as: `,
icons: [{ label: $localize`📑️`, order: 2 }],
filters: [
{ query: 'plugin/todo', label: $localize`📑️ todo`, title: $localize`TODO Lists`, group: $localize`Plugins 🧰️` },
],
// language=CSS
css: `
body.dark-theme {
.todo-item {
&.cdk-drag-preview {
background-color: var(--card-dragging);
}
}
}
.form .todo-list > input {
display: block !important;
}
.nested-form .todo-list {
padding-bottom: 4px !important;
& > input {
display: block !important;
}
& > .spacer {
display: none !important;
}
}
.todo-item {
padding: 4px;
margin-top: 2px;
border-radius: 4px;
background-color: var(--card);
textarea {
height: 64px !important;
resize: none;
}
&.unlocked {
border-radius: 5px;
border: 0.25px dashed var(--border-accent);
}
&:hover {
filter: drop-shadow(0 0 0.5px var(--border));
}
&.cdk-drag-placeholder {
background-color: var(--placeholder);
}
.md p {
text-align: left;
margin: 1px;
}
&.no-write {
cursor: no-drop !important;
&.cdk-drag-preview {
pointer-events: auto !important;
cursor: no-drop !important;
* {
pointer-events: none !important;
}
}
}
transform: scale(1);
transform-origin: center;
transition: transform 0.1s cubic-bezier(.47,1.64,.8,1.2);
&.unlocked {
z-index: 1;
transform: scale(1.05);
}
&:hover {
z-index: 1;
transform: scale(1.01);
}
&:not(.no-write) {
cursor: grab;
}
&.cdk-drag-preview {
transition: transform 0s;
box-shadow: 0 5px 5px -3px rgba(0, 0, 0, 0.2),
0 8px 10px 1px rgba(0, 0, 0, 0.14),
0 3px 14px 2px rgba(0, 0, 0, 0.12);
}
&.cdk-drag-placeholder {
transition: transform 0s;
* {
visibility: hidden !important;
}
}
}
`,
},
};
export const todoTemplate: Template = {
tag: 'plugin/todo',
name: $localize`📑️ To Do List`,
config: {
mod: $localize`📑️ To Do List`,
type: 'plugin',
generated: $localize`Generated by jasper-ui ${DateTime.now().toISO()}`,
view: $localize`📑️`,
// language=CSS
css: `
app-ref-list.plugin_todo {
.list-container {
grid-auto-flow: row dense;
padding: 4px;
gap: 8px;
grid-template-columns: 1fr;
@media (min-width: 1000px) {
grid-template-columns: 1fr 1fr;
}
@media (min-width: 1500px) {
grid-template-columns: 1fr 1fr 1fr;
}
@media (min-width: 2000px) {
grid-template-columns: 1fr 1fr 1fr 1fr;
}
.list-number {
display: none;
}
.ref {
break-inside: avoid;
.toggle {
display: none;
}
@media (max-width: 740px) {
.actions, .info {
height: 28px;
}
}
}
}
}
`,
advancedForm: [{
key: 'defaultExpanded',
type: 'boolean',
defaultValue: true,
props: {
label: $localize`Default Expanded:`,
},
}],
},
defaults: {
defaultExpanded: true,
noFloatingSidebar: true,
defaultSort: ['modified,DESC'],
defaultCols: 0, // Leave to CSS screen size detection, but show cols dropdown
}
};
export const todoMod: Mod = {
plugin: [
todoPlugin,
],
template: [
todoTemplate,
],
};
|