@rmdes/indiekit-endpoint-microsub 1.0.0-beta.4 → 1.0.0-beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/locales/en.json CHANGED
@@ -9,6 +9,7 @@
9
9
  },
10
10
  "channels": {
11
11
  "title": "Channels",
12
+ "name": "Channel name",
12
13
  "new": "New channel",
13
14
  "create": "Create channel",
14
15
  "delete": "Delete channel",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rmdes/indiekit-endpoint-microsub",
3
- "version": "1.0.0-beta.4",
3
+ "version": "1.0.0-beta.5",
4
4
  "description": "Microsub endpoint for Indiekit. Enables subscribing to feeds and reading content using the Microsub protocol.",
5
5
  "keywords": [
6
6
  "indiekit",
@@ -7,17 +7,13 @@
7
7
  </a>
8
8
 
9
9
  <form method="post" action="{{ baseUrl }}/channels/new">
10
- {{ field({
11
- label: {
12
- text: __("microsub.channels.new")
13
- },
14
- input: {
15
- id: "name",
16
- name: "name",
17
- required: true,
18
- autocomplete: "off",
19
- autofocus: true
20
- }
10
+ {{ input({
11
+ id: "name",
12
+ name: "name",
13
+ label: __("microsub.channels.name"),
14
+ required: true,
15
+ autocomplete: "off",
16
+ attributes: { autofocus: true }
21
17
  }) }}
22
18
 
23
19
  <div class="button-group">
package/views/compose.njk CHANGED
@@ -37,14 +37,11 @@
37
37
 
38
38
  {% if not likeOf and not repostOf %}
39
39
  {{ textarea({
40
- label: {
41
- text: __("microsub.compose.content"),
42
- classes: "label--visuallyhidden"
43
- },
40
+ label: __("microsub.compose.content"),
44
41
  id: "content",
45
42
  name: "content",
46
43
  rows: 5,
47
- autofocus: true
44
+ attributes: { autofocus: true }
48
45
  }) }}
49
46
  {% endif %}
50
47
 
@@ -7,65 +7,43 @@
7
7
  </a>
8
8
 
9
9
  <form method="post" action="{{ baseUrl }}/channels/{{ channel.uid }}/settings">
10
- {{ fieldset({
11
- legend: {
12
- text: __("microsub.settings.excludeTypes"),
13
- classes: "fieldset__legend--medium"
14
- },
15
- hint: {
16
- text: __("microsub.settings.excludeTypesHelp")
10
+ {{ checkboxes({
11
+ name: "excludeTypes",
12
+ values: channel.settings.excludeTypes,
13
+ fieldset: {
14
+ legend: __("microsub.settings.excludeTypes")
17
15
  },
16
+ hint: __("microsub.settings.excludeTypesHelp"),
18
17
  items: [
19
18
  {
20
- id: "excludeTypes-like",
21
- name: "excludeTypes",
22
- value: "like",
23
- text: __("microsub.settings.types.like"),
24
- checked: channel.settings.excludeTypes | includes("like")
19
+ label: __("microsub.settings.types.like"),
20
+ value: "like"
25
21
  },
26
22
  {
27
- id: "excludeTypes-repost",
28
- name: "excludeTypes",
29
- value: "repost",
30
- text: __("microsub.settings.types.repost"),
31
- checked: channel.settings.excludeTypes | includes("repost")
23
+ label: __("microsub.settings.types.repost"),
24
+ value: "repost"
32
25
  },
33
26
  {
34
- id: "excludeTypes-bookmark",
35
- name: "excludeTypes",
36
- value: "bookmark",
37
- text: __("microsub.settings.types.bookmark"),
38
- checked: channel.settings.excludeTypes | includes("bookmark")
27
+ label: __("microsub.settings.types.bookmark"),
28
+ value: "bookmark"
39
29
  },
40
30
  {
41
- id: "excludeTypes-reply",
42
- name: "excludeTypes",
43
- value: "reply",
44
- text: __("microsub.settings.types.reply"),
45
- checked: channel.settings.excludeTypes | includes("reply")
31
+ label: __("microsub.settings.types.reply"),
32
+ value: "reply"
46
33
  },
47
34
  {
48
- id: "excludeTypes-checkin",
49
- name: "excludeTypes",
50
- value: "checkin",
51
- text: __("microsub.settings.types.checkin"),
52
- checked: channel.settings.excludeTypes | includes("checkin")
35
+ label: __("microsub.settings.types.checkin"),
36
+ value: "checkin"
53
37
  }
54
38
  ]
55
- }) | checkboxes }}
39
+ }) }}
56
40
 
57
- {{ field({
58
- label: {
59
- text: __("microsub.settings.excludeRegex")
60
- },
61
- hint: {
62
- text: __("microsub.settings.excludeRegexHelp")
63
- },
64
- input: {
65
- id: "excludeRegex",
66
- name: "excludeRegex",
67
- value: channel.settings.excludeRegex
68
- }
41
+ {{ input({
42
+ id: "excludeRegex",
43
+ name: "excludeRegex",
44
+ label: __("microsub.settings.excludeRegex"),
45
+ hint: __("microsub.settings.excludeRegexHelp"),
46
+ value: channel.settings.excludeRegex
69
47
  }) }}
70
48
 
71
49
  <div class="button-group">