Skip to content

Commit

Permalink
Add copy to clipboard action
Browse files Browse the repository at this point in the history
  • Loading branch information
electrikmilk committed Nov 25, 2023
1 parent aabf628 commit 0467f3a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions src/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import SplitText from "~/actions/split-text";
import GetFromList from "~/actions/get-from-list";
import SetName from "~/actions/set-name";
import Output from "~/actions/output";
import CopyToClipboard from "~/actions/copy-to-clipboard";

Check failure on line 27 in src/actions.ts

View workflow job for this annotation

GitHub Actions / build (14.x)

Cannot find module '~/actions/copy-to-clipboard' or its corresponding type declarations.

Check failure on line 27 in src/actions.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

Cannot find module '~/actions/copy-to-clipboard' or its corresponding type declarations.

Check failure on line 27 in src/actions.ts

View workflow job for this annotation

GitHub Actions / build (18.x)

Cannot find module '~/actions/copy-to-clipboard' or its corresponding type declarations.

Check failure on line 27 in src/actions.ts

View workflow job for this annotation

GitHub Actions / build (19.x)

Cannot find module '~/actions/copy-to-clipboard' or its corresponding type declarations.

Check failure on line 27 in src/actions.ts

View workflow job for this annotation

GitHub Actions / build (20.x)

Cannot find module '~/actions/copy-to-clipboard' or its corresponding type declarations.

Check failure on line 27 in src/actions.ts

View workflow job for this annotation

GitHub Actions / build (21.x)

Cannot find module '~/actions/copy-to-clipboard' or its corresponding type declarations.

interface ActionDefinitions {
[key: string]: ActionDefinition
Expand Down Expand Up @@ -69,6 +70,7 @@ export let actions: ActionDefinitions = {
'exit': Stop,
'setitemname': SetName,
'output': Output,
'setclipboard': CopyToClipboard,
};

export function actionText(value: string): HTMLElement {
Expand Down
2 changes: 1 addition & 1 deletion src/actions/url.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ interface URLParameters {
export default {
icon: 'link',
render: (container: HTMLElement, params: URLParameters) => {
container.className += ' sp-url-action';
container.className += ' sp-blue-action';

let links: HTMLElement[] = [];
if (params['WFURLActionURL']) {
Expand Down
8 changes: 4 additions & 4 deletions src/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@
color: white !important;
}

.sp-container .sp-date-action .sp-action-icon {
.sp-container .sp-date-action .sp-action-icon:not(.sp-variable-icon) {
color: #ff453a !important;
background: #3d2622 !important;
}

.sp-container .sp-url-action .sp-action-icon {
.sp-container .sp-blue-action .sp-action-icon:not(.sp-variable-icon) {
color: #0b84ff !important;
background: #202d3b !important;
}
Expand Down Expand Up @@ -208,12 +208,12 @@
font-size: 1.2rem;
}

.sp-container .sp-date-action .sp-action-icon {
.sp-container .sp-date-action .sp-action-icon:not(.sp-variable-icon) {
color: #ff3b2f !important;
background: #ffeeee !important;
}

.sp-container .sp-url-action .sp-action-icon {
.sp-container .sp-blue-action .sp-action-icon:not(.sp-variable-icon) {
color: #007aff !important;
background: #eaf1ff !important;
}
Expand Down

0 comments on commit 0467f3a

Please sign in to comment.