Compare commits

..

2 Commits

Author SHA1 Message Date
ffff7baf16 Almalinux: build on stable version withotu plugin store
GitLab: #1418

Change-Id: I37239869e691a621138ae0616695f8efdf4b47ca
2023-12-01 15:29:06 -04:00
67904773d7 Donation banner: patch focus when press tab
Change-Id: I113e412fdda28ef91be8fdc506309c4f84bc7350
2023-12-01 13:52:26 -05:00
663 changed files with 87250 additions and 91666 deletions

View File

@ -1,4 +1,4 @@
# Copyright (C) 2020-2024 Savoir-faire Linux Inc.
# Copyright (C) 2020-2023 Savoir-faire Linux Inc.
#
# Author: Albert Babí <albert.babi@savoirfairelinux.com>
# Author: Amin Bandali <amin.bandali@savoirfairelinux.com>
@ -97,7 +97,7 @@ set(TESTS_DIR ${PROJECT_SOURCE_DIR}/tests)
# Here we let find_package(<PackageName>...) try to find Qt 6,
# If it is found, find_package will succeed, and the CMake variable
# QT_VERSION_MAJOR will be defined 6.
set(QT6_MINVER_MINOR 5)
set(QT6_MINVER_MINOR 4)
if(QT6_VER AND QT6_PATH)
find_package(QT NAMES Qt6 REQUIRED
PATHS ${QT6_PATH} NO_DEFAULT_PATH)
@ -106,10 +106,10 @@ else()
find_package(QT NAMES Qt6 REQUIRED)
endif()
if (${QT_VERSION_MINOR} GREATER_EQUAL ${QT6_MINVER_MINOR})
# Qt version is 6.5 or higher
# Qt version is 6.4 or higher
message(STATUS "Found a suitable Qt version ${QT_VERSION}")
else()
message(FATAL_ERROR "Qt 6.5 or higher is required. Found ${QT_VERSION}")
message(FATAL_ERROR "Qt 6.4 or higher is required. Found ${QT_VERSION}")
endif()
# libjamiclient
@ -343,8 +343,6 @@ if(Vulkan_FOUND)
add_definitions(-DHAS_VULKAN)
include_directories(${Vulkan_INCLUDE_DIR})
endif()
# Define PREFER_VULKAN to prefer Vulkan over the default API
# on GNU/Linux and Windows. Metal is always preferred on macOS.
if(MSVC)
set(WINDOWS_SYS_LIBS
@ -800,7 +798,6 @@ else()
MACOSX_BUNDLE_COPYRIGHT "${PROJ_COPYRIGHT}")
if(APPSTORE)
message(STATUS "app store version")
add_definitions(-DAPPSTORE)
set_target_properties(${PROJECT_NAME} PROPERTIES
XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS "${CMAKE_CURRENT_SOURCE_DIR}/resources/entitlements/appstore/Jami.entitlements")
else()

View File

@ -38,7 +38,7 @@ cf [INSTALL.md](/INSTALL.md)
# License
Copyright (C) 2020-2024 Savoir-faire Linux Inc.
Copyright (C) 2020-2023 Savoir-faire Linux Inc.
Jami is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

View File

@ -1,7 +1,7 @@
#!/usr/bin/env python3
# build.py --- Convenience script for building and running Jami
# Copyright (C) 2016-2024 Savoir-faire Linux Inc.
# Copyright (C) 2016-2023 Savoir-faire Linux Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by

2
daemon

Submodule daemon updated: 6addbbc160...8c1c74f0f3

View File

@ -1,7 +1,7 @@
# Taken from:
# https://cmake.org/Wiki/CMake_FAQ#Can_I_do_.22make_uninstall.22_with_CMake.3F
#
# Copyright (C) 2021-2024 Savoir-faire Linux Inc.
# Copyright (C) 2021-2023 Savoir-faire Linux Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by

View File

@ -1,4 +1,4 @@
# Copyright (C) 2015-2024 Savoir-faire Linux Inc.
# Copyright (C) 2015-2023 Savoir-faire Linux Inc.
#
# Author: Alexandre Lision <alexandre.lision@savoirfairelinux.com>
# Author: Emmanuel Lepage Vallee <emmanuel.lepage@savoirfairelinux.com>

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2022-2024 Savoir-faire Linux Inc.
* Copyright (C) 2022-2023 Savoir-faire Linux Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright (C) 2015-2024 Savoir-faire Linux Inc. -->
<!-- Copyright (C) 2015-2023 Savoir-faire Linux Inc. -->
<component type="desktop-application">
<id>net.jami.Jami</id>
<metadata_license>CC-BY-SA-3.0</metadata_license>

View File

@ -1,4 +1,4 @@
// Copyright (C) 2021-2024 Savoir-faire Linux Inc.
// Copyright (C) 2021-2023 Savoir-faire Linux Inc.
//
// Author: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
//

View File

@ -1,5 +1,5 @@
# -*- mode: makefile; -*-
# Copyright (C) 2016-2024 Savoir-faire Linux Inc.
# Copyright (C) 2016-2023 Savoir-faire Linux Inc.
#
# Author: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
#
@ -49,7 +49,7 @@ QT_MAJOR := 6
QT_MINOR := 5
QT_PATCH := 3
QT_TARBALL_CHECKSUM := 7cda4d119aad27a3887329cfc285f2aba5da85601212bcb0aea27bd6b7b544cb
DEBIAN_QT_VERSION := $(QT_MAJOR).$(QT_MINOR).$(QT_PATCH)-1
DEBIAN_QT_VERSION := $(QT_MAJOR).$(QT_MINOR).$(QT_PATCH)-0
DEBIAN_QT_DSC_FILENAME := libqt-jami_$(DEBIAN_QT_VERSION).dsc
QT_JAMI_PREFIX := /usr/lib/libqt-jami
@ -173,7 +173,6 @@ DISTRIBUTIONS := \
fedora_39 \
alma_9 \
opensuse-leap_15.4 \
opensuse-leap_15.5 \
snap
IS_SHELL_INTERACTIVE := $(shell [ -t 0 ] && echo yes)

View File

@ -1,111 +0,0 @@
FROM opensuse/leap:15.5
RUN zypper refresh
RUN zypper --non-interactive install -y \
dnf \
dnf-command\(builddep\) \
rpmdevtools \
Mesa-dri-devel Mesa-dri \
git \
gcc10 \
gcc10-c++ \
rpm-build \
tar \
make \
autoconf \
automake \
nasm \
speexdsp-devel \
libpulse-devel \
libcanberra-devel \
libcurl-devel \
libtool \
pcre-devel \
yaml-cpp-devel \
libXext-devel \
libXfixes-devel \
yasm \
speex-devel \
libgsm-devel \
chrpath \
check \
astyle \
gettext-devel \
which \
alsa-lib-devel \
systemd-devel \
libuuid-devel \
uuid-devel \
libopus-devel \
patch \
jsoncpp-devel \
webkit2gtk3-devel \
libcryptopp-devel \
libva-devel \
libvdpau-devel \
msgpack-c-devel \
msgpack-cxx-devel \
clutter-devel \
openssl-devel \
clutter-gtk-devel \
libnma-devel \
libcryptopp-devel \
libexpat-devel \
gnome-icon-theme-symbolic \
libgsm-devel \
gtk3-devel \
libappindicator-devel \
sqlite-devel \
ffmpeg-4-libavutil-devel \
gtk3-devel\
qrencode-devel \
python3-python-dateutil \
python3-html5lib \
libsndfile-devel \
libdrm \
gperf \
bison \
flex \
ffmpeg ffmpeg-devel \
nodejs20 \
mozilla-nss-devel \
python-xml \
python3-six \
python3-importlib-metadata \
libxcb* \
libxkb* \
libX11-devel \
libXrender-devel \
libfreetype6 \
xcb-util-image-devel \
xcb-util-keysyms-devel \
xcb-util-renderutil-devel \
xcb-util-wm-devel \
xorg-x11-devel \
xz \
xkeyboard-config \
libnotify \
argon2-devel \
libxshmfence-devel \
xproto-devel \
xcb-proto-devel \
xcb-* \
xorg-* \
vulkan-devel \
ninja \
gstreamer-devel \
gstreamer-plugins-good \
gstreamer-plugins-bad-devel \
gstreamer-plugins-base-devel \
cmake \
wget
RUN update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 50
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 50
ADD extras/packaging/gnu-linux/scripts/build-package-rpm.sh /opt/build-package-rpm.sh
ENV CC=gcc
ENV CXX=g++
CMD ["/opt/build-package-rpm.sh"]

View File

@ -1,5 +1,5 @@
#!/bin/sh
# Copyright (C) 2021-2024 Savoir-faire Linux Inc.
# Copyright (C) 2021-2023 Savoir-faire Linux Inc.
#
# Author: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
#

View File

@ -1,4 +1,4 @@
;;; Copyright (C) 2021-2024 Savoir-faire Linux Inc.
;;; Copyright (C) 2021-2023 Savoir-faire Linux Inc.
;;;
;;; Author: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
;;;

View File

@ -53,7 +53,6 @@ Build-Depends: debhelper (>= 9),
libvulkan-dev [linux-any],
libx11-dev,
libx11-xcb-dev,
libsm-dev,
libxcb-glx0-dev,
libxcb-icccm4-dev,
libxcb-image0-dev,
@ -299,11 +298,10 @@ Build-Depends: debhelper (>= 9),
# libvpx-dev (>= 1.8),
libvpx-dev,
libwebp-dev,
libx11-xcb-dev,
# libx11-xcb-dev,
libxcb-dri3-dev,
# libxcomposite-dev,
libxcursor-dev,
libxcb-cursor-dev,
libxdamage-dev,
libxml2-dev,
libxnvctrl-dev,

View File

@ -3,7 +3,7 @@ Upstream-Name: jami
Upstream-Contact: Amin Bandali <bandali@gnu.org>
Source: https://dl.jami.net/release/tarballs/
Files: *
Copyright: 2004-2024 Savoir-faire Linux Inc.
Copyright: 2004-2023 Savoir-faire Linux Inc.
License: GPL-3+
Comment: Upstream embeds everything that is needed to build Jami inside the release tarball.
Everything that is already in Debian has been removed.
@ -50,7 +50,7 @@ Files: daemon/src/media/audio/opensl/audio_common.h
daemon/src/media/audio/opensl/audio_recorder.h
daemon/src/media/audio/opensl/buf_manager.h
Copyright: 2015 The Android Open Source Project
2015-2024 Savoir-faire Linux Inc.
2015-2023 Savoir-faire Linux Inc.
License: Apache-2.0
Files: daemon/extras/tools/bootstrap

View File

@ -1,4 +1,4 @@
# Copyright (C) 2019-2024 Savoir-faire Linux Inc.
# Copyright (C) 2019-2023 Savoir-faire Linux Inc.
#
# Author: Sébastien Blin <sebastien.blin@savoirfairelinux.com>
# Author: Amin Bandali <amin.bandali@savoirfairelinux.com>

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
# Copyright (C) 2016-2024 Savoir-faire Linux Inc.
# Copyright (C) 2016-2023 Savoir-faire Linux Inc.
#
# Author: Alexandre Viau <alexandre.viau@savoirfairelinux.com>
# Author: Amin Bandali <amin.bandali@savoirfairelinux.com>

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
# Copyright (C) 2016-2024 Savoir-faire Linux Inc.
# Copyright (C) 2016-2023 Savoir-faire Linux Inc.
#
# Author: Alexandre Viau <alexandre.viau@savoirfairelinux.com>
# Author: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
# Copyright (C) 2020-2024 Savoir-faire Linux Inc.
# Copyright (C) 2020-2023 Savoir-faire Linux Inc.
#
# Author: Amin Bandali <amin.bandali@savoirfairelinux.com>
#

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
# Copyright (C) 2016-2024 Savoir-faire Linux Inc.
# Copyright (C) 2016-2023 Savoir-faire Linux Inc.
#
# Author: Alexandre Viau <alexandre.viau@savoirfairelinux.com>
# Author: Guillaume Roguez <guillaume.roguez@savoirfairelinux.com>

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
# Copyright (C) 2021-2024 Savoir-faire Linux Inc.
# Copyright (C) 2021-2023 Savoir-faire Linux Inc.
#
# Author: Amin Bandali <amin.bandali@savoirfairelinux.com>
#

View File

@ -1,6 +1,6 @@
#!/bin/sh
#
# Copyright (C) 2024 Savoir-faire Linux Inc.
# Copyright (C) 2023 Savoir-faire Linux Inc.
#
# Author: Amin Bandali <amin.bandali@savoirfairelinux.com>
#

View File

@ -1,7 +1,7 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (C) 2022-2024 Savoir-faire Linux Inc.
# Copyright (C) 2022-2023 Savoir-faire Linux Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (C) 2021-2024 Savoir-faire Linux Inc.
# Copyright (C) 2021-2023 Savoir-faire Linux Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by

View File

@ -1,4 +1,4 @@
# Copyright (C) 2019-2024 Savoir-faire Linux Inc.
# Copyright (C) 2019-2023 Savoir-faire Linux Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash
# install.sh --- build and install Jami daemon and client
# Copyright (C) 2016-2024 Savoir-faire Linux Inc.
# Copyright (C) 2016-2023 Savoir-faire Linux Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by

View File

@ -20,8 +20,6 @@ rm -rf Jami.app/Contents/Frameworks/QtWebEngineQuickDelegatesQml.framework
rm -rf Jami.app/Contents/Frameworks/QtWebEngineQuick.framework
rm -rf Jami.app/Contents/Frameworks/QtWebEngineCore.framework
rm -rf Jami.app/Contents/Frameworks/QtWebChannel.framework
echo "remove web dSYM files"
find Jami.app/Contents/Resources/qml -type d -name "*.dSYM" -exec rm -r {} \;
codesign --force --sign "${APP_CERTIFICATE}" --entitlements ../resources/entitlements/appstore/Jami.entitlements Jami.app
codesign --verify Jami.app
echo "create .pkg"

View File

@ -1,7 +1,7 @@
#!/usr/bin/python
##
## Copyright (C) 2016-2024 Savoir-faire Linux Inc.
## Copyright (C) 2016-2023 Savoir-faire Linux Inc.
##
## Author: Edric Milaret <edric.ladent-milaret@savoirfairelinux.com>
## Author: Guillaume Roguez <guillaume.roguez@savoirfairelinux.com>

View File

@ -1,21 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 28.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 43 52.7" style="enable-background:new 0 0 43 52.7;" xml:space="preserve">
<style type="text/css">
.st0{fill:#9EB3C3;}
.st1{opacity:0.3;fill:#FF0045;enable-background:new ;}
.st2{opacity:0.16;fill:#FF0045;enable-background:new ;}
.st3{fill:#FF0045;}
</style>
<g id="Icon_Donate" transform="translate(-22 -189.345)">
<path id="Rectangle_267" class="st0" d="M27,232h33c2.8,0,5,2.2,5,5l0,0c0,2.8-2.2,5-5,5H27c-2.8,0-5-2.2-5-5l0,0
C22,234.2,24.2,232,27,232z"/>
<path id="Path_459" class="st1" d="M32.1,216.9l-1.1-1c-4-3.6-6.6-5.9-6.6-8.8c0-2.3,1.8-4.2,4.1-4.2c0,0,0.1,0,0.1,0
c1.3,0,2.6,0.6,3.5,1.6c0.9-1,2.1-1.6,3.5-1.6c2.3,0,4.2,1.8,4.2,4.1c0,0,0,0.1,0,0.1c0,2.9-2.6,5.3-6.6,8.9L32.1,216.9z"/>
<path id="Path_460" class="st2" d="M52.5,198.4l-0.7-0.7c-2.6-2.3-4.2-3.8-4.2-5.7c0-1.5,1.2-2.7,2.7-2.7c0,0,0,0,0,0
c0.9,0,1.7,0.4,2.2,1c0.6-0.7,1.4-1,2.2-1c1.5,0,2.7,1.2,2.7,2.7c0,0,0,0,0,0c0,1.9-1.7,3.4-4.2,5.7L52.5,198.4z"/>
<path class="st3" d="M37.3,236.7h11.4c3.1-3,4.9-5.5,4.9-8.4c0,0,0-0.1,0-0.1c0-3.2-2.7-5.8-5.9-5.7c-1.8,0-3.6,0.8-4.8,2.2
c-1.2-1.4-2.9-2.2-4.8-2.2c0,0-0.1,0-0.1,0c-3.2,0-5.8,2.7-5.7,5.9C32.4,231.2,34.3,233.7,37.3,236.7z"/>
</g>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="43" height="52.655" viewBox="0 0 43 52.655">
<defs>
<clipPath id="clip-path">
<rect id="Rectangle_268" data-name="Rectangle 268" width="38" height="24" transform="translate(-0.407 0.083)" fill="#fff" stroke="#707070" stroke-width="1"/>
</clipPath>
</defs>
<g id="Icon_Donate" transform="translate(-22 -189.345)">
<rect id="Rectangle_267" data-name="Rectangle 267" width="43" height="10" rx="5" transform="translate(22 232)" fill="#9eb3c3"/>
<path id="Path_459" data-name="Path 459" d="M9.674,17.083,8.562,16.07C4.609,12.486,2,10.122,2,7.221A4.18,4.18,0,0,1,6.221,3,4.6,4.6,0,0,1,9.674,4.6,4.6,4.6,0,0,1,13.128,3a4.18,4.18,0,0,1,4.221,4.221c0,2.9-2.609,5.265-6.562,8.856Z" transform="translate(22.407 199.828)" fill="#ff0045" opacity="0.3"/>
<path id="Path_460" data-name="Path 460" d="M6.953,12.088l-.718-.654C3.684,9.122,2,7.6,2,5.724A2.7,2.7,0,0,1,4.724,3,2.966,2.966,0,0,1,6.953,4.035,2.966,2.966,0,0,1,9.182,3a2.7,2.7,0,0,1,2.724,2.724c0,1.872-1.684,3.4-4.235,5.716Z" transform="translate(45.571 186.345)" fill="#ff0045" opacity="0.16"/>
<g id="Mask_Group_38" data-name="Mask Group 38" transform="translate(24.407 213.918)" clip-path="url(#clip-path)">
<path id="Path_270" data-name="Path 270" d="M12.649,22.542l-1.544-1.406C5.621,16.163,2,12.883,2,8.857A5.8,5.8,0,0,1,7.857,3a6.377,6.377,0,0,1,4.792,2.226A6.377,6.377,0,0,1,17.442,3,5.8,5.8,0,0,1,23.3,8.857c0,4.025-3.621,7.306-9.105,12.289Z" transform="translate(5.992 5.54)" fill="#ff0045"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -1,3 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
<path id="check_circle_FILL0_wght400_GRAD0_opsz24" d="M88.6-865.4l7.05-7.05-1.4-1.4L88.6-868.2l-2.85-2.85-1.4,1.4ZM90-860a9.738,9.738,0,0,1-3.9-.787,10.1,10.1,0,0,1-3.175-2.138,10.1,10.1,0,0,1-2.138-3.175A9.738,9.738,0,0,1,80-870a9.738,9.738,0,0,1,.787-3.9,10.1,10.1,0,0,1,2.138-3.175,10.1,10.1,0,0,1,3.175-2.138A9.738,9.738,0,0,1,90-880a9.738,9.738,0,0,1,3.9.787,10.1,10.1,0,0,1,3.175,2.138,10.1,10.1,0,0,1,2.138,3.175A9.738,9.738,0,0,1,100-870a9.738,9.738,0,0,1-.787,3.9,10.1,10.1,0,0,1-2.138,3.175,10.1,10.1,0,0,1-3.175,2.138A9.738,9.738,0,0,1,90-860Zm0-2a7.721,7.721,0,0,0,5.675-2.325A7.721,7.721,0,0,0,98-870a7.721,7.721,0,0,0-2.325-5.675A7.721,7.721,0,0,0,90-878a7.721,7.721,0,0,0-5.675,2.325A7.721,7.721,0,0,0,82-870a7.721,7.721,0,0,0,2.325,5.675A7.721,7.721,0,0,0,90-862ZM90-870Z" transform="translate(-80 880)" fill="#fff"/>
</svg>

Before

Width:  |  Height:  |  Size: 927 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="none" d="M24 24H0V0h24v24z"/><circle fill="#ff0000" cx="12" cy="12" r="8"/></svg>

After

Width:  |  Height:  |  Size: 176 B

View File

@ -1,3 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<path id="phone_in_talk_FILL0_wght400_GRAD0_opsz24_1_" data-name="phone_in_talk_FILL0_wght400_GRAD0_opsz24 (1)" d="M134.222-832a6,6,0,0,0-1.811-4.411A6,6,0,0,0,128-838.222V-840a7.737,7.737,0,0,1,3.122.633,8.132,8.132,0,0,1,2.533,1.711,8.133,8.133,0,0,1,1.711,2.533A7.74,7.74,0,0,1,136-832Zm-3.556,0a2.572,2.572,0,0,0-.778-1.889,2.571,2.571,0,0,0-1.889-.778v-1.778a4.283,4.283,0,0,1,3.144,1.3,4.283,4.283,0,0,1,1.3,3.144Zm4.4,8a13.343,13.343,0,0,1-5.489-1.211,16.42,16.42,0,0,1-4.933-3.433,16.42,16.42,0,0,1-3.433-4.933A13.343,13.343,0,0,1,120-839.067a.9.9,0,0,1,.267-.667.9.9,0,0,1,.667-.267h3.6a.827.827,0,0,1,.556.211.812.812,0,0,1,.289.5l.578,3.111a1.567,1.567,0,0,1-.022.6.934.934,0,0,1-.244.422l-2.156,2.178a10.745,10.745,0,0,0,1.056,1.589,15.638,15.638,0,0,0,1.344,1.478,15.651,15.651,0,0,0,1.444,1.278,14.051,14.051,0,0,0,1.6,1.078l2.089-2.089a1.245,1.245,0,0,1,.522-.3,1.431,1.431,0,0,1,.633-.056l3.067.622a1.029,1.029,0,0,1,.511.322.782.782,0,0,1,.2.522v3.6a.9.9,0,0,1-.267.667A.9.9,0,0,1,135.067-824Zm-12.378-10.667,1.467-1.467-.378-2.089H121.8a18.259,18.259,0,0,0,.311,1.8A9.736,9.736,0,0,0,122.689-834.667Zm7.956,7.956a11.029,11.029,0,0,0,1.767.6,10.838,10.838,0,0,0,1.811.289v-1.956l-2.089-.422ZM122.689-834.667ZM130.644-826.711Z" transform="translate(-120 840)"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 24.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 24 24" style="enable-background:new 0 0 24 24;" xml:space="preserve">
<path d="M20.2,6.5c-1.4-2.2-3.6-3.7-6-4.2C9,1.1,3.9,4.2,2.7,9.3c0,0,0,0,0,0l0,0.1c-0.6,2.4-0.1,4.9,1.2,6.9c1.2,1.9,3,3.3,5.1,4
l-0.4,0.3c-0.1,0-0.1,0.1-0.2,0.1C8,20.9,8,21.4,8.2,21.7C8.3,21.9,8.5,22,8.7,22c0,0,0.1,0,0.1,0c0.2,0,0.3-0.1,0.4-0.1l2-1.2
c0.2-0.1,0.3-0.3,0.3-0.5s0-0.4-0.1-0.6l-1.3-2c-0.2-0.3-0.6-0.4-1-0.2c-0.4,0.2-0.5,0.7-0.3,1l0.2,0.4c-1.7-0.6-3.1-1.7-4.1-3.3
c-1.1-1.7-1.4-3.8-1-5.9c0,0,0,0,0,0l0-0.1c1-4.2,5.3-6.8,9.7-5.9c2.1,0.5,3.9,1.8,5.1,3.6c1.1,1.7,1.4,3.8,1,5.9
c-0.6,2.7-2.8,4.9-5.6,5.8c-0.4,0.1-0.6,0.5-0.5,0.9c0.1,0.4,0.5,0.6,0.9,0.5c3.3-1,5.9-3.7,6.7-6.9l0-0.1
C21.9,11,21.5,8.5,20.2,6.5z"/>
</svg>

After

Width:  |  Height:  |  Size: 976 B

View File

@ -1,9 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
<g id="Picture_FILLO" transform="translate(-378.5 -900)">
<circle id="Oval" cx="7.222" cy="7.222" r="7.222" transform="translate(381.278 902.778)" fill="#fff"/>
<g id="Oval-2" data-name="Oval" transform="translate(378.5 900)" fill="none" stroke="#fff" stroke-width="1">
<circle cx="10" cy="10" r="10" stroke="none"/>
<circle cx="10" cy="10" r="9.5" fill="none"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 492 B

View File

@ -1,3 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
<path id="refresh_FILL0_wght400_GRAD0_opsz24" d="M170-780a9.651,9.651,0,0,0,7.094-2.906A9.651,9.651,0,0,0,180-790a9.651,9.651,0,0,0-2.906-7.094A9.651,9.651,0,0,0,170-800a9.9,9.9,0,0,0-4.125.891,9.528,9.528,0,0,0-3.375,2.547V-800H160v8.75h8.75v-2.5H163.5a7.3,7.3,0,0,1,2.734-2.75,7.409,7.409,0,0,1,3.766-1,7.233,7.233,0,0,1,5.313,2.188A7.233,7.233,0,0,1,177.5-790a7.233,7.233,0,0,1-2.187,5.313A7.233,7.233,0,0,1,170-782.5a7.328,7.328,0,0,1-4.344-1.375,7.261,7.261,0,0,1-2.719-3.625h-2.625a9.87,9.87,0,0,0,3.563,5.406A9.7,9.7,0,0,0,170-780Z" transform="translate(-160 800)" fill="#fff"/>
</svg>

Before

Width:  |  Height:  |  Size: 679 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M6 6h12v12H6z" fill="#ff0000"/></svg>

After

Width:  |  Height:  |  Size: 166 B

View File

@ -1,6 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="15" height="16" viewBox="0 0 15 16">
<g id="Stop_FILLO" fill="none" stroke="#fff" stroke-width="1.5">
<rect width="15" height="16" rx="5" stroke="none"/>
<rect x="0.75" y="0.75" width="13.5" height="14.5" rx="4.25" fill="none"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 300 B

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2019-2024 Savoir-faire Linux Inc.
* Copyright (C) 2019-2023 Savoir-faire Linux Inc.
* Author: Yang Wang <yang.wang@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2024 Savoir-faire Linux Inc.
* Copyright (C) 2020-2023 Savoir-faire Linux Inc.
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2022-2024 Savoir-faire Linux Inc.
* Copyright (C) 2022-2023 Savoir-faire Linux Inc.
* Author: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2024 Savoir-faire Linux Inc.
* Copyright (C) 2020-2023 Savoir-faire Linux Inc.
* Author: Aline Gondim Santos <aline.gondimsantos@savoirfairelinux.com>
* Author: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
* Author: Albert Babí <albert.babi@savoirfairelinux.com>

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2024 Savoir-faire Linux Inc.
* Copyright (C) 2023 Savoir-faire Linux Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2024 Savoir-faire Linux Inc.
* Copyright (C) 2023 Savoir-faire Linux Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2019-2024 Savoir-faire Linux Inc.
* Copyright (C) 2019-2023 Savoir-faire Linux Inc.
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2024 Savoir-faire Linux Inc.
* Copyright (C) 2020-2023 Savoir-faire Linux Inc.
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
* Author: Yang Wang <yang.yang@savoirfairelinux.com>
* Author: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2024 Savoir-faire Linux Inc.
* Copyright (C) 2021-2023 Savoir-faire Linux Inc.
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2019-2024 Savoir-faire Linux Inc.
* Copyright (C) 2019-2023 Savoir-faire Linux Inc.
* Author: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
*

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2019-2024 Savoir-faire Linux Inc.
* Copyright (C) 2019-2023 Savoir-faire Linux Inc.
* Author: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
*

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2024 Savoir-faire Linux Inc.
* Copyright (C) 2021-2023 Savoir-faire Linux Inc.
* Author: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify
@ -137,11 +137,4 @@ AppSettingsManager::loadTranslations()
}
Q_EMIT retranslate();
loadHistory();
}
void
AppSettingsManager::loadHistory()
{
Q_EMIT reloadHistory();
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2024 Savoir-faire Linux Inc.
* Copyright (C) 2020-2023 Savoir-faire Linux Inc.
* Author: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify
@ -20,21 +20,20 @@
#pragma once
#include "utils.h"
#include <QMetaEnum>
#include <QObject>
#include <QString>
#include <QStandardPaths>
#include <QWindow> // for QWindow::AutomaticVisibility
#include <QSettings>
#include <QDir>
#include <QTranslator>
extern const QString defaultDownloadPath;
// clang-format off
// Common key-value pairs for both APPSTORE and non-APPSTORE builds
#define COMMON_KEYS \
#define KEYS \
X(MinimizeOnClose, false) \
X(DownloadPath, defaultDownloadPath) \
X(ScreenshotPath, {}) \
@ -65,19 +64,11 @@ extern const QString defaultDownloadPath;
X(ShowMardownOption, false) \
X(ChatViewEnterIsNewLine, false) \
X(ShowSendOption, false) \
X(EnablePtt, false) \
X(PttKeys, 32)
#ifdef APPSTORE
#define KEYS COMMON_KEYS
#else
// Additional key-value pairs for non-APPSTORE builds including donation
// related settings.
#define KEYS COMMON_KEYS \
X(Donation2023VisibleDate, "2023-11-27 05:00") \
X(IsDonationVisible, true) \
X(Donation2023EndDate, "2024-01-31 00:00")
#endif
X(Donation2023EndDate, "2024-01-31 00:00") \
X(EnablePtt, false) \
X(PttKeys, 32)
/*
* A class to expose settings keys in both c++ and QML.
* Note: this is using a non-constructable class instead of a
@ -115,9 +106,8 @@ public:
default: return {};
}
}
private:
Settings() = delete;
Settings() = delete;
};
Q_DECLARE_METATYPE(Settings::Key)
// clang-format on
@ -140,11 +130,9 @@ public:
QString getLanguage();
void loadTranslations();
void loadHistory();
Q_SIGNALS:
void retranslate();
void reloadHistory();
private:
QSettings* settings_;

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2024 Savoir-faire Linux Inc.
* Copyright (C) 2020-2023 Savoir-faire Linux Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2024 Savoir-faire Linux Inc.
* Copyright (C) 2020-2023 Savoir-faire Linux Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2024 Savoir-faire Linux Inc.
* Copyright (C) 2021-2023 Savoir-faire Linux Inc.
* Author: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2024 Savoir-faire Linux Inc.
* Copyright (C) 2021-2023 Savoir-faire Linux Inc.
* Author: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2019-2024 Savoir-faire Linux Inc.
* Copyright (C) 2019-2023 Savoir-faire Linux Inc.
* Author: Yang Wang <yang.wang@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2019-2024 Savoir-faire Linux Inc.
* Copyright (C) 2019-2023 Savoir-faire Linux Inc.
* Author: Yang Wang <yang.wang@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2024 Savoir-faire Linux Inc.
* Copyright (C) 2020-2023 Savoir-faire Linux Inc.
* Author : Edric Ladent Milaret<edric.ladent - milaret @savoirfairelinux.com>
* Author : Andreas Traczyk<andreas.traczyk @savoirfairelinux.com>
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
@ -204,10 +204,16 @@ AvAdapter::shareFile(const QString& filePath)
&lrc::api::AVModel::fileOpened,
this,
[this, callId, filePath, resource](bool hasAudio, bool hasVideo) {
lrcInstance_->avModel().setAutoRestart(resource, true);
lrcInstance_->getCurrentCallModel()
->addMedia(callId, filePath, lrc::api::CallModel::MediaRequestType::FILESHARING, false, hasAudio);
lrcInstance_->avModel().pausePlayer(resource, false);
// TODO: allow audio only sharing
if (hasVideo) { // only start sharing if video is available
lrcInstance_->avModel().pausePlayer(resource, false);
lrcInstance_->avModel().setAutoRestart(resource, true);
lrcInstance_->getCurrentCallModel()
->addMedia(callId, filePath, lrc::api::CallModel::MediaRequestType::FILESHARING, false, hasAudio);
} else {
// Close media player because we are not going to start sharing
lrcInstance_->avModel().closeMediaPlayer(resource);
}
});
lrcInstance_->avModel().createMediaPlayer(resource);

View File

@ -1,5 +1,5 @@
/*!
* Copyright (C) 2020-2024 Savoir-faire Linux Inc.
* Copyright (C) 2020-2023 Savoir-faire Linux Inc.
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2024 Savoir-faire Linux Inc.
* Copyright (C) 2020-2023 Savoir-faire Linux Inc.
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
* Author: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
*

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2024 Savoir-faire Linux Inc.
* Copyright (C) 2021-2023 Savoir-faire Linux Inc.
* Author: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify
@ -27,8 +27,7 @@ AvatarRegistry::AvatarRegistry(LRCInstance* instance, QObject* parent)
connect(lrcInstance_,
&LRCInstance::currentAccountIdChanged,
this,
&AvatarRegistry::connectAccount,
Qt::DirectConnection);
&AvatarRegistry::connectAccount);
connect(&lrcInstance_->accountModel(),
&AccountModel::profileUpdated,

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2024 Savoir-faire Linux Inc.
* Copyright (C) 2021-2023 Savoir-faire Linux Inc.
* Author: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2019-2024 Savoir-faire Linux Inc.
* Copyright (C) 2019-2023 Savoir-faire Linux Inc.
* Author: Isa Nanic <isa.nanic@savoirfairelinux.com>
* Author: Yang Wang <yang.wang@savoirfairelinux.com>
*

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2019-2024 Savoir-faire Linux Inc.
* Copyright (C) 2019-2023 Savoir-faire Linux Inc.
* Author: Isa Nanic <isa.nanic@savoirfairelinux.com>
* Author: Yang Wang <yang.wang@savoirfairelinux.com>
*

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2024 Savoir-faire Linux Inc.
* Copyright (C) 2020-2023 Savoir-faire Linux Inc.
* Author: Edric Ladent Milaret <edric.ladent-milaret@savoirfairelinux.com>
* Author: Anthony Léonard <anthony.leonard@savoirfairelinux.com>
* Author: Olivier Soldano <olivier.soldano@savoirfairelinux.com>
@ -314,7 +314,7 @@ CallAdapter::onCallStatusChanged(const QString& callId, int code)
currentConfSubcalls_.clear();
return;
}
} else if (currentConfSubcalls_.size() >= 2) {
} else {
// okay, still a conference, so just update the subcall list and this call
saveConferenceSubcalls();
Q_EMIT lrcInstance_->conversationUpdated(currentConvInfo.uid, accountId_);

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2024 Savoir-faire Linux Inc.
* Copyright (C) 2020-2023 Savoir-faire Linux Inc.
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
* Author: Sébastien Blin <sebastien.blin@savoirfairelinux.com>
* Author: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2024 Savoir-faire Linux Inc.
* Copyright (C) 2021-2023 Savoir-faire Linux Inc.
* Author: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
*

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2024 Savoir-faire Linux Inc.
* Copyright (C) 2021-2023 Savoir-faire Linux Inc.
* Author: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
*

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2022-2024 Savoir-faire Linux Inc.
* Copyright (C) 2022-2023 Savoir-faire Linux Inc.
* Author: Aline Gondim Santos <aline.gondimsantos@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2022-2024 Savoir-faire Linux Inc.
* Copyright (C) 2022-2023 Savoir-faire Linux Inc.
* Author: Aline Gondim Santos <aline.gondimsantos@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2024 Savoir-faire Linux Inc.
* Copyright (C) 2020-2023 Savoir-faire Linux Inc.
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
* Author: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
*

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2024 Savoir-faire Linux Inc.
* Copyright (C) 2021-2023 Savoir-faire Linux Inc.
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2024 Savoir-faire Linux Inc.
* Copyright (C) 2020-2023 Savoir-faire Linux Inc.
* Author: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2024 Savoir-faire Linux Inc.
* Copyright (C) 2023 Savoir-faire Linux Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2024 Savoir-faire Linux Inc.
* Copyright (C) 2021-2023 Savoir-faire Linux Inc.
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2022-2024 Savoir-faire Linux Inc.
* Copyright (C) 2022-2023 Savoir-faire Linux Inc.
* Author: Sébastien Blin <sebastien.blin@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify
@ -25,17 +25,15 @@ import net.jami.Constants 1.1
SBSMessageBase {
id: root
component JoinCallButton: MaterialButton {
component JoinCallButton: PushButton {
visible: root.isActive
toolTipText: JamiStrings.joinCall
color: JamiTheme.blackColor
background.opacity: hovered ? 0.2 : 0.1
hoveredColor: JamiTheme.blackColor
contentColorProvider: JamiTheme.textColor
textOpacity: hovered ? 1 : 0.5
buttontextHeightMargin: 16
textLeftPadding: 9
textRightPadding: 9
preferredSize: visible ? 40 : 0
imageColor: callLabel.color
normalColor: "transparent"
hoveredColor: Qt.rgba(255, 255, 255, 0.2)
border.width: 1
border.color: callLabel.color
}
property bool isRemoteImage
@ -45,20 +43,12 @@ SBSMessageBase {
readers: Readers
formattedTime: MessagesAdapter.getFormattedTime(Timestamp)
bubble.border.color: CurrentConversation.color
bubble.border.width: root.isActive ? 1.5 : 0
Connections {
target: CurrentConversation
enabled: root.isActive
function onActiveCallsChanged() {
root.isActive = LRCInstance.indexOfActiveCall(ConfId, ActionUri, DeviceId) !== -1;
if (root.isActive) {
bubble.mask.border.color = CurrentConversation.color;
bubble.mask.border.width = 1.5;
bubble.mask.z = -2;
}
}
}
@ -66,6 +56,13 @@ SBSMessageBase {
visible: isActive || ConfId === "" || Duration > 0
property var baseColor: isOutgoing? CurrentConversation.color : JamiTheme.messageInBgColor
bubble.color: {
if (ConfId === "" && Duration === 0) {
// If missed, we can add a darker pattern
return Qt.lighter(root.baseColor, 1.15)
}
return root.baseColor
}
innerContent.children: [
RowLayout {
@ -76,21 +73,20 @@ SBSMessageBase {
Label {
id: callLabel
padding: 10
Layout.margins: 8
Layout.fillWidth: true
Layout.rightMargin: root.isActive ? 0 : root.timeWidth + 16
Layout.leftMargin: root.isActive ? 10 : 8
text: {
if (root.isActive)
return JamiStrings.startedACall;
return JamiStrings.joinCall;
return Body;
}
horizontalAlignment: Qt.AlignHCenter
font.pointSize: JamiTheme.mediumFontSize
font.hintingPreference: Font.PreferNoHinting
font.bold: true
renderType: Text.NativeRendering
textFormat: Text.MarkdownText
@ -99,21 +95,17 @@ SBSMessageBase {
JoinCallButton {
id: joinCallInAudio
Layout.topMargin: 4
Layout.bottomMargin: 4
text: JamiStrings.joinInAudio
source: JamiResources.place_audiocall_24dp_svg
onClicked: MessagesAdapter.joinCall(ActionUri, DeviceId, ConfId, true)
}
JoinCallButton {
id: joinCallInVideo
text: JamiStrings.joinInVideo
Layout.topMargin: 4
Layout.bottomMargin: 4
source: JamiResources.videocam_24dp_svg
onClicked: MessagesAdapter.joinCall(ActionUri, DeviceId, ConfId)
Layout.rightMargin: 4
Layout.rightMargin: parent.spacing
}
}
]
@ -124,8 +116,5 @@ SBSMessageBase {
duration: 100
}
}
Component.onCompleted: {
bubble.timestampItem.visible = !root.isActive;
opacity = 1;
}
Component.onCompleted: opacity = 1
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2024 Savoir-faire Linux Inc.
* Copyright (C) 2023 Savoir-faire Linux Inc.
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -52,20 +52,21 @@ BaseModalDialog {
popupContent: ColumnLayout {
id: deleteAccountContentColumnLayout
anchors.centerIn: parent
spacing: 20
spacing: JamiTheme.preferredMarginSize
Component.onCompleted: keyItem.forceActiveFocus()
Label {
id: instructionLabel
Layout.alignment: Qt.AlignLeft
Layout.alignment: Qt.AlignCenter
Layout.preferredWidth: JamiTheme.preferredDialogWidth - 4*JamiTheme.preferredMarginSize
color: JamiTheme.textColor
text: JamiStrings.assignmentIndication
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
font.pointSize: JamiTheme.settingsFontSize
font.pointSize: JamiTheme.textFontSize
font.kerning: true
wrapMode: Text.Wrap
@ -73,13 +74,12 @@ BaseModalDialog {
Label {
id: keyLabel
Layout.alignment: Qt.AlignLeft
Layout.leftMargin: JamiTheme.preferredMarginSize
Layout.alignment: Qt.AlignCenter
color: JamiTheme.blackColor
wrapMode: Text.WordWrap
text: ""
font.pointSize: JamiTheme.textFontSize
font.pointSize: JamiTheme.settingsFontSize
font.kerning: true
horizontalAlignment: Text.AlignHCenter

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2022-2024 Savoir-faire Linux Inc.
* Copyright (C) 2022-2023 Savoir-faire Linux Inc.
* Author: Sébastien Blin <sebastien.blin@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2022-2024 Savoir-faire Linux Inc.
* Copyright (C) 2022-2023 Savoir-faire Linux Inc.
* Author: Sébastien Blin <sebastien.blin@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2024 Savoir-faire Linux Inc.
* Copyright (C) 2020-2023 Savoir-faire Linux Inc.
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2024 Savoir-faire Linux Inc.
* Copyright (C) 2020-2023 Savoir-faire Linux Inc.
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2024 Savoir-faire Linux Inc.
* Copyright (C) 2021-2023 Savoir-faire Linux Inc.
* Author: Trevor Tabah <trevor.tabah@savoirfairelinux.com>
* Author: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
@ -79,7 +79,6 @@ Loader {
formattedTime: root.formattedTime
formattedDay: root.formattedTime
extraHeight: progressBar.visible ? 18 : 0
innerContent.children: [
RowLayout {
id: transferItem
@ -105,7 +104,7 @@ Loader {
property string iconSourceA
property string iconSourceB
Layout.margins: 8
Layout.margins: 12
sourceComponent: {
switch (Status) {
@ -133,22 +132,14 @@ Loader {
}
Component {
id: terminatedComp
Control {
width: 50
height: 50
padding: 13
background: Rectangle {
color: JamiTheme.blackColor
opacity: 0.15
radius: msgRadius
}
contentItem: ResponsiveImage {
source: buttonsLoader.iconSourceA
color: UtilsAdapter.luma(bubble.color) ? JamiTheme.fileIconLightColor : JamiTheme.fileIconDarkColor
}
ResponsiveImage {
source: buttonsLoader.iconSourceA
Layout.leftMargin: 12
Layout.preferredWidth: 24
Layout.preferredHeight: 24
color: UtilsAdapter.luma(bubble.color)
? JamiTheme.chatviewTextColorLight
: JamiTheme.chatviewTextColorDark
}
}
Component {
@ -188,7 +179,7 @@ Loader {
}
Column {
Layout.rightMargin: 24
spacing: 4
spacing: 6
TextEdit {
id: transferName
@ -198,6 +189,7 @@ Loader {
TransferName :
Body
wrapMode: Label.WrapAtWordBoundaryOrAnywhere
font.weight: Font.DemiBold
font.pointSize: 11
renderType: Text.NativeRendering
readOnly: true
@ -225,7 +217,7 @@ Loader {
width: Math.min(implicitWidth, maxMsgWidth)
bottomPadding: 10
text: {
var res = ""
var res = formattedTime + " - "
if (transferStats.totalSize !== undefined) {
if (transferStats.progress !== 0 &&
transferStats.progress !== transferStats.totalSize) {
@ -234,7 +226,7 @@ Loader {
var totalSize = transferStats.totalSize !== 0 ? transferStats.totalSize : TotalSize
res += UtilsAdapter.humanFileSize(totalSize)
}
return res
return res + " - " + MessagesAdapter.getStatusString(Status)
}
wrapMode: Label.WrapAtWordBoundaryOrAnywhere
font.pointSize: 10
@ -265,7 +257,6 @@ Loader {
id: localMediaMsgItem
isOutgoing: Author === CurrentAccount.uri
property var transferStats: MessagesAdapter.getTransferStats(Id, Status)
showTime: root.showTime
seq: root.seq
author: Author
@ -275,31 +266,7 @@ Loader {
readers: Readers
formattedTime: MessagesAdapter.getFormattedTime(Timestamp)
formattedDay: MessagesAdapter.getFormattedDay(Timestamp)
property real contentWidth
Component.onCompleted: {
if (transferStats.totalSize !== undefined) {
var totalSize = transferStats.totalSize !== 0 ? transferStats.totalSize : TotalSize
var txt = UtilsAdapter.humanFileSize(totalSize)
}
bubble.timestampItem.timeLabel.text += " - " + txt
bubble.color = "transparent"
if (mediaInfo.isImage)
bubble.z = 1
else
timeUnderBubble = true
}
onContentWidthChanged: {
if (bubble.timestampItem.timeLabel.width > contentWidth)
timeUnderBubble = true
else {
bubble.timestampItem.timeColor = JamiTheme.whiteColor
bubble.timestampItem.timeLabel.opacity = 1
}
}
bubble.visible: false
innerContent.children: [
Loader {
id: localMediaCompLoader
@ -315,9 +282,6 @@ Loader {
return animatedImageComp
return avComp
}
Component {
id: avComp
@ -332,7 +296,6 @@ Loader {
}
Component {
id: animatedImageComp
AnimatedImage {
id: animatedImg
@ -367,27 +330,12 @@ Loader {
radius: msgRadius
}
}
onWidthChanged: {
localMediaMsgItem.contentWidth = width
}
Component.onCompleted: localMediaMsgItem.bubble.imgSource = source
LinearGradient {
id: gradient
anchors.fill: parent
start: Qt.point(0, height / 3)
gradient: Gradient {
GradientStop {
position: 0.0
color: JamiTheme.transparentColor
}
GradientStop {
position: 1.0
color: JamiTheme.darkGreyColorOpacityFade
}
HoverHandler {
target : parent
onHoveredChanged: {
localMediaMsgItem.hoveredLink = hovered ? animatedImg.source : ""
}
cursorShape: Qt.PointingHandCursor
}
}
}
@ -407,8 +355,6 @@ Loader {
asynchronous: true
source: Body !== undefined ? UtilsAdapter.urlFromLocalPath(Body) : ''
Component.onCompleted: localMediaMsgItem.bubble.imgSource = source
// The sourceSize represents the maximum source dimensions.
// This should not be a dynamic binding, as property changes
// (resizing the chat view) here will trigger a reload of the image.
@ -423,14 +369,9 @@ Loader {
if (status == Image.Ready && aspectRatio) {
height = Qt.binding(() => JamiQmlUtils.clamp(idealWidth / aspectRatio, 64, 256))
width = Qt.binding(() => height * aspectRatio)
}
}
onWidthChanged: {
localMediaMsgItem.contentWidth = width
}
Rectangle {
color: JamiTheme.previewImageBackgroundColor
z: -1
@ -446,21 +387,12 @@ Loader {
radius: msgRadius
}
}
LinearGradient {
id: gradient
anchors.fill: parent
start: Qt.point(0, height / 3)
gradient: Gradient {
GradientStop {
position: 0.0
color: JamiTheme.transparentColor
}
GradientStop {
position: 1.0
color: JamiTheme.darkGreyColorOpacityFade
}
HoverHandler {
target : parent
onHoveredChanged: {
localMediaMsgItem.hoveredLink = hovered ? img.source : ""
}
cursorShape: Qt.PointingHandCursor
}
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2024 Savoir-faire Linux Inc.
* Copyright (C) 2020-2023 Savoir-faire Linux Inc.
* Author: Yang Wang <yang.wang@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify
@ -182,8 +182,6 @@ BaseModalDialog {
Rectangle {
Layout.fillWidth: true
visible: !isSIP
radius: 5
color: root.backgroundColor
@ -244,7 +242,7 @@ BaseModalDialog {
anchors.centerIn: parent
anchors.margins: 15
width: parent.width
width: accountRectangle.width
Image{
id: warningIcon
@ -262,6 +260,9 @@ BaseModalDialog {
Layout.fillWidth: true
Layout.margins: 15
visible: !isSIP
text: JamiStrings.deleteAccountInfos
font.pointSize: JamiTheme.textFontSize

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2024 Savoir-faire Linux Inc.
* Copyright (C) 2023 Savoir-faire Linux Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2022-2024 Savoir-faire Linux Inc.
* Copyright (C) 2022-2023 Savoir-faire Linux Inc.
* Author: Sébastien blin <sebastien.blin@savoirfairelinux.com>
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
*

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2022-2024 Savoir-faire Linux Inc.
* Copyright (C) 2022-2023 Savoir-faire Linux Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2024 Savoir-faire Linux Inc.
* Copyright (C) 2020-2023 Savoir-faire Linux Inc.
* Author: Albert Babí <albert.babig@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2022-2024 Savoir-faire Linux Inc.
* Copyright (C) 2022-2023 Savoir-faire Linux Inc.
* Author: Nicolas Vengeon <nicolas.vengeon@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify
@ -131,7 +131,7 @@ Popup {
Repeater {
model: emojiArray.length < 15 ? emojiArray.length : 15
delegate: Text {
text: emojiArray[index].body
text: emojiArray[index]
horizontalAlignment: Text.AlignRight
font.pointSize: JamiTheme.emojiPopupFontsize
}
@ -147,7 +147,7 @@ Popup {
delegate: Button {
id: emojiButton
text: emojiArray[index].body
text: emojiArray[index]
font.pointSize: JamiTheme.emojiPopupFontsize
background.visible: false
padding: 0
@ -155,13 +155,13 @@ Popup {
Text {
visible: emojiButton.hovered
anchors.centerIn: parent
text: emojiArray[index].body
text: emojiArray[index]
font.pointSize: JamiTheme.emojiPopupFontsizeBig
z: 1
}
onClicked: {
MessagesAdapter.removeEmojiReaction(CurrentConversation.id, emojiButton.text, emojiArray[index].commitId);
MessagesAdapter.removeEmojiReaction(CurrentConversation.id, emojiButton.text, msgId);
if (emojiArray.length === 1)
close();
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2022-2024 Savoir-faire Linux Inc.
* Copyright (C) 2022-2023 Savoir-faire Linux Inc.
* Author: Nicolas Vengeon <nicolas.vengeon@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify
@ -43,7 +43,7 @@ Item {
for (const reaction of Object.entries(reactions)) {
var authorEmojiList = reaction[1];
for (var emojiIndex in authorEmojiList) {
var emoji = authorEmojiList[emojiIndex].body;
var emoji = authorEmojiList[emojiIndex];
if (emojiList.includes(emoji)) {
var findIndex = emojiList.indexOf(emoji);
if (findIndex != -1)
@ -75,7 +75,7 @@ Item {
var authorEmojiList = reaction[1];
if (CurrentAccount.uri === authorUri) {
for (var emojiIndex in authorEmojiList) {
list[index] = authorEmojiList[emojiIndex].body;
list[index] = authorEmojiList[emojiIndex];
index++;
}
return list;

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2024 Savoir-faire Linux Inc.
* Copyright (C) 2021-2023 Savoir-faire Linux Inc.
* Author: Trevor Tabah <trevor.tabah@savoirfairelinux.com>
* Author: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2024 Savoir-faire Linux Inc.
* Copyright (C) 2021-2023 Savoir-faire Linux Inc.
* Author: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2022-2024 Savoir-faire Linux Inc.
* Copyright (C) 2022-2023 Savoir-faire Linux Inc.
* Author: Xavier Jouslin <xavier.jouslindenoray@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify

View File

@ -1,193 +0,0 @@
/*
* Copyright (C) 2022-2024 Savoir-faire Linux Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import Qt5Compat.GraphicalEffects
import net.jami.Adapters 1.1
import net.jami.Constants 1.1
import net.jami.Models 1.1
Item {
id: root
property string prefixIconSrc: {
switch (nameRegistrationState) {
case UsernameTextEdit.NameRegistrationState.FREE:
return JamiResources.circled_green_check_svg;
case UsernameTextEdit.NameRegistrationState.INVALID:
case UsernameTextEdit.NameRegistrationState.TAKEN:
return JamiResources.circled_red_cross_svg;
case UsernameTextEdit.NameRegistrationState.BLANK:
default:
return JamiResources.person_24dp_svg;
}
}
property color prefixIconColor: {
switch (nameRegistrationState) {
case UsernameTextEdit.NameRegistrationState.FREE:
return "#009980";
case UsernameTextEdit.NameRegistrationState.INVALID:
case UsernameTextEdit.NameRegistrationState.TAKEN:
return "#CC0022";
case UsernameTextEdit.NameRegistrationState.BLANK:
default:
return JamiTheme.editLineColor;
}
}
property bool isActive: false
property string infohash: CurrentAccount.uri
property string accountId: CurrentAccount.id
property string registeredName: CurrentAccount.registeredName
property string staticText: root.isActive ? registeredName : (registeredName ? registeredName : infohash)
property bool editMode: false
signal keyPressed
signal activeChanged(bool active)
property string dynamicText
property QtObject textValidator: RegularExpressionValidator {
regularExpression: /[A-Za-z0-9-]{0,32}/
}
enum NameRegistrationState {
BLANK,
INVALID,
TAKEN,
FREE,
SEARCHING
}
property int nameRegistrationState: UsernameTextEdit.NameRegistrationState.BLANK
property bool inputIsValid: dynamicText.length === 0 || nameRegistrationState === UsernameTextEdit.NameRegistrationState.FREE
signal accepted
property bool btnHovered: false
Connections {
target: CurrentAccount
function onRegisteredNameChanged() {
root.editMode = false;
}
}
Connections {
id: registeredNameFoundConnection
target: NameDirectory
enabled: dynamicText.length !== 0
function onRegisteredNameFound(status, address, name) {
if (dynamicText === name) {
switch (status) {
case NameDirectory.LookupStatus.NOT_FOUND:
nameRegistrationState = UsernameTextEdit.NameRegistrationState.FREE;
break;
case NameDirectory.LookupStatus.ERROR:
case NameDirectory.LookupStatus.INVALID_NAME:
case NameDirectory.LookupStatus.INVALID:
nameRegistrationState = UsernameTextEdit.NameRegistrationState.INVALID;
break;
case NameDirectory.LookupStatus.SUCCESS:
nameRegistrationState = UsernameTextEdit.NameRegistrationState.TAKEN;
break;
}
}
}
}
Timer {
id: lookupTimer
repeat: false
interval: JamiTheme.usernameTextEditlookupInterval
onTriggered: {
if (dynamicText.length !== 0) {
nameRegistrationState = UsernameTextEdit.NameRegistrationState.SEARCHING;
NameDirectory.lookupName(root.accountId, dynamicText);
} else {
nameRegistrationState = UsernameTextEdit.NameRegistrationState.BLANK;
}
}
}
onDynamicTextChanged: lookupTimer.restart()
onActiveChanged: function (active) {
root.isActive = active;
}
onFocusChanged: {
if (focus)
editCompField.forceActiveFocus();
}
function startEditing() {
if (!registeredName) {
root.editMode = true;
editCompField.forceActiveFocus();
nameRegistrationState = UsernameTextEdit.NameRegistrationState.BLANK;
}
}
MaterialTextField {
id: editCompField
anchors.fill: parent
visible: root.editMode
onVisibleChanged: {
if (visible) {
forceActiveFocus();
text = staticText;
}
}
focus: true
infoTipText: JamiStrings.usernameToolTip
prefixIconSrc: root.prefixIconSrc
prefixIconColor: root.prefixIconColor
suffixIconSrc: JamiResources.outline_info_24dp_svg
suffixIconColor: JamiTheme.buttonTintedBlue
textColor: JamiTheme.tintedBlue
font.pixelSize: JamiTheme.jamiIdSmallFontSize
placeholderText: JamiStrings.chooseAUsername
onAccepted: root.accepted()
onRejected: root.editMode = false;
onKeyPressed: root.keyPressed()
onTextChanged: dynamicText = text;
inputIsValid: root.inputIsValid
onFocusChanged: {
if (!focus && root.editMode && !root.btnHovered)
rejected();
activeChanged(root.editMode);
}
onIsActiveChanged: activeChanged(isActive)
validator: root.textValidator
readOnly: !root.editMode
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2022-2024 Savoir-faire Linux Inc.
* Copyright (C) 2022-2023 Savoir-faire Linux Inc.
* Author: Fadi Shehadeh <fadi.shehadeh@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify
@ -21,7 +21,7 @@ import QtQuick.Controls
import net.jami.Models 1.1
import net.jami.Constants 1.1
Control {
Rectangle {
id: root
property string icoSource: ""
@ -32,7 +32,9 @@ Control {
width: 190
height: infos.implicitHeight
contentItem: ColumnLayout {
color: JamiTheme.transparentColor
ColumnLayout {
id: infos
anchors.fill: parent
@ -77,7 +79,6 @@ Control {
color: JamiTheme.textColor
wrapMode: Text.WordWrap
text: description
lineHeight: 1.3
}
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2024 Savoir-faire Linux Inc.
* Copyright (C) 2020-2023 Savoir-faire Linux Inc.
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2024 Savoir-faire Linux Inc.
* Copyright (C) 2020-2023 Savoir-faire Linux Inc.
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2022-2024 Savoir-faire Linux Inc.
* Copyright (C) 2022-2023 Savoir-faire Linux Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -29,10 +29,6 @@ Item {
property color backgroundColor: JamiTheme.welcomeBlockColor
property color contentColor: JamiTheme.tintedBlue
property bool centered: true
property bool validated: false
property bool outsideClic: false
property bool justChanged: false
property bool clic : false
height: getHeight()
function getHeight() {
@ -42,10 +38,9 @@ Item {
Connections {
target: CurrentAccount
function onIdChanged(id) {
if (usernameTextEdit.editMode) {
usernameTextEdit.editMode = false;
if (!usernameTextEdit.readOnly) {
usernameTextEdit.readOnly = true;
}
}
}
@ -58,7 +53,8 @@ Item {
RoundedBorderRectangle {
id: leftRect
fillColor: JamiTheme.jamiIdBackgroundColor
Layout.preferredWidth: usernameTextEdit.visible ? childrenRect.width + JamiTheme.pushButtonMargins : childrenRect.width
Layout.preferredWidth: childrenRect.width
Layout.maximumWidth: jamiId.width - rightRect.width
Layout.preferredHeight: childrenRect.height
radius: {
"tl": 5,
@ -75,24 +71,24 @@ Item {
Layout.preferredHeight: 40
containerHeight: 40
containerWidth: 40
Layout.fillHeight: true
Layout.leftMargin: JamiTheme.pushButtonMargins
source: JamiResources.jami_id_logo_svg
color: JamiTheme.tintedBlue
}
IdentifierUsernameTextEdit {
UsernameTextEdit {
id: usernameTextEdit
visible: editMode
visible: !readOnly
Layout.preferredHeight: 40
Layout.preferredWidth: 300
Layout.alignment: Qt.AlignVCenter
Layout.fillWidth: true
textColor: JamiTheme.tintedBlue
fontPixelSize: staticText.length > 16 || dynamicText.length > 16 ? JamiTheme.jamiIdSmallFontSize : JamiTheme.bigFontSize
editMode: false
isPersistent: false
readOnly: true
onAccepted: {
usernameTextEdit.editMode = false;
usernameTextEdit.readOnly = true;
if (dynamicText === '') {
return;
}
@ -100,31 +96,22 @@ Item {
"registeredName": dynamicText
});
dlg.accepted.connect(function () {
usernameTextEdit.nameRegistrationState = IdentifierUsernameTextEdit.NameRegistrationState.BLANK;
usernameTextEdit.nameRegistrationState = UsernameTextEdit.NameRegistrationState.BLANK;
});
dynamicText = '';
}
}
Label{
id: usernameLabel
visible: !usernameTextEdit.editMode
verticalAlignment: Text.AlignVCenter
visible: usernameTextEdit.readOnly
Layout.alignment: Qt.AlignVCenter
Layout.rightMargin: JamiTheme.pushButtonMargins
Layout.bottomMargin: text === registeredName ? 5 : 0
Layout.maximumWidth: leftRect.width - 50
Layout.fillHeight: true
elide: Text.ElideRight
color: JamiTheme.tintedBlue
font.pixelSize : text.length > 16 ? JamiTheme.jamiIdSmallFontSize : JamiTheme.bigFontSize
property string registeredName: CurrentAccount.registeredName
property string infohash: CurrentAccount.uri
text: registeredName ? registeredName : infohash
onRegisteredNameChanged: {
text = registeredName ? registeredName : infohash
}
}
}
}
@ -161,32 +148,21 @@ Item {
if (!usernameTextEdit.editMode)
return true;
switch (usernameTextEdit.nameRegistrationState) {
case UsernameTextEdit.NameRegistrationState.BLANK:
case UsernameTextEdit.NameRegistrationState.FREE:
return true;
case UsernameTextEdit.NameRegistrationState.SEARCHING:
case UsernameTextEdit.NameRegistrationState.INVALID:
case UsernameTextEdit.NameRegistrationState.TAKEN:
case UsernameTextEdit.NameRegistrationState.BLANK:
return false;
}
}
hoverEnabled: enabled
onHoveredChanged: {
if (hovered) {
usernameTextEdit.btnHovered = true;
} else {
usernameTextEdit.btnHovered = false;
}
}
source: usernameTextEdit.editMode ? JamiResources.check_black_24dp_svg : JamiResources.assignment_ind_black_24dp_svg
toolTipText: JamiStrings.chooseUsername
onClicked: {
usernameTextEdit.forceActiveFocus();
if (!usernameTextEdit.editMode) {
if (usernameTextEdit.readOnly) {
usernameTextEdit.startEditing();
usernameTextEdit.editMode = true;
usernameTextEdit.readOnly = false;
} else {
usernameTextEdit.accepted();
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2019-2024 Savoir-faire Linux Inc.
* Copyright (C) 2019-2023 Savoir-faire Linux Inc.
* Author: Yang Wang <yang.wang@savoirfairelinux.com>
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
*

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2024 Savoir-faire Linux Inc.
* Copyright (C) 2020-2023 Savoir-faire Linux Inc.
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2024 Savoir-faire Linux Inc.
* Copyright (C) 2023 Savoir-faire Linux Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2024 Savoir-faire Linux Inc.
* Copyright (C) 2021-2023 Savoir-faire Linux Inc.
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify

Some files were not shown because too many files have changed in this diff Show More