Unverified Commit c29506e4 authored by Haelwenn's avatar Haelwenn

Fork Tooter to Kyclos

parent d67a4c22
# Tooter
# Kyclos
Tooter is Mastodon client for Sailfish OS. It is a free, open-source social network. A decentralized alternative to commercial platforms, it avoids the risks of a single company monopolizing your communication.
## Screenshot
<img width="200" title="Simple and cute cover" src="https://grave-design.com/images/tooter/sailfishos-tooter-cover.png"> <img width="200" title="Never miss a notification" src="https://grave-design.com/images/tooter/sailfishos-tooter-notifications.png"> <img width="200" title="Rich timeline with media display" src="https://grave-design.com/images/tooter/sailfishos-tooter-home.png"> <img width="200" title="Media upload and spoiler toots" src="https://grave-design.com/images/tooter/sailfishos-tooter-conversation.png"> <img width="200" title="Reading mode for Articles" src="https://grave-design.com/images/tooter/sailfishos-tooter-reading-mode.png"> <img width="200" title="Save up on your data plan" src="https://grave-design.com/images/tooter/sailfishos-tooter-settings.png"> <img width="200" title="Username prediction while typing" src="https://grave-design.com/images/tooter/sailfishos-tooter-autocomplete.png"> <img width="200" title="Simple user search" src="https://grave-design.com/images/tooter/sailfishos-tooter-usersearch.png">
## License
`// TODO`
Kyclos is a Pleroma client for Sailfish OS (Silica Qt).
[D-BUS Service]
Name=ba.dysko.harbour.tooter
Exec=/usr/bin/invoker --type=silica-qt5 --desktop-file=harbour-tooter.desktop -s -n /usr/bin/harbour-tooter
\ No newline at end of file
[D-BUS Service]
Name=social.pleroma.harbour.kyclos
Exec=/usr/bin/invoker --type=silica-qt5 --desktop-file=harbour-kyclos.desktop -s -n /usr/bin/harbour-kyclos
\ No newline at end of file
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="ba.dysko.harbour.tooter">
<interface name="social.pleroma.harbour.kyclos">
<method name="showtoot">
<annotation name="org.freedesktop.DBus.Method.NoReply" value="true" />
<arg name="key" type="as" direction="in" />
......
appIcon=/usr/share/harbour-tooter/config/icon-lock-harbour-tooter.png
x-nemo-icon=/usr/share/harbour-tooter/config/icon-lock-harbour-tooter.png
appIcon=/usr/share/harbour-kyclos/config/icon-lock-harbour-kyclos.png
x-nemo-icon=/usr/share/harbour-kyclos/config/icon-lock-harbour-kyclos.png
x-nemo-priority=120
x-nemo-feedback=sms_exists
x-nemo-led-disabled-without-body-and-summary=false
[Desktop Entry]
Type=Application
X-Nemo-Application-Type=silica-qt5
Icon=harbour-kyclos
Exec=harbour-kyclos
Name=Kyclos
......@@ -10,7 +10,7 @@
# - translation filenames have to be changed
# The name of your application
TARGET = harbour-tooter
TARGET = harbour-kyclos
CONFIG += sailfishapp
......@@ -24,22 +24,22 @@ DEFINES += "APPVERSION=\\\"$${SPECVERSION}\\\""
DEFINES += "APPNAME=\\\"$${TARGET}\\\""
!exists( src/dbusAdaptor.h ) {
system(qdbusxml2cpp config/ba.dysko.harbour.tooter.xml -i dbus.h -a src/dbusAdaptor)
system(qdbusxml2cpp config/social.pleroma.harbour.kyclos.xml -i dbus.h -a src/dbusAdaptor)
}
config.path = /usr/share/$${TARGET}/config/
config.files = config/icon-lock-harbour-tooter.png
config.files = config/icon-lock-harbour-kyclos.png
notification_categories.path = /usr/share/lipstick/notificationcategories
notification_categories.files = config/x-harbour.tooter.activity.*
notification_categories.files = config/x-harbour.kyclos.activity.*
dbus_services.path = /usr/share/dbus-1/services/
dbus_services.files = config/ba.dysko.harbour.tooter.service
dbus_services.files = config/social.pleroma.harbour.kyclos.service
interfaces.path = /usr/share/dbus-1/interfaces/
interfaces.files = config/ba.dysko.harbour.tooter.xml
interfaces.files = config/social.pleroma.harbour.kyclos.xml
SOURCES += src/harbour-tooter.cpp
SOURCES += src/harbour-kyclos.cpp
SOURCES += src/imageuploader.cpp
SOURCES += src/filedownloader.cpp
SOURCES += src/notifications.cpp
......@@ -52,7 +52,7 @@ HEADERS += src/notifications.h
HEADERS += src/dbusAdaptor.h
HEADERS += src/dbus.h
DISTFILES += qml/harbour-tooter.qml \
DISTFILES += qml/harbour-kyclos.qml \
qml/pages/components/VisualContainer.qml \
qml/pages/components/MiniStatus.qml \
qml/pages/components/MiniHeader.qml \
......@@ -79,18 +79,18 @@ DISTFILES += qml/harbour-tooter.qml \
qml/images/verified.svg \
qml/images/local.svg \
qml/images/federated.svg \
qml/images/tooter.svg \
qml/images/kyclos.svg \
qml/lib/Mastodon.js \
qml/lib/Worker.js \
qml/images/boosted.svg \
config/icon-lock-harbour-tooter.png \
config/x-harbour.tooter.activity.conf \
rpm/harbour-tooter.changes \
rpm/harbour-tooter.changes.run.in \
rpm/harbour-tooter.spec \
rpm/harbour-tooter.yaml \
config/icon-lock-harbour-kyclos.png \
config/x-harbour.kyclos.activity.conf \
rpm/harbour-kyclos.changes \
rpm/harbour-kyclos.changes.run.in \
rpm/harbour-kyclos.spec \
rpm/harbour-kyclos.yaml \
translations/*.ts \
harbour-tooter.desktop
harbour-kyclos.desktop
SAILFISHAPP_ICONS = 86x86 108x108 128x128 172x172
......@@ -102,16 +102,16 @@ CONFIG += sailfishapp_i18n
# planning to localize your app, remember to comment out the
# following TRANSLATIONS line. And also do not forget to
# modify the localized app name in the the .desktop file.
TRANSLATIONS += translations/harbour-tooter-de.ts
TRANSLATIONS += translations/harbour-tooter-el.ts
TRANSLATIONS += translations/harbour-tooter-es.ts
TRANSLATIONS += translations/harbour-tooter-fi.ts
TRANSLATIONS += translations/harbour-tooter-fr.ts
TRANSLATIONS += translations/harbour-tooter-nl.ts
TRANSLATIONS += translations/harbour-tooter-nl_BE.ts
TRANSLATIONS += translations/harbour-tooter-oc.ts
TRANSLATIONS += translations/harbour-tooter-pl.ts
TRANSLATIONS += translations/harbour-tooter-ru.ts
TRANSLATIONS += translations/harbour-tooter-sr.ts
TRANSLATIONS += translations/harbour-tooter-sv.ts
TRANSLATIONS += translations/harbour-tooter-zh.ts
TRANSLATIONS += translations/harbour-kyclos-de.ts
TRANSLATIONS += translations/harbour-kyclos-el.ts
TRANSLATIONS += translations/harbour-kyclos-es.ts
TRANSLATIONS += translations/harbour-kyclos-fi.ts
TRANSLATIONS += translations/harbour-kyclos-fr.ts
TRANSLATIONS += translations/harbour-kyclos-nl.ts
TRANSLATIONS += translations/harbour-kyclos-nl_BE.ts
TRANSLATIONS += translations/harbour-kyclos-oc.ts
TRANSLATIONS += translations/harbour-kyclos-pl.ts
TRANSLATIONS += translations/harbour-kyclos-ru.ts
TRANSLATIONS += translations/harbour-kyclos-sr.ts
TRANSLATIONS += translations/harbour-kyclos-sv.ts
TRANSLATIONS += translations/harbour-kyclos-zh.ts
[Desktop Entry]
Type=Application
X-Nemo-Application-Type=silica-qt5
Icon=harbour-tooter
Exec=harbour-tooter
Name=Tooter
# translation example:
# your app name in German locale (de)
#
# Remember to comment out the following line, if you do not want to use
# a different app name in German locale (de).
......@@ -58,7 +58,7 @@ CoverBackground {
verticalAlignment: Image.AlignBottom
fillMode: Image.PreserveAspectFit
source: "../images/tooter.svg"
source: "../images/kyclos.svg"
}
Timer {
id: timer
......@@ -95,7 +95,7 @@ CoverBackground {
rightMargin: Theme.paddingLarge
verticalCenter: iconNot.verticalCenter
}
text: "Tooter"
text: "Kyclos"
color: Theme.primaryColor
}
......
.pragma library
.import QtQuick.LocalStorage 2.0 as LS
var db = LS.LocalStorage.openDatabaseSync("tooter", "", "harbour-tooter", 100000);
var db = LS.LocalStorage.openDatabaseSync("kyclos", "", "harbour-kyclos", 100000);
var conf = {};
var mediator = (function(){
var subscribe = function(channel, fn){
......@@ -118,17 +118,17 @@ var notificationGenerator = function(item){
var notification;
switch (item.urgency){
case "normal":
notification = Qt.createQmlObject('import org.nemomobile.notifications 1.0; Notification { category: "x-harbour.tooter.activity"; appName: "Tooter"; itemCount: 1; remoteActions: [ { "name": "default", "displayName": "Do something", "icon": "icon-s-certificates", "service": "ba.dysko.harbour.tooter", "path": "/", "iface": "ba.dysko.harbour.tooter", "method": "openapp", "arguments": [ "'+item.service+'", "'+item.key+'" ] }]; urgency: Notification.Normal; }', Qt.application, 'InternalQmlObject');
notification = Qt.createQmlObject('import org.nemomobile.notifications 1.0; Notification { category: "x-harbour.kyclos.activity"; appName: "Kyclos"; itemCount: 1; remoteActions: [ { "name": "default", "displayName": "Do something", "icon": "icon-s-certificates", "service": "social.pleroma.harbour.kyclos", "path": "/", "iface": "social.pleroma.harbour.kyclos", "method": "openapp", "arguments": [ "'+item.service+'", "'+item.key+'" ] }]; urgency: Notification.Normal; }', Qt.application, 'InternalQmlObject');
break;
case "critical":
notification = Qt.createQmlObject('import org.nemomobile.notifications 1.0; Notification { appName: "Tooter"; itemCount: 1; remoteActions: [ { "name": "default", "displayName": "Do something", "icon": "icon-s-certificates", "service": "ba.dysko.harbour.tooter", "path": "/", "iface": "ba.dysko.harbour.tooter", "method": "openapp", "arguments": [ "'+item.service+'", "'+item.key+'" ] }]; urgency: Notification.Critical; }', Qt.application, 'InternalQmlObject');
notification = Qt.createQmlObject('import org.nemomobile.notifications 1.0; Notification { appName: "Kyclos"; itemCount: 1; remoteActions: [ { "name": "default", "displayName": "Do something", "icon": "icon-s-certificates", "service": "ba.dysko.harbour.kyclos", "path": "/", "iface": "social.pleroma.harbour.kyclos", "method": "openapp", "arguments": [ "'+item.service+'", "'+item.key+'" ] }]; urgency: Notification.Critical; }', Qt.application, 'InternalQmlObject');
break;
default:
notification = Qt.createQmlObject('import org.nemomobile.notifications 1.0; Notification { category: "x-harbour.tooter.activity"; appName: "Tooter"; itemCount: 1; remoteActions: [ { "name": "default", "displayName": "Do something", "icon": "icon-s-certificates", "service": "ba.dysko.harbour.tooter", "path": "/", "iface": "ba.dysko.harbour.tooter", "method": "openapp", "arguments": [ "'+item.service+'", "'+item.key+'" ] }]; urgency: Notification.Low; }', Qt.application, 'InternalQmlObject');
notification = Qt.createQmlObject('import org.nemomobile.notifications 1.0; Notification { category: "x-harbour.kyclos.activity"; appName: "Kyclos"; itemCount: 1; remoteActions: [ { "name": "default", "displayName": "Do something", "icon": "icon-s-certificates", "service": "social.pleroma.harbour.kyclos", "path": "/", "iface": "social.pleroma.harbour.kyclos", "method": "openapp", "arguments": [ "'+item.service+'", "'+item.key+'" ] }]; urgency: Notification.Low; }', Qt.application, 'InternalQmlObject');
}
console.log(JSON.stringify(notification.remoteActions[0].arguments))
//Notifications.notify("Tooter", "serverinfo.serverTitle", " new activity", false, "2015-10-15 00:00:00", "aaa")
//Notifications.notify("Kyclos", "serverinfo.serverTitle", " new activity", false, "2015-10-15 00:00:00", "aaa")
notification.timestamp = item.timestamp
notification.summary = item.summary
......
import QtQuick 2.0
import Sailfish.Silica 1.0
import harbour.tooter.Uploader 1.0
import harbour.kyclos.Uploader 1.0
import "../lib/API.js" as Logic
import "./components/"
......@@ -13,6 +13,7 @@ Page {
property string suggestedUser: ""
property ListModel suggestedModel;
property string toot_id: ""
// TODO: Get the instance max chars
property int tootMaxChar: 500;
property ListModel mdl;
allowedOrientations: Orientation.All
......
......@@ -71,10 +71,10 @@ Page {
EnterKey.iconSource: "image://theme/icon-m-enter-next"
EnterKey.onClicked: {
Logic.api = new Logic.MastodonAPI({ instance: instance.text, api_user_token: "" });
Logic.api.registerApplication("Tooter",
'http://localhost/harbour-tooter', // redirect uri, we will need this later on
Logic.api.registerApplication("Kyclos",
'http://localhost/harbour-kyclos', // redirect uri, we will need this later on
["read", "write", "follow"], //scopes
"http://grave-design.com/harbour-tooter", //website on the login screen
"https://git.pleroma.social/pleroma/harbour-kyclos", //website on the login screen
function(data) {
console.log(data)
......@@ -140,8 +140,8 @@ Page {
onLoadingChanged: {
console.log(url)
if (
(url+"").substr(0, 37) === 'http://localhost/harbour-tooter?code=' ||
(url+"").substr(0, 38) === 'https://localhost/harbour-tooter?code='
(url+"").substr(0, 37) === 'http://localhost/harbour-kyclos?code=' ||
(url+"").substr(0, 38) === 'https://localhost/harbour-kyclos?code='
) {
visible = false;
......
......@@ -64,22 +64,6 @@ Page {
Logic.conf['loadImages'] = checked
}
}
IconTextSwitch {
text: qsTr("Translate")
description: qsTr("Use Transifex to help with app translation to your language")
icon.source: "image://theme/icon-m-presence"
onCheckedChanged: {
busy = true;
checked = false;
Qt.openUrlExternally("https://www.transifex.com/dysko/tooter/");
timer2.start()
}
Timer {
id: timer2
interval: 4700
onTriggered: parent.busy = false
}
}
}
SectionHeader {
text: qsTr("Credits")
......@@ -94,40 +78,46 @@ Page {
}
Repeater {
model: ListModel {
ListElement {
name: "Pleroma Authors"
desc: qsTr("Pleroma Authors")
mastodon: ""
mail: ""
}
ListElement {
name: "Duško Angirević"
desc: qsTr("UI/UX design and development")
desc: qsTr("Tooter developer")
mastodon: "dysko@mastodon.social"
mail: ""
}
ListElement {
name: "Miodrag Nikolić"
desc: "visual identity"
desc: qsTr("visual identity")
mastodon: ""
mail: "micotakis@gmail.com"
}
ListElement {
name: "Quentin PAGÈS / Quenti ♏"
desc: "Occitan & French translation"
desc: qsTr("Occitan & French translation")
mastodon: "Quenti@framapiaf.org"
mail: ""
}
ListElement {
name: "André Koot"
desc: "Dutch translation"
desc: qsTr("Dutch translation")
mastodon: "meneer@mastodon.social"
mail: "https://twitter.com/meneer"
}
ListElement {
name: "Carlos Gonzalez / Caballlero"
desc: "Español translation"
desc: qsTr("Español translation")
mastodon: ""
mail: "carlosgonz@protonmail.com"
}
ListElement {
name: "Mohamed-Touhami MAHDI"
desc: "Added README file"
desc: qsTr("Added README file")
mastodon: "dragnucs@touha.me"
mail: "touhami@touha.me"
}
......@@ -156,8 +146,8 @@ Page {
mdl: m,
type: "reply"
})
} else {
Qt.openUrlExternally("mailto:"+model.mail);
} else if (model.mail !== ""){
Qt.openUrlExternally("mailto:"+model.mail);
}
}
}
......
* Fri Jan 17 2020 Haelwenn (lanodan) Monnier <contact+kyclos@hacktivis.me> 0.1.0
- Forked from harbour-tooter
* Sun Jan 27 2019 Dusko Angirevic <dysko@me.com> 1.0.3-0
- Remorse popup added for account removal
- Updated translations
......
......@@ -3,7 +3,7 @@
# Generated by: spectacle version 0.27
#
Name: harbour-tooter
Name: harbour-kyclos
# >> macros
# << macros
......@@ -12,14 +12,14 @@ Name: harbour-tooter
%{!?qtc_qmake5:%define qtc_qmake5 %qmake5}
%{!?qtc_make:%define qtc_make make}
%{?qtc_builddir:%define _builddir %qtc_builddir}
Summary: Tooter
Version: 1.0.3
Summary: Kyclos
Version: 0.1.0
Release: 0
Group: Qt/Qt
License: LICENSE
URL: http://example.org/
URL: https://git.pleroma.social/pleroma/harbour-kyclos
Source0: %{name}-%{version}.tar.bz2
Source100: harbour-tooter.yaml
Source100: harbour-kyclos.yaml
Requires: sailfishsilica-qt5 >= 0.10.9
BuildRequires: pkgconfig(sailfishapp) >= 1.0.2
BuildRequires: pkgconfig(Qt5Core)
......@@ -29,7 +29,7 @@ BuildRequires: pkgconfig(nemonotifications-qt5)
BuildRequires: desktop-file-utils
%description
Tooter is native client for Mastodon network instances.
Kyclos is a native SailfishOS client for Pleroma.
%prep
......
Name: harbour-tooter
Summary: Tooter
Version: 1.0.3
Name: harbour-kyclos
Summary: Kyclos
Version: 0.1.0
Release: 0
# The contents of the Group field should be one of the groups listed here:
# https://github.com/mer-tools/spectacle/blob/master/data/GROUPS
Group: Qt/Qt
URL: http://example.org/
License: LICENSE
URL: https://git.pleroma.social/pleroma/harbour-kyclos
License: GPL-3
# This must be generated before uploading a package to a remote build service.
# Usually this line does not need to be modified.
Sources:
- '%{name}-%{version}.tar.bz2'
Description: |
Tooter is native client for Mastodon network instances.
Kyclos is a native SailfishOS client for Pleroma.
Configure: none
# The qtc5 builder inserts macros to allow QtCreator to have fine
# control over qmake/make execution
......
......@@ -5,7 +5,7 @@
#include <QtDBus/QtDBus>
#include "dbusAdaptor.h"
#define SERVICE_NAME "ba.dysko.harbour.tooter"
#define SERVICE_NAME "social.pleroma.harbour.kyclos"
class QDBusInterface;
class Dbus : public QObject
......
......@@ -35,13 +35,13 @@ TooterAdaptor::~TooterAdaptor()
void TooterAdaptor::openapp()
{
// handle method call ba.dysko.harbour.tooter.openapp
// handle method call social.pleroma.harbour.kyclos.openapp
QMetaObject::invokeMethod(parent(), "openapp");
}
void TooterAdaptor::showtoot(const QStringList &key)
{
// handle method call ba.dysko.harbour.tooter.showtoot
// handle method call social.pleroma.harbour.kyclos.showtoot
QMetaObject::invokeMethod(parent(), "showtoot", Q_ARG(QStringList, key));
}
......@@ -30,9 +30,9 @@ QT_END_NAMESPACE
class TooterAdaptor: public QDBusAbstractAdaptor
{
Q_OBJECT
Q_CLASSINFO("D-Bus Interface", "ba.dysko.harbour.tooter")
Q_CLASSINFO("D-Bus Interface", "social.pleroma.harbour.kyclos")
Q_CLASSINFO("D-Bus Introspection", ""
" <interface name=\"ba.dysko.harbour.tooter\">\n"
" <interface name=\"social.pleroma.harbour.kyclos\">\n"
" <method name=\"showtoot\">\n"
" <annotation value=\"true\" name=\"org.freedesktop.DBus.Method.NoReply\"/>\n"
" <arg direction=\"in\" type=\"as\" name=\"key\"/>\n"
......
......@@ -27,7 +27,7 @@ int main(int argc, char *argv[])
FileDownloader *fd = new FileDownloader(engine);
view->rootContext()->setContextProperty("FileDownloader", fd);
qmlRegisterType<ImageUploader>("harbour.tooter.Uploader", 1, 0, "ImageUploader");
qmlRegisterType<ImageUploader>("harbour.kyclos.Uploader", 1, 0, "ImageUploader");
Notifications *no = new Notifications();
view->rootContext()->setContextProperty("Notifications", no);
......@@ -36,7 +36,7 @@ int main(int argc, char *argv[])
Dbus *dbus = new Dbus();
view->rootContext()->setContextProperty("Dbus", dbus);
view->setSource(SailfishApp::pathTo("qml/harbour-tooter.qml"));
view->setSource(SailfishApp::pathTo("qml/harbour-kyclos.qml"));
view->show();
return app->exec();
}
......@@ -24,14 +24,14 @@ void Notifications::notify(QString appName, QString summary, QString body, bool
{
notif.setPreviewSummary(summary);
notif.setPreviewBody(body);
notif.setCategory("x-harbour.tooter.activity");
notif.setCategory("x-harbour.kyclos.activity");
if (issuekey.isEmpty())
{
remoteactions << Notification::remoteAction("default",
QString(),
"ba.dysko.habour.tooter",
"social.pleroma.harbour.kyclos",
"/",
"ba.dysko.habour.tooter",
"social.pleroma.harbour.kyclos",
"openapp",
QVariantList());
}
......@@ -42,12 +42,12 @@ void Notifications::notify(QString appName, QString summary, QString body, bool
notif.setSummary(summary);
notif.setBody(body);
notif.setItemCount(1);
notif.setCategory("x-harbour.tooter.activity");
notif.setCategory("x-harbour.kyclos.activity");
remoteactions << Notification::remoteAction("app",
QString(),
"ba.dysko.habour.tooter",
"social.pleroma.harbour.kyclos",
"/",
"ba.dysko.habour.tooter",
"social.pleroma.harbour.kyclos",
"openapp",
QVariantList());
}
......@@ -64,9 +64,9 @@ void Notifications::notify(QString appName, QString summary, QString body, bool
remoteactions << Notification::remoteAction("default",
QString(),
"ba.dysko.habour.tooter",
"social.pleroma.harbour.kyclos",
"/",
"ba.dysko.habour.tooter",
"social.pleroma.harbour.kyclos",
"showtoot",
args);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment