version v0.6

This commit is contained in:
LubuWest 2021-05-12 21:41:34 +02:00
commit 8482bde3ed
86 changed files with 7064 additions and 3208 deletions

View file

@ -63,7 +63,7 @@ Rectangle{
}
function updateImage(){
function updateImage(){
xhr.url= login.server + "/api/friendica/photo/update.json";
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.clearParams();
@ -119,7 +119,7 @@ function updateImage(){
anchors.rightMargin: 1*mm
spacing:5*mm
Text{
font.pixelSize: 3.5*mm
font.pointSize: osSettings.bigFontSize
font.bold: true
text:qsTr("Upload to album")
}
@ -132,17 +132,46 @@ function updateImage(){
// }
// }
Button{
MButton{
id:closeButton
height: 8*mm
text: "\uf057"
font.pixelSize: 3*mm
onClicked:{photoStack.pop();
//imageDialog.destroy()
width: 2.5*root.fontFactor*osSettings.bigFontSize
font.pointSize: osSettings.bigFontSize
onClicked:{photoStack.pop()}
}
}
ComboBox{
id: album
x: 3*mm
y: 3*root.fontFactor*osSettings.bigFontSize
width: root.width/2;
height: 2.5*root.fontFactor*osSettings.bigFontSize//5*mm;
font.pointSize: osSettings.bigFontSize
editable:true
model: albumModel
// delegate: ItemDelegate {
// width: album.width
// contentItem: Text {
// //text: modelData
// color: "white"
// font: album.font
// font.pixelSize: album.font.pixelSize
// elide: Text.ElideRight
// verticalAlignment: Text.AlignVCenter
// }
// //highlighted: album.highlightedIndex === index
// }
onAccepted: {
if (find(currentText) === -1) {
albumModel.append({text: editText})
currentIndex = find(editText)
}
}
}
ListModel{id:albumModel}
// Text {
// text: qsTr("Album")
// x: 4*mm; y: 10*mm
@ -161,16 +190,28 @@ function updateImage(){
ListView{
id: imageUploadView
x:3*mm //23*mm
y:17*mm
y: 11*mm + album.height
width: imageDialog.width-5*mm //25*mm
height: root.width/2 //25*mm
height: parent.height -(9*root.fontFactor*osSettings.bigFontSize)//root.width/2 //25*mm
model: imageUploadModel
delegate: imageDelegate
footer: imageId==""?imageFooter:null
clip:true
orientation: ListView.Horizontal
spacing: mm
DropArea{
anchors.fill: parent
onDropped: {
if (drop.keys.includes('text/uri-list')){
var urllist=drop.text.split('\n');
for(var i=0;i< urllist.length;i++){
attachImage(urllist[i])
}
}
}
}
}
BusyIndicator{
id: uploadBusy
running: false
@ -180,6 +221,7 @@ function updateImage(){
width:10*mm
height: 10*mm
}
ListModel{
id: imageUploadModel
}
@ -192,7 +234,7 @@ function updateImage(){
Image{
id: uploadImage
width: root.width/2-mm //20*mm
height: imageUploadView.height-6*mm//height: 14*mm
height: imageUploadView.height-(3*root.fontFactor*osSettings.bigFontSize+2*mm)
fillMode: Image.PreserveAspectFit
source:imageUrl
onVisibleChanged: descriptionInput.focus=true;
@ -207,18 +249,19 @@ function updateImage(){
}
Rectangle{
color: "light grey"
//color: "light grey"
border.color: "grey"
anchors.top: uploadImage.bottom
anchors.topMargin: mm
//x: mm; y: 15*mm;
width: root.width/2-mm //Math.max(root.width/2-mm, descriptionInput.contentWidth);
height: 5*mm;
height: 2.5*root.fontFactor*osSettings.bigFontSize +2*mm //5*mm;
TextField{
//TextInput {
id: descriptionInput
anchors.fill: parent
font.pixelSize: 3*mm
anchors.margins: mm
font.pointSize: osSettings.systemFontSize
selectByMouse: true
placeholderText: qsTr("Description")
text:description!=""?description:""
@ -248,44 +291,17 @@ function updateImage(){
}
}
}
ComboBox{
id: album
x: 3*mm
y: 10*mm
width: root.width/2;
height: 5*mm;
font.pixelSize: 3*mm
editable:true
model: albumModel
// delegate: ItemDelegate {
// width: album.width
// contentItem: Text {
// //text: modelData
// color: "white"
// font: album.font
// font.pixelSize: album.font.pixelSize
// elide: Text.ElideRight
// verticalAlignment: Text.AlignVCenter
// }
// //highlighted: album.highlightedIndex === index
// }
onAccepted: {
if (find(currentText) === -1) {
albumModel.append({text: editText})
currentIndex = find(editText)
}
}
}
ListModel{id:albumModel}
Button{
id:uploadButton
height: 8*mm
x:4*mm; y:root.width/2+18*mm //40*mm
height: 2*root.fontFactor*osSettings.bigFontSize
x:4*mm;
anchors.top:imageUploadView.bottom
anchors.topMargin: mm
//y:root.width/2+18*mm //40*mm
text: imageId==""?qsTr("Upload"):qsTr("Change")
font.pixelSize: 3*mm
font.pointSize: osSettings.bigFontSize
onClicked:{
if(album.currentText==""){Helperjs.showMessage(qsTr("Error"),qsTr(" No album name given"), imageDialog)}
else if (imageId!=""){uploadBusy.running=true; updateImage()}

View file

@ -78,7 +78,7 @@ Package {
width:15*mm
anchors.bottom: photoWrapper.bottom
color: "white"
font.pixelSize: 2*mm
font.pointSize: osSettings.systemFontSize
wrapMode:Text.Wrap
}
MouseArea {

View file

@ -152,6 +152,31 @@ StackView{
photoStack.push("qrc:/qml/photoqml/ImageUploadDialog.qml",{"attachImageURLs":urls})
}
BlueButton{
x:mm
y:mm
z:2
visible: !wideScreen
fontColor: "grey"
border.color: "transparent"
text: "\uf0c9"
font.pointSize: osSettings.bigFontSize
onClicked:{
leftDrawerAndroid.visible?leftDrawerAndroid.close():leftDrawerAndroid.open()}
}
LeftDrawerLinux{
id:leftDrawer
property var newstabstatus: newstab.newstabstatus
visible: wideScreen&&rootstackView.depth<2
width: visible?osSettings.systemFontSize*15:0
height: root.height-bar.height
}
LeftDrawerAndroid{
id: leftDrawerAndroid
}
ProgressBar{
id: newImagesProgress
width: 15*mm
@ -169,8 +194,6 @@ StackView{
anchors.topMargin: 0.5*mm
anchors.right:updatePhotolist.left
anchors.rightMargin:mm
height: 6*mm
width: 8*mm
text:"\uf0ee"
onClicked: {
photoStack.push("qrc:/qml/photoqml/ImageUploadDialog.qml");
@ -184,22 +207,20 @@ StackView{
anchors.topMargin: 0.5*mm
anchors.right:phototabstatusButton.left
anchors.rightMargin:mm
height: 6*mm
width: 8*mm
text:"\uf0ed"
Menu {
id:photoupdatemenu
width:40*mm
width:8*root.fontFactor*osSettings.bigFontSize
MenuItem {
text: qsTr("All Images")
font.pixelSize: 3*mm
font.pointSize: osSettings.bigFontSize
onTriggered: {
Imagejs.requestList(root.login,root.db, false, fotostab,function(obj){fotorectangle.newimages=obj})}
}
MenuItem {
text: qsTr("Only new")
font.pixelSize: 3*mm
font.pointSize: osSettings.bigFontSize
onTriggered: {
Imagejs.requestList(root.login,root.db, true,fotostab,function(obj){fotorectangle.newimages=obj})}
}
@ -213,15 +234,14 @@ StackView{
anchors.topMargin: 0.5*mm
anchors.right: parent.right
anchors.rightMargin:2*mm
height: 6*mm
width: Math.max(10*mm,implicitWidth)
width: Math.max(8*root.fontFactor*osSettings.bigFontSize,implicitWidth)
text: fotostab.phototabstatus=="Images"?qsTr("Own Images"):fotostab.phototabstatus
Menu {
id:phototabmenu
width: 40*mm
width: 20*root.fontFactor*osSettings.bigFontSize
MenuItem {
text: qsTr("Own Images")
font.pixelSize: 3*mm
font.pointSize: osSettings.bigFontSize
onTriggered: {
fotostab.phototabstatus="Images";
// phototabstatusButton.text=qsTr("Own images");
@ -246,8 +266,10 @@ StackView{
id: albumgridview
cellWidth: 17*mm
cellHeight: 17*mm
x: mm;y:8*mm
width: parent.width-2*mm; height: parent.height-9*mm
x: leftDrawer.width//mm;
y:8*mm
width: wideScreen&&rootstackView.depth<2?parent.width-leftDrawer.width-mm:parent.width-mm //parent.width-2*mm;
height: parent.height-9*mm
clip: true
model: visualphotoModel.parts.album
footer:Rectangle{
@ -256,7 +278,7 @@ StackView{
width:12*mm
height:6*mm
Text{
font.pixelSize: 1.5*mm
font.pointSize: 0.75*osSettings.systemFontSize
anchors.centerIn: parent
text:qsTr("More")
}
@ -282,11 +304,9 @@ StackView{
MButton {
id: backButton
height: 6*mm
width: 8*mm
text: "\uf057"
x: parent.width - backButton.width - 3*mm
y: -backButton.height - 4*mm
x: parent.width - backButton.width - root.fontFactor*osSettings.bigFontSize
y: -backButton.height - root.fontFactor*osSettings.bigFontSize
z:2
onClicked: {photoBackground.opacity=0}
}

View file

@ -93,7 +93,7 @@ Package {
wrapMode:Text.Wrap
color: "white"
font.family: "Monospace"
font.pixelSize: 2*mm
font.pointSize: osSettings.systemFontSize
anchors.bottom: albumWrapper.bottom
}
@ -125,7 +125,7 @@ Package {
MouseArea {
anchors.fill: parent
onPressAndHold:{
var menuString="import QtQuick.Controls 1.4; Menu {MenuItem{text:qsTr('Delete on client and server'); onTriggered: {deletepics('album',albumname);photogroupModel.remove(index)}}}";
var menuString="import QtQuick.Controls 2.12; Menu {MenuItem{text:qsTr('Delete on client and server'); onTriggered: {deletepics('album',albumname);photogroupModel.remove(index)}}}";
var albummenuObject=Qt.createQmlObject(menuString,albumWrapper,"albummenuOutput")
albummenuObject.popup()
}