Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@uppy/webdav: add plugin icon #5555

Merged
merged 1 commit into from
Dec 17, 2024
Merged

@uppy/webdav: add plugin icon #5555

merged 1 commit into from
Dec 17, 2024

Conversation

Murderlon
Copy link
Member

Screenshot 2024-12-17 at 17 23 05

@Murderlon Murderlon self-assigned this Dec 17, 2024
Copy link
Contributor

Diff output files
diff --git a/packages/@uppy/webdav/lib/Webdav.js b/packages/@uppy/webdav/lib/Webdav.js
index daaa1bd..3bbaec6 100644
--- a/packages/@uppy/webdav/lib/Webdav.js
+++ b/packages/@uppy/webdav/lib/Webdav.js
@@ -1,6 +1,6 @@
 import { Provider, tokenStorage } from "@uppy/companion-client";
 import { UIPlugin } from "@uppy/core";
-import { defaultPickerIcon, ProviderViews, SearchInput } from "@uppy/provider-views";
+import { ProviderViews, SearchInput } from "@uppy/provider-views";
 import { h } from "preact";
 import { useCallback, useState } from "preact/hooks";
 const packageJson = {
@@ -54,7 +54,6 @@ const AuthForm = _ref2 => {
 export default class Webdav extends UIPlugin {
   constructor(uppy, opts) {
     super(uppy, opts);
-    this.icon = defaultPickerIcon;
     this.rootFolderId = null;
     this.id = this.opts.id || "WebDav";
     this.type = "acquirer";
@@ -63,6 +62,21 @@ export default class Webdav extends UIPlugin {
     this.defaultLocale = locale;
     this.i18nInit();
     this.title = this.i18n("pluginNameWebdav");
+    this.icon = () =>
+      h(
+        "svg",
+        {
+          className: "uppy-DashboardTab-iconWebdav",
+          width: "32",
+          height: "32",
+          viewBox: "0 0 32 32",
+        },
+        h("path", {
+          fill: "currentcolor",
+          "fill-rule": "nonzero",
+          d: "m22.484 10.456 1.661 7.152s1.799-6.175 1.89-6.519c.094-.356-.173-.553-.274-.614l-.036-.02H28s-.796 2.444-1.56 4.854l-.182.577c-.632 2.006-1.194 3.85-1.194 4.062 0 .709.346 1.052.346 1.052h-2.78v-.087a5 5 0 0 0-.115-1.007c-.058-.24-.679-2.248-1.321-4.32l-.184-.592c-.642-2.068-1.255-4.038-1.299-4.202-.08-.305-.222-.334-.253-.336zM10.266 10c1.898 0 4.496 1.236 3.206 5.836C12.327 19.916 9.957 21 8.367 21H4s.18-.049.326-.532c.07-.237.582-2.502 1.095-4.801l.14-.626c.488-2.186.942-4.237.981-4.42.086-.393-.009-.621-.009-.621Zm7.936.456s-.137.287 0 .675c.063.178.71 2.28 1.39 4.5l.266.87 1.296 4.237.06.194.02.068h-2.697l-.518-2.129h-2.61L14.788 21h-2.064l.026-.1c.127-.476.69-2.586 1.256-4.72l.162-.61c.564-2.125 1.092-4.12 1.153-4.377.137-.574-.06-.737-.06-.737zM9.896 11.58h-.911L7.07 19.36h1.143c.755 0 1.89-.942 2.616-3.362.725-2.42.147-4.416-.934-4.416m6.806 2.45-1.09 3.289h2.133z",
+        }),
+      );
     this.provider = new WebdavSimpleAuthProvider(uppy, {
       companionUrl: this.opts.companionUrl,
       companionHeaders: this.opts.companionHeaders,

@Murderlon
Copy link
Member Author

cc @dschmidt

@Murderlon Murderlon merged commit 8812180 into main Dec 17, 2024
16 checks passed
@Murderlon Murderlon deleted the webdav-icon branch December 17, 2024 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant