Experimental tablet UI
This commit is contained in:
parent
55c5c8d74d
commit
e95ec1f76a
8 changed files with 142 additions and 65 deletions
|
@ -25,8 +25,9 @@ import 'common/util.js' as Util
|
|||
import 'icons/icons.js' as Icons
|
||||
import 'common/constants.js' as Constants
|
||||
|
||||
SlidePage {
|
||||
SplitPage {
|
||||
id: page
|
||||
position: 0.4
|
||||
|
||||
canClose: false
|
||||
|
||||
|
@ -91,67 +92,80 @@ SlidePage {
|
|||
], undefined, undefined, true);
|
||||
}
|
||||
|
||||
PListView {
|
||||
id: podcastList
|
||||
title: 'Subscriptions'
|
||||
SplitPane {
|
||||
PListView {
|
||||
id: podcastList
|
||||
title: 'Subscriptions'
|
||||
|
||||
section.property: 'section'
|
||||
section.delegate: SectionHeader { text: section }
|
||||
section.property: 'section'
|
||||
section.delegate: SectionHeader { text: section }
|
||||
|
||||
PPlaceholder {
|
||||
text: 'No podcasts'
|
||||
visible: podcastList.count === 0
|
||||
}
|
||||
PPlaceholder {
|
||||
text: 'No podcasts'
|
||||
visible: podcastList.count === 0
|
||||
}
|
||||
|
||||
model: podcastListModel
|
||||
model: podcastListModel
|
||||
|
||||
delegate: PodcastItem {
|
||||
onClicked: pgst.loadPage('EpisodesPage.qml', {'podcast_id': id, 'title': title});
|
||||
onPressAndHold: {
|
||||
pgst.showSelection([
|
||||
{
|
||||
label: 'Refresh',
|
||||
callback: function () {
|
||||
py.call('main.check_for_episodes', [url]);
|
||||
delegate: PodcastItem {
|
||||
onClicked: {
|
||||
episodesPage.podcast_id = id;
|
||||
episodesPage.title = title;
|
||||
}//pgst.loadPage('EpisodesPage.qml', {'podcast_id': id, 'title': title});
|
||||
onPressAndHold: {
|
||||
pgst.showSelection([
|
||||
{
|
||||
label: 'Refresh',
|
||||
callback: function () {
|
||||
py.call('main.check_for_episodes', [url]);
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
label: 'Unsubscribe',
|
||||
callback: function () {
|
||||
var ctx = { py: py, id: id };
|
||||
pgst.showConfirmation(title, 'Unsubscribe', 'Cancel', 'Remove this podcast and all downloaded episodes?', Icons.trash, function () {
|
||||
ctx.py.call('main.unsubscribe', [ctx.id]);
|
||||
});
|
||||
{
|
||||
label: 'Unsubscribe',
|
||||
callback: function () {
|
||||
var ctx = { py: py, id: id };
|
||||
pgst.showConfirmation(title, 'Unsubscribe', 'Cancel', 'Remove this podcast and all downloaded episodes?', Icons.trash, function () {
|
||||
ctx.py.call('main.unsubscribe', [ctx.id]);
|
||||
});
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
label: 'Rename',
|
||||
callback: function () {
|
||||
var ctx = { py: py, id: id };
|
||||
pgst.loadPage('TextInputDialog.qml', {
|
||||
buttonText: 'Rename',
|
||||
placeholderText: 'New name',
|
||||
text: title,
|
||||
callback: function (new_title) {
|
||||
ctx.py.call('main.rename_podcast', [ctx.id, new_title]);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Mark episodes as old',
|
||||
callback: function () {
|
||||
py.call('main.mark_episodes_as_old', [id]);
|
||||
{
|
||||
label: 'Rename',
|
||||
callback: function () {
|
||||
var ctx = { py: py, id: id };
|
||||
pgst.loadPage('TextInputDialog.qml', {
|
||||
buttonText: 'Rename',
|
||||
placeholderText: 'New name',
|
||||
text: title,
|
||||
callback: function (new_title) {
|
||||
ctx.py.call('main.rename_podcast', [ctx.id, new_title]);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
label: 'Podcast details',
|
||||
callback: function () {
|
||||
pgst.loadPage('PodcastDetail.qml', {podcast_id: id, title: title});
|
||||
}
|
||||
},
|
||||
], title);
|
||||
{
|
||||
label: 'Mark episodes as old',
|
||||
callback: function () {
|
||||
py.call('main.mark_episodes_as_old', [id]);
|
||||
},
|
||||
},
|
||||
{
|
||||
label: 'Podcast details',
|
||||
callback: function () {
|
||||
pgst.loadPage('PodcastDetail.qml', {podcast_id: id, title: title});
|
||||
}
|
||||
},
|
||||
], title);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SplitPane {
|
||||
EpisodesPage {
|
||||
id: episodesPage
|
||||
|
||||
anchors.fill: parent
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue