Merge pull request #28 from molan-git/develop

Add commits from upstream branch
This commit is contained in:
molan-git 2020-04-30 15:35:34 +02:00 committed by GitHub
commit c752c82209
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 76 additions and 21 deletions

View file

@ -3,11 +3,18 @@
## About ## About
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. 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.
This is a fork of dysk0/harbour-tooter. The app can by downloaded here: https://openrepos.net/content/molan/tooter-fork. This fork is being used to further develop and maintain the Tooter app by dysk0 (https://github.com/dysk0/harbour-tooter). The development branch 'upstream' is being used to create pull requests from this fork. Releases by dysk0 can be found on the Jolla store and on https://openrepos.net/content/dysko/tooter
Releases from this forked repository can be found here: https://openrepos.net/content/molan/tooter-fork.
## Build ## Build
Clone / download this repository and import it in your SailfishOS IDE using the harbour-tooter.pro project file. No additional configuration needed. Clone / download this repository and import it in your SailfishOS IDE using the harbour-tooter.pro project file. No additional configuration needed.
## Repository branches:
- master: default
- develop: commits WIP
- upstream: commits for Tooter release
## Contributions ## Contributions
Contributions to this project are very welcome, since I don't have the resources and time to implement and fix everything Tooter still misses or lacks. Thank you! Contributions to this project are very welcome, since I don't have the resources and time to implement and fix everything Tooter still misses or lacks. Thank you!

View file

@ -73,16 +73,14 @@ DISTFILES += qml/harbour-tooter.qml \
qml/pages/Settings.qml \ qml/pages/Settings.qml \
qml/lib/API.js \ qml/lib/API.js \
qml/images/notification.svg \ qml/images/notification.svg \
qml/images/home.svg \
qml/images/mesagess.svg \
qml/images/search.svg \
qml/images/verified.svg \ qml/images/verified.svg \
qml/images/local.svg \ qml/images/boosted.svg \
qml/images/federated.svg \
qml/images/tooter.svg \ qml/images/tooter.svg \
qml/images/emojiselect.svg \
qml/images/icon-m-profile.svg \
qml/images/icon-l-profile.svg \
qml/lib/Mastodon.js \ qml/lib/Mastodon.js \
qml/lib/Worker.js \ qml/lib/Worker.js \
qml/images/boosted.svg \
config/icon-lock-harbour-tooter.png \ config/icon-lock-harbour-tooter.png \
config/x-harbour.tooter.activity.conf \ config/x-harbour.tooter.activity.conf \
rpm/harbour-tooter.changes \ rpm/harbour-tooter.changes \
@ -115,3 +113,4 @@ TRANSLATIONS += translations/harbour-tooter-ru.ts
TRANSLATIONS += translations/harbour-tooter-sr.ts TRANSLATIONS += translations/harbour-tooter-sr.ts
TRANSLATIONS += translations/harbour-tooter-sv.ts TRANSLATIONS += translations/harbour-tooter-sv.ts
TRANSLATIONS += translations/harbour-tooter-zh_CN.ts TRANSLATIONS += translations/harbour-tooter-zh_CN.ts
TRANSLATIONS += translations/harbour-tooter-it.ts

View file

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 21.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_2" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 96 96" style="enable-background:new 0 0 96 96;" xml:space="preserve">
<style type="text/css">
.st0{opacity:0.5;fill:#FFFFFF;}
.st1{fill:#FFFFFF;}
.st2{opacity:0.75;fill:#FFFFFF;}
</style>
<g>
<rect x="0.5" y="0" class="st0" width="95" height="95"/>
</g>
<path class="st1" d="M48,52.5c-9.7,0-17.6-7.9-17.6-17.6S38.3,17.3,48,17.3s17.6,7.9,17.6,17.6S57.7,52.5,48,52.5z M48,19.3
c-8.6,0-15.6,7-15.6,15.6s7,15.6,15.6,15.6c8.6,0,15.6-7,15.6-15.6S56.6,19.3,48,19.3z"/>
<path class="st2" d="M78.8,76.4h-2v-1.6c0-7.6-6.2-13.8-13.8-13.8H33c-7.6,0-13.8,6.2-13.8,13.8v1.6h-2v-1.6
c0-8.7,7.1-15.8,15.8-15.8h30c8.7,0,15.8,7.1,15.8,15.8V76.4z"/>
</svg>

After

Width:  |  Height:  |  Size: 936 B

View file

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 21.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 64 64" style="enable-background:new 0 0 64 64;" xml:space="preserve">
<style type="text/css">
.st0{opacity:0.5;fill:#FFFFFF;}
.st1{fill:#FFFFFF;fill-opacity:0;}
.st2{opacity:0.6;fill:#FFFFFF;enable-background:new ;}
.st3{fill:#FFFFFF;}
</style>
<g id="Layer_2">
<rect y="0" class="st0" width="64" height="64"/>
</g>
<g id="Layer_1">
<g id="icon-m-contact">
<rect id="icon-m-contact_1_" y="0" class="st1" width="64" height="64"/>
<g>
<path class="st2" d="M22,41.5h20c5,0,9,4,9,9c0,0.3,0,0.7-0.1,1h2c0-0.3,0-0.7,0-1c0-6.1-4.9-11-11-11H22c-6.1,0-11,4.9-11,11
c0,0.3,0,0.7,0,1h2c0-0.3-0.1-0.7-0.1-1C13,45.5,17,41.5,22,41.5z"/>
<path class="st3" d="M32,35.5c-6.6,0-12-5.4-12-12s5.4-12,12-12s12,5.4,12,12S38.6,35.5,32,35.5z M32,13.5c-5.5,0-10,4.5-10,10
s4.5,10,10,10s10-4.5,10-10S37.5,13.5,32,13.5z"/>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -68,7 +68,8 @@ Page {
width: parent.width width: parent.width
validator: RegExpValidator { regExp: /^(ftp|http|https):\/\/[^ "]+$/ } validator: RegExpValidator { regExp: /^(ftp|http|https):\/\/[^ "]+$/ }
EnterKey.enabled: instance.acceptableInput; EnterKey.enabled: instance.acceptableInput;
EnterKey.iconSource: "image://theme/icon-m-enter-next" EnterKey.highlighted: instance.acceptableInput;
EnterKey.iconSource: "image://theme/icon-m-accept"
EnterKey.onClicked: { EnterKey.onClicked: {
Logic.api = new Logic.MastodonAPI({ instance: instance.text, api_user_token: "" }); Logic.api = new Logic.MastodonAPI({ instance: instance.text, api_user_token: "" });
Logic.api.registerApplication("Tooter", Logic.api.registerApplication("Tooter",
@ -110,13 +111,14 @@ Page {
anchors { anchors {
left: parent.left left: parent.left
right: parent.right right: parent.right
leftMargin: Theme.paddingLarge topMargin: Theme.paddingMedium
rightMargin: Theme.paddingLarge leftMargin: Theme.horizontalPageMargin
rightMargin: Theme.horizontalPageMargin
} }
width: parent.width width: parent.width
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
color: Theme.secondaryHighlightColor color: Theme.highlightColor
font.pixelSize: Theme.fontSizeExtraSmall font.pixelSize: Theme.fontSizeExtraSmall
text: qsTr("Mastodon is a free, open-source social network. A decentralized alternative to commercial platforms, it avoids the risks of a single company monopolizing your communication. Pick a server that you trust — whichever you choose, you can interact with everyone else. Anyone can run their own Mastodon instance and participate in the social network seamlessly.") text: qsTr("Mastodon is a free, open-source social network. A decentralized alternative to commercial platforms, it avoids the risks of a single company monopolizing your communication. Pick a server that you trust — whichever you choose, you can interact with everyone else. Anyone can run their own Mastodon instance and participate in the social network seamlessly.")
} }

View file

@ -72,7 +72,7 @@ Page {
// line below was commented out, reason unknown // line below was commented out, reason unknown
// username = messageObject.data // username = messageObject.data
break; break;
case 'locked':m case 'locked':
locked = messageObject.data locked = messageObject.data
break; break;
case 'created_at': case 'created_at':

View file

@ -25,8 +25,8 @@ Page {
IconTextSwitch { IconTextSwitch {
id: removeAccount id: removeAccount
text: Logic.conf['login'] ? qsTr("Remove Account") : qsTr("Add Account") text: Logic.conf['login'] ? qsTr("Remove Account") : qsTr("Add Account")
description: Logic.conf['login'] ? qsTr("Deauthorize this app and remove your account") : qsTr("Authorize this app to use your Mastodon account in your behalf") description: Logic.conf['login'] ? qsTr("Deauthorize this app and remove your account") : qsTr("Authorize this app to access your Mastodon account")
icon.source: Logic.conf['login'] ? "image://theme/icon-m-people" : "image://theme/icon-m-add" icon.source: Logic.conf['login'] ? "image://theme/icon-m-contact" : "image://theme/icon-m-add"
onCheckedChanged: { onCheckedChanged: {
@ -59,7 +59,7 @@ Page {
checked: typeof Logic.conf['loadImages'] !== "undefined" && Logic.conf['loadImages'] checked: typeof Logic.conf['loadImages'] !== "undefined" && Logic.conf['loadImages']
text: qsTr("Load images in toots") text: qsTr("Load images in toots")
description: qsTr("Disable this option if you want to preserve your data connection") description: qsTr("Disable this option if you want to preserve your data connection")
icon.source: "image://theme/icon-m-mobile-network" icon.source: "image://theme/icon-m-image"
onClicked: { onClicked: {
Logic.conf['loadImages'] = checked Logic.conf['loadImages'] = checked
} }
@ -67,7 +67,7 @@ Page {
IconTextSwitch { IconTextSwitch {
text: qsTr("Translate") text: qsTr("Translate")
description: qsTr("Use Transifex to help with app translation to your language") description: qsTr("Use Transifex to help with app translation to your language")
icon.source: "image://theme/icon-m-presence" icon.source: "image://theme/icon-m-font-size"
onCheckedChanged: { onCheckedChanged: {
busy = true; busy = true;
checked = false; checked = false;
@ -108,7 +108,7 @@ Page {
} }
ListElement { ListElement {
name: "Molan" name: "Molan"
desc: qsTr("Development and maintenance") desc: qsTr("Development and translations")
mastodon: "" mastodon: ""
mail: "mol_an@sunrise.ch" mail: "mol_an@sunrise.ch"
} }
@ -153,7 +153,7 @@ Page {
verticalCenter: parent.verticalCenter verticalCenter: parent.verticalCenter
right: parent.right right: parent.right
} }
icon.source: "image://theme/" + (model.mastodon !== "" ? "icon-m-person" : "icon-m-mail") + "?" + (pressed icon.source: "image://theme/" + (model.mastodon !== "" ? "icon-m-contact" : "icon-m-mail") + "?" + (pressed
? Theme.highlightColor ? Theme.highlightColor
: Theme.primaryColor) : Theme.primaryColor)
onClicked: { onClicked: {

View file

@ -37,7 +37,12 @@ Item {
asynchronous: true asynchronous: true
width: description === "" ? Theme.iconSizeMedium : Theme.iconSizeLarge width: description === "" ? Theme.iconSizeMedium : Theme.iconSizeLarge
height: width height: width
source: image source:
if (icon.status === Image.Error)
source = "../../images/icon-l-profile.svg?" + (pressed
? Theme.highlightColor
: Theme.primaryColor)
else image
} }
Column { Column {
anchors { anchors {
@ -61,7 +66,7 @@ Item {
Label { Label {
height: description === "" ? 0 : contentHeight height: description === "" ? 0 : contentHeight
text: description text: description
color: Theme.primaryColor color: Theme.secondaryColor
font.pixelSize: Theme.fontSizeSmall font.pixelSize: Theme.fontSizeSmall
font.family: Theme.fontFamilyHeading font.family: Theme.fontFamilyHeading
horizontalAlignment: Text.AlignRight horizontalAlignment: Text.AlignRight

View file

@ -46,7 +46,7 @@ BackgroundItem {
visible: true visible: true
onStatusChanged: { onStatusChanged: {
if (avatar.status === Image.Error) if (avatar.status === Image.Error)
source = "image://theme/icon-m-person?" + (pressed source = "../../images/icon-m-profile.svg?" + (pressed
? Theme.highlightColor ? Theme.highlightColor
: Theme.primaryColor) : Theme.primaryColor)
} }