mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
Use proper URL
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
18f1452b04
commit
156605c2fa
@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>506</width>
|
<width>802</width>
|
||||||
<height>515</height>
|
<height>629</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@ -19,9 +19,21 @@
|
|||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Form</string>
|
<string>Form</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="autoFillBackground">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">background-color:#faf;</string>
|
||||||
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="6" column="0">
|
<item row="16" column="0">
|
||||||
<widget class="QLabel" name="bottomLabel">
|
<widget class="QLabel" name="bottomLabel">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>TextLabel</string>
|
<string>TextLabel</string>
|
||||||
</property>
|
</property>
|
||||||
@ -30,16 +42,16 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="14" column="0">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="horizontalSpacer">
|
<spacer name="horizontalSpacer_6">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Minimum</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>40</width>
|
<width>40</width>
|
||||||
@ -49,83 +61,31 @@
|
|||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<widget class="QPushButton" name="hostButton">
|
||||||
<item>
|
<property name="sizePolicy">
|
||||||
<spacer name="verticalSpacer_2">
|
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
||||||
<property name="orientation">
|
<horstretch>0</horstretch>
|
||||||
<enum>Qt::Vertical</enum>
|
<verstretch>0</verstretch>
|
||||||
</property>
|
</sizepolicy>
|
||||||
<property name="sizeType">
|
</property>
|
||||||
<enum>QSizePolicy::Minimum</enum>
|
<property name="font">
|
||||||
</property>
|
<font>
|
||||||
<property name="sizeHint" stdset="0">
|
<underline>true</underline>
|
||||||
<size>
|
</font>
|
||||||
<width>20</width>
|
</property>
|
||||||
<height>13</height>
|
<property name="text">
|
||||||
</size>
|
<string>Host your own server</string>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
<property name="flat">
|
||||||
</item>
|
<bool>true</bool>
|
||||||
<item>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
</widget>
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_2">
|
|
||||||
<property name="text">
|
|
||||||
<string>Ser&ver Address</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>leUrl</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="OCC::PostfixLineEdit" name="leUrl">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="placeholderText">
|
|
||||||
<string>https://...</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="urlLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="verticalSpacer_3">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Minimum</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>18</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="horizontalSpacer_2">
|
<spacer name="horizontalSpacer_5">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Minimum</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>40</width>
|
<width>40</width>
|
||||||
@ -136,26 +96,7 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="3" column="0">
|
||||||
<widget class="QLabel" name="errorLabel">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Maximum">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Error Label</string>
|
|
||||||
</property>
|
|
||||||
<property name="textFormat">
|
|
||||||
<enum>Qt::RichText</enum>
|
|
||||||
</property>
|
|
||||||
<property name="openExternalLinks">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="topLabel">
|
<widget class="QLabel" name="topLabel">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
@ -177,8 +118,113 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0">
|
<item row="11" column="0" rowspan="2">
|
||||||
<spacer name="verticalSpacer">
|
<layout class="QHBoxLayout" name="buttons" stretch="0,0,0,0">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>20</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_3">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="createAccountButton">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>150</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="autoFillBackground">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Register with a provider</string>
|
||||||
|
</property>
|
||||||
|
<property name="default">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="loginButton">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>150</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Log in</string>
|
||||||
|
</property>
|
||||||
|
<property name="autoDefault">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="default">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="flat">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_4">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="slideImage">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>100</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="pixmap">
|
||||||
|
<pixmap resource="../../../theme.qrc">:/client/theme/colored/wizard-files.svg</pixmap>
|
||||||
|
</property>
|
||||||
|
<property name="scaledContents">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="0">
|
||||||
|
<spacer name="verticalSpacer_4">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
</property>
|
</property>
|
||||||
@ -188,25 +234,212 @@
|
|||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>20</width>
|
<width>20</width>
|
||||||
<height>200</height>
|
<height>20</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="0">
|
<item row="2" column="0">
|
||||||
<layout class="QHBoxLayout" name="resultLayout">
|
<widget class="QLabel" name="slideLabel">
|
||||||
<property name="spacing">
|
<property name="font">
|
||||||
<number>0</number>
|
<font>
|
||||||
|
<pointsize>12</pointsize>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
</property>
|
</property>
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0">
|
|
||||||
<widget class="QPushButton" name="createAccountButton">
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Create a new account</string>
|
<string>SlideshowLabel</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<widget class="QWidget" name="login" native="true">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>80</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true"/>
|
||||||
|
</property>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="serverBox">
|
||||||
|
<property name="sizeConstraint">
|
||||||
|
<enum>QLayout::SetDefaultConstraint</enum>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Preferred</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer_2">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::MinimumExpanding</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_2">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Ignored">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Ser&ver Address</string>
|
||||||
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>leUrl</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="OCC::PostfixLineEdit" name="leUrl">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Ignored">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="placeholderText">
|
||||||
|
<string>https://...</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="resultLayout">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="urlLabel">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="errorLabel">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Error Label</string>
|
||||||
|
</property>
|
||||||
|
<property name="textFormat">
|
||||||
|
<enum>Qt::RichText</enum>
|
||||||
|
</property>
|
||||||
|
<property name="openExternalLinks">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer_3">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::MinimumExpanding</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_2">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Preferred</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<spacer name="verticalSpacer_5">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::MinimumExpanding</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
@ -216,6 +449,8 @@
|
|||||||
<header>wizard/postfixlineedit.h</header>
|
<header>wizard/postfixlineedit.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources/>
|
<resources>
|
||||||
|
<include location="../../../theme.qrc"/>
|
||||||
|
</resources>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
|||||||
@ -22,6 +22,9 @@
|
|||||||
#include <QSsl>
|
#include <QSsl>
|
||||||
#include <QSslCertificate>
|
#include <QSslCertificate>
|
||||||
#include <QNetworkAccessManager>
|
#include <QNetworkAccessManager>
|
||||||
|
#include <QPropertyAnimation>
|
||||||
|
#include <QGraphicsPixmapItem>
|
||||||
|
#include <QtSvg/QSvgRenderer>
|
||||||
|
|
||||||
#include "QProgressIndicator.h"
|
#include "QProgressIndicator.h"
|
||||||
|
|
||||||
@ -68,13 +71,43 @@ OwncloudSetupPage::OwncloudSetupPage(QWidget *parent)
|
|||||||
slotUrlChanged(QLatin1String("")); // don't jitter UI
|
slotUrlChanged(QLatin1String("")); // don't jitter UI
|
||||||
connect(_ui.leUrl, &QLineEdit::textChanged, this, &OwncloudSetupPage::slotUrlChanged);
|
connect(_ui.leUrl, &QLineEdit::textChanged, this, &OwncloudSetupPage::slotUrlChanged);
|
||||||
connect(_ui.leUrl, &QLineEdit::editingFinished, this, &OwncloudSetupPage::slotUrlEditFinished);
|
connect(_ui.leUrl, &QLineEdit::editingFinished, this, &OwncloudSetupPage::slotUrlEditFinished);
|
||||||
|
connect(_ui.loginButton, &QPushButton::clicked, this, &OwncloudSetupPage::slotLogin);
|
||||||
connect(_ui.createAccountButton, &QPushButton::clicked, this, &OwncloudSetupPage::slotGotoProviderList);
|
connect(_ui.createAccountButton, &QPushButton::clicked, this, &OwncloudSetupPage::slotGotoProviderList);
|
||||||
|
|
||||||
addCertDial = new AddCertificateDialog(this);
|
addCertDial = new AddCertificateDialog(this);
|
||||||
|
|
||||||
|
_ui.login->hide();
|
||||||
|
_slideshow.append(qMakePair(QString("nextcloud"), tr("Keep your data secure and under your control")));
|
||||||
|
_slideshow.append(qMakePair(QString("files"), tr("Secure collaboration & file exchange")));
|
||||||
|
_slideshow.append(qMakePair(QString("groupware"), tr("Easy-to-use web mail, calendaring & contacts")));
|
||||||
|
_slideshow.append(qMakePair(QString("talk"), tr("Screensharing, online meetings & web conferences")));
|
||||||
|
|
||||||
|
_ui.slideLabel->setStyleSheet(QString("color:%1;").arg(theme->wizardHeaderBackgroundColor().name()));
|
||||||
|
_currentSlide = -1;
|
||||||
|
nextSlide();
|
||||||
|
|
||||||
|
QTimer *timer = new QTimer(this);
|
||||||
|
connect(timer, SIGNAL(timeout()), this, SLOT(nextSlide()));
|
||||||
|
timer->start(2500);
|
||||||
|
setStyleSheet(QString("background-color:%1; color:%2 QLabel { color:%2; } QSpacerItem { color: red; }").arg(theme->wizardHeaderBackgroundColor().name(), theme->wizardHeaderTitleColor().name()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void OwncloudSetupPage::nextSlide()
|
||||||
|
{
|
||||||
|
if (_currentSlide < _slideshow.length()-1) {
|
||||||
|
_currentSlide++;
|
||||||
|
} else {
|
||||||
|
_currentSlide = 0;
|
||||||
|
}
|
||||||
|
QPixmap pixmap = QIcon(Theme::hidpiFileName(":/client/theme/colored/wizard-" + _slideshow.at(_currentSlide).first + ".svg")).pixmap(QSize(1024, 1024));
|
||||||
|
_ui.slideImage->setPixmap(pixmap.scaled(QSize(_ui.slideImage->size().height(), _ui.slideImage->size().height()), Qt::KeepAspectRatio, Qt::SmoothTransformation));
|
||||||
|
_ui.slideLabel->setText(_slideshow.at(_currentSlide).second);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void OwncloudSetupPage::setServerUrl(const QString &newUrl)
|
void OwncloudSetupPage::setServerUrl(const QString &newUrl)
|
||||||
{
|
{
|
||||||
|
_ocWizard->setRegistration(false);
|
||||||
_oCUrl = newUrl;
|
_oCUrl = newUrl;
|
||||||
if (_oCUrl.isEmpty()) {
|
if (_oCUrl.isEmpty()) {
|
||||||
_ui.leUrl->clear();
|
_ui.leUrl->clear();
|
||||||
@ -100,10 +133,21 @@ void OwncloudSetupPage::setupCustomization()
|
|||||||
WizardCommon::setupCustomMedia(variant, _ui.bottomLabel);
|
WizardCommon::setupCustomMedia(variant, _ui.bottomLabel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void OwncloudSetupPage::slotLogin()
|
||||||
|
{
|
||||||
|
_ui.login->setMaximumHeight(0);
|
||||||
|
QPropertyAnimation *animation = new QPropertyAnimation(_ui.login, "maximumHeight");
|
||||||
|
animation->setDuration(0);
|
||||||
|
animation->setStartValue(500);
|
||||||
|
animation->setEndValue(500);
|
||||||
|
_ui.login->show();
|
||||||
|
wizard()->resize(wizard()->sizeHint());
|
||||||
|
animation->start();
|
||||||
|
}
|
||||||
void OwncloudSetupPage::slotGotoProviderList()
|
void OwncloudSetupPage::slotGotoProviderList()
|
||||||
{
|
{
|
||||||
|
// todo set _ocWizard->registation so we have the url in webview.cpp
|
||||||
setServerUrl("http://localhost:8113/");
|
_ocWizard->setRegistration(true);
|
||||||
_ocWizard->setAuthType(DetermineAuthTypeJob::AuthType::WebViewFlow);
|
_ocWizard->setAuthType(DetermineAuthTypeJob::AuthType::WebViewFlow);
|
||||||
_authTypeKnown = true;
|
_authTypeKnown = true;
|
||||||
_checking = false;
|
_checking = false;
|
||||||
@ -184,6 +228,7 @@ void OwncloudSetupPage::initializePage()
|
|||||||
validatePage();
|
validatePage();
|
||||||
setVisible(false);
|
setVisible(false);
|
||||||
}
|
}
|
||||||
|
wizard()->resize(wizard()->sizeHint());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool OwncloudSetupPage::urlHasChanged()
|
bool OwncloudSetupPage::urlHasChanged()
|
||||||
@ -300,11 +345,13 @@ void OwncloudSetupPage::setErrorString(const QString &err, bool retryHTTPonly)
|
|||||||
_checking = false;
|
_checking = false;
|
||||||
emit completeChanged();
|
emit completeChanged();
|
||||||
stopSpinner();
|
stopSpinner();
|
||||||
|
wizard()->resize(wizard()->sizeHint());
|
||||||
}
|
}
|
||||||
|
|
||||||
void OwncloudSetupPage::startSpinner()
|
void OwncloudSetupPage::startSpinner()
|
||||||
{
|
{
|
||||||
_ui.resultLayout->setEnabled(true);
|
_ui.resultLayout->setEnabled(true);
|
||||||
|
_ui.urlLabel->setVisible(false);
|
||||||
_progressIndi->setVisible(true);
|
_progressIndi->setVisible(true);
|
||||||
_progressIndi->startAnimation();
|
_progressIndi->startAnimation();
|
||||||
}
|
}
|
||||||
@ -312,6 +359,7 @@ void OwncloudSetupPage::startSpinner()
|
|||||||
void OwncloudSetupPage::stopSpinner()
|
void OwncloudSetupPage::stopSpinner()
|
||||||
{
|
{
|
||||||
_ui.resultLayout->setEnabled(false);
|
_ui.resultLayout->setEnabled(false);
|
||||||
|
_ui.urlLabel->setVisible(true);
|
||||||
_progressIndi->setVisible(false);
|
_progressIndi->setVisible(false);
|
||||||
_progressIndi->stopAnimation();
|
_progressIndi->stopAnimation();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -60,10 +60,12 @@ public slots:
|
|||||||
void startSpinner();
|
void startSpinner();
|
||||||
void stopSpinner();
|
void stopSpinner();
|
||||||
void slotCertificateAccepted();
|
void slotCertificateAccepted();
|
||||||
|
void nextSlide();
|
||||||
|
|
||||||
protected slots:
|
protected slots:
|
||||||
void slotUrlChanged(const QString &);
|
void slotUrlChanged(const QString &);
|
||||||
void slotUrlEditFinished();
|
void slotUrlEditFinished();
|
||||||
|
void slotLogin();
|
||||||
void slotGotoProviderList();
|
void slotGotoProviderList();
|
||||||
|
|
||||||
void setupCustomization();
|
void setupCustomization();
|
||||||
@ -88,6 +90,10 @@ private:
|
|||||||
QString _remoteFolder;
|
QString _remoteFolder;
|
||||||
AddCertificateDialog *addCertDial;
|
AddCertificateDialog *addCertDial;
|
||||||
OwncloudWizard *_ocWizard;
|
OwncloudWizard *_ocWizard;
|
||||||
|
|
||||||
|
QList<QPair<QString, QString>> _slideshow;
|
||||||
|
int _currentSlide;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace OCC
|
} // namespace OCC
|
||||||
|
|||||||
@ -53,6 +53,7 @@ OwncloudWizard::OwncloudWizard(QWidget *parent)
|
|||||||
, _credentialsPage(0)
|
, _credentialsPage(0)
|
||||||
, _webViewPage(new WebViewPage(this))
|
, _webViewPage(new WebViewPage(this))
|
||||||
, _setupLog()
|
, _setupLog()
|
||||||
|
, _registration(false)
|
||||||
{
|
{
|
||||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||||
setPage(WizardCommon::Page_ServerSetup, _setupPage);
|
setPage(WizardCommon::Page_ServerSetup, _setupPage);
|
||||||
@ -128,6 +129,15 @@ QString OwncloudWizard::ocUrl() const
|
|||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool OwncloudWizard::registration() {
|
||||||
|
return _registration;
|
||||||
|
}
|
||||||
|
|
||||||
|
void OwncloudWizard::setRegistration(bool registration) {
|
||||||
|
_registration = registration;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void OwncloudWizard::enableFinishOnResultWidget(bool enable)
|
void OwncloudWizard::enableFinishOnResultWidget(bool enable)
|
||||||
{
|
{
|
||||||
_resultPage->setComplete(enable);
|
_resultPage->setComplete(enable);
|
||||||
|
|||||||
@ -59,6 +59,8 @@ public:
|
|||||||
void setAccount(AccountPtr account);
|
void setAccount(AccountPtr account);
|
||||||
AccountPtr account() const;
|
AccountPtr account() const;
|
||||||
void setOCUrl(const QString &);
|
void setOCUrl(const QString &);
|
||||||
|
bool registration();
|
||||||
|
void setRegistration(bool registration);
|
||||||
|
|
||||||
void setupCustomMedia(QVariant, QLabel *);
|
void setupCustomMedia(QVariant, QLabel *);
|
||||||
QString ocUrl() const;
|
QString ocUrl() const;
|
||||||
@ -108,6 +110,8 @@ private:
|
|||||||
|
|
||||||
QStringList _setupLog;
|
QStringList _setupLog;
|
||||||
|
|
||||||
|
bool _registration;
|
||||||
|
|
||||||
friend class OwncloudSetupWizard;
|
friend class OwncloudSetupWizard;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -30,8 +30,13 @@ WebViewPage::WebViewPage(QWidget *parent)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void WebViewPage::initializePage() {
|
void WebViewPage::initializePage() {
|
||||||
auto url = _ocWizard->ocUrl();
|
QString url;
|
||||||
url += "/index.php/login/flow";
|
if (_ocWizard->registration()) {
|
||||||
|
url = "https://nextcloud.com/register";
|
||||||
|
} else {
|
||||||
|
url = _ocWizard->ocUrl();
|
||||||
|
url += "/index.php/login/flow";
|
||||||
|
}
|
||||||
qCInfo(lcWizardWebiewPage()) << "Url to auth at: " << url;
|
qCInfo(lcWizardWebiewPage()) << "Url to auth at: " << url;
|
||||||
_webView->setUrl(QUrl(url));
|
_webView->setUrl(QUrl(url));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -117,5 +117,9 @@
|
|||||||
<file>theme/white/state-warning-64.png</file>
|
<file>theme/white/state-warning-64.png</file>
|
||||||
<file>theme/white/state-warning-128.png</file>
|
<file>theme/white/state-warning-128.png</file>
|
||||||
<file>theme/white/state-warning-256.png</file>
|
<file>theme/white/state-warning-256.png</file>
|
||||||
|
<file>theme/colored/wizard-files.svg</file>
|
||||||
|
<file>theme/colored/wizard-groupware.svg</file>
|
||||||
|
<file>theme/colored/wizard-nextcloud.svg</file>
|
||||||
|
<file>theme/colored/wizard-talk.svg</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user