-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from neochapay/master
Code update
- Loading branch information
Showing
15 changed files
with
253 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!DOCTYPE TS> | ||
<TS version="2.1"> | ||
<context> | ||
<name>AppLauncher</name> | ||
<message> | ||
<location filename="../qml/AppLauncher.qml" line="67"/> | ||
<source>Remove</source> | ||
<translation type="unfinished"></translation> | ||
</message> | ||
<message> | ||
<location filename="../qml/AppLauncher.qml" line="82"/> | ||
<source>Uninstall</source> | ||
<translation type="unfinished"></translation> | ||
</message> | ||
</context> | ||
<context> | ||
<name>AppSwitcher</name> | ||
<message> | ||
<location filename="../qml/AppSwitcher.qml" line="173"/> | ||
<source>Close | ||
All</source> | ||
<translation type="unfinished"></translation> | ||
</message> | ||
<message> | ||
<location filename="../qml/AppSwitcher.qml" line="187"/> | ||
<source>No apps open</source> | ||
<translation type="unfinished"></translation> | ||
</message> | ||
</context> | ||
<context> | ||
<name>BatteryPanel</name> | ||
<message> | ||
<location filename="../qml/BatteryPanel.qml" line="39"/> | ||
<source>Battery level</source> | ||
<translation type="unfinished"></translation> | ||
</message> | ||
</context> | ||
<context> | ||
<name>CommonPanel</name> | ||
<message> | ||
<location filename="../qml/CommonPanel.qml" line="42"/> | ||
<source>Close</source> | ||
<translation type="unfinished"></translation> | ||
</message> | ||
</context> | ||
<context> | ||
<name>LauncherItemDelegate</name> | ||
<message> | ||
<location filename="../qml/LauncherItemDelegate.qml" line="147"/> | ||
<source>Remove</source> | ||
<translation type="unfinished"></translation> | ||
</message> | ||
<message> | ||
<location filename="../qml/LauncherItemDelegate.qml" line="148"/> | ||
<source>Uninstall</source> | ||
<translation type="unfinished"></translation> | ||
</message> | ||
<message> | ||
<location filename="../qml/LauncherItemDelegate.qml" line="170"/> | ||
<source>Removing</source> | ||
<translation type="unfinished"></translation> | ||
</message> | ||
<message> | ||
<location filename="../qml/LauncherItemDelegate.qml" line="172"/> | ||
<source>Uninstalling</source> | ||
<translation type="unfinished"></translation> | ||
</message> | ||
</context> | ||
<context> | ||
<name>SimPanel</name> | ||
<message> | ||
<location filename="../qml/SimPanel.qml" line="76"/> | ||
<source>OK</source> | ||
<translation type="unfinished"></translation> | ||
</message> | ||
<message> | ||
<location filename="../qml/SimPanel.qml" line="87"/> | ||
<source>Clear</source> | ||
<translation type="unfinished"></translation> | ||
</message> | ||
<message> | ||
<location filename="../qml/SimPanel.qml" line="135"/> | ||
<source>No pin required!</source> | ||
<translation type="unfinished"></translation> | ||
</message> | ||
</context> | ||
<context> | ||
<name>USBModeSelector</name> | ||
<message> | ||
<location filename="../qml/USBModeSelector.qml" line="82"/> | ||
<source>Current mode: Charging only</source> | ||
<translation type="unfinished"></translation> | ||
</message> | ||
<message> | ||
<location filename="../qml/USBModeSelector.qml" line="98"/> | ||
<source>MTP Mode</source> | ||
<translation type="unfinished"></translation> | ||
</message> | ||
<message> | ||
<location filename="../qml/USBModeSelector.qml" line="118"/> | ||
<source>Mass Storage Mode</source> | ||
<translation type="unfinished"></translation> | ||
</message> | ||
<message> | ||
<location filename="../qml/USBModeSelector.qml" line="138"/> | ||
<source>Developer Mode</source> | ||
<translation type="unfinished"></translation> | ||
</message> | ||
</context> | ||
</TS> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
import QtQuick 2.1 | ||
import QtQuick.Controls 1.0 | ||
import QtQuick.Controls.Nemo 1.0 | ||
import QtQuick.Controls.Styles.Nemo 1.0 | ||
import QtQuick.Layouts 1.0 | ||
|
||
import org.nemomobile.lipstick 0.1 | ||
import org.nemomobile.devicelock 1.0 | ||
|
||
Item { | ||
id: root | ||
|
||
property bool shouldAuthenticate: Lipstick.compositor.visible | ||
&& authenticator.availableMethods !== 0 | ||
onShouldAuthenticateChanged: { | ||
if (shouldAuthenticate) { | ||
DeviceLock.authorization.requestChallenge() | ||
} else { | ||
authenticator.cancel() | ||
DeviceLock.authorization.relinquishChallenge() | ||
} | ||
} | ||
|
||
Component.onCompleted: { | ||
DeviceLock.authorization.requestChallenge() | ||
} | ||
|
||
Connections { | ||
target: DeviceLock.authorization | ||
onChallengeIssued: { | ||
authenticator.authenticate( | ||
DeviceLock.authorization.challengeCode, | ||
DeviceLock.authorization.allowedMethods) | ||
} | ||
} | ||
|
||
|
||
Authenticator { | ||
id: authenticator | ||
onAuthenticated: { | ||
DeviceLock.unlock(authenticationToken) | ||
} | ||
onFeedback: { | ||
console.log('### still locked', feedback, attemptsRemaining) | ||
} | ||
} | ||
|
||
ColumnLayout { | ||
anchors.fill: parent | ||
spacing: 40 | ||
|
||
TextField { | ||
id: lockCodeField | ||
readOnly: true | ||
echoMode: TextInput.PasswordEchoOnEdit | ||
anchors.horizontalCenter: parent.horizontalCenter | ||
} | ||
|
||
GridLayout { | ||
height: parent.height | ||
width: parent.width | ||
columns: 3 | ||
Repeater { | ||
model: ["1","2","3","4","5","6","7","8","9","Ca","0","OK"] | ||
delegate: | ||
Button { | ||
style: ButtonStyle {} | ||
Layout.fillWidth: true | ||
text: modelData | ||
onClicked: { | ||
if (text !== "Ca" && text !== "OK") { | ||
lockCodeField.insert(lockCodeField.cursorPosition, text) | ||
} else { | ||
if (text === "OK") { | ||
authenticator.enterLockCode(lockCodeField.text) | ||
lockCodeField.text = "" | ||
} else if (text === "Ca"){ | ||
lockCodeField.text = "" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.