commit 98b1a831b3732290b49dd1fbe270c876c9c4d486
parent 23b7437940a4806f92a4ea713ffdc54df1f67856
Author: MTRNord <mtrnord1@gmail.com>
Date: Wed, 27 Sep 2023 10:48:52 +0200
Fix: Small login fixes and update
Diffstat:
8 files changed, 225 insertions(+), 62 deletions(-)
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
+ <component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
@@ -4,28 +4,23 @@
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
- <list default="true" id="fc5af14b-7484-46dc-b4cb-0394f9dc3dda" name="Changes" comment="Cleanup">
- <change afterPath="$PROJECT_DIR$/.idea/uiDesigner.xml" afterDir="false" />
- <change afterPath="$PROJECT_DIR$/src/jsMain/kotlin/pages/Login.kt" afterDir="false" />
- <change afterPath="$PROJECT_DIR$/src/jsMain/resources/index.html" afterDir="false" />
- <change afterPath="/var/home/marcel/IdeaProjects/MagicMatrix/.idea/uiDesigner.xml" afterDir="false" />
- <change afterPath="/var/home/marcel/IdeaProjects/MagicMatrix/src/jsMain/kotlin/pages/Login.kt" afterDir="false" />
- <change afterPath="/var/home/marcel/IdeaProjects/MagicMatrix/src/jsMain/resources/index.html" afterDir="false" />
+ <list default="true" id="fc5af14b-7484-46dc-b4cb-0394f9dc3dda" name="Changes" comment="Feat: Partially implement password login">
+ <change beforePath="$PROJECT_DIR$/.idea/gradle.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/gradle.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/.run/browser.run.xml" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/build.gradle.kts" beforeDir="false" afterPath="$PROJECT_DIR$/build.gradle.kts" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/settings.gradle.kts" beforeDir="false" afterPath="$PROJECT_DIR$/settings.gradle.kts" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/src/main/kotlin/main.kt" beforeDir="false" afterPath="$PROJECT_DIR$/src/jsMain/kotlin/Main.kt" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/src/main/kotlin/pages/Login.kt" beforeDir="false" />
- <change beforePath="$PROJECT_DIR$/src/main/resources/index.html" beforeDir="false" />
+ <change beforePath="$PROJECT_DIR$/gradle.properties" beforeDir="false" afterPath="$PROJECT_DIR$/gradle.properties" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/kotlin-js-store/yarn.lock" beforeDir="false" afterPath="$PROJECT_DIR$/kotlin-js-store/yarn.lock" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/src/jsMain/kotlin/pages/Login.kt" beforeDir="false" afterPath="$PROJECT_DIR$/src/jsMain/kotlin/pages/Login.kt" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/webpack.config.d/webpack-olm.js" beforeDir="false" afterPath="$PROJECT_DIR$/webpack.config.d/webpack-olm.js" afterDir="false" />
+ <change beforePath="/var/home/marcel/IdeaProjects/MagicMatrix/.idea/gradle.xml" beforeDir="false" afterPath="/var/home/marcel/IdeaProjects/MagicMatrix/.idea/gradle.xml" afterDir="false" />
<change beforePath="/var/home/marcel/IdeaProjects/MagicMatrix/.idea/workspace.xml" beforeDir="false" afterPath="/var/home/marcel/IdeaProjects/MagicMatrix/.idea/workspace.xml" afterDir="false" />
- <change beforePath="/var/home/marcel/IdeaProjects/MagicMatrix/.run/browser.run.xml" beforeDir="false" />
<change beforePath="/var/home/marcel/IdeaProjects/MagicMatrix/build.gradle.kts" beforeDir="false" afterPath="/var/home/marcel/IdeaProjects/MagicMatrix/build.gradle.kts" afterDir="false" />
+ <change beforePath="/var/home/marcel/IdeaProjects/MagicMatrix/gradle.properties" beforeDir="false" afterPath="/var/home/marcel/IdeaProjects/MagicMatrix/gradle.properties" afterDir="false" />
<change beforePath="/var/home/marcel/IdeaProjects/MagicMatrix/gradle/libs.versions.toml" beforeDir="false" afterPath="/var/home/marcel/IdeaProjects/MagicMatrix/gradle/libs.versions.toml" afterDir="false" />
- <change beforePath="/var/home/marcel/IdeaProjects/MagicMatrix/settings.gradle.kts" beforeDir="false" afterPath="/var/home/marcel/IdeaProjects/MagicMatrix/settings.gradle.kts" afterDir="false" />
- <change beforePath="/var/home/marcel/IdeaProjects/MagicMatrix/src/main/kotlin/main.kt" beforeDir="false" afterPath="/var/home/marcel/IdeaProjects/MagicMatrix/src/jsMain/kotlin/Main.kt" afterDir="false" />
- <change beforePath="/var/home/marcel/IdeaProjects/MagicMatrix/src/main/kotlin/pages/Login.kt" beforeDir="false" />
- <change beforePath="/var/home/marcel/IdeaProjects/MagicMatrix/src/main/resources/index.html" beforeDir="false" />
+ <change beforePath="/var/home/marcel/IdeaProjects/MagicMatrix/kotlin-js-store/yarn.lock" beforeDir="false" afterPath="/var/home/marcel/IdeaProjects/MagicMatrix/kotlin-js-store/yarn.lock" afterDir="false" />
+ <change beforePath="/var/home/marcel/IdeaProjects/MagicMatrix/src/jsMain/kotlin/Main.kt" beforeDir="false" afterPath="/var/home/marcel/IdeaProjects/MagicMatrix/src/jsMain/kotlin/Main.kt" afterDir="false" />
+ <change beforePath="/var/home/marcel/IdeaProjects/MagicMatrix/src/jsMain/kotlin/pages/Login.kt" beforeDir="false" afterPath="/var/home/marcel/IdeaProjects/MagicMatrix/src/jsMain/kotlin/pages/Login.kt" afterDir="false" />
+ <change beforePath="/var/home/marcel/IdeaProjects/MagicMatrix/webpack.config.d/webpack-olm.js" beforeDir="false" afterPath="/var/home/marcel/IdeaProjects/MagicMatrix/webpack.config.d/webpack-olm.js" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -62,12 +57,12 @@
<option name="RECENT_GIT_ROOT_PATH" value="/var/home/marcel/IdeaProjects/MagicMatrix" />
<option name="ROOT_SYNC" value="SYNC" />
</component>
- <component name="GitHubPullRequestSearchHistory"><![CDATA[{
- "lastFilter": {
- "state": "OPEN",
- "assignee": "MTRNord"
+ <component name="GitHubPullRequestSearchHistory">{
+ "lastFilter": {
+ "state": "OPEN",
+ "assignee": "MTRNord"
}
-}]]></component>
+}</component>
<component name="GithubPullRequestsUISettings">
<option name="selectedUrlAndAccountId">
<UrlAndAccount>
@@ -79,32 +74,54 @@
<component name="OptimizeOnSaveOptions">
<option name="myRunOnSave" value="true" />
</component>
- <component name="ProjectColorInfo"><![CDATA[{
- "customColor": "",
- "associatedIndex": 4
-}]]></component>
+ <component name="ProjectColorInfo">{
+ "customColor": "",
+ "associatedIndex": 4
+}</component>
<component name="ProjectId" id="2VwHNzvSv2Sslp2QwykXo6gnL8v" />
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
- <component name="PropertiesComponent"><![CDATA[{
- "keyToString": {
- "RunOnceActivity.OpenProjectViewOnStart": "true",
- "RunOnceActivity.ShowReadmeOnStart": "true",
- "SHARE_PROJECT_CONFIGURATION_FILES": "true",
- "WebServerToolWindowFactoryState": "false",
- "git-widget-placeholder": "main",
- "node.js.detected.package.eslint": "true",
- "node.js.detected.package.tslint": "true",
- "node.js.selected.package.eslint": "(autodetect)",
- "node.js.selected.package.tslint": "(autodetect)",
- "nodejs_package_manager_path": "npm",
- "settings.editor.selected.configurable": "actions.on.save",
- "vue.rearranger.settings.migration": "true"
+ <component name="PropertiesComponent">{
+ "keyToString": {
+ "RunOnceActivity.OpenProjectViewOnStart": "true",
+ "RunOnceActivity.ShowReadmeOnStart": "true",
+ "SHARE_PROJECT_CONFIGURATION_FILES": "true",
+ "WebServerToolWindowFactoryState": "false",
+ "git-widget-placeholder": "main",
+ "node.js.detected.package.eslint": "true",
+ "node.js.detected.package.tslint": "true",
+ "node.js.selected.package.eslint": "(autodetect)",
+ "node.js.selected.package.tslint": "(autodetect)",
+ "nodejs_package_manager_path": "npm",
+ "settings.editor.selected.configurable": "actions.on.save",
+ "vue.rearranger.settings.migration": "true"
}
-}]]></component>
+}</component>
<component name="RunManager" selected="Gradle.MagicMatrix::var:home:marcel:IdeaProjects:MagicMatrix [jsBrowserRun]">
+ <configuration name="MagicMatrix::var:home:marcel:IdeaProjects:MagicMatrix [clean]" type="GradleRunConfiguration" factoryName="Gradle" temporary="true">
+ <ExternalSystemSettings>
+ <option name="executionName" />
+ <option name="externalProjectPath" value="/var/home/marcel/IdeaProjects/MagicMatrix" />
+ <option name="externalSystemIdString" value="GRADLE" />
+ <option name="scriptParameters" />
+ <option name="taskDescriptions">
+ <list />
+ </option>
+ <option name="taskNames">
+ <list>
+ <option value="clean" />
+ </list>
+ </option>
+ <option name="vmOptions" />
+ </ExternalSystemSettings>
+ <ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
+ <ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
+ <DebugAllEnabled>false</DebugAllEnabled>
+ <RunAsTest>false</RunAsTest>
+ <method v="2" />
+ </configuration>
<configuration name="MagicMatrix::var:home:marcel:IdeaProjects:MagicMatrix [jsBrowserRun]" type="GradleRunConfiguration" factoryName="Gradle" temporary="true">
<ExternalSystemSettings>
<option name="executionName" />
@@ -152,6 +169,7 @@
<recent_temporary>
<list>
<item itemvalue="Gradle.MagicMatrix::var:home:marcel:IdeaProjects:MagicMatrix [jsBrowserRun]" />
+ <item itemvalue="Gradle.MagicMatrix::var:home:marcel:IdeaProjects:MagicMatrix [clean]" />
<item itemvalue="Gradle.MagicMatrix::var:home:marcel:IdeaProjects:MagicMatrix [kotlinUpgradeYarnLock]" />
</list>
</recent_temporary>
@@ -164,7 +182,8 @@
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1695740188018</updated>
- <workItem from="1695740189223" duration="13483000" />
+ <workItem from="1695740189223" duration="16753000" />
+ <workItem from="1695802254211" duration="1894000" />
</task>
<task id="LOCAL-00001" summary="Fix: Fix typo in workflow file">
<option name="closed" value="true" />
@@ -214,7 +233,15 @@
<option name="project" value="LOCAL" />
<updated>1695746206343</updated>
</task>
- <option name="localTasksCounter" value="7" />
+ <task id="LOCAL-00007" summary="Feat: Partially implement password login">
+ <option name="closed" value="true" />
+ <created>1695756319632</created>
+ <option name="number" value="00007" />
+ <option name="presentableId" value="LOCAL-00007" />
+ <option name="project" value="LOCAL" />
+ <updated>1695756319632</updated>
+ </task>
+ <option name="localTasksCounter" value="8" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
@@ -240,6 +267,7 @@
<MESSAGE value="Fix: use correct github action" />
<MESSAGE value="Feat: Add very early and basic state handling" />
<MESSAGE value="Cleanup" />
- <option name="LAST_COMMIT_MESSAGE" value="Cleanup" />
+ <MESSAGE value="Feat: Partially implement password login" />
+ <option name="LAST_COMMIT_MESSAGE" value="Feat: Partially implement password login" />
</component>
</project>
\ No newline at end of file
diff --git a/build.gradle.kts b/build.gradle.kts
@@ -19,9 +19,11 @@ kotlin {
sourceSets {
val jsMain by getting {
dependencies {
+ implementation(npm("copy-webpack-plugin", "11.0.0"))
implementation(compose.html.core)
implementation(compose.runtime)
implementation(libs.trixnity.messenger)
+ implementation(libs.koin.core)
implementation(libs.koin.compose)
implementation(libs.kobweb.silk)
}
diff --git a/gradle.properties b/gradle.properties
@@ -1,3 +1,11 @@
-org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
+org.gradle.jvmargs=-Dfile.encoding=UTF-8 -Xmx4g -XX:MaxMetaspaceSize=1g
+org.gradle.parallel=true
kotlin.code.style=official
-kotlin.version=1.9.10
-\ No newline at end of file
+kotlin.mpp.stability.nowarn=true
+kotlin.mpp.enableCInteropCommonization=true
+kotlin.mpp.enableHierarchicalCommonization=true
+# see https://github.com/JetBrains/kotlin/blob/master/kotlin-native/NEW_MM.md
+kotlin.native.binary.memoryModel=experimental
+# kotlin logging does not support the experminetal memory model yet
+kotlin.native.binary.freezing=disabled
+kotlin.version=1.9.10
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
@@ -1,12 +1,13 @@
[versions]
jetbrains-compose = "1.5.2"
kotlin = "1.9.10"
-trixnity = "1.0.5"
+trixnity = "1.0.6-SNAPSHOT"
koin = "1.1.0"
kobweb = "0.14.0"
[libraries]
trixnity-messenger = { module = "de.connect2x:trixnity-messenger", version.ref = "trixnity" }
+koin-core = { module = "io.insert-koin:koin-core", version.ref = "koin" }
koin-compose = { module = "io.insert-koin:koin-compose", version.ref = "koin" }
kobweb-silk = { module = "com.varabyte.kobweb:kobweb-silk", version.ref = "kobweb" }
diff --git a/kotlin-js-store/yarn.lock b/kotlin-js-store/yarn.lock
@@ -72,6 +72,27 @@
resolved "https://gitlab.matrix.org/api/v4/projects/27/packages/npm/@matrix-org/olm/-/@matrix-org/olm-3.2.15.tgz#77b4df2cd3db4709f52f3d4eb09a1b3d6b989bbb"
integrity sha1-d7TfLNPbRwn1Lz1OsJobPWuYm7s=
+"@nodelib/fs.scandir@2.1.5":
+ version "2.1.5"
+ resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5"
+ integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==
+ dependencies:
+ "@nodelib/fs.stat" "2.0.5"
+ run-parallel "^1.1.9"
+
+"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2":
+ version "2.0.5"
+ resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b"
+ integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==
+
+"@nodelib/fs.walk@^1.2.3":
+ version "1.2.8"
+ resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a"
+ integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==
+ dependencies:
+ "@nodelib/fs.scandir" "2.1.5"
+ fastq "^1.6.0"
+
"@socket.io/component-emitter@~3.1.0":
version "3.1.0"
resolved "https://registry.yarnpkg.com/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz#96116f2a912e0c02817345b3c10751069920d553"
@@ -781,6 +802,18 @@ cookie@~0.4.1:
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.2.tgz#0e41f24de5ecf317947c82fc789e06a884824432"
integrity sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==
+copy-webpack-plugin@11.0.0:
+ version "11.0.0"
+ resolved "https://registry.yarnpkg.com/copy-webpack-plugin/-/copy-webpack-plugin-11.0.0.tgz#96d4dbdb5f73d02dd72d0528d1958721ab72e04a"
+ integrity sha512-fX2MWpamkW0hZxMEg0+mYnA40LTosOSa5TqZ9GYIBzyJa9C3QUaMPSE2xAi/buNr8u89SfD9wHSQVBzrRa/SOQ==
+ dependencies:
+ fast-glob "^3.2.11"
+ glob-parent "^6.0.1"
+ globby "^13.1.1"
+ normalize-path "^3.0.0"
+ schema-utils "^4.0.0"
+ serialize-javascript "^6.0.0"
+
core-util-is@~1.0.0:
version "1.0.3"
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85"
@@ -874,6 +907,13 @@ diff@5.0.0:
resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b"
integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==
+dir-glob@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f"
+ integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==
+ dependencies:
+ path-type "^4.0.0"
+
dns-equal@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/dns-equal/-/dns-equal-1.0.0.tgz#b39e7f1da6eb0a75ba9c17324b34753c47e0654d"
@@ -1082,6 +1122,17 @@ fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3:
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525"
integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==
+fast-glob@^3.2.11, fast-glob@^3.3.0:
+ version "3.3.1"
+ resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.1.tgz#784b4e897340f3dbbef17413b3f11acf03c874c4"
+ integrity sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==
+ dependencies:
+ "@nodelib/fs.stat" "^2.0.2"
+ "@nodelib/fs.walk" "^1.2.3"
+ glob-parent "^5.1.2"
+ merge2 "^1.3.0"
+ micromatch "^4.0.4"
+
fast-json-stable-stringify@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633"
@@ -1092,6 +1143,13 @@ fastest-levenshtein@^1.0.12:
resolved "https://registry.yarnpkg.com/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz#210e61b6ff181de91ea9b3d1b84fdedd47e034e5"
integrity sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==
+fastq@^1.6.0:
+ version "1.15.0"
+ resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.15.0.tgz#d04d07c6a2a68fe4599fea8d2e103a937fae6b3a"
+ integrity sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==
+ dependencies:
+ reusify "^1.0.4"
+
faye-websocket@^0.11.3:
version "0.11.4"
resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.11.4.tgz#7f0d9275cfdd86a1c963dc8b65fcc451edcbb1da"
@@ -1227,13 +1285,20 @@ get-stream@^6.0.0:
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7"
integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==
-glob-parent@~5.1.2:
+glob-parent@^5.1.2, glob-parent@~5.1.2:
version "5.1.2"
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4"
integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==
dependencies:
is-glob "^4.0.1"
+glob-parent@^6.0.1:
+ version "6.0.2"
+ resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3"
+ integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==
+ dependencies:
+ is-glob "^4.0.3"
+
glob-to-regexp@^0.4.1:
version "0.4.1"
resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e"
@@ -1263,6 +1328,17 @@ glob@^7.1.3, glob@^7.1.7:
once "^1.3.0"
path-is-absolute "^1.0.0"
+globby@^13.1.1:
+ version "13.2.2"
+ resolved "https://registry.yarnpkg.com/globby/-/globby-13.2.2.tgz#63b90b1bf68619c2135475cbd4e71e66aa090592"
+ integrity sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w==
+ dependencies:
+ dir-glob "^3.0.1"
+ fast-glob "^3.3.0"
+ ignore "^5.2.4"
+ merge2 "^1.4.1"
+ slash "^4.0.0"
+
graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.10, graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.9:
version "4.2.11"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3"
@@ -1385,6 +1461,11 @@ iconv-lite@^0.6.3:
dependencies:
safer-buffer ">= 2.1.2 < 3.0.0"
+ignore@^5.2.4:
+ version "5.2.4"
+ resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324"
+ integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==
+
import-local@^3.0.2:
version "3.1.0"
resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.1.0.tgz#b4479df8a5fd44f6cdce24070675676063c95cb4"
@@ -1455,7 +1536,7 @@ is-fullwidth-code-point@^3.0.0:
resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d"
integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==
-is-glob@^4.0.1, is-glob@~4.0.1:
+is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1:
version "4.0.3"
resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084"
integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==
@@ -1697,12 +1778,17 @@ merge-stream@^2.0.0:
resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60"
integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==
+merge2@^1.3.0, merge2@^1.4.1:
+ version "1.4.1"
+ resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae"
+ integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==
+
methods@~1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee"
integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==
-micromatch@^4.0.2:
+micromatch@^4.0.2, micromatch@^4.0.4:
version "4.0.5"
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6"
integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==
@@ -1990,6 +2076,11 @@ path-to-regexp@0.1.7:
resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c"
integrity sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==
+path-type@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b"
+ integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==
+
picocolors@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c"
@@ -2037,6 +2128,11 @@ qs@6.11.0:
dependencies:
side-channel "^1.0.4"
+queue-microtask@^1.2.2:
+ version "1.2.3"
+ resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243"
+ integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==
+
randombytes@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a"
@@ -2146,6 +2242,11 @@ retry@^0.13.1:
resolved "https://registry.yarnpkg.com/retry/-/retry-0.13.1.tgz#185b1587acf67919d63b357349e03537b2484658"
integrity sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==
+reusify@^1.0.4:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76"
+ integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==
+
rfdc@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.3.0.tgz#d0b7c441ab2720d05dc4cf26e01c89631d9da08b"
@@ -2158,6 +2259,13 @@ rimraf@^3.0.0, rimraf@^3.0.2:
dependencies:
glob "^7.1.3"
+run-parallel@^1.1.9:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee"
+ integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==
+ dependencies:
+ queue-microtask "^1.2.2"
+
safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1:
version "5.1.2"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
@@ -2230,7 +2338,7 @@ serialize-javascript@6.0.0:
dependencies:
randombytes "^2.1.0"
-serialize-javascript@^6.0.1:
+serialize-javascript@^6.0.0, serialize-javascript@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.1.tgz#b206efb27c3da0b0ab6b52f48d170b7996458e5c"
integrity sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==
@@ -2308,6 +2416,11 @@ signal-exit@^3.0.3:
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9"
integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==
+slash@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/slash/-/slash-4.0.0.tgz#2422372176c4c6c5addb5e2ada885af984b396a7"
+ integrity sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==
+
socket.io-adapter@~2.5.2:
version "2.5.2"
resolved "https://registry.yarnpkg.com/socket.io-adapter/-/socket.io-adapter-2.5.2.tgz#5de9477c9182fdc171cd8c8364b9a8894ec75d12"
diff --git a/src/jsMain/kotlin/pages/Login.kt b/src/jsMain/kotlin/pages/Login.kt
@@ -20,6 +20,7 @@ import org.jetbrains.compose.web.dom.Text
fun PasswordLogin(passwordLoginViewModel: PasswordLoginViewModel) {
val username by passwordLoginViewModel.username.collectAsState();
val password by passwordLoginViewModel.password.collectAsState();
+ val canLogin by passwordLoginViewModel.canLogin.collectAsState();
Row(
Modifier
.display(DisplayStyle.Flex)
@@ -43,10 +44,10 @@ fun PasswordLogin(passwordLoginViewModel: PasswordLoginViewModel) {
username,
password = false,
onTextChanged = { newText ->
- passwordLoginViewModel.username.update {
+ passwordLoginViewModel.accountName.update {
newText
}
- passwordLoginViewModel.accountName.update {
+ passwordLoginViewModel.username.update {
newText
}
})
@@ -64,14 +65,16 @@ fun PasswordLogin(passwordLoginViewModel: PasswordLoginViewModel) {
}
})
}
- Button(attrs = {
- onClick {
- if (username.isNotBlank() && password.isNotBlank()) {
- passwordLoginViewModel.tryLogin()
+ if (canLogin) {
+ Button(attrs = {
+ onClick {
+ if (username.isNotBlank() && password.isNotBlank() && canLogin) {
+ passwordLoginViewModel.tryLogin()
+ }
}
+ }) {
+ Text("Login")
}
- }) {
- Text("Login")
}
}
}
diff --git a/webpack.config.d/webpack-olm.js b/webpack.config.d/webpack-olm.js
@@ -7,4 +7,13 @@ config.resolve = {
os: false,
buffer: false
}
-};
-\ No newline at end of file
+};
+
+const CopyPlugin = require("copy-webpack-plugin");
+config.plugins.push(
+ new CopyPlugin({
+ patterns: [
+ {from: "../../node_modules/@matrix-org/olm/olm.wasm", to: "."},
+ ],
+ })
+)