Fix patches to account for matrix-react-sdk being merged into element-web
This commit is contained in:
parent
5155fc2ec4
commit
f5374e8d47
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
element-web
|
@ -31,10 +31,10 @@ echo 'Adding custom emoji...'
|
||||
|
||||
|
||||
echo 'Backing up _EmojiPicker.pcss...'
|
||||
if [ ! -f "${1}"/node_modules/matrix-react-sdk/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
|
||||
if [ ! -f "${1}"/res/css/views/emojipicker/_EmojiPicker.pcss.backup ]; then
|
||||
cp "${1}"/res/css/views/emojipicker/_EmojiPicker.pcss "${1}"/res/css/views/emojipicker/_EmojiPicker.pcss.backup
|
||||
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
|
||||
|
||||
echo 'Adding custom emoji picker CSS...'
|
||||
@ -47,4 +47,4 @@ emoji_picker_css_code=$(cat << 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
|
||||
|
@ -33,16 +33,15 @@ patch_content=$(cat << EOF
|
||||
}
|
||||
--- a/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 SdkConfig from "matrix-react-sdk/src/SdkConfig";
|
||||
|
||||
import SdkConfig from "../../../SdkConfig";
|
||||
-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}
|
||||
</div>
|
||||
</div>
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,5 +1,5 @@
|
||||
--- a/node_modules/matrix-react-sdk/src/SlashCommands.tsx
|
||||
+++ b/node_modules/matrix-react-sdk/src/SlashCommands.tsx
|
||||
--- a/src/SlashCommands.tsx
|
||||
+++ b/src/SlashCommands.tsx
|
||||
@@ -68,6 +68,29 @@
|
||||
|
||||
export const Commands = [
|
||||
|
@ -17,7 +17,7 @@
|
||||
element=../element-web
|
||||
|
||||
# Running the shell scripts:
|
||||
./add_custom_reactions.sh $element
|
||||
#./add_custom_reactions.sh $element
|
||||
./add_greentext.sh $element
|
||||
./delete_login_footer.sh $element
|
||||
./remove-share-to-nonfree-services.sh $element
|
||||
|
@ -67,11 +67,11 @@ EOF
|
||||
echo "${patchjs_content}" | patch -t -p1 || error
|
||||
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
|
||||
--- a/node_modules/matrix-react-sdk/src/components/views/dialogs/ShareDialog.tsx
|
||||
+++ b/node_modules/matrix-react-sdk/src/components/views/dialogs/ShareDialog.tsx
|
||||
--- a${1}/src/components/views/dialogs/ShareDialog.tsx
|
||||
+++ b${1}/src/components/views/dialogs/ShareDialog.tsx
|
||||
@@ -31,30 +31,6 @@
|
||||
|
||||
const socials = [
|
||||
|
@ -41,26 +41,26 @@ error() {
|
||||
|
||||
# Remove
|
||||
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" \
|
||||
-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" \
|
||||
-e "s/)s removed %(tar/)s ${remove_command_past_tense} %(tar/g" \
|
||||
-e "s/\"Remove,/\"${capital_remove_command},/g" \
|
||||
-e "s/You were removed/You were ${remove_command_past_tense}/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/removed/${remove_command_past_tense}/g" "${1}"/node_modules/matrix-react-sdk/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/${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}"/node_modules/matrix-react-sdk/src/components/views/right_panel/UserInfo.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}"/src/components/views/rooms/RoomPreviewBar.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}"/src/i18n/strings/en_EN.json
|
||||
sed -i -e "s/${capital_remove_command} recent/Remove recent/g" "${1}"/src/components/views/right_panel/UserInfo.tsx
|
||||
|
||||
# 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" \
|
||||
-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/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\",/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
|
||||
|
@ -24,7 +24,7 @@
|
||||
echo "Replacing notification sounds..."
|
||||
|
||||
#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}"/node_modules/matrix-react-sdk/res/media/message.ogg
|
||||
cp -f "./files/message.ogg" "${1}"/res/media/message.ogg
|
||||
|
Loading…
Reference in New Issue
Block a user