git.iko.soy/cinny-click-packaging
on main help sign in
Remove unused components; clean debug lines
bbdf38eMarcel Alexandru Nitan
po/cinny.nitanmarcel.pot+10−6
@@ -8,7 +8,7 @@ msgid ""
8msgstr ""
8msgstr ""
9"Project-Id-Version: cinny.nitanmarcel\n"
9"Project-Id-Version: cinny.nitanmarcel\n"
10"Report-Msgid-Bugs-To: \n"
10"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"
12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14"Language-Team: LANGUAGE <LL@li.org>\n"
14"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -17,26 +17,30 @@ msgstr ""
17"Content-Type: text/plain; charset=CHARSET\n"
17"Content-Type: text/plain; charset=CHARSET\n"
18"Content-Transfer-Encoding: 8bit\n"
18"Content-Transfer-Encoding: 8bit\n"
19
19
20−#: ../qml/DownloadPage.qml:35 ../qml/UploadPage.qml:37
20+#: ../qml/DownloadPage.qml:35
21−msgid "Content Picker"
21+msgid "Save With"
22msgstr ""
22msgstr ""
23
23
24#: ../qml/DownloadPage.qml:40 ../qml/UploadPage.qml:42
24#: ../qml/DownloadPage.qml:40 ../qml/UploadPage.qml:42
25msgid "Back"
25msgid "Back"
26msgstr ""
26msgstr ""
27
27
28−#: ../qml/Main.qml:180
28+#: ../qml/Main.qml:203
29msgid "Javascript Dialog"
29msgid "Javascript Dialog"
30msgstr ""
30msgstr ""
31
31
32−#: ../qml/Main.qml:192
32+#: ../qml/Main.qml:215
33msgid "Yes"
33msgid "Yes"
34msgstr ""
34msgstr ""
35
35
36−#: ../qml/Main.qml:197
36+#: ../qml/Main.qml:220
37msgid "Cancel"
37msgid "Cancel"
38msgstr ""
38msgstr ""
39
39
40+#: ../qml/UploadPage.qml:37
41+msgid "Chose"
42+msgstr ""
43+
40#: cinny.desktop.in.h:1
44#: cinny.desktop.in.h:1
41msgid "Cinny"
45msgid "Cinny"
42msgstr ""
46msgstr ""
qml/Main.qml+2−96
@@ -63,11 +63,8 @@ MainView {
63 }
63 }
64
64
65 Component.onCompleted: function () {
65 Component.onCompleted: function () {
66− theme.name = "" // set system theme
66+ theme.name = ""
67 appSettings.systemTheme = theme.name.substring(theme.name.lastIndexOf(".")+1)
67 appSettings.systemTheme = theme.name.substring(theme.name.lastIndexOf(".")+1)
68−
69− //appSettings.pushAppId = 'cinny.nitanmarcel_cinny'
70− console.log("appSettings.pushAppId " + appSettings.pushAppId)
71 }
68 }
72 onActiveChanged: () => {appSettings.windowActive = mainView.active}
69 onActiveChanged: () => {appSettings.windowActive = mainView.active}
73
70
@@ -97,9 +94,8 @@ MainView {
97 id : webView
94 id : webView
98 anchors.fill : parent
95 anchors.fill : parent
99 focus : true
96 focus : true
100− url : "http://localhost:19999/" // Qt.resolvedUrl(Backend.getIndexPath())
97+ url : "http://localhost:19999/"
101 webChannel: channel
98 webChannel: channel
102− //zoomFactor : 2.5
103 settings.pluginsEnabled : true
99 settings.pluginsEnabled : true
104 settings.javascriptEnabled : true
100 settings.javascriptEnabled : true
105 profile : WebEngineProfile {
101 profile : WebEngineProfile {
@@ -108,8 +104,6 @@ MainView {
108 persistentStoragePath : "/home/phablet/.local/share/cinny.nitanmarcel/QWebEngine"
104 persistentStoragePath : "/home/phablet/.local/share/cinny.nitanmarcel/QWebEngine"
109
105
110 onDownloadRequested: function (download) {
106 onDownloadRequested: function (download) {
111− console.log("Downloading")
112− console.log(download.path)
113 download.accept()
107 download.accept()
114 }
108 }
115
109
@@ -131,19 +125,6 @@ MainView {
131 })
125 })
132 }
126 }
133
127
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−
147 onFullScreenRequested : function (request) {
128 onFullScreenRequested : function (request) {
148 request.accept()
129 request.accept()
149 if (request.toggleOn)
130 if (request.toggleOn)
@@ -154,20 +135,6 @@ MainView {
154
135
155 }
136 }
156
137
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−
171 WebChannel {
138 WebChannel {
172 id: channel
139 id: channel
173 registeredObjects: [webChannelObject]
140 registeredObjects: [webChannelObject]
@@ -192,36 +159,6 @@ MainView {
192 setCurrentTheme(themeName)
159 setCurrentTheme(themeName)
193 }
160 }
194 }
161 }
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− }
225 }
162 }
226 }
163 }
227
164
@@ -233,36 +170,5 @@ MainView {
233 appSettings.pushToken = token
170 appSettings.pushToken = token
234 webChannelObject.matrixPushTokenChanged();
171 webChannelObject.matrixPushTokenChanged();
235 }
172 }
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− }
267 }
173 }
268}
174}
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>