Fix patches to account for matrix-react-sdk being merged into element-web

This commit is contained in:
q 2024-10-30 14:21:22 -04:00
parent 5155fc2ec4
commit f5374e8d47
9 changed files with 29 additions and 29 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
element-web

View File

@ -31,10 +31,10 @@ echo 'Adding custom emoji...'
echo 'Backing up _EmojiPicker.pcss...' echo 'Backing up _EmojiPicker.pcss...'
if [ ! -f "${1}"/node_modules/matrix-react-sdk/res/css/views/emojipicker/_EmojiPicker.pcss.backup ]; then if [ ! -f "${1}"/res/css/views/emojipicker/_EmojiPicker.pcss.backup ]; then
cp "${1}"/node_modules/matrix-react-sdk/res/css/views/emojipicker/_EmojiPicker.pcss "${1}"/node_modules/matrix-react-sdk/res/css/views/emojipicker/_EmojiPicker.pcss.backup cp "${1}"/res/css/views/emojipicker/_EmojiPicker.pcss "${1}"/res/css/views/emojipicker/_EmojiPicker.pcss.backup
else else
cp "${1}"/node_modules/matrix-react-sdk/res/css/views/emojipicker/_EmojiPicker.pcss.backup "${1}"/node_modules/matrix-react-sdk/res/css/views/emojipicker/_EmojiPicker.pcss cp "${1}"/res/css/views/emojipicker/_EmojiPicker.pcss.backup "${1}"/res/css/views/emojipicker/_EmojiPicker.pcss
fi fi
echo 'Adding custom emoji picker CSS...' echo 'Adding custom emoji picker CSS...'
@ -47,4 +47,4 @@ emoji_picker_css_code=$(cat << EOF
EOF EOF
) )
echo "${emoji_picker_css_code}" >> "${1}"/node_modules/matrix-react-sdk/res/css/views/emojipicker/_EmojiPicker.pcss echo "${emoji_picker_css_code}" >> "${1}"/res/css/views/emojipicker/_EmojiPicker.pcss

View File

@ -33,16 +33,15 @@ patch_content=$(cat << EOF
} }
--- a/src/components/views/auth/VectorAuthPage.tsx --- a/src/components/views/auth/VectorAuthPage.tsx
+++ b/src/components/views/auth/VectorAuthPage.tsx +++ b/src/components/views/auth/VectorAuthPage.tsx
@@ -17,8 +17,6 @@ @@ -8,7 +8,6 @@ Please see LICENSE files in the repository root for full details.
import * as React from "react"; import * as React from "react";
import SdkConfig from "matrix-react-sdk/src/SdkConfig";
import SdkConfig from "../../../SdkConfig";
-import VectorAuthFooter from "./VectorAuthFooter"; -import VectorAuthFooter from "./VectorAuthFooter";
-
export default class VectorAuthPage extends React.PureComponent {
private static welcomeBackgroundUrl?: string;
@@ -77,7 +75,6 @@ export default class VectorAuthPage extends React.PureComponent<React.PropsWithChildren> {
private static welcomeBackgroundUrl?: string;
@@ -68,7 +67,6 @@ export default class VectorAuthPage extends React.PureComponent<React.PropsWithC
{this.props.children} {this.props.children}
</div> </div>
</div> </div>

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
--- a/node_modules/matrix-react-sdk/src/SlashCommands.tsx --- a/src/SlashCommands.tsx
+++ b/node_modules/matrix-react-sdk/src/SlashCommands.tsx +++ b/src/SlashCommands.tsx
@@ -68,6 +68,29 @@ @@ -68,6 +68,29 @@
export const Commands = [ export const Commands = [

View File

@ -17,7 +17,7 @@
element=../element-web element=../element-web
# Running the shell scripts: # Running the shell scripts:
./add_custom_reactions.sh $element #./add_custom_reactions.sh $element
./add_greentext.sh $element ./add_greentext.sh $element
./delete_login_footer.sh $element ./delete_login_footer.sh $element
./remove-share-to-nonfree-services.sh $element ./remove-share-to-nonfree-services.sh $element

View File

@ -67,11 +67,11 @@ EOF
echo "${patchjs_content}" | patch -t -p1 || error echo "${patchjs_content}" | patch -t -p1 || error
fi fi
if test -f "./node_modules/matrix-react-sdk/src/components/views/dialogs/ShareDialog.tsx"; then if test -f ".${1}/src/components/views/dialogs/ShareDialog.tsx"; then
patchtsx_content=$(cat << EOF patchtsx_content=$(cat << EOF
--- a/node_modules/matrix-react-sdk/src/components/views/dialogs/ShareDialog.tsx --- a${1}/src/components/views/dialogs/ShareDialog.tsx
+++ b/node_modules/matrix-react-sdk/src/components/views/dialogs/ShareDialog.tsx +++ b${1}/src/components/views/dialogs/ShareDialog.tsx
@@ -31,30 +31,6 @@ @@ -31,30 +31,6 @@
const socials = [ const socials = [

View File

@ -41,26 +41,26 @@ error() {
# Remove # Remove
sed -i -e "s/remove/${remove_command}/g" \ sed -i -e "s/remove/${remove_command}/g" \
-e "s/Removes/${capital_remove_command_plural}/g" "${1}"/node_modules/matrix-react-sdk/src/SlashCommands.tsx -e "s/Removes/${capital_remove_command_plural}/g" "${1}"/src/SlashCommands.tsx
sed -i -e "s/\"Remove/\"${capital_remove_command}/g" \ sed -i -e "s/\"Remove/\"${capital_remove_command}/g" \
-e "s/Failed to remove/Failed to ${remove_command}/g" "${1}"/node_modules/matrix-react-sdk/src/components/views/right_panel/UserInfo.tsx -e "s/Failed to remove/Failed to ${remove_command}/g" "${1}"/src/components/views/right_panel/UserInfo.tsx
sed -i -e "s/Removes user/${capital_remove_command_plural} user/g" \ sed -i -e "s/Removes user/${capital_remove_command_plural} user/g" \
-e "s/)s removed %(tar/)s ${remove_command_past_tense} %(tar/g" \ -e "s/)s removed %(tar/)s ${remove_command_past_tense} %(tar/g" \
-e "s/\"Remove,/\"${capital_remove_command},/g" \ -e "s/\"Remove,/\"${capital_remove_command},/g" \
-e "s/You were removed/You were ${remove_command_past_tense}/g" \ -e "s/You were removed/You were ${remove_command_past_tense}/g" \
-e "s/Remove from/${capital_remove_command} from/g" \ -e "s/Remove from/${capital_remove_command} from/g" \
-e "s/removed\"/${remove_command_past_tense}\"/g" "${1}"/node_modules/matrix-react-sdk/src/i18n/strings/en_EN.json -e "s/removed\"/${remove_command_past_tense}\"/g" "${1}"/src/i18n/strings/en_EN.json
sed -i -e "s/senderName)s removed %(targetName/senderName)s ${remove_command_past_tense} %(targetName/g" "${1}"/node_modules/matrix-react-sdk/src/TextForEvent.tsx sed -i -e "s/senderName)s removed %(targetName/senderName)s ${remove_command_past_tense} %(targetName/g" "${1}"/src/TextForEvent.tsx
sed -i -e "s/removed/${remove_command_past_tense}/g" "${1}"/node_modules/matrix-react-sdk/src/components/views/rooms/RoomPreviewBar.tsx sed -i -e "s/removed/${remove_command_past_tense}/g" "${1}"/src/components/views/rooms/RoomPreviewBar.tsx
sed -i -e "s/Remove users/${capital_remove_command} users/g" "${1}"/node_modules/matrix-react-sdk/src/components/views/settings/tabs/room/RolesRoomSettingsTab.tsx sed -i -e "s/Remove users/${capital_remove_command} users/g" "${1}"/src/components/views/settings/tabs/room/RolesRoomSettingsTab.tsx
sed -i -e "s/${capital_remove_command} recent/Remove recent/g" "${1}"/node_modules/matrix-react-sdk/src/i18n/strings/en_EN.json sed -i -e "s/${capital_remove_command} recent/Remove recent/g" "${1}"/src/i18n/strings/en_EN.json
sed -i -e "s/${capital_remove_command} recent/Remove recent/g" "${1}"/node_modules/matrix-react-sdk/src/components/views/right_panel/UserInfo.tsx sed -i -e "s/${capital_remove_command} recent/Remove recent/g" "${1}"/src/components/views/right_panel/UserInfo.tsx
# Ban # Ban
sed -i -e "s/\"Ban\"/\"${capital_ban_command}\"/g" "${1}"/node_modules/matrix-react-sdk/src/components/views/right_panel/UserInfo.tsx || error sed -i -e "s/\"Ban\"/\"${capital_ban_command}\"/g" "${1}"/src/components/views/right_panel/UserInfo.tsx || error
sed -i -e "s/Bans user with given id\",/${capital_ban_command_plural} user with given id\",/g" \ sed -i -e "s/Bans user with given id\",/${capital_ban_command_plural} user with given id\",/g" \
-e "s/\"Ban from %(roomName)s\",/\"${capital_ban_command} from %(roomName)s\",/g" \ -e "s/\"Ban from %(roomName)s\",/\"${capital_ban_command} from %(roomName)s\",/g" \
@ -73,4 +73,4 @@ sed -i -e "s/Bans user with given id\",/${capital_ban_command_plural} user with
-e "s/banned from %(roomName)s by %(memberName)s\",/${ban_command_past_tense} from %(roomName)s by %(memberName)s\",/g" \ -e "s/banned from %(roomName)s by %(memberName)s\",/${ban_command_past_tense} from %(roomName)s by %(memberName)s\",/g" \
-e "s/were banned %(count)s times\",/were ${ban_command_past_tense} %(count)s times\",/g" \ -e "s/were banned %(count)s times\",/were ${ban_command_past_tense} %(count)s times\",/g" \
-e "s/s banned %(targetName)s: %(reason)s\",/s ${ban_command_past_tense} %(targetName)s: %(reason)s\",/g" \ -e "s/s banned %(targetName)s: %(reason)s\",/s ${ban_command_past_tense} %(targetName)s: %(reason)s\",/g" \
-e "s/s banned %(targetName)s\",/s ${ban_command_past_tense} %(targetName)s\",/g" "${1}"/node_modules/matrix-react-sdk/src/i18n/strings/en_EN.json || error -e "s/s banned %(targetName)s\",/s ${ban_command_past_tense} %(targetName)s\",/g" "${1}"/src/i18n/strings/en_EN.json || error

View File

@ -24,7 +24,7 @@
echo "Replacing notification sounds..." echo "Replacing notification sounds..."
#cp -f "./files/message.mp3" "${1}"/webapp/media/message.mp3 #cp -f "./files/message.mp3" "${1}"/webapp/media/message.mp3
cp -f "./files/message.mp3" "${1}"/node_modules/matrix-react-sdk/res/media/message.mp3 cp -f "./files/message.mp3" "${1}"/res/media/message.mp3
#cp -f "./files/message.ogg" "${1}"/webapp/media/message.ogg #cp -f "./files/message.ogg" "${1}"/webapp/media/message.ogg
cp -f "./files/message.ogg" "${1}"/node_modules/matrix-react-sdk/res/media/message.ogg cp -f "./files/message.ogg" "${1}"/res/media/message.ogg