Skip to content

Commit

Permalink
deploy: 41a79d1
Browse files Browse the repository at this point in the history
  • Loading branch information
xirreal committed Jan 8, 2025
1 parent 3f76e02 commit 686f7ad
Show file tree
Hide file tree
Showing 8 changed files with 111 additions and 51 deletions.
148 changes: 104 additions & 44 deletions externalUpload/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -7332,8 +7332,13 @@
onLoad: () => onLoad,
settings: () => settings
});
var import_web10 = __toESM(require_web());
var import_web11 = __toESM(require_web());
var import_web12 = __toESM(require_web());
var import_web13 = __toESM(require_web());
var import_web14 = __toESM(require_web());
var import_web15 = __toESM(require_web());
var import_web16 = __toESM(require_web());
var import_web17 = __toESM(require_web());

// plugins/externalUpload/modal.jsx
var import_web = __toESM(require_web());
Expand Down Expand Up @@ -7500,7 +7505,6 @@
.-bMcgq_dashboardTable th {
text-align: left;
text-transform: uppercase;
border-bottom: 2px solid var(--background-modifier-border);
padding: 12px 16px;
font-size: 14px;
font-weight: 600;
Expand All @@ -7520,16 +7524,55 @@
}

.-bMcgq_dashboardTable td {
border-bottom: 1px solid var(--background-modifier-border);
padding: 12px 16px;
font-size: 14px;
}

.-bMcgq_dashboardTable td:last-child {
text-align: center;
}

[class^="buttons"] > [aria-haspopup="dialog"] {
display: none;
}

.-bMcgq_replacedButton {
color: var(--interactive-normal);
transform-origin: bottom;
background: none;
align-items: center;
transition: all .3s;
display: flex;
}

.-bMcgq_replacedButton > svg:hover {
color: var(--icon-primary);
animation: .3s ease-out -bMcgq_sway;
}

@keyframes -bMcgq_sway {
0% {
transform: rotate(0);
}

25% {
transform: rotate(5deg);
}

50% {
transform: rotate(0);
}

75% {
transform: rotate(-5deg);
}

100% {
transform: rotate(0);
}
}
`);
var modal_jsx_default = { "previewVideo": "-bMcgq_previewVideo", "previewItem": "-bMcgq_previewItem", "progressFill": "-bMcgq_progressFill", "uploadArea": "-bMcgq_uploadArea", "shake": "-bMcgq_shake", "progressBar": "-bMcgq_progressBar", "footer": "-bMcgq_footer", "dashboardTable": "-bMcgq_dashboardTable", "uploadModal": "-bMcgq_uploadModal", "previewImage": "-bMcgq_previewImage", "dragOver": "-bMcgq_dragOver", "dashboardButton": "-bMcgq_dashboardButton", "previewArea": "-bMcgq_previewArea", "removeButton": "-bMcgq_removeButton", "previewItemInfo": "-bMcgq_previewItemInfo", "previewIcon": "-bMcgq_previewIcon", "uploading": "-bMcgq_uploading" };
var modal_jsx_default = { "shake": "-bMcgq_shake", "uploadArea": "-bMcgq_uploadArea", "previewItem": "-bMcgq_previewItem", "uploadModal": "-bMcgq_uploadModal", "previewArea": "-bMcgq_previewArea", "dashboardButton": "-bMcgq_dashboardButton", "footer": "-bMcgq_footer", "replacedButton": "-bMcgq_replacedButton", "previewIcon": "-bMcgq_previewIcon", "dashboardTable": "-bMcgq_dashboardTable", "progressFill": "-bMcgq_progressFill", "previewImage": "-bMcgq_previewImage", "sway": "-bMcgq_sway", "uploading": "-bMcgq_uploading", "progressBar": "-bMcgq_progressBar", "previewItemInfo": "-bMcgq_previewItemInfo", "removeButton": "-bMcgq_removeButton", "dragOver": "-bMcgq_dragOver", "previewVideo": "-bMcgq_previewVideo" };

// node_modules/.pnpm/@smithy+protocol-http@4.1.8/node_modules/@smithy/protocol-http/dist-es/extensions/httpExtensionConfiguration.js
var getHttpHandlerExtensionConfiguration = (runtimeConfig) => {
Expand Down Expand Up @@ -18555,9 +18598,17 @@ For more information please go to https://github.com/aws/aws-sdk-js-v3#functiona
}
(0, import_web2.delegateEvents)(["click"]);

// plugins/externalUpload/uploadIcon.jsx
var import_web10 = __toESM(require_web());
var _tmpl$13 = /* @__PURE__ */ (0, import_web10.template)(`<svg aria-hidden="true" role="img" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="currentColor" d="M13.82 21.7c.17.05.14.3-.04.3H6a4 4 0 0 1-4-4V6a4 4 0 0 1 4-4h7.5c.28 0 .5.22.5.5V5a5 5 0 0 0 5 5h2.5c.28 0 .5.22.5.5v2.3a.4.4 0 0 1-.68.27l-.2-.2a3 3 0 0 0-4.24 0l-4 4a3 3 0 0 0 0 4.25c.3.3.6.46.94.58Z"></path><path fill="currentColor" d="M21.66 8c.03 0 .05-.03.04-.06a3 3 0 0 0-.58-.82l-4.24-4.24a3 3 0 0 0-.82-.58.04.04 0 0 0-.06.04V5a3 3 0 0 0 3 3h2.66ZM18.3 14.3a1 1 0 0 1 1.4 0l4 4a1 1 0 0 1-1.4 1.4L20 17.42V23a1 1 0 1 1-2 0v-5.59l-2.3 2.3a1 1 0 0 1-1.4-1.42l4-4Z"></path></svg>`, 6);
function uploadIcon() {
return _tmpl$13.cloneNode(true);
}

// plugins/externalUpload/index.jsx
var _tmpl$13 = /* @__PURE__ */ (0, import_web10.template)(`<br>`, 1);
var _tmpl$22 = /* @__PURE__ */ (0, import_web10.template)(`<pre style="background-color: var(--background-secondary); padding: 10px; border-radius: 8px;"><code>{
var _tmpl$14 = /* @__PURE__ */ (0, import_web11.template)(`<button></button>`, 2);
var _tmpl$22 = /* @__PURE__ */ (0, import_web11.template)(`<br>`, 1);
var _tmpl$32 = /* @__PURE__ */ (0, import_web11.template)(`<pre style="background-color: var(--background-secondary); padding: 10px; border-radius: 8px;"><code>{
"CORSRules": [
{
"AllowedHeaders": ["*"],
Expand All @@ -18577,28 +18628,21 @@ For more information please go to https://github.com/aws/aws-sdk-js-v3#functiona
Header,
HeaderTags,
Text,
TextBox
TextBox,
focusring
},
plugin
} = shelter;
var {
subscribe
} = shelter.plugin.scoped.flux;
function updateConfig() {
updateS3Client(plugin.store.region, plugin.store.endpoint, plugin.store.accessKeyId, plugin.store.secretAccessKey, plugin.store.bucket);
}
function onLoad() {
plugin.store.region ??= "";
plugin.store.endpoint ??= "";
plugin.store.accessKeyId ??= "";
plugin.store.secretAccessKey ??= "";
plugin.store.bucket ??= "";
plugin.store.publicUrl ??= "";
updateConfig();
observeDom('[class^="giftIconContainer"]', (element) => {
if (element.dataset.externalUpload)
return;
element.dataset.externalUpload = true;
element.parentElement.parentElement.parentElement.onclick = (e3) => {
e3.stopImmediatePropagation();
e3.preventDefault();
function uploadButton() {
return (() => {
const _el$ = _tmpl$14.cloneNode(true);
_el$.$$click = () => {
if (plugin.store.endpoint === "" || plugin.store.accessKeyId === "" || plugin.store.secretAccessKey === "" || plugin.store.bucket === "") {
showToast2({
title: "External Upload",
Expand All @@ -18609,26 +18653,41 @@ For more information please go to https://github.com/aws/aws-sdk-js-v3#functiona
openModal((p2) => UploadModal(p2.close));
}
};
element.style.display = "none";
const newElement = document.createElement("div");
newElement.style.display = "inline-block";
newElement.style.marginLeft = "5px";
newElement.style.marginTop = "-2px";
newElement.style.cursor = "pointer";
newElement.innerHTML = "sex button";
element.parentElement.appendChild(newElement);
(0, import_web17.use)(focusring, _el$, () => true);
(0, import_web16.insert)(_el$, uploadIcon);
(0, import_web15.effect)(() => (0, import_web14.className)(_el$, modal_jsx_default.replacedButton));
return _el$;
})();
}
function onLoad() {
plugin.store.region ??= "";
plugin.store.endpoint ??= "";
plugin.store.accessKeyId ??= "";
plugin.store.secretAccessKey ??= "";
plugin.store.bucket ??= "";
plugin.store.publicUrl ??= "";
updateConfig();
subscribe("CHANNEL_SELECT", () => {
let unobserve = observeDom('[class^="inner"] > [class^="buttons"]', (element) => {
if (element.dataset.externalUpload)
return;
unobserve();
element.dataset.externalUpload = true;
element.prepend(uploadButton());
});
setTimeout(() => unobserve(), 2e3);
});
}
var settings = () => [(0, import_web11.createComponent)(Text, {
var settings = () => [(0, import_web13.createComponent)(Text, {
get children() {
return ["Configure the S3 compatible backend to use for external uploads.", _tmpl$13.cloneNode(true), _tmpl$13.cloneNode(true), "Remember to allow CORS for the endpoint!", _tmpl$13.cloneNode(true), _tmpl$13.cloneNode(true), "Example CORS configuration:", _tmpl$13.cloneNode(true), _tmpl$13.cloneNode(true), _tmpl$22.cloneNode(true)];
return ["Configure the S3 compatible backend to use for external uploads.", _tmpl$22.cloneNode(true), _tmpl$22.cloneNode(true), "Remember to allow CORS for the endpoint!", _tmpl$22.cloneNode(true), _tmpl$22.cloneNode(true), "Example CORS configuration:", _tmpl$22.cloneNode(true), _tmpl$22.cloneNode(true), _tmpl$32.cloneNode(true)];
}
}), _tmpl$13.cloneNode(true), (0, import_web11.createComponent)(Header, {
}), _tmpl$22.cloneNode(true), (0, import_web13.createComponent)(Header, {
get tag() {
return HeaderTags.H3;
},
children: "S3 endpoint"
}), (0, import_web11.createComponent)(TextBox, {
}), (0, import_web13.createComponent)(TextBox, {
placeholder: "https://your-user-id.r2.cloudflarestorage.com",
get value() {
return plugin.store.endpoint;
Expand All @@ -18637,12 +18696,12 @@ For more information please go to https://github.com/aws/aws-sdk-js-v3#functiona
plugin.store.endpoint = v2;
updateConfig();
}
}), (0, import_web11.createComponent)(Header, {
}), (0, import_web13.createComponent)(Header, {
get tag() {
return HeaderTags.H3;
},
children: "Region"
}), (0, import_web11.createComponent)(TextBox, {
}), (0, import_web13.createComponent)(TextBox, {
placeholder: "us-east-1",
get value() {
return plugin.store.region;
Expand All @@ -18651,12 +18710,12 @@ For more information please go to https://github.com/aws/aws-sdk-js-v3#functiona
plugin.store.region = v2;
updateConfig();
}
}), (0, import_web11.createComponent)(Header, {
}), (0, import_web13.createComponent)(Header, {
get tag() {
return HeaderTags.H3;
},
children: "Access Key ID"
}), (0, import_web11.createComponent)(TextBox, {
}), (0, import_web13.createComponent)(TextBox, {
placeholder: "b00b5de99be7b50bb9471a5db83aa7a9",
get value() {
return plugin.store.accessKeyId;
Expand All @@ -18665,12 +18724,12 @@ For more information please go to https://github.com/aws/aws-sdk-js-v3#functiona
plugin.store.accessKeyId = v2;
updateConfig();
}
}), (0, import_web11.createComponent)(Header, {
}), (0, import_web13.createComponent)(Header, {
get tag() {
return HeaderTags.H3;
},
children: "Secret Access Key"
}), (0, import_web11.createComponent)(TextBox, {
}), (0, import_web13.createComponent)(TextBox, {
placeholder: "deadbeef1063cb36c699199b48cb26b9475197345c08230c66c1c6a6c54b00b5",
get value() {
return plugin.store.secretAccessKey;
Expand All @@ -18679,12 +18738,12 @@ For more information please go to https://github.com/aws/aws-sdk-js-v3#functiona
plugin.store.secretAccessKey = v2;
updateConfig();
}
}), (0, import_web11.createComponent)(Header, {
}), (0, import_web13.createComponent)(Header, {
get tag() {
return HeaderTags.H3;
},
children: "Bucket"
}), (0, import_web11.createComponent)(TextBox, {
}), (0, import_web13.createComponent)(TextBox, {
placeholder: "discord-uploads",
get value() {
return plugin.store.bucket;
Expand All @@ -18693,12 +18752,12 @@ For more information please go to https://github.com/aws/aws-sdk-js-v3#functiona
plugin.store.bucket = v2;
updateConfig();
}
}), (0, import_web11.createComponent)(Header, {
}), (0, import_web13.createComponent)(Header, {
get tag() {
return HeaderTags.H3;
},
children: "Public URL"
}), (0, import_web11.createComponent)(TextBox, {
}), (0, import_web13.createComponent)(TextBox, {
placeholder: "https://uploads.example.com",
get value() {
return plugin.store.publicUrl;
Expand All @@ -18707,6 +18766,7 @@ For more information please go to https://github.com/aws/aws-sdk-js-v3#functiona
plugin.store.publicUrl = v2;
}
})];
(0, import_web12.delegateEvents)(["click"]);
return __toCommonJS(externalUpload_exports);
})();
/*! Bundled license information:
Expand Down
2 changes: 1 addition & 1 deletion externalUpload/plugin.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"name":"External Upload","description":"Boot too big? Upload it somewhere else!","author":"xirreal","hash":"0dda5fe39ef9eab9278669d9e73d6d43"}
{"name":"External Upload","description":"Boot too big? Upload it somewhere else!","author":"xirreal","hash":"ceee0719d9a514c1b38294a2e6a0dcb5"}
2 changes: 1 addition & 1 deletion hiddenChannels/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
white-space: pre-wrap;
}
`);
var style_default = { "mainBody": "ccAoOa_mainBody", "topic": "ccAoOa_topic", "bold": "ccAoOa_bold", "divider": "ccAoOa_divider", "headerBar": "ccAoOa_headerBar", "topicModal": "ccAoOa_topicModal", "hiddenChannel": "ccAoOa_hiddenChannel", "topicWrapper": "ccAoOa_topicWrapper" };
var style_default = { "topicWrapper": "ccAoOa_topicWrapper", "headerBar": "ccAoOa_headerBar", "divider": "ccAoOa_divider", "topic": "ccAoOa_topic", "mainBody": "ccAoOa_mainBody", "bold": "ccAoOa_bold", "hiddenChannel": "ccAoOa_hiddenChannel", "topicModal": "ccAoOa_topicModal" };

// plugins/hiddenChannels/assets/ChannelTopic.jsx
var import_web = __toESM(require_web(), 1);
Expand Down
2 changes: 1 addition & 1 deletion hiddenChannels/plugin.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"name":"Hidden Channels","description":"Allows you to see the name and description of channels you don't have actually access to.","author":"xirreal","hash":"7470f0abdb77622a6a746ca86b0dd478"}
{"name":"Hidden Channels","description":"Allows you to see the name and description of channels you don't have actually access to.","author":"xirreal","hash":"93779ac4c3330ec449d9bce7a1bb1997"}
2 changes: 1 addition & 1 deletion installButton/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
line-height: 20px;
}
`);
var index_jsx_default = { "title": "eeurUa_title", "copied": "eeurUa_copied", "header": "eeurUa_header", "description": "eeurUa_description", "card": "eeurUa_card", "author": "eeurUa_author", "content": "eeurUa_content", "icon": "eeurUa_icon", "alignRight": "eeurUa_alignRight", "copyLink": "eeurUa_copyLink" };
var index_jsx_default = { "header": "eeurUa_header", "copied": "eeurUa_copied", "author": "eeurUa_author", "card": "eeurUa_card", "content": "eeurUa_content", "alignRight": "eeurUa_alignRight", "title": "eeurUa_title", "description": "eeurUa_description", "icon": "eeurUa_icon", "copyLink": "eeurUa_copyLink" };

// plugins/installButton/icons.jsx
var import_web = __toESM(require_web(), 1);
Expand Down
2 changes: 1 addition & 1 deletion installButton/plugin.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"name":"Install Button","description":"Allows you to use OneClick™ to install plugins, and gives plugins inside the app a nice embed.","author":"xirreal","hash":"bc2b522dcdf256752298868cf1911e17"}
{"name":"Install Button","description":"Allows you to use OneClick™ to install plugins, and gives plugins inside the app a nice embed.","author":"xirreal","hash":"81f7e80fb60c0a59f2c733d161ae1e0a"}
2 changes: 1 addition & 1 deletion soundboardHotkeys/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@
max-height: 680px;
}
`);
var style_default = { "sound": "_6PhcGW_sound", "content": "_6PhcGW_content", "margin": "_6PhcGW_margin", "preview": "_6PhcGW_preview", "inline": "_6PhcGW_inline", "card": "_6PhcGW_card", "soundPicker": "_6PhcGW_soundPicker", "emoji": "_6PhcGW_emoji", "noMarginUnselectable": "_6PhcGW_noMarginUnselectable", "spaced": "_6PhcGW_spaced", "column": "_6PhcGW_column", "flexRow": "_6PhcGW_flexRow", "selected": "_6PhcGW_selected", "tallerModal": "_6PhcGW_tallerModal", "marginTop": "_6PhcGW_marginTop", "flexSpaceBetween": "_6PhcGW_flexSpaceBetween", "keybindButton": "_6PhcGW_keybindButton" };
var style_default = { "inline": "_6PhcGW_inline", "flexRow": "_6PhcGW_flexRow", "selected": "_6PhcGW_selected", "card": "_6PhcGW_card", "content": "_6PhcGW_content", "margin": "_6PhcGW_margin", "sound": "_6PhcGW_sound", "keybindButton": "_6PhcGW_keybindButton", "soundPicker": "_6PhcGW_soundPicker", "spaced": "_6PhcGW_spaced", "flexSpaceBetween": "_6PhcGW_flexSpaceBetween", "tallerModal": "_6PhcGW_tallerModal", "marginTop": "_6PhcGW_marginTop", "preview": "_6PhcGW_preview", "emoji": "_6PhcGW_emoji", "noMarginUnselectable": "_6PhcGW_noMarginUnselectable", "column": "_6PhcGW_column" };

// plugins/soundboardHotkeys/components/addModal.jsx
var import_web26 = __toESM(require_web(), 1);
Expand Down
2 changes: 1 addition & 1 deletion soundboardHotkeys/plugin.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"name":"Soundboard Hotkeys","description":"Allows you to bind hotkeys to soundboard buttons. Works even while tabbed out!","author":"xirreal","hash":"18c5e2979e4d775218e431b2bd0af79a"}
{"name":"Soundboard Hotkeys","description":"Allows you to bind hotkeys to soundboard buttons. Works even while tabbed out!","author":"xirreal","hash":"a04bb575abad717d3c54b11857ab2985"}

0 comments on commit 686f7ad

Please sign in to comment.