Create QML module for login
This commit is contained in:
@@ -200,7 +200,6 @@ qt_add_qml_module(neochat URI org.kde.neochat NO_PLUGIN
|
|||||||
qml/ExplorerDelegate.qml
|
qml/ExplorerDelegate.qml
|
||||||
qml/InviteUserPage.qml
|
qml/InviteUserPage.qml
|
||||||
qml/ImageEditorPage.qml
|
qml/ImageEditorPage.qml
|
||||||
qml/WelcomePage.qml
|
|
||||||
qml/NeochatMaximizeComponent.qml
|
qml/NeochatMaximizeComponent.qml
|
||||||
qml/FancyEffectsContainer.qml
|
qml/FancyEffectsContainer.qml
|
||||||
qml/TypingPane.qml
|
qml/TypingPane.qml
|
||||||
@@ -213,19 +212,6 @@ qt_add_qml_module(neochat URI org.kde.neochat NO_PLUGIN
|
|||||||
qml/PieProgressBar.qml
|
qml/PieProgressBar.qml
|
||||||
qml/QuickFormatBar.qml
|
qml/QuickFormatBar.qml
|
||||||
qml/EmojiPicker.qml
|
qml/EmojiPicker.qml
|
||||||
qml/LoginStep.qml
|
|
||||||
qml/Login.qml
|
|
||||||
qml/Homeserver.qml
|
|
||||||
qml/Username.qml
|
|
||||||
qml/RegisterPassword.qml
|
|
||||||
qml/Captcha.qml
|
|
||||||
qml/Terms.qml
|
|
||||||
qml/Email.qml
|
|
||||||
qml/Password.qml
|
|
||||||
qml/LoginRegister.qml
|
|
||||||
qml/Loading.qml
|
|
||||||
qml/LoginMethod.qml
|
|
||||||
qml/Sso.qml
|
|
||||||
qml/UserDetailDialog.qml
|
qml/UserDetailDialog.qml
|
||||||
qml/CreateRoomDialog.qml
|
qml/CreateRoomDialog.qml
|
||||||
qml/EmojiDialog.qml
|
qml/EmojiDialog.qml
|
||||||
@@ -299,6 +285,7 @@ qt_add_qml_module(neochat URI org.kde.neochat NO_PLUGIN
|
|||||||
add_subdirectory(settings)
|
add_subdirectory(settings)
|
||||||
add_subdirectory(timeline)
|
add_subdirectory(timeline)
|
||||||
add_subdirectory(devtools)
|
add_subdirectory(devtools)
|
||||||
|
add_subdirectory(login)
|
||||||
|
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
qt_target_qml_sources(neochat QML_FILES qml/ShareAction.qml)
|
qt_target_qml_sources(neochat QML_FILES qml/ShareAction.qml)
|
||||||
@@ -390,7 +377,7 @@ if (NOT ANDROID AND NOT WIN32 AND NOT APPLE)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_include_directories(neochat PRIVATE ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/models ${CMAKE_CURRENT_SOURCE_DIR}/enums)
|
target_include_directories(neochat PRIVATE ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/models ${CMAKE_CURRENT_SOURCE_DIR}/enums)
|
||||||
target_link_libraries(neochat PRIVATE settingsplugin timelineplugin devtoolsplugin)
|
target_link_libraries(neochat PRIVATE settingsplugin timelineplugin devtoolsplugin loginplugin)
|
||||||
target_link_libraries(neochat PUBLIC
|
target_link_libraries(neochat PUBLIC
|
||||||
Qt::Core
|
Qt::Core
|
||||||
Qt::Quick
|
Qt::Quick
|
||||||
|
|||||||
23
src/login/CMakeLists.txt
Normal file
23
src/login/CMakeLists.txt
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
# SPDX-FileCopyrightText: 2024 James Graham <james.h.graham@protonmail.com>
|
||||||
|
# SPDX-License-Identifier: BSD-2-Clause
|
||||||
|
|
||||||
|
qt_add_library(login STATIC)
|
||||||
|
qt_add_qml_module(login
|
||||||
|
URI org.kde.neochat.login
|
||||||
|
OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/src/org/kde/neochat/login
|
||||||
|
QML_FILES
|
||||||
|
WelcomePage.qml
|
||||||
|
LoginStep.qml
|
||||||
|
Captcha.qml
|
||||||
|
Email.qml
|
||||||
|
Homeserver.qml
|
||||||
|
Loading.qml
|
||||||
|
Login.qml
|
||||||
|
LoginMethod.qml
|
||||||
|
LoginRegister.qml
|
||||||
|
Password.qml
|
||||||
|
RegisterPassword.qml
|
||||||
|
Sso.qml
|
||||||
|
Terms.qml
|
||||||
|
Username.qml
|
||||||
|
)
|
||||||
@@ -129,7 +129,7 @@ FormCard.FormCardPage {
|
|||||||
Loader {
|
Loader {
|
||||||
id: module
|
id: module
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
sourceComponent: Qt.createComponent('org.kde.neochat', root.initialStep)
|
sourceComponent: Qt.createComponent('org.kde.neochat.login', root.initialStep)
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
id: stepConnections
|
id: stepConnections
|
||||||
@@ -231,6 +231,7 @@ int main(int argc, char *argv[])
|
|||||||
Q_IMPORT_QML_PLUGIN(org_kde_neochat_settingsPlugin)
|
Q_IMPORT_QML_PLUGIN(org_kde_neochat_settingsPlugin)
|
||||||
Q_IMPORT_QML_PLUGIN(org_kde_neochat_timelinePlugin)
|
Q_IMPORT_QML_PLUGIN(org_kde_neochat_timelinePlugin)
|
||||||
Q_IMPORT_QML_PLUGIN(org_kde_neochat_devtoolsPlugin)
|
Q_IMPORT_QML_PLUGIN(org_kde_neochat_devtoolsPlugin)
|
||||||
|
Q_IMPORT_QML_PLUGIN(org_kde_neochat_loginPlugin)
|
||||||
|
|
||||||
qml_register_types_org_kde_neochat();
|
qml_register_types_org_kde_neochat();
|
||||||
qmlRegisterSingletonInstance("org.kde.neochat.config", 1, 0, "Config", NeoChatConfig::self());
|
qmlRegisterSingletonInstance("org.kde.neochat.config", 1, 0, "Config", NeoChatConfig::self());
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ Kirigami.Dialog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'WelcomePage'), {}, {
|
pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat.login', 'WelcomePage'), {}, {
|
||||||
title: i18nc("@title:window", "Login")
|
title: i18nc("@title:window", "Login")
|
||||||
});
|
});
|
||||||
if (switchUserButton.checked) {
|
if (switchUserButton.checked) {
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import QtQuick.Controls as QQC2
|
|||||||
import org.kde.kirigami as Kirigami
|
import org.kde.kirigami as Kirigami
|
||||||
|
|
||||||
import org.kde.neochat
|
import org.kde.neochat
|
||||||
|
import org.kde.neochat.login
|
||||||
import org.kde.neochat.settings
|
import org.kde.neochat.settings
|
||||||
import org.kde.neochat.config
|
import org.kde.neochat.config
|
||||||
import org.kde.neochat.accounts
|
import org.kde.neochat.accounts
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ FormCard.FormCardPage {
|
|||||||
id: addAccountDelegate
|
id: addAccountDelegate
|
||||||
text: i18n("Add Account")
|
text: i18n("Add Account")
|
||||||
icon.name: "list-add"
|
icon.name: "list-add"
|
||||||
onClicked: applicationWindow().pageStack.layers.push(Qt.createComponent('org.kde.neochat', 'WelcomePage'))
|
onClicked: applicationWindow().pageStack.layers.push(Qt.createComponent('org.kde.neochat.login', 'WelcomePage'))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user