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
...
nightly/20
| Author | SHA1 | Date | |
|---|---|---|---|
| e8075a412e | |||
| 4d55a1430d | |||
| 8de099e38d | |||
| 306c428019 | |||
| c0a5ced044 | |||
| 9f570a3cee |
2
daemon
2
daemon
Submodule daemon updated: 85549fce49...459e58a6d2
@ -166,7 +166,6 @@ DISTRIBUTIONS := \
|
||||
debian_unstable \
|
||||
ubuntu_20.04 \
|
||||
ubuntu_22.04 \
|
||||
ubuntu_22.10 \
|
||||
ubuntu_23.04 \
|
||||
fedora_37 \
|
||||
fedora_38 \
|
||||
|
||||
@ -1,22 +0,0 @@
|
||||
FROM ubuntu:22.10
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get clean
|
||||
RUN apt-get update && \
|
||||
apt-get install -y -o Acquire::Retries=10 \
|
||||
devscripts \
|
||||
equivs \
|
||||
python-is-python3 \
|
||||
wget
|
||||
|
||||
ADD extras/packaging/gnu-linux/scripts/prebuild-package-debian.sh /opt/prebuild-package-debian.sh
|
||||
|
||||
COPY extras/packaging/gnu-linux/rules/debian-qt/control /tmp/builddeps/debian/control
|
||||
RUN /opt/prebuild-package-debian.sh qt-deps
|
||||
|
||||
COPY extras/packaging/gnu-linux/rules/debian/control /tmp/builddeps/debian/control
|
||||
RUN /opt/prebuild-package-debian.sh jami-deps
|
||||
|
||||
ADD extras/packaging/gnu-linux/scripts/build-package-debian.sh /opt/build-package-debian.sh
|
||||
CMD ["/opt/build-package-debian.sh"]
|
||||
@ -99,8 +99,6 @@ if [ -f /etc/os-release ]; then
|
||||
ENDTAG="ubuntu_20.04"
|
||||
elif [ "${UBUNTU_CODENAME}" = "jammy" ] || [ "${ID}_${VERSION_ID}" = "ubuntu_22.04" ]; then
|
||||
ENDTAG="ubuntu_22.04"
|
||||
elif [ "${UBUNTU_CODENAME}" = "kinetic" ] || [ "${ID}_${VERSION_ID}" = "ubuntu_22.10" ]; then
|
||||
ENDTAG="ubuntu_22.10"
|
||||
elif [ "${UBUNTU_CODENAME}" = "lunar" ] || [ "${ID}_${VERSION_ID}" = "ubuntu_23.04" ]; then
|
||||
ENDTAG="ubuntu_23.04"
|
||||
elif [ "${ID}" = "debian" ] && \
|
||||
|
||||
@ -228,6 +228,18 @@ Popup {
|
||||
}
|
||||
}
|
||||
|
||||
MessageOptionButton {
|
||||
visible: type === Interaction.Type.DATA_TRANSFER && Status === Interaction.Status.TRANSFER_FINISHED
|
||||
textButton: JamiStrings.removeLocally
|
||||
iconSource: JamiResources.trash_black_24dp_svg
|
||||
Layout.fillWidth: true
|
||||
Layout.margins: 5
|
||||
onClicked: {
|
||||
MessagesAdapter.removeFile(msgId, root.location)
|
||||
close()
|
||||
}
|
||||
}
|
||||
|
||||
MessageOptionButton {
|
||||
id: buttonEdit
|
||||
|
||||
|
||||
@ -496,6 +496,7 @@ Item {
|
||||
// Context Menu
|
||||
property string saveFile: qsTr("Save file")
|
||||
property string openLocation: qsTr("Open location")
|
||||
property string removeLocally: qsTr("Delete file from device")
|
||||
|
||||
// Updates
|
||||
property string betaInstall: qsTr("Install beta version")
|
||||
|
||||
@ -57,6 +57,7 @@ RowLayout {
|
||||
Layout.preferredHeight: parent.height
|
||||
Layout.preferredWidth: childrenRect.width
|
||||
visible: !CurrentConversation.isSip
|
||||
color: JamiTheme.transparentColor
|
||||
ComboBox {
|
||||
id: showMoreButton
|
||||
width: JamiTheme.chatViewFooterButtonSize
|
||||
@ -1174,6 +1175,7 @@ RowLayout {
|
||||
Layout.preferredHeight: parent.height
|
||||
Layout.preferredWidth: childrenRect.width
|
||||
visible: sendButtonVisibility
|
||||
color: JamiTheme.transparentColor
|
||||
PushButton {
|
||||
id: sendMessageButton
|
||||
|
||||
|
||||
@ -239,7 +239,7 @@ ListSelectionView {
|
||||
|
||||
Connections {
|
||||
target: CurrentAccount
|
||||
onIdChanged: {
|
||||
function onIdChanged() {
|
||||
//Making sure the tips are refreshed when changing user
|
||||
loader_tipsRow.active = false;
|
||||
loader_tipsRow.active = Qt.binding(function () {
|
||||
|
||||
@ -299,6 +299,13 @@ MessagesAdapter::openDirectory(const QString& path)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
MessagesAdapter::removeFile(const QString& interactionId, const QString& path)
|
||||
{
|
||||
auto convUid = lrcInstance_->get_selectedConvUid();
|
||||
lrcInstance_->getCurrentConversationModel()->removeFile(convUid, interactionId, path);
|
||||
}
|
||||
|
||||
void
|
||||
MessagesAdapter::acceptFile(const QString& interactionId)
|
||||
{
|
||||
|
||||
@ -111,6 +111,7 @@ protected:
|
||||
Q_INVOKABLE void cancelFile(const QString& arg);
|
||||
Q_INVOKABLE void openUrl(const QString& url);
|
||||
Q_INVOKABLE void openDirectory(const QString& arg);
|
||||
Q_INVOKABLE void removeFile(const QString& interactionId, const QString& path);
|
||||
Q_INVOKABLE void deleteInteraction(const QString& interactionId);
|
||||
Q_INVOKABLE void joinCall(const QString& uri,
|
||||
const QString& deviceId,
|
||||
|
||||
@ -90,7 +90,8 @@ PluginAdapter::getPluginsFromStore()
|
||||
Q_EMIT storeNotAvailable();
|
||||
});
|
||||
pluginVersionManager_
|
||||
->sendGetRequest(QUrl(baseUrl_ + "?arch=" + Utils::getPlatformString()),
|
||||
->sendGetRequest(QUrl(baseUrl_
|
||||
+ "?arch=" + lrcInstance_->pluginModel().getPlatformInfo()["os"]),
|
||||
[this, errorHandler](const QByteArray& data) {
|
||||
auto result = QJsonDocument::fromJson(data).array();
|
||||
auto pluginsInstalled = lrcInstance_->pluginModel().getPluginsId();
|
||||
@ -112,18 +113,19 @@ PluginAdapter::getPluginsFromStore()
|
||||
void
|
||||
PluginAdapter::getPluginDetails(const QString& pluginId)
|
||||
{
|
||||
pluginVersionManager_->sendGetRequest(QUrl(baseUrl_ + "/details/" + pluginId
|
||||
+ "?arch=" + Utils::getPlatformString()),
|
||||
[this](const QByteArray& data) {
|
||||
auto result = QJsonDocument::fromJson(data).object();
|
||||
// my response is a json object and I want to convert
|
||||
// it to a QVariantMap
|
||||
auto plugin = result.toVariantMap();
|
||||
if (!plugin.contains("id")) {
|
||||
plugin["id"] = plugin["name"];
|
||||
}
|
||||
pluginStoreListModel_->addPlugin(plugin);
|
||||
});
|
||||
pluginVersionManager_
|
||||
->sendGetRequest(QUrl(baseUrl_ + "/details/" + pluginId
|
||||
+ "?arch=" + lrcInstance_->pluginModel().getPlatformInfo()["os"]),
|
||||
[this](const QByteArray& data) {
|
||||
auto result = QJsonDocument::fromJson(data).object();
|
||||
// my response is a json object and I want to convert
|
||||
// it to a QVariantMap
|
||||
auto plugin = result.toVariantMap();
|
||||
if (!plugin.contains("id")) {
|
||||
plugin["id"] = plugin["name"];
|
||||
}
|
||||
pluginStoreListModel_->addPlugin(plugin);
|
||||
});
|
||||
}
|
||||
|
||||
void
|
||||
@ -204,11 +206,13 @@ PluginAdapter::baseUrl() const
|
||||
QString
|
||||
PluginAdapter::getIconUrl(const QString& pluginId) const
|
||||
{
|
||||
return baseUrl_ + "/icons/" + pluginId + "?arch=" + Utils::getPlatformString();
|
||||
return baseUrl_ + "/icons/" + pluginId
|
||||
+ "?arch=" + lrcInstance_->pluginModel().getPlatformInfo()["os"];
|
||||
}
|
||||
|
||||
QString
|
||||
PluginAdapter::getBackgroundImageUrl(const QString& pluginId) const
|
||||
{
|
||||
return baseUrl_ + "/backgrounds/" + pluginId + "?arch=" + Utils::getPlatformString();
|
||||
return baseUrl_ + "/backgrounds/" + pluginId
|
||||
+ "?arch=" + lrcInstance_->pluginModel().getPlatformInfo()["os"];
|
||||
}
|
||||
|
||||
@ -103,8 +103,8 @@ public:
|
||||
return;
|
||||
}
|
||||
|
||||
parent_.sendGetRequest(QUrl(parent_.baseUrl + "/versions/" + plugin.id
|
||||
+ "?arch=" + Utils::getPlatformString()),
|
||||
parent_.sendGetRequest(QUrl(parent_.baseUrl + "/versions/" + plugin.id + "?arch="
|
||||
+ lrcInstance_->pluginModel().getPlatformInfo()["os"]),
|
||||
[this, plugin](const QByteArray& data) {
|
||||
// `data` represents the version in this case.
|
||||
if (plugin.version < data) {
|
||||
@ -121,7 +121,8 @@ public:
|
||||
void installRemotePlugin(const QString& pluginId)
|
||||
{
|
||||
parent_.downloadFile(
|
||||
QUrl(parent_.baseUrl + "/download/" + Utils::getPlatformString() + "/" + pluginId),
|
||||
QUrl(parent_.baseUrl + "/download/"
|
||||
+ lrcInstance_->pluginModel().getPlatformInfo()["os"] + "/" + pluginId),
|
||||
pluginId,
|
||||
0,
|
||||
[this, pluginId](bool success, const QString& error) {
|
||||
|
||||
@ -931,9 +931,3 @@ Utils::generateUid()
|
||||
{
|
||||
return QUuid::createUuid().toString(QUuid::Id128);
|
||||
}
|
||||
|
||||
QString
|
||||
Utils::getPlatformString()
|
||||
{
|
||||
return "desktop";
|
||||
}
|
||||
|
||||
@ -126,6 +126,4 @@ QString generateUid();
|
||||
// Misc
|
||||
QString humanFileSize(qint64 fileSize);
|
||||
QString getDebugFilePath();
|
||||
|
||||
QString getPlatformString();
|
||||
} // namespace Utils
|
||||
|
||||
@ -306,6 +306,9 @@ public:
|
||||
void getTransferInfo(const QString& conversationId,
|
||||
const QString& interactionId,
|
||||
api::datatransfer::Info& info) const;
|
||||
void removeFile(const QString& conversationId,
|
||||
const QString& interactionId,
|
||||
const QString& path);
|
||||
|
||||
/**
|
||||
* Starts a search of all medias in a conversation
|
||||
|
||||
@ -102,6 +102,7 @@ public:
|
||||
*/
|
||||
QString getPluginPath(const QString& pluginId);
|
||||
|
||||
MapStringString getPlatformInfo();
|
||||
/**
|
||||
* @brief fetch all plugins path and id
|
||||
*
|
||||
|
||||
@ -3384,8 +3384,7 @@ ConversationModelPimpl::slotNewCall(const QString& fromId, const QString& callId
|
||||
// in case if we receive call after removing contact add conversation request;
|
||||
try {
|
||||
auto contact = linked.owner.contactModel->getContact(fromId);
|
||||
if (!isOutgoing && !contact.isBanned
|
||||
&& fromId != linked.owner.profileInfo.uri) {
|
||||
if (!isOutgoing && !contact.isBanned && fromId != linked.owner.profileInfo.uri) {
|
||||
addContactRequest(fromId);
|
||||
}
|
||||
if (isOutgoing && contact.profileInfo.type == profile::Type::TEMPORARY) {
|
||||
@ -4049,6 +4048,26 @@ ConversationModel::getTransferInfo(const QString& conversationId,
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ConversationModel::removeFile(const QString& conversationId,
|
||||
const QString& interactionId,
|
||||
const QString& path)
|
||||
{
|
||||
auto convOpt = getConversationForUid(conversationId);
|
||||
if (!convOpt)
|
||||
return;
|
||||
|
||||
QFile::remove(path);
|
||||
|
||||
std::lock_guard<std::mutex> lk(pimpl_->interactionsLocks[convOpt->get().uid]);
|
||||
auto& interactions = convOpt->get().interactions;
|
||||
auto it = interactions->find(interactionId);
|
||||
if (it != interactions->end()) {
|
||||
it->second.status = interaction::Status::TRANSFER_AWAITING_HOST;
|
||||
interactions->emitDataChanged(it, {MessageList::Role::Status});
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
ConversationModel::getNumberOfUnreadMessagesFor(const QString& convUid)
|
||||
{
|
||||
|
||||
@ -109,6 +109,12 @@ PluginModel::getPluginDetails(const QString& path)
|
||||
return result;
|
||||
}
|
||||
|
||||
MapStringString
|
||||
PluginModel::getPlatformInfo()
|
||||
{
|
||||
return PluginManager::instance().getPlatformInfo();
|
||||
}
|
||||
|
||||
bool
|
||||
PluginModel::installPlugin(const QString& jplPath, bool force)
|
||||
{
|
||||
|
||||
@ -60,6 +60,12 @@ PluginManagerInterface::uninstallPlugin(const QString& pluginRootPath)
|
||||
return libjami::uninstallPlugin(pluginRootPath.toStdString());
|
||||
}
|
||||
|
||||
MapStringString
|
||||
PluginManagerInterface::getPlatformInfo()
|
||||
{
|
||||
return convertMap(libjami::getPlatformInfo());
|
||||
}
|
||||
|
||||
QStringList
|
||||
PluginManagerInterface::getCallMediaHandlers()
|
||||
{
|
||||
|
||||
@ -61,6 +61,12 @@ PluginManagerInterface::uninstallPlugin(const QString& pluginRootPath)
|
||||
return 0;
|
||||
}
|
||||
|
||||
MapStringString
|
||||
PluginManagerInterface::getPlatformInfo()
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
QStringList
|
||||
PluginManagerInterface::getCallMediaHandlers()
|
||||
{
|
||||
|
||||
@ -58,6 +58,8 @@ public Q_SLOTS: // METHODS
|
||||
|
||||
int uninstallPlugin(const QString& pluginRootPath);
|
||||
|
||||
MapStringString getPlatformInfo();
|
||||
|
||||
QStringList getCallMediaHandlers();
|
||||
|
||||
void toggleCallMediaHandler(const QString& mediaHandlerId, const QString& callId, bool toggle);
|
||||
|
||||
Reference in New Issue
Block a user