git.iko.soy/cinny-click-packaging
on main help sign in
Remove unused components; clean debug lines
commitbbdf38ef4b7e6c1fd6c7e4ccc67b7fce7e52a81b authorMarcel Alexandru Nitan <nitan.marcel@protonmail.com> dateFri 24 Jun 2022, 13:13 (4 years ago) parent57264ef
3 files changed+12−109
po/cinny.nitanmarcel.pot+10−6 qml/Main.qml+2−96 qml/qml.qrc.depends−7
po/cinny.nitanmarcel.pot+10−6
@@ -8,7 +8,7 @@ msgid ""
88msgstr ""
99"Project-Id-Version: cinny.nitanmarcel\n"
1010"Report-Msgid-Bugs-To: \n"
11−"POT-Creation-Date: 2022-04-01 20:14+0000\n"
11+"POT-Creation-Date: 2022-06-16 14:04+0000\n"
1212"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -17,26 +17,30 @@ msgstr ""
1717"Content-Type: text/plain; charset=CHARSET\n"
1818"Content-Transfer-Encoding: 8bit\n"
1919
20−#: ../qml/DownloadPage.qml:35 ../qml/UploadPage.qml:37
21−msgid "Content Picker"
20+#: ../qml/DownloadPage.qml:35
21+msgid "Save With"
2222msgstr ""
2323
2424#: ../qml/DownloadPage.qml:40 ../qml/UploadPage.qml:42
2525msgid "Back"
2626msgstr ""
2727
28−#: ../qml/Main.qml:180
28+#: ../qml/Main.qml:203
2929msgid "Javascript Dialog"
3030msgstr ""
3131
32−#: ../qml/Main.qml:192
32+#: ../qml/Main.qml:215
3333msgid "Yes"
3434msgstr ""
3535
36−#: ../qml/Main.qml:197
36+#: ../qml/Main.qml:220
3737msgid "Cancel"
3838msgstr ""
3939
40+#: ../qml/UploadPage.qml:37
41+msgid "Chose"
42+msgstr ""
43+
4044#: cinny.desktop.in.h:1
4145msgid "Cinny"
4246msgstr ""
qml/Main.qml+2−96
@@ -63,11 +63,8 @@ MainView {
6363 }
6464
6565 Component.onCompleted: function () {
66− theme.name = "" // set system theme
66+ theme.name = ""
6767 appSettings.systemTheme = theme.name.substring(theme.name.lastIndexOf(".")+1)
68−
69− //appSettings.pushAppId = 'cinny.nitanmarcel_cinny'
70− console.log("appSettings.pushAppId " + appSettings.pushAppId)
7168 }
7269 onActiveChanged: () => {appSettings.windowActive = mainView.active}
7370
@@ -97,9 +94,8 @@ MainView {
9794 id : webView
9895 anchors.fill : parent
9996 focus : true
100− url : "http://localhost:19999/" // Qt.resolvedUrl(Backend.getIndexPath())
97+ url : "http://localhost:19999/"
10198 webChannel: channel
102− //zoomFactor : 2.5
10399 settings.pluginsEnabled : true
104100 settings.javascriptEnabled : true
105101 profile : WebEngineProfile {
@@ -108,8 +104,6 @@ MainView {
108104 persistentStoragePath : "/home/phablet/.local/share/cinny.nitanmarcel/QWebEngine"
109105
110106 onDownloadRequested: function (download) {
111− console.log("Downloading")
112− console.log(download.path)
113107 download.accept()
114108 }
115109
@@ -131,19 +125,6 @@ MainView {
131125 })
132126 }
133127
134− onJavaScriptDialogRequested: function (request) {
135− request.accepted = true;
136− var popup = PopupUtils.open(jsDialogComponent, this, {"title": request.title, "message": request.message})
137− popup.dialogAccepted.connect(function () {
138− request.dialogAccept()
139− PopupUtils.close(popup)
140− })
141− popup.dialogRejected.connect(function () {
142− request.dialogReject()
143− PopupUtils.close(popup)
144− })
145− }
146−
147128 onFullScreenRequested : function (request) {
148129 request.accept()
149130 if (request.toggleOn)
@@ -154,20 +135,6 @@ MainView {
154135
155136 }
156137
157− Connections {
158− target: UriHandler
159−
160− onOpened: {
161− console.log('Open from UriHandler')
162−
163− if (uris.length > 0) {
164− if (uris[0].match(/^cinny:\/\/sso\/\?loginToken=.*/)) {
165− webView.url = "http://localhost:19999/" + uris[0].replace("cinny://sso/", "");
166− }
167− }
168− }
169− }
170−
171138 WebChannel {
172139 id: channel
173140 registeredObjects: [webChannelObject]
@@ -192,36 +159,6 @@ MainView {
192159 setCurrentTheme(themeName)
193160 }
194161 }
195−
196− Component {
197− id: jsDialogComponent
198−
199− Dialog {
200−
201− id: jsDialog
202−
203− title: i18n.tr("Javascript Dialog")
204− property var message
205−
206− signal dialogAccepted()
207− signal dialogRejected()
208−
209− Label {
210− wrapMode: Text.WordWrap
211− text: jsDialog.message
212− }
213−
214− Button {
215− text: i18n.tr("Yes")
216− color: UbuntuColors.green
217− onClicked: () => dialogAccepted()
218− }
219− Button {
220− text: i18n.tr("Cancel")
221− onClicked: () => dialogRejected()
222− }
223− }
224− }
225162 }
226163 }
227164
@@ -233,36 +170,5 @@ MainView {
233170 appSettings.pushToken = token
234171 webChannelObject.matrixPushTokenChanged();
235172 }
236−
237− function sendPushNotification(icon, title, body) {
238− var req = new XMLHttpRequest();
239− req.open("post", "https://push.ubports.com/notify", true);
240− req.setRequestHeader("Content-type", "application/json");
241− req.onreadystatechange = function() {
242− if ( req.readyState === XMLHttpRequest.DONE ) {
243− console.log("✍ Answer:", req.responseText);
244− }
245− }
246− var approxExpire = new Date ();
247− approxExpire.setUTCMinutes(approxExpire.getUTCMinutes()+10);
248− req.send(JSON.stringify({
249− "appid" : "cinny.nitanmarcel_cinny",
250− "expire_on": approxExpire.toISOString(),
251− "token": appSettings.pushToken,
252− "data": {
253− "notification": {
254− "card": {
255− "icon": icon,
256− "summary": title,
257− "body": body,
258− "popup": true,
259− "persist": true
260− },
261− "vibrate": true,
262− "sound": true
263− }
264− }
265− }));
266− }
267173 }
268174}
qml/qml.qrc.dependsdeleted−7
@@ -1,7 +0,0 @@
1−<RCC>
2− <qresource prefix="/">
3− <file>Main.qml</file>
4− <file>DownloadPage.qml</file>
5− <file>UploadPage.qml</file>
6− </qresource>
7−</RCC>