git.iko.soy/cinny-click-packaging
on main help sign in
12 files changed+161−189
since splitsnapshots
unifiedsplit
.github/ISSUE_TEMPLATE/bug_report.md+32 .github/ISSUE_TEMPLATE/feature_request.md+22 .github/workflows/build.yml+31 .gitlab-ci.yml−59 README.md+1−3 manifest.json.in+1−1 patches/0008-Set-push-notifications-to-UTs-push-hook.patch+16−15 patches/0013-Disable-cinny-s-notification-sound.patch+36 po/cinny.nitanmarcel.pot+10−6 prebuild.sh+10−2 qml/Main.qml+2−96 qml/qml.qrc.depends−7
.github/ISSUE_TEMPLATE/bug_report.mdnew file+32
@@ -0,0 +1,32 @@
1+---
2+name: Bug report
3+about: Create a report to help us improve
4+title: ''
5+labels: ''
6+assignees: ''
7+
8+---
9+
10+# Please follow the general troubleshooting steps first:
11+
12+- [ ] This bug is not reproducible on https://app.cinny.in
13+- [ ] This bug is not mentioned in any issues here or in the [upstream repository](https://github.com/cinnyapp/cinny)
14+
15+**Describe the bug**
16+A clear and concise description of what the bug is.
17+
18+**To Reproduce**
19+Steps to reproduce the behavior:
20+1. Go to '...'
21+2. Click on '....'
22+3. Scroll down to '....'
23+4. See error
24+
25+**Expected behavior**
26+A clear and concise description of what you expected to happen.
27+
28+**Screenshots**
29+If applicable, add screenshots to help explain your problem.
30+
31+**Additional context**
32+Add any other context about the problem here.
.github/ISSUE_TEMPLATE/feature_request.mdnew file+22
@@ -0,0 +1,22 @@
1+---
2+name: Feature request
3+about: Suggest an idea for this project
4+title: ''
5+labels: ''
6+assignees: ''
7+
8+---
9+
10+- [ ] This feature request can't be implemented in the [upstream repository](https://github.com/cinnyapp/cinny)
11+
12+**Is your feature request related to a problem? Please describe.**
13+A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
14+
15+**Describe the solution you'd like**
16+A clear and concise description of what you want to happen.
17+
18+**Describe alternatives you've considered**
19+A clear and concise description of any alternative solutions or features you've considered.
20+
21+**Additional context**
22+Add any other context or screenshots about the feature request here.
.github/workflows/build.ymlnew file+31
@@ -0,0 +1,31 @@
1+name: Clickable Build
2+
3+on:
4+ push:
5+
6+jobs:
7+ build:
8+ strategy:
9+ matrix:
10+ arch: [amd64, arm64, armhf]
11+ runs-on: ubuntu-latest
12+ steps:
13+ - name: Checkout
14+ uses: actions/checkout@v3
15+ with:
16+ submodules: 'true'
17+ - name: Parse version
18+ run: |
19+ echo ARTIFACT_VERSION=$(cat prebuild.sh | grep "export REPO_VERSION=" | awk -F'"' '$0=$2')$(cat prebuild.sh | grep "export CLICK_VERSION_PREFIX=" | awk -F'"' '$0=$2') >> $GITHUB_ENV
20+ - name: Install clickable
21+ run: |
22+ python3 -m pip install clickable-ut
23+ - name: Build
24+ run: |
25+ clickable build --arch ${{ matrix.arch }}
26+ - name: Upload Artifacts
27+ uses: actions/upload-artifact@v3
28+ with:
29+ name: cinny.nitanmarcel_${{ env.ARTIFACT_VERSION }}_${{ matrix.arch }}
30+ path: build/*/app/*.click
31+ if-no-files-found: error
.gitlab-ci.ymldeleted−59
@@ -1,59 +0,0 @@
1−---
2−variables:
3− GIT_SUBMODULE_STRATEGY: recursive
4−
5−###############################################################################
6−# Define all YAML node anchors
7−###############################################################################
8−.node_anchors:
9− # `stage`
10− stage_build: &stage_build 'build'
11− # `image`
12− image_clickable_amd64: &image_clickable_amd64 'clickable/ci-16.04-amd64'
13− image_clickable_arm64: &image_clickable_arm64 'clickable/ci-16.04-arm64'
14− image_clickable_armhf: &image_clickable_armhf 'clickable/ci-16.04-armhf'
15− # `artifacts.paths`
16− paths_amd64: &paths_amd64
17− - 'build/x86_64-linux-gnu/app/*.click'
18− paths_arm64: &paths_arm64
19− - 'build/aarch64-linux-gnu/app/*.click'
20− paths_armhf: &paths_armhf
21− - 'build/arm-linux-gnueabihf/app/*.click'
22−
23−###############################################################################
24−# Define stages
25−###############################################################################
26−stages:
27− - *stage_build
28−
29−###############################################################################
30−# Define `build` template
31−###############################################################################
32−.build_click:
33− stage: *stage_build
34− script:
35− - 'clickable build'
36− - 'clickable review'
37− artifacts:
38− expire_in: '1 week'
39−
40−###############################################################################
41−# `build` stage: build clicks for `armhf`, `arm64` & `amd64`
42−###############################################################################
43−xenial_armhf_click:
44− extends: '.build_click'
45− image: *image_clickable_armhf
46− artifacts:
47− paths: *paths_armhf
48−
49−xenial_arm64_click:
50− extends: '.build_click'
51− image: *image_clickable_arm64
52− artifacts:
53− paths: *paths_arm64
54−
55−xenial_amd64_click:
56− extends: '.build_click'
57− image: *image_clickable_amd64
58− artifacts:
59− paths: *paths_amd64
README.md+1−3
@@ -4,12 +4,10 @@ Cinny is a Matrix client focusing primarily on simple, elegant and secure interf
44
55## License
66
7−Cinny source package licensed under [MIT](https://github.com/ajbura/cinny/blob/dev/LICENSE) (c) 2021 Ajay Bura (ajbura) and contributors.
7+Cinny source package licensed under [MIT](https://github.com/cinnyapp/cinny/blob/dev/LICENSE) (c) 2021 Ajay Bura (ajbura) and contributors.
88
99[Graphics](/svg/) by Ajay Bura (ajbura) licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) (c) by Ajay Bura (ajbura).
1010
11−Cinny mobile adaptation by [C0ffeeCode](https://github.com/C0ffeeCode/cinny/commits/adapt-mobile-width) under [MIT](https://github.com/ajbura/cinny/blob/dev/LICENSE) (c) 2021 Ajay Bura (ajbura) and contributors.
12−
1311Click packaging by [Marcel Alexandru Nitan](https://github.com/nitanmarcel/cinny-click-packaging) [GPLv3](https://github.com/nitanmarcel/cinny-click-packaging/blob/dev/LICENSE) (C) 2022 Marcel Alexandru Nitan.
1412
1513[![OpenStore](https://open-store.io/badges/en_US.png)](https://open-store.io/app/cinny.nitanmarcel)
manifest.json.in+1−1
@@ -15,7 +15,7 @@
1515 "push-helper": "push/push.json"
1616 }
1717 },
18− "version": "2.0.4",
18+ "version": "@CLICK_VERSION@",
1919 "maintainer": "Marcel Alexandru Nitan <nitan.marcel@protonmail.com>",
2020 "framework" : "@CLICK_FRAMEWORK@"
2121}
patches/0008-Set-push-notifications-to-UTs-push-hook.patch+16−15
@@ -1,25 +1,26 @@
1−From 4305381292b98fff780bef159014076897569e74 Mon Sep 17 00:00:00 2001
1+From fe881f37607a0d720b8a4d7f6b9d260173f621a5 Mon Sep 17 00:00:00 2001
22From: Marcel Alexandru Nitan <nitan.marcel@protonmail.com>
3−Date: Thu, 16 Jun 2022 16:05:12 +0300
4−Subject: [PATCH] Set push notifications to UTs push hook
3+Date: Thu, 16 Jun 2022 17:09:38 +0300
4+Subject: [PATCH] Add missing import in notification hook patch
55
66---
7− src/client/initMatrix.js | 31 +++++++++++++++++++++++++++++++
8− 1 file changed, 31 insertions(+)
7+ src/client/initMatrix.js | 32 ++++++++++++++++++++++++++++++++
8+ 1 file changed, 32 insertions(+)
99
1010diff --git a/src/client/initMatrix.js b/src/client/initMatrix.js
11−index aec2f3d..23c7598 100644
11+index aec2f3d..ac85e8e 100644
1212--- a/src/client/initMatrix.js
1313+++ b/src/client/initMatrix.js
14−@@ -2,6 +2,7 @@ import EventEmitter from 'events';
15− import * as sdk from 'matrix-js-sdk';
16− // import { logger } from 'matrix-js-sdk/lib/logger';
14+@@ -9,6 +9,8 @@ import RoomsInput from './state/RoomsInput';
15+ import Notifications from './state/Notifications';
16+ import { cryptoCallbacks } from './state/secretStorageKeys';
1717
18−+import { cons } from './state/cons';
19− import { secret } from './state/auth';
20− import RoomList from './state/RoomList';
21− import AccountData from './state/AccountData';
22−@@ -18,6 +19,12 @@ class InitMatrix extends EventEmitter {
18++import cons from './state/cons';
19++
20+ global.Olm = require('@matrix-org/olm');
21+
22+ // logger.disableAll();
23+@@ -18,6 +20,12 @@ class InitMatrix extends EventEmitter {
2324 await this.startClient();
2425 this.setupSync();
2526 this.listenEvents();
@@ -32,7 +33,7 @@ index aec2f3d..23c7598 100644
3233 }
3334
3435 async startClient() {
35−@@ -51,6 +58,30 @@ class InitMatrix extends EventEmitter {
36+@@ -51,6 +59,30 @@ class InitMatrix extends EventEmitter {
3637 this.matrixClient.setGlobalErrorOnUnknownDevices(false);
3738 }
3839
patches/0013-Disable-cinny-s-notification-sound.patchnew file+36
@@ -0,0 +1,36 @@
1+From 39642c26fb08db515272c070c512ed477df0d228 Mon Sep 17 00:00:00 2001
2+From: Marcel Alexandru Nitan <nitan.marcel@protonmail.com>
3+Date: Thu, 16 Jun 2022 16:09:35 +0300
4+Subject: [PATCH] Disable cinny's notification sound
5+
6+This is controlled by the matrix push server now and not by cinny
7+---
8+ src/client/state/settings.js | 11 ++++++-----
9+ 1 file changed, 6 insertions(+), 5 deletions(-)
10+
11+diff --git a/src/client/state/settings.js b/src/client/state/settings.js
12+index 7454be3..71521a5 100644
13+--- a/src/client/state/settings.js
14++++ b/src/client/state/settings.js
15+@@ -136,12 +136,13 @@ class Settings extends EventEmitter {
16+ }
17+
18+ getIsNotificationSounds() {
19+- if (typeof this.isNotificationSounds === 'boolean') return this.isNotificationSounds;
20++ return false;
21++ // if (typeof this.isNotificationSounds === 'boolean') return this.isNotificationSounds;
22+
23+- const settings = getSettings();
24+- if (settings === null) return true;
25+- if (typeof settings.isNotificationSounds === 'undefined') return true;
26+- return settings.isNotificationSounds;
27++ // const settings = getSettings();
28++ // if (settings === null) return true;
29++ // if (typeof settings.isNotificationSounds === 'undefined') return true;
30++ // return settings.isNotificationSounds;
31+ }
32+
33+ setter(action) {
34+--
35+2.30.2
36+
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 ""
prebuild.sh+10−2
@@ -3,17 +3,20 @@
33set -e
44
55export REPO_NAME="cinny"
6−export REPO_URL="https://github.com/ajbura/cinny"
6+export REPO_URL="https://github.com/cinnyapp/cinny"
77export REPO_BRANCH="dev"
88export APP_TARGET="dist"
99
10+export REPO_VERSION="2.0.4"
11+export CLICK_VERSION_PREFIX="notificationfix1"
12+
1013if [ -d "${ROOT}/${REPO_NAME}" ]; then
1114 echo "Cleaning up"
1215 rm -rf "${ROOT}/${REPO_NAME}" "${ROOT}/target"
1316fi
1417echo "Cloning source repo"
1518
16−git clone "${REPO_URL}" -b "${REPO_BRANCH}" "${ROOT}/${REPO_NAME}" --depth=1
19+git clone "${REPO_URL}" -b "${REPO_BRANCH}" "${ROOT}/${REPO_NAME}" --depth=1 --branch="v${REPO_VERSION}"
1720cd "${ROOT}/${REPO_NAME}"
1821
1922if [ -d "${ROOT}/patches" ]; then
@@ -33,4 +36,9 @@ echo "Run npm build"
3336npm run build
3437echo "Copying ${APP_TARGET}"
3538cp -r "${APP_TARGET}" "${ROOT}/target"
39+
40+sed -i "s/@CLICK_VERSION@/$REPO_VERSION$CLICK_VERSION_PREFIX/g" "${ROOT}/manifest.json.in"
41+
42+cat "${ROOT}/manifest.json.in"
43+
3644echo "Done. Creating click package."
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>