Skip to content

Commit

Permalink
TCHAP: update matrix-react-sdk paths and ~tchap-web
Browse files Browse the repository at this point in the history
  • Loading branch information
marc.sirisak committed Nov 14, 2024
1 parent f765606 commit 285ed3d
Show file tree
Hide file tree
Showing 94 changed files with 728 additions and 2,771 deletions.
2 changes: 0 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ package-lock.json
#remove tchap files from prettier
patches/
patches_legacy/
yarn-linked-dependencies/
linked-dependencies/
.github/
res/
scripts/tchap
Expand Down
14 changes: 7 additions & 7 deletions customisations.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
"src/components/views/messages/MStickerBody.tsx": "src/tchap/customisations/components/views/messages/ContentScanningStickerBody.tsx",
"src/components/views/messages/MVideoBody.tsx": "src/tchap/customisations/components/views/messages/ContentScanningVideoBody.tsx",
"src/components/views/messages/MVoiceMessageBody.tsx": "src/tchap/customisations/components/views/messages/ContentScanningVoiceMessageBody.tsx",
"src/tchap/components/views/messages/OriginalAudioBody.tsx": "node_modules/matrix-react-sdk/src/components/views/messages/MAudioBody.tsx",
"src/tchap/components/views/messages/OriginalFileBody.tsx": "node_modules/matrix-react-sdk/src/components/views/messages/MFileBody.tsx",
"src/tchap/components/views/messages/OriginalImageBody.tsx": "node_modules/matrix-react-sdk/src/components/views/messages/MImageBody.tsx",
"src/tchap/components/views/messages/OriginalImageReplyBody.tsx": "node_modules/matrix-react-sdk/src/components/views/messages/MImageReplyBody.tsx",
"src/tchap/components/views/messages/OriginalStickerBody.tsx": "node_modules/matrix-react-sdk/src/components/views/messages/MStickerBody.tsx",
"src/tchap/components/views/messages/OriginalVideoBody.tsx": "node_modules/matrix-react-sdk/src/components/views/messages/MVideoBody.tsx",
"src/tchap/components/views/messages/OriginalVoiceMessageBody.tsx": "node_modules/matrix-react-sdk/src/components/views/messages/MVoiceMessageBody.tsx",
"src/tchap/components/views/messages/OriginalAudioBody.tsx": "src/src/components/views/messages/MAudioBody.tsx",
"src/tchap/components/views/messages/OriginalFileBody.tsx": "src/src/components/views/messages/MFileBody.tsx",
"src/tchap/components/views/messages/OriginalImageBody.tsx": "src/src/components/views/messages/MImageBody.tsx",
"src/tchap/components/views/messages/OriginalImageReplyBody.tsx": "src/src/components/views/messages/MImageReplyBody.tsx",
"src/tchap/components/views/messages/OriginalStickerBody.tsx": "src/src/components/views/messages/MStickerBody.tsx",
"src/tchap/components/views/messages/OriginalVideoBody.tsx": "src/src/components/views/messages/MVideoBody.tsx",
"src/tchap/components/views/messages/OriginalVoiceMessageBody.tsx": "src/src/components/views/messages/MVoiceMessageBody.tsx",
"src/components/views/messages/UnknownBody.tsx": "src/tchap/components/views/messages/TchapUnknownBody.tsx",
"src/components/views/settings/JoinRuleSettings.tsx": "src/tchap/components/views/settings/TchapJoinRuleSettings.tsx",
"src/components/views/dialogs/RoomUpgradeWarningDialog.tsx": "src/tchap/components/views/dialogs/TchapRoomUpgradeWarningDialog.tsx",
Expand Down
2 changes: 0 additions & 2 deletions jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,7 @@ const config: Config = {
"../../../../../../src/tchap/components/views/messages/OriginalAudioBody":
"<rootDir>/node_modules/matrix-react-sdk/src/components/views/messages/MAudioBody.tsx",
"MStickerBody": "<rootDir>/src/tchap/customisations/components/views/messages/ContentScanningStickerBody.tsx",
"~matrix-react-sdk/(.*)": "<rootDir>/linked-dependencies/matrix-react-sdk/$1",
"~tchap-web/(.*)": "<rootDir>/$1",
"matrix-react-sdk/(.*)": "<rootDir>/linked-dependencies/matrix-react-sdk/$1",
// end :TCHAP:
},
transformIgnorePatterns: ["/node_modules/(?!(mime|matrix-js-sdk)).+$"],
Expand Down
2 changes: 1 addition & 1 deletion res/css/views/messages/ContentScanningFileBody.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ limitations under the License.
}

.mx_MFileBody_download_icon.mx_MFileBody_download_icon {
mask-image: url("~matrix-react-sdk/res/img/element-icons/roomlist/checkmark.svg");
mask-image: url("$(res)/img/element-icons/roomlist/checkmark.svg");
height: 10px;
mask-size: 18px;
margin-right: 4px;
Expand Down
2 changes: 1 addition & 1 deletion res/css/views/messages/TchapLegacyCallEvent.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
.mx_LegacyCallEvent {
&.mx_LegacyCallEvent_voice {
.mx_LegacyCallEvent_content_button_reportBug span::before {
mask-image: url("~matrix-react-sdk/res/img/element-icons/warning-badge.svg");
mask-image: url("$(res)/img/element-icons/warning-badge.svg");
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion res/themes/tchap-common/css/_paths.pcss
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/* Path from root SCSS file (such as `light.pcss`) to `res` dir in the source tree */
/* This value is overridden by external themes in `element-web`. */
$res: ../../../../node_modules/matrix-react-sdk/res;
$res: ../../../../res;
14 changes: 7 additions & 7 deletions res/themes/tchap-dark/css/tchap-dark.pcss
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/* activate _custom.pcss after settings _tchap_custom_vars */
@import "_tchap_custom_vars.pcss";
@import "../../../../node_modules/matrix-react-sdk/res/css/_font-sizes.pcss";
@import "../../../../res/css/_font-sizes.pcss";
@import "../../tchap-common/css/_paths.pcss";
@import "../../../../node_modules/matrix-react-sdk/res/themes/light/css/_fonts.pcss";
@import "../../../../node_modules/matrix-react-sdk/res/themes/light/css/_light.pcss"; /* base _light css */
@import "../../../../node_modules/matrix-react-sdk/res/themes/dark/css/_dark.pcss"; /* base _dark css */
/* @import "../../../../node_modules/matrix-react-sdk/res/themes/light-custom/css/_custom.pcss"; */ /* match css --vars to pcss $vars */
@import "../../../../node_modules/matrix-react-sdk/res/themes/light/css/_mods.pcss";
@import "../../../../node_modules/matrix-react-sdk/res/css/_components.pcss";
@import "../../../../res/themes/light/css/_fonts.pcss";
@import "../../../../res/themes/light/css/_light.pcss"; /* base _light css */
@import "../../../../res/themes/dark/css/_dark.pcss"; /* base _dark css */
/* @import "../../../../res/themes/light-custom/css/_custom.pcss"; */ /* match css --vars to pcss $vars */
@import "../../../../res/themes/light/css/_mods.pcss";
@import "../../../../res/css/_components.pcss";
@import "../../tchap-common/css/_tchap_custom.pcss"; /* import override from the common folder */
@import url("highlight.js/styles/atom-one-light.css");
@import url("github-markdown-css/github-markdown-dark.css");
12 changes: 6 additions & 6 deletions res/themes/tchap-light/css/tchap-light.pcss
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
@import "_tchap_custom_vars.pcss";
@import "../../../../node_modules/matrix-react-sdk/res/css/_font-sizes.pcss"; /* font sizes from matrix-react-sdk */
@import "../../../../res/css/_font-sizes.pcss"; /* font sizes from matrix-react-sdk */
@import "../../tchap-common/css/_paths.pcss"; /* tchap custom path to load ressources inside matrix css */
@import "../../../../node_modules/matrix-react-sdk/res/themes/light/css/_fonts.pcss"; /* tchap custom fonts */
@import "../../../../node_modules/matrix-react-sdk/res/themes/light/css/_light.pcss"; /* base _light css */
@import "../../../../node_modules/matrix-react-sdk/res/themes/light-custom/css/_custom.pcss"; /* match css --vars to pcss $vars */
@import "../../../../node_modules/matrix-react-sdk/res/themes/light/css/_mods.pcss";
@import "../../../../node_modules/matrix-react-sdk/res/css/_components.pcss"; /* css of all components */
@import "../../../../res/themes/light/css/_fonts.pcss"; /* tchap custom fonts */
@import "../../../../res/themes/light/css/_light.pcss"; /* base _light css */
@import "../../../../res/themes/light-custom/css/_custom.pcss"; /* match css --vars to pcss $vars */
@import "../../../../res/themes/light/css/_mods.pcss";
@import "../../../../res/css/_components.pcss"; /* css of all components */
@import url("highlight.js/styles/atom-one-light.css"); /* taken from matrix theme, don't know what it is */
@import "../../tchap-common/css/_tchap_custom.pcss"; /* import override from the common folder */
@import "_tchap_custom.pcss";
Expand Down
19 changes: 8 additions & 11 deletions scripts/copy-res.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const COPY_LIST = [
["res/themes/**", "webapp/themes"],
["res/vector-icons/**", "webapp/vector-icons"],
["res/decoder-ring/**", "webapp/decoder-ring"],
["node_modules/matrix-react-sdk/res/media/**", "webapp/media"],
["res/media/**", "webapp/media"],
["node_modules/@matrix-org/olm/olm_legacy.js", "webapp", { directwatch: 1 }],
["./config.json", "webapp", { directwatch: 1 }],
["contribute.json", "webapp"],
Expand Down Expand Up @@ -114,20 +114,17 @@ function next(i, err) {
}

function genLangFile(lang, dest) {
const reactSdkFile = "node_modules/matrix-react-sdk/src/i18n/strings/" + lang + ".json";
const riotWebFile = "src/i18n/strings/" + lang + ".json";

const translations = {};
[reactSdkFile, riotWebFile].forEach(function (f) {
if (fs.existsSync(f)) {
try {
Object.assign(translations, JSON.parse(fs.readFileSync(f).toString()));
} catch (e) {
console.error("Failed: " + f, e);
throw e;
}
if (fs.existsSync(riotWebFile)) {
try {
Object.assign(translations, JSON.parse(fs.readFileSync(riotWebFile).toString()));
} catch (e) {
console.error("Failed: " + riotWebFile, e);
throw e;
}
});
}

const json = JSON.stringify(translations, null, 4);
const jsonBuffer = Buffer.from(json);
Expand Down
8 changes: 0 additions & 8 deletions scripts/tchap/install-yarn-linked-repositories.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,6 @@ rm -R examples/

popd

cd ../linked-dependencies
pushd matrix-react-sdk
yarn unlink # :TCHAP: for local build, undo previous links if present.
yarn link
yarn link matrix-js-sdk
yarn install --pure-lockfile
popd


# :TCHAP: yarn-link modules
cd .. # go back to root
Expand Down
16 changes: 0 additions & 16 deletions scripts/tchap/postinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,3 @@ set -x
# This postinstall script is to make sure we use the linked-dependencies module for matrx-react-sdk

./scripts/tchap/apply_patches.sh

cd linked-dependencies
pushd matrix-react-sdk
# Normally when dealing with a subtree and node_modules, it is good practice to merge them in the parent package.json.
# However in our case nothing should overlaps since element and matrix-react-sdk are deeply interconnected.
# Moreover, webpack will apply tree shaking to remove unecessary pacakges
yarn install --pure-lockfile
yarn unlink # :TCHAP: for local build, undo previous links if present.
yarn link

popd

cd ..
# Link the layers into element-web
yarn link matrix-react-sdk

4 changes: 1 addition & 3 deletions scripts/tchap/translations/collect-reference-translations.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,9 @@ node scripts/tchap/translations/extractENTranslations.js --file=$TCHAP_TRANSLATI

# Merge element translations from both web and react-sdk repos, into OUTPUT_FILE
export ELEMENT_WEB_TRANSLATION_FILE=`realpath src/i18n/strings/en_EN.json`
export ELEMENT_REACT_TRANSLATION_FILE=`realpath linked-dependencies/matrix-react-sdk/src/i18n/strings/en_EN.json`
merge_json_files $ELEMENT_WEB_TRANSLATION_FILE $ELEMENT_REACT_TRANSLATION_FILE $OUTPUT_FILE

# Merge in tchap translations, into OUTPUT_FILE. Tchap values should override element values in case of conflict.
merge_json_files $OUTPUT_FILE $TCHAP_TRANSLATION_EN_FILE $OUTPUT_FILE
merge_json_files $ELEMENT_WEB_TRANSLATION_FILE $TCHAP_TRANSLATION_EN_FILE $OUTPUT_FILE

# Some keys have been removed from the code by patches. Remove these keys from the reference file.
REMOVED_TRANSLATION_FILE=`realpath modules/tchap-translations/tchap_translations_removed.json`
Expand Down
24 changes: 4 additions & 20 deletions scripts/tchap/translations/crawl-for-translations.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,13 @@ source scripts/tchap/translations/helpers.sh

# Usage : crawl repo inputfile outputfile
crawl () {
export repo=$1
# Run the original gen-i18n script from matrix-web-i18n.
# gen-i18n crawls through the code files in src and res, looking for translations.
# For each translation key, it finds the values in INPUT_FILE. If no value found, it uses value=key.
# Then it writes key:value in OUTPUT_FILE.
export INPUT_FILE=$2 # var read by matrix-gen-i18n, don't rename
export OUTPUT_FILE=$3 # var read by matrix-gen-i18n, don't rename
if [[ "$repo" == "react-sdk" ]]; then
cd linked-dependencies/matrix-react-sdk
yarn matrix-gen-i18n;
cd ../../
else
yarn matrix-gen-i18n;
fi
export INPUT_FILE=$1 # var read by matrix-gen-i18n, don't rename
export OUTPUT_FILE=$2 # var read by matrix-gen-i18n, don't rename
yarn matrix-gen-i18n;
retVal=$?
if [ $retVal -ne 0 ]; then
echo "gen-i18n failed. Aborting."
Expand All @@ -38,16 +31,7 @@ export REFERENCE_TRANSLATIONS=$1
export CRAWLED=$2

# Repo web
export REPO="web";
export CRAWLED_WEB=`realpath modules/tchap-translations/tmp/crawled_${REPO}.json`
crawl $REPO $REFERENCE_TRANSLATIONS $CRAWLED_WEB

# Repo react-sdk
export REPO="react-sdk";
export CRAWLED_REACT=`realpath modules/tchap-translations/tmp/crawled_${REPO}.json`
crawl $REPO $REFERENCE_TRANSLATIONS $CRAWLED_REACT

merge_json_files $CRAWLED_WEB $CRAWLED_REACT $CRAWLED
crawl $REFERENCE_TRANSLATIONS $CRAWLED

# Extra hack : config.json is not crawled by matrix-gen-i18n, so the terms_and_conditions_links are missing. Add them in.
# Get the terms_and_conditions strings from config.json
Expand Down
2 changes: 1 addition & 1 deletion src/IdentityAuthClient.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
} from "./utils/IdentityServerUtils";
import QuestionDialog from "./components/views/dialogs/QuestionDialog";
import { abbreviateUrl } from "./utils/UrlUtils";

Check failure on line 23 in src/IdentityAuthClient.tsx

View workflow job for this annotation

GitHub Actions / ESLint

There should be at least one empty line between import groups
import TchapUIFeature from "../../../src/tchap/util/TchapUIFeature";
import TchapUIFeature from "~tchap-web/src/tchap/util/TchapUIFeature";

export class AbortedIdentityActionError extends Error {}

Expand Down
2 changes: 1 addition & 1 deletion src/Terms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
doesAccountDataHaveIdentityServer,
setToDefaultIdentityServer,
} from './utils/IdentityServerUtils';
import TchapUIFeature from "../../../src/tchap/util/TchapUIFeature";
import TchapUIFeature from "~tchap-web/src/tchap/util/TchapUIFeature";

export class TermsNotSignedError extends Error {}

Expand Down
4 changes: 2 additions & 2 deletions src/components/structures/MatrixChat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ import { ConfirmSessionLockTheftView } from "./auth/ConfirmSessionLockTheftView"
import { LoginSplashView } from "./auth/LoginSplashView";
import { cleanUpDraftsIfRequired } from "../../DraftCleaner";

import TchapUrls from "../../../../../src/tchap/util/TchapUrls"; // :TCHAP: activate-cross-signing-and-secure-storage-react
import EmailVerificationPage from "../../../../../src/tchap/components/views/sso/EmailVerificationPage"; // :TCHAP: sso-agentconnect-flow
import TchapUrls from "~tchap-web/src/tchap/util/TchapUrls"; // :TCHAP: activate-cross-signing-and-secure-storage-react
import EmailVerificationPage from "~tchap-web/src/tchap/components/views/sso/EmailVerificationPage"; // :TCHAP: sso-agentconnect-flow

// legacy export
export { default as Views } from "../../Views";
Expand Down
2 changes: 1 addition & 1 deletion src/components/structures/RoomSearchView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import ResizeNotifier from "../../utils/ResizeNotifier";
import MatrixClientContext from "../../contexts/MatrixClientContext";
import { RoomPermalinkCreator } from "../../utils/permalinks/Permalinks";
import RoomContext from "../../contexts/RoomContext";

Check failure on line 29 in src/components/structures/RoomSearchView.tsx

View workflow job for this annotation

GitHub Actions / ESLint

There should be at least one empty line between import groups
import Tchapi18nUtils from "../../../../../src/tchap/i18n/Tchapi18nUtils"; // :tchap: error-tchap-is-down
import Tchapi18nUtils from "~tchap-web/src/tchap/i18n/Tchapi18nUtils"; // :tchap: error-tchap-is-down

const DEBUG = false;
let debuglog = function (msg: string): void {};
Expand Down
2 changes: 1 addition & 1 deletion src/components/structures/RoomStatusBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import InlineSpinner from "../views/elements/InlineSpinner";
import MatrixClientContext from "../../contexts/MatrixClientContext";
import { RoomStatusBarUnsentMessages } from "./RoomStatusBarUnsentMessages";
import ExternalLink from "../views/elements/ExternalLink";

Check failure on line 32 in src/components/structures/RoomStatusBar.tsx

View workflow job for this annotation

GitHub Actions / ESLint

There should be at least one empty line between import groups
import Tchapi18nUtils from '../../../../../src/tchap/i18n/Tchapi18nUtils'; // :TCHAP: error-tchap-is-down
import Tchapi18nUtils from '~tchap-web/src/tchap/i18n/Tchapi18nUtils'; // :TCHAP: error-tchap-is-down

const STATUS_BAR_HIDDEN = 0;
const STATUS_BAR_EXPANDED = 1;
Expand Down
4 changes: 2 additions & 2 deletions src/components/structures/auth/ForgotPassword.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ import { VerifyEmailModal } from "./forgot-password/VerifyEmailModal";
import Spinner from "../../views/elements/Spinner";
import { formatSeconds } from "../../../DateUtils";
import AutoDiscoveryUtils from "../../../utils/AutoDiscoveryUtils";
import TchapUtils from "../../../../../../src/tchap/util/TchapUtils"; // :TCHAP: forgot-password
import Tchapi18nUtils from "../../../../../../src/tchap/i18n/Tchapi18nUtils";
import TchapUtils from "~tchap-web/src/tchap/util/TchapUtils"; // :TCHAP: forgot-password
import Tchapi18nUtils from "~tchap-web/src/tchap/i18n/Tchapi18nUtils";

const emailCheckInterval = 2000;

Expand Down
4 changes: 2 additions & 2 deletions src/components/structures/auth/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ import { ValidatedServerConfig } from "../../../utils/ValidatedServerConfig";
import { filterBoolean } from "../../../utils/arrays";
import { Features } from "../../../settings/Settings";
import { startOidcLogin } from "../../../utils/oidc/authorize";
import TchapUtils from '../../../../../../src/tchap/util/TchapUtils'; // :TCHAP: login
import Tchapi18nUtils from '../../../../../../src/tchap/i18n/Tchapi18nUtils'; // :TCHAP: login
import TchapUtils from '~tchap-web/src/tchap/util/TchapUtils'; // :TCHAP: login
import Tchapi18nUtils from '~tchap-web/src/tchap/i18n/Tchapi18nUtils'; // :TCHAP: login

interface IProps {
serverConfig: ValidatedServerConfig;
Expand Down
8 changes: 4 additions & 4 deletions src/components/structures/auth/Registration.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ import { ValidatedServerConfig } from "../../../utils/ValidatedServerConfig";
import { Features } from "../../../settings/Settings";
import { startOidcLogin } from "../../../utils/oidc/authorize";

import TchapUtils from '../../../../../../src/tchap/util/TchapUtils'; // :TCHAP: registration-for-mainlining
import TchapUIFeature from "../../../../../../src/tchap/util/TchapUIFeature"; // :TCHAP: sso-agentconnect-flow
import ProconnectButton from "../../../../../../src/tchap/components/views/sso/ProconnectButton"; // :TCHAP: sso-agentconnect-flow
import TchapUrls from "../../../../../../src/tchap/util/TchapUrls";
import TchapUtils from '~tchap-web/src/tchap/util/TchapUtils'; // :TCHAP: registration-for-mainlining
import TchapUIFeature from "~tchap-web/src/tchap/util/TchapUIFeature"; // :TCHAP: sso-agentconnect-flow
import ProconnectButton from "~tchap-web/src/tchap/components/views/sso/ProconnectButton"; // :TCHAP: sso-agentconnect-flow
import TchapUrls from "~tchap-web/src/tchap/util/TchapUrls";

const debuglog = (...args: any[]): void => {
if (SettingsStore.getValue("debug_registration")) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/structures/auth/SetupEncryptionBody.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { SetupEncryptionStore, Phase } from "../../../stores/SetupEncryptionStor
import EncryptionPanel from "../../views/right_panel/EncryptionPanel";
import AccessibleButton, { ButtonEvent } from "../../views/elements/AccessibleButton";
import Spinner from "../../views/elements/Spinner";
import TchapUrls from "../../../../../../src/tchap/util/TchapUrls"; // :TCHAP: help-access-verify-device
import TchapUrls from "~tchap-web/src/tchap/util/TchapUrls"; // :TCHAP: help-access-verify-device

function keyHasPassphrase(keyInfo: SecretStorageKeyDescription): boolean {
return Boolean(keyInfo.passphrase && keyInfo.passphrase.salt && keyInfo.passphrase.iterations);
Expand Down
2 changes: 1 addition & 1 deletion src/components/views/auth/PassphraseField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import withValidation, { IFieldState, IValidationResult } from "../elements/Vali
import { _t, _td, TranslationKey } from "../../../languageHandler";
import Field, { IInputProps } from "../elements/Field";
import { MatrixClientPeg } from "../../../MatrixClientPeg";
import TchapStrongPassword from "../../../../../../src/tchap/util/TchapStrongPassword";
import TchapStrongPassword from "~tchap-web/src/tchap/util/TchapStrongPassword";

interface IProps extends Omit<IInputProps, "onValidate" | "element"> {
autoFocus?: boolean;
Expand Down
2 changes: 1 addition & 1 deletion src/components/views/auth/PasswordLogin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ export default class PasswordLogin extends React.PureComponent<IProps, IState> {
onMouseUp={() => this.setDisplayPassword(false)}
>
<img
src={require("../../../../../../res/img/grey-eye.svg").default}
src={require("~tchap-web/res/img/grey-eye.svg").default}
width="24"
height="24"
alt={_t("Eye")}
Expand Down
2 changes: 1 addition & 1 deletion src/components/views/auth/Welcome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { UIFeature } from "../../../settings/UIFeature";
import LanguageSelector from "./LanguageSelector";
import EmbeddedPage from "../../structures/EmbeddedPage";
import { MATRIX_LOGO_HTML } from "../../structures/static-page-vars";
import TchapUIFeature from "../../../../../../src/tchap/util/TchapUIFeature";
import TchapUIFeature from "~tchap-web/src/tchap/util/TchapUIFeature";

interface IProps {}

Expand Down
Loading

0 comments on commit 285ed3d

Please sign in to comment.