Adrià Vilanova Martínez | 54964a5 | 2022-10-26 23:53:29 +0200 | [diff] [blame] | 1 | import {css} from 'lit'; |
| 2 | |
| 3 | // TODO: remove this and substitute it with proper localization. |
| 4 | export const kActionHeadings = { |
| 5 | 0: 'Unknown action', |
| 6 | 1: 'Reply', |
| 7 | 2: 'Move to a forum', |
| 8 | 3: 'Mark as duplicate of a thread', |
| 9 | 4: 'Unmark duplicate', |
| 10 | 5: 'Change thread attributes', |
| 11 | 6: 'Reply with canned response', |
| 12 | 16: 'Star/unstar thread', |
| 13 | 17: 'Subscribe/unsubscribe to thread', |
| 14 | 18: 'Vote thread', |
| 15 | 19: 'Report thread', |
Adrià Vilanova Martínez | 6c4739a | 2022-11-07 00:11:53 +0100 | [diff] [blame] | 16 | 20: 'Mark as read', |
| 17 | 21: 'Mark as unread', |
Adrià Vilanova Martínez | 54964a5 | 2022-10-26 23:53:29 +0200 | [diff] [blame] | 18 | }; |
| 19 | |
Adrià Vilanova Martínez | 6c4739a | 2022-11-07 00:11:53 +0100 | [diff] [blame] | 20 | export const kSupportedActions = new Set([6, 20, 21]); |
Adrià Vilanova Martínez | 54964a5 | 2022-10-26 23:53:29 +0200 | [diff] [blame] | 21 | |
| 22 | export const kActionStyles = css` |
| 23 | .action { |
| 24 | margin-bottom: 20px; |
| 25 | } |
| 26 | |
| 27 | .header { |
| 28 | display: flex; |
| 29 | align-items: center; |
| 30 | margin-bottom: 8px; |
| 31 | } |
| 32 | |
| 33 | .step { |
| 34 | display: flex; |
| 35 | position: relative; |
| 36 | align-items: center; |
| 37 | justify-content: center; |
| 38 | |
| 39 | min-height: 30px; |
| 40 | min-width: 30px; |
| 41 | margin-inline-end: 8px; |
| 42 | |
| 43 | font-weight: 500; |
| 44 | font-size: 18px; |
| 45 | |
| 46 | border-radius: 50%; |
| 47 | color: white; |
| 48 | background-color: #018786; |
| 49 | } |
| 50 | |
| 51 | :is(.action--idle, .action--running) .step { |
| 52 | color: black; |
| 53 | background-color: #d1d1d1; |
| 54 | } |
| 55 | |
| 56 | .action--error .step { |
| 57 | background-color: #c30000; |
| 58 | } |
| 59 | |
| 60 | .step mwc-circular-progress { |
| 61 | position: absolute; |
| 62 | --mdc-theme-primary: #018786; |
| 63 | } |
| 64 | |
| 65 | .title { |
| 66 | font-weight: 500; |
| 67 | margin: 0; |
| 68 | flex-grow: 1; |
| 69 | } |
| 70 | |
| 71 | .header .select { |
| 72 | flex-grow: 1; |
| 73 | width: 300px; |
| 74 | padding: 4px; |
| 75 | margin-inline-end: 8px; |
| 76 | font-size: 16px; |
| 77 | } |
| 78 | `; |