mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-10-30 07:53:33 +08:00
Compare commits
6 Commits
nightly/20
...
stable/202
| Author | SHA1 | Date | |
|---|---|---|---|
| ea5b2d6589 | |||
| eaababc817 | |||
| aa96b723bc | |||
| 1616261bef | |||
| 926ab72334 | |||
| a6d16ba1f8 |
2
daemon
2
daemon
Submodule daemon updated: 86d147d080...3bbac87283
@ -46,7 +46,7 @@ extern const QString defaultDownloadPath;
|
||||
X(AppTheme, "System") \
|
||||
X(BaseZoom, 1.0) \
|
||||
X(ParticipantsSide, false) \
|
||||
X(HideSelf, false) \
|
||||
X(HideSelf, true) \
|
||||
X(HideSpectators, false) \
|
||||
X(AutoUpdate, true) \
|
||||
X(PluginAutoUpdate, false) \
|
||||
|
||||
@ -203,61 +203,70 @@ ItemDelegate {
|
||||
anchors.fill: parent
|
||||
color: menuItem.down ? "#c4aaaaaa" : menuItem.hovered ? "#c4777777" : "transparent"
|
||||
}
|
||||
contentItem: ColumnLayout {
|
||||
// After update to qt 6.4.3 the layout was broken, adding a Rectangle
|
||||
// as top level in the contentIntem is a workaround which removal can be
|
||||
// tested with newer qt versions
|
||||
contentItem: Rectangle {
|
||||
anchors.fill: parent
|
||||
spacing: 0
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
Layout.rightMargin: 15
|
||||
Layout.leftMargin: 20
|
||||
Layout.fillHeight: true
|
||||
Layout.alignment: {
|
||||
if (menuAction.popupMode !== CallActionBar.ActionPopupMode.LayoutOption || TopMargin && BottomMargin) {
|
||||
return Qt.AlignLeft | Qt.AlignVCenter;
|
||||
}
|
||||
if (TopMargin) {
|
||||
Layout.bottomMargin = 4;
|
||||
return Qt.AlignBottom;
|
||||
}
|
||||
Layout.topMargin = 4;
|
||||
return Qt.AlignTop;
|
||||
}
|
||||
color: "transparent"
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
spacing: 0
|
||||
|
||||
spacing: 6
|
||||
ResponsiveImage {
|
||||
source: menuAction.popupMode === CallActionBar.ActionPopupMode.ListElement || menuAction.popupMode === CallActionBar.ActionPopupMode.LayoutOption ? IconSource : (menuItem.ListView.isCurrentItem ? JamiResources.check_box_24dp_svg : JamiResources.check_box_outline_blank_24dp_svg)
|
||||
color: "white"
|
||||
width: 20
|
||||
height: 20
|
||||
}
|
||||
Text {
|
||||
id: delegateText
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: menuAction.popupMode === CallActionBar.ActionPopupMode.ListElement || menuAction.popupMode === CallActionBar.ActionPopupMode.LayoutOption ? Name : DeviceName
|
||||
elide: Text.ElideRight
|
||||
font.pointSize: JamiTheme.participantFontSize
|
||||
color: "white"
|
||||
Layout.fillHeight: true
|
||||
Layout.rightMargin: 15
|
||||
Layout.leftMargin: 20
|
||||
|
||||
Layout.alignment: {
|
||||
if (menuAction.popupMode !== CallActionBar.ActionPopupMode.LayoutOption || TopMargin && BottomMargin) {
|
||||
return Qt.AlignLeft | Qt.AlignVCenter;
|
||||
}
|
||||
if (TopMargin) {
|
||||
Layout.bottomMargin = 4;
|
||||
return Qt.AlignBottom;
|
||||
}
|
||||
Layout.topMargin = 4;
|
||||
return Qt.AlignTop;
|
||||
}
|
||||
|
||||
spacing: 6
|
||||
ResponsiveImage {
|
||||
source: menuAction.popupMode === CallActionBar.ActionPopupMode.ListElement || menuAction.popupMode === CallActionBar.ActionPopupMode.LayoutOption ? IconSource : (menuItem.ListView.isCurrentItem ? JamiResources.check_box_24dp_svg : JamiResources.check_box_outline_blank_24dp_svg)
|
||||
color: "white"
|
||||
width: 20
|
||||
height: 20
|
||||
}
|
||||
Text {
|
||||
id: delegateText
|
||||
Layout.fillWidth: true
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: menuAction.popupMode === CallActionBar.ActionPopupMode.ListElement || menuAction.popupMode === CallActionBar.ActionPopupMode.LayoutOption ? Name : DeviceName
|
||||
elide: Text.ElideRight
|
||||
font.pointSize: JamiTheme.participantFontSize
|
||||
color: "white"
|
||||
}
|
||||
ResponsiveImage {
|
||||
source: JamiResources.check_black_24dp_svg
|
||||
color: "white"
|
||||
width: 20
|
||||
height: 20
|
||||
visible: menuAction.popupMode === CallActionBar.ActionPopupMode.LayoutOption ? ActiveSetting : false
|
||||
}
|
||||
}
|
||||
ResponsiveImage {
|
||||
source: JamiResources.check_black_24dp_svg
|
||||
color: "white"
|
||||
width: 20
|
||||
height: 20
|
||||
visible: menuAction.popupMode === CallActionBar.ActionPopupMode.LayoutOption ? ActiveSetting : false
|
||||
Rectangle {
|
||||
id: buttonDiv
|
||||
visible: menuAction.popupMode === CallActionBar.ActionPopupMode.LayoutOption ? SectionEnd : false
|
||||
Layout.fillWidth: true
|
||||
height: 1
|
||||
opacity: 0.2
|
||||
border.width: 0
|
||||
color: JamiTheme.separationLine
|
||||
Layout.alignment: Qt.AlignBottom
|
||||
}
|
||||
}
|
||||
Rectangle {
|
||||
id: buttonDiv
|
||||
visible: menuAction.popupMode === CallActionBar.ActionPopupMode.LayoutOption ? SectionEnd : false
|
||||
Layout.fillWidth: true
|
||||
height: 1
|
||||
opacity: 0.2
|
||||
border.width: 0
|
||||
color: JamiTheme.separationLine
|
||||
Layout.alignment: Qt.AlignBottom
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -219,32 +219,32 @@ RowLayout {
|
||||
},
|
||||
"Link": function () {
|
||||
if (!showPreview) {
|
||||
listViewTypoSecond.itemAtIndex(0).action.triggered();
|
||||
listViewTypoFirst.itemAtIndex(4).action.triggered();
|
||||
}
|
||||
},
|
||||
"Code": function () {
|
||||
if (!showPreview) {
|
||||
listViewTypoSecond.itemAtIndex(1).action.triggered();
|
||||
listViewTypoFirst.itemAtIndex(5).action.triggered();
|
||||
}
|
||||
},
|
||||
"Quote": function () {
|
||||
if (!showPreview) {
|
||||
listViewTypoSecond.itemAtIndex(2).action.triggered();
|
||||
listViewTypoSecond.itemAtIndex(0).action.triggered();
|
||||
}
|
||||
},
|
||||
"Unordered list": function () {
|
||||
if (!showPreview) {
|
||||
listViewTypoSecond.itemAtIndex(3).action.triggered();
|
||||
listViewTypoSecond.itemAtIndex(1).action.triggered();
|
||||
}
|
||||
},
|
||||
"Ordered list": function () {
|
||||
if (!showPreview) {
|
||||
listViewTypoSecond.itemAtIndex(4).action.triggered();
|
||||
listViewTypoSecond.itemAtIndex(2).action.triggered();
|
||||
}
|
||||
},
|
||||
"Enter is new line": function () {
|
||||
if (!showPreview) {
|
||||
listViewTypoSecond.itemAtIndex(5).action.triggered();
|
||||
listViewTypoSecond.itemAtIndex(3).action.triggered();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -80,6 +80,8 @@ PluginListModel::data(const QModelIndex& index, int role) const
|
||||
return QVariant(pluginStatus_.value(installedPlugins_.at(index.row())));
|
||||
case Role::NewPluginAvailable:
|
||||
return QVariant(newVersionAvailable_.value(installedPlugins_.at(index.row())));
|
||||
case Role::Id:
|
||||
return QVariant(details.id);
|
||||
}
|
||||
return QVariant();
|
||||
}
|
||||
@ -98,6 +100,7 @@ PluginListModel::roleNames() const
|
||||
roles[Status] = "Status";
|
||||
roles[PluginDescription] = "PluginDescription";
|
||||
roles[NewPluginAvailable] = "NewPluginAvailable";
|
||||
roles[Id] = "Id";
|
||||
return roles;
|
||||
}
|
||||
|
||||
|
||||
@ -38,7 +38,8 @@ public:
|
||||
PluginIcon,
|
||||
NewPluginAvailable,
|
||||
IsLoaded,
|
||||
Status
|
||||
Status,
|
||||
Id
|
||||
};
|
||||
Q_ENUM(Role)
|
||||
|
||||
|
||||
@ -79,7 +79,6 @@ void
|
||||
PluginStoreListModel::reset()
|
||||
{
|
||||
beginResetModel();
|
||||
plugins_.clear();
|
||||
endResetModel();
|
||||
}
|
||||
|
||||
@ -88,8 +87,8 @@ PluginStoreListModel::addPlugin(const QVariantMap& plugin)
|
||||
{
|
||||
beginInsertRows(QModelIndex(), plugins_.size(), plugins_.size());
|
||||
plugins_.append(plugin);
|
||||
endInsertRows();
|
||||
sort();
|
||||
endInsertRows();
|
||||
}
|
||||
|
||||
void
|
||||
@ -97,8 +96,8 @@ PluginStoreListModel::setPlugins(const QList<QVariantMap>& plugins)
|
||||
{
|
||||
beginResetModel();
|
||||
plugins_ = filterPlugins(plugins);
|
||||
endResetModel();
|
||||
sort();
|
||||
endResetModel();
|
||||
}
|
||||
|
||||
void
|
||||
@ -109,12 +108,12 @@ PluginStoreListModel::removePlugin(const QString& pluginId)
|
||||
if (plugin["id"].toString() == pluginId) {
|
||||
beginRemoveRows(QModelIndex(), index, index);
|
||||
plugins_.removeAt(index);
|
||||
sort();
|
||||
endRemoveRows();
|
||||
return;
|
||||
}
|
||||
index++;
|
||||
}
|
||||
sort();
|
||||
}
|
||||
|
||||
void
|
||||
@ -129,7 +128,6 @@ PluginStoreListModel::updatePlugin(const QVariantMap& plugin)
|
||||
}
|
||||
index++;
|
||||
}
|
||||
sort();
|
||||
}
|
||||
|
||||
QColor
|
||||
@ -221,11 +219,9 @@ PluginStoreListModel::rowFromPluginId(const QString& pluginId) const
|
||||
void
|
||||
PluginStoreListModel::sort()
|
||||
{
|
||||
beginResetModel();
|
||||
std::sort(plugins_.begin(), plugins_.end(), [](const QVariantMap& a, const QVariantMap& b) {
|
||||
return a["timestamp"].toString() < b["timestamp"].toString();
|
||||
});
|
||||
endResetModel();
|
||||
}
|
||||
|
||||
QList<QVariantMap>
|
||||
|
||||
@ -109,7 +109,7 @@ public:
|
||||
// `data` represents the version in this case.
|
||||
if (plugin.version < data) {
|
||||
if (isAutoUpdaterEnabled()) {
|
||||
installRemotePlugin(plugin.name);
|
||||
installRemotePlugin(plugin.id);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@ -289,9 +289,10 @@ Item {
|
||||
"buttonTitles": [JamiStrings.optionOk, JamiStrings.optionCancel],
|
||||
"buttonStyles": [SimpleMessageDialog.ButtonStyle.TintedBlue, SimpleMessageDialog.ButtonStyle.TintedBlack],
|
||||
"buttonCallBacks": [function () {
|
||||
PluginListModel.setVersionStatus(PluginName, PluginStatus.INSTALLABLE);
|
||||
PluginListModel.setVersionStatus(Id, PluginStatus.INSTALLABLE);
|
||||
PluginModel.uninstallPlugin(PluginId);
|
||||
PluginListModel.removePlugin(index);
|
||||
PluginAdapter.getPluginsFromStore();
|
||||
// could not call root from here
|
||||
settings.ListView.view.parent.closed();
|
||||
}]
|
||||
|
||||
Reference in New Issue
Block a user