mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-08 22:23:02 -04:00
Merge remote-tracking branch 'upstream/dev' into dev
This commit is contained in:
commit
7618040739
6 changed files with 30 additions and 25 deletions
|
@ -79,18 +79,17 @@ export default definePlugin({
|
||||||
|
|
||||||
patches: [
|
patches: [
|
||||||
{
|
{
|
||||||
find: 'type:"UPLOAD_START"',
|
find: "async uploadFiles(",
|
||||||
replacement: {
|
replacement: [
|
||||||
match: /await \i\.uploadFiles\((\i),/,
|
{
|
||||||
replace: "$1.forEach($self.anonymise),$&"
|
match: /async uploadFiles\((\i),\i\){/,
|
||||||
},
|
replace: "$&$1.forEach($self.anonymise);"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
find: "FirstThreadMessage,options",
|
match: /async uploadFilesSimple\((\i)\){/,
|
||||||
replacement: {
|
replace: "$&$1.forEach($self.anonymise);"
|
||||||
match: /\i.uploadFilesSimple\((\i)\);/,
|
}
|
||||||
replace: "$&$1.forEach($self.anonymise);"
|
],
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
find: "#{intl::ATTACHMENT_UTILITIES_SPOILER}",
|
find: "#{intl::ATTACHMENT_UTILITIES_SPOILER}",
|
||||||
|
|
|
@ -121,14 +121,9 @@ export default definePlugin({
|
||||||
},
|
},
|
||||||
// Make the gap between each item smaller so our tab can fit.
|
// Make the gap between each item smaller so our tab can fit.
|
||||||
{
|
{
|
||||||
match: /className:\i\.tabBar/,
|
match: /type:"top",/,
|
||||||
replace: '$& + " vc-mutual-gdms-modal-v2-tab-bar"'
|
replace: '$&className:"vc-mutual-gdms-modal-v2-tab-bar",'
|
||||||
},
|
},
|
||||||
// Make the tab bar item text smaller so our tab can fit.
|
|
||||||
{
|
|
||||||
match: /(\.tabBarItem.+?variant:)"heading-md\/normal"/,
|
|
||||||
replace: '$1"heading-sm/normal"'
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -3,5 +3,5 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.vc-mutual-gdms-modal-v2-tab-bar {
|
.vc-mutual-gdms-modal-v2-tab-bar {
|
||||||
gap: 12px;
|
--space-xl: 16px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -530,6 +530,7 @@ export default definePlugin({
|
||||||
|
|
||||||
if (channel.channelId != null) channel = ChannelStore.getChannel(channel.channelId);
|
if (channel.channelId != null) channel = ChannelStore.getChannel(channel.channelId);
|
||||||
if (channel == null || channel.isDM() || channel.isGroupDM() || channel.isMultiUserDM()) return false;
|
if (channel == null || channel.isDM() || channel.isGroupDM() || channel.isMultiUserDM()) return false;
|
||||||
|
if (["browse", "customize", "guide"].includes(channel.id)) return false;
|
||||||
|
|
||||||
return !PermissionStore.can(PermissionsBits.VIEW_CHANNEL, channel) || checkConnect && !PermissionStore.can(PermissionsBits.CONNECT, channel);
|
return !PermissionStore.can(PermissionsBits.VIEW_CHANNEL, channel) || checkConnect && !PermissionStore.can(PermissionsBits.CONNECT, channel);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
|
@ -132,10 +132,16 @@ export default definePlugin({
|
||||||
|
|
||||||
{
|
{
|
||||||
find: "Copy image not supported",
|
find: "Copy image not supported",
|
||||||
replacement: {
|
replacement: [
|
||||||
match: /(?<=canSaveImage\((\i,\i)?\)\{.{0,150})!\i\.isPlatformEmbedded/g,
|
{
|
||||||
replace: "false"
|
match: /(?<=(?:canSaveImage|canCopyImage)\(.{0,120}?)!\i\.isPlatformEmbedded/g,
|
||||||
}
|
replace: "false"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
match: /canCopyImage\(.+?(?=return"function"==typeof \i\.clipboard\.copyImage)/,
|
||||||
|
replace: "$&return true;"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
// Add back Copy & Save Image
|
// Add back Copy & Save Image
|
||||||
{
|
{
|
||||||
|
@ -147,7 +153,7 @@ export default definePlugin({
|
||||||
replace: "false"
|
replace: "false"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
match: /return\s*?\[.{0,50}?\)(?=\?.{0,100}?id:"copy-image")/,
|
match: /return\s*?\[.{0,50}?(?=\?\(0,\i\.jsxs?.{0,100}?id:"copy-image")/,
|
||||||
replace: "return [true"
|
replace: "return [true"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -606,6 +606,10 @@ export const Devs = /* #__PURE__*/ Object.freeze({
|
||||||
name: "samsam",
|
name: "samsam",
|
||||||
id: 836452332387565589n,
|
id: 836452332387565589n,
|
||||||
},
|
},
|
||||||
|
Cootshk: {
|
||||||
|
name: "Cootshk",
|
||||||
|
id: 921605971577548820n
|
||||||
|
},
|
||||||
} satisfies Record<string, Dev>);
|
} satisfies Record<string, Dev>);
|
||||||
|
|
||||||
export const EquicordDevs = Object.freeze({
|
export const EquicordDevs = Object.freeze({
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue