Merge branch 'release/v1.2' of github.com:ONLYOFFICE/AppServer into release/v1.2
This commit is contained in:
commit
78cdd52e94
@ -42,7 +42,7 @@ curl https://artifacts.elastic.co/GPG-KEY-elasticsearch | apt-key add -
|
||||
echo "deb https://artifacts.elastic.co/packages/${ELASTIC_DIST}.x/apt stable main" | tee /etc/apt/sources.list.d/elastic-${ELASTIC_DIST}.x.list
|
||||
|
||||
# add nodejs repo
|
||||
curl -sL https://deb.nodesource.com/setup_12.x | bash -
|
||||
curl -sL https://deb.nodesource.com/setup_14.x | bash -
|
||||
|
||||
#add yarn repo
|
||||
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
|
||||
@ -56,16 +56,16 @@ rm packages-microsoft-prod.deb
|
||||
#install kafka
|
||||
PRODUCT_DIR="/var/www/${product}"
|
||||
if [ "$(ls "$PRODUCT_DIR/services/kafka" 2> /dev/null)" == "" ]; then
|
||||
mkdir -p ${PRODUCT_DIR}/services/
|
||||
if ! cat /etc/passwd | grep -q "kafka"; then
|
||||
adduser --quiet --home ${PRODUCT_DIR}/services/kafka --system kafka
|
||||
mkdir -p ${PRODUCT_DIR}/services/kafka/
|
||||
if ! cat /etc/passwd | grep -q "onlyoffice"; then
|
||||
adduser --quiet --home ${PRODUCT_DIR} --system --group onlyoffice
|
||||
fi
|
||||
cd ${PRODUCT_DIR}/services/kafka
|
||||
KAFKA_VERSION=$(curl https://downloads.apache.org/kafka/ | grep -Eo '3.1.[0-9]' | tail -1)
|
||||
KAFKA_ARCHIVE=$(curl https://downloads.apache.org/kafka/$KAFKA_VERSION/ | grep -Eo "kafka_2.[0-9][0-9]-$KAFKA_VERSION.tgz" | tail -1)
|
||||
curl https://downloads.apache.org/kafka/$KAFKA_VERSION/$KAFKA_ARCHIVE -O
|
||||
tar xzf $KAFKA_ARCHIVE --strip 1 && rm -rf $KAFKA_ARCHIVE
|
||||
chown -R kafka ${PRODUCT_DIR}/services/kafka/
|
||||
chown -R onlyoffice ${PRODUCT_DIR}/services/kafka/
|
||||
cd -
|
||||
fi
|
||||
|
||||
@ -76,14 +76,13 @@ Requires=network.target remote-fs.target
|
||||
After=network.target remote-fs.target
|
||||
[Service]
|
||||
Type=simple
|
||||
User=kafka
|
||||
User=onlyoffice
|
||||
ExecStart=/bin/sh -c '${PRODUCT_DIR}/services/kafka/bin/zookeeper-server-start.sh ${PRODUCT_DIR}/services/kafka/config/zookeeper.properties > ${PRODUCT_DIR}/services/kafka/zookeeper.log 2>&1'
|
||||
ExecStop=${PRODUCT_DIR}/services/kafka/bin/zookeeper-server-stop.sh
|
||||
Restart=on-abnormal
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
END
|
||||
systemctl start zookeeper
|
||||
fi
|
||||
|
||||
if [ ! -e /lib/systemd/system/kafka.service ]; then
|
||||
@ -93,14 +92,13 @@ Requires=zookeeper.service
|
||||
After=zookeeper.service
|
||||
[Service]
|
||||
Type=simple
|
||||
User=kafka
|
||||
User=onlyoffice
|
||||
ExecStart=/bin/sh -c '${PRODUCT_DIR}/services/kafka/bin/kafka-server-start.sh ${PRODUCT_DIR}/services/kafka/config/server.properties > ${PRODUCT_DIR}/services/kafka/kafka.log 2>&1'
|
||||
ExecStop=${PRODUCT_DIR}/services/kafka/bin/kafka-server-stop.sh
|
||||
Restart=on-abnormal
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
END
|
||||
systemctl start kafka
|
||||
fi
|
||||
|
||||
if ! dpkg -l | grep -q "mysql-server"; then
|
||||
@ -154,7 +152,7 @@ apt-get install -o DPkg::options::="--force-confnew" -yq \
|
||||
g++ \
|
||||
make \
|
||||
yarn \
|
||||
dotnet-sdk-5.0 \
|
||||
dotnet-sdk-6.0 \
|
||||
mysql-server \
|
||||
mysql-client \
|
||||
postgresql \
|
||||
|
@ -63,6 +63,7 @@ MYSQL_USER=""
|
||||
MYSQL_PASSWORD=""
|
||||
MYSQL_ROOT_PASSWORD=""
|
||||
MYSQL_HOST=""
|
||||
DATABASE_MIGRATION="true"
|
||||
|
||||
ZOO_PORT=""
|
||||
ZOO_HOST=""
|
||||
@ -290,6 +291,13 @@ while [ "$1" != "" ]; do
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
|
||||
-dbm | --databasemigration )
|
||||
if [ "$2" != "" ]; then
|
||||
DATABASE_MIGRATION=$2
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
|
||||
-? | -h | --help )
|
||||
echo " Usage: bash $HELP_TARGET [PARAMETER] [[PARAMETER], ...]"
|
||||
@ -320,6 +328,7 @@ while [ "$1" != "" ]; do
|
||||
echo " -ep, --externalport external appserver port (default value 8092)"
|
||||
echo " -mk, --machinekey setting for core.machinekey"
|
||||
echo " -ls, --local_scripts run the installation from local scripts"
|
||||
echo " -dbm, --databasemigration database migration (true|false)"
|
||||
echo " -?, -h, --help this help"
|
||||
echo
|
||||
echo " Install all the components without document server:"
|
||||
@ -538,6 +547,7 @@ install_docker_compose () {
|
||||
rm get-pip.py
|
||||
fi
|
||||
|
||||
python3 -m pip install --upgrade pip
|
||||
python3 -m pip install docker-compose
|
||||
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
|
||||
|
||||
@ -790,7 +800,6 @@ download_files () {
|
||||
fi
|
||||
|
||||
svn export --force https://github.com/ONLYOFFICE/${PRODUCT}/branches/${GIT_BRANCH}/build/install/docker/ ${BASE_DIR}
|
||||
svn export --force https://github.com/ONLYOFFICE/CommunityServer/branches/master/build/sql/ ${BASE_DIR}/config/ #Download SQL scripts
|
||||
|
||||
reconfigure STATUS ${STATUS}
|
||||
}
|
||||
@ -822,6 +831,7 @@ install_mysql_server () {
|
||||
reconfigure MYSQL_PASSWORD ${MYSQL_PASSWORD}
|
||||
reconfigure MYSQL_ROOT_PASSWORD ${MYSQL_ROOT_PASSWORD}
|
||||
reconfigure MYSQL_HOST ${MYSQL_HOST}
|
||||
reconfigure DATABASE_MIGRATION ${DATABASE_MIGRATION}
|
||||
|
||||
docker-compose -f $BASE_DIR/db.yml up -d
|
||||
}
|
||||
|
@ -140,13 +140,14 @@ if rpm -q "firewalld"; then
|
||||
fi
|
||||
|
||||
{ ${package_manager} check-update ${package_sysname}-${product}; APPSERVER_CHECK_UPDATE=$?; } || true
|
||||
if [[ $APPSERVER_CHECK_UPDATE -eq $UPDATE_AVAILABLE_CODE ]]; then
|
||||
APPSERVER_NEED_UPDATE="true"
|
||||
fi
|
||||
|
||||
if [ "$APPSERVER_INSTALLED" = "false" ]; then
|
||||
${package_manager} install -y ${package_sysname}-${product}
|
||||
elif [ "$APPSERVER_NEED_UPDATE" = "true" ]; then
|
||||
${package_manager} install -y ${package_sysname}-${product}
|
||||
${product}-configuration.sh \
|
||||
-mysqlh ${MYSQL_SERVER_HOST} \
|
||||
-mysqld ${MYSQL_SERVER_DB_NAME} \
|
||||
-mysqlu ${MYSQL_SERVER_USER} \
|
||||
-mysqlp ${MYSQL_ROOT_PASS}
|
||||
elif [[ $APPSERVER_CHECK_UPDATE -eq $UPDATE_AVAILABLE_CODE ]]; then
|
||||
ENVIRONMENT="$(cat /lib/systemd/system/${product}-api.service | grep -oP 'ENVIRONMENT=\K.*')"
|
||||
USER_CONNECTIONSTRING=$(json -f /etc/onlyoffice/${product}/appsettings.$ENVIRONMENT.json ConnectionStrings.default.connectionString)
|
||||
MYSQL_SERVER_HOST=$(echo $USER_CONNECTIONSTRING | grep -oP 'Server=\K.*' | grep -o '^[^;]*')
|
||||
@ -156,34 +157,12 @@ elif [ "$APPSERVER_NEED_UPDATE" = "true" ]; then
|
||||
MYSQL_ROOT_PASS=$(echo $USER_CONNECTIONSTRING | grep -oP 'Password=\K.*' | grep -o '^[^;]*')
|
||||
|
||||
${package_manager} -y update ${package_sysname}-${product}
|
||||
fi
|
||||
|
||||
if [ "${APPSERVER_INSTALLED}" = "false" ] || [ "$APPSERVER_NEED_UPDATE" = "true" ]; then
|
||||
expect << EOF
|
||||
set timeout -1
|
||||
log_user 1
|
||||
|
||||
if { "${UPDATE}" == "true" } {
|
||||
spawn ${product}-configuration.sh -e ${ENVIRONMENT}
|
||||
} else {
|
||||
spawn ${product}-configuration.sh
|
||||
}
|
||||
|
||||
expect -re "Database host:"
|
||||
send "\025$MYSQL_SERVER_HOST\r"
|
||||
|
||||
expect -re "Database name:"
|
||||
send "\025$MYSQL_SERVER_DB_NAME\r"
|
||||
|
||||
expect -re "Database user:"
|
||||
send "\025$MYSQL_SERVER_USER\r"
|
||||
|
||||
expect -re "Database password:"
|
||||
send "\025$MYSQL_ROOT_PASS\r"
|
||||
|
||||
expect eof
|
||||
EOF
|
||||
APPSERVER_INSTALLED="true";
|
||||
${product}-configuration.sh \
|
||||
-e ${ENVIRONMENT} \
|
||||
-mysqlh ${MYSQL_SERVER_HOST} \
|
||||
-mysqld ${MYSQL_SERVER_DB_NAME} \
|
||||
-mysqlu ${MYSQL_SERVER_USER} \
|
||||
-mysqlp ${MYSQL_ROOT_PASS}
|
||||
fi
|
||||
|
||||
echo ""
|
||||
|
@ -62,7 +62,7 @@ rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-$REV.noarch.r
|
||||
rpm -ivh https://rpms.remirepo.net/enterprise/remi-release-$REV.rpm || true
|
||||
|
||||
#add nodejs repo
|
||||
curl -sL https://rpm.nodesource.com/setup_12.x | bash - || true
|
||||
curl -sL https://rpm.nodesource.com/setup_14.x | bash - || true
|
||||
|
||||
#add yarn
|
||||
curl -sL https://dl.yarnpkg.com/rpm/yarn.repo | tee /etc/yum.repos.d/yarn.repo || true
|
||||
@ -183,7 +183,7 @@ ${package_manager} -y install epel-release \
|
||||
gcc-c++ \
|
||||
make \
|
||||
yarn \
|
||||
dotnet-sdk-5.0 \
|
||||
dotnet-sdk-6.0 \
|
||||
elasticsearch-${ELASTIC_VERSION} --enablerepo=elasticsearch \
|
||||
mysql-server \
|
||||
nginx \
|
||||
@ -207,4 +207,4 @@ if [ ! -e /usr/bin/json ]; then
|
||||
fi
|
||||
|
||||
systemctl daemon-reload
|
||||
package_services="rabbitmq-server postgresql redis supervisord nginx kafka mysqld"
|
||||
package_services="rabbitmq-server postgresql redis supervisord nginx mysqld"
|
||||
|
@ -92,7 +92,7 @@ while [ "$1" != "" ]; do
|
||||
|
||||
-zkp | --zookeeperport )
|
||||
if [ "$2" != "" ]; then
|
||||
ZOOKEEPER_HOST=$2
|
||||
ZOOKEEPER_PORT=$2
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
@ -208,30 +208,26 @@ install_json() {
|
||||
chown onlyoffice:onlyoffice $USER_CONF
|
||||
|
||||
set_core_machinekey
|
||||
$JSON_USERCONF "this.core={'base-domain': \"$APP_HOST\", 'machinekey': \"$CORE_MACHINEKEY\" }" \
|
||||
$JSON_USERCONF "this.core={'base-domain': \"$APP_HOST\", 'machinekey': \"$CORE_MACHINEKEY\", \
|
||||
'products': { 'folder': '/var/www/appserver/products', 'subfolder': 'server'} }" \
|
||||
-e "this.urlshortener={ 'path': '../ASC.UrlShortener/index.js' }" -e "this.thumb={ 'path': '../ASC.Thumbnails/' }" \
|
||||
-e "this.socket={ 'path': '../ASC.Socket.IO/' }" -e "this.ssoauth={ 'path': '../ASC.SsoAuth/' }" >/dev/null 2>&1
|
||||
$JSON $APP_DIR/appsettings.json -e "this.core.products.subfolder='server'" >/dev/null 2>&1
|
||||
$JSON $APP_DIR/appsettings.services.json -e "this.core={ 'products': { 'folder': '../../products', 'subfolder': 'server'} }" >/dev/null 2>&1
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
restart_services() {
|
||||
echo -n "Restarting services... "
|
||||
|
||||
sed -i "s/Type=.*/Type=simple/" $SYSTEMD_DIR/${PRODUCT}-calendar.service >/dev/null 2>&1 #Fix non-start of service
|
||||
sed -i "s/ENVIRONMENT=.*/ENVIRONMENT=$ENVIRONMENT/" $SYSTEMD_DIR/${PRODUCT}*.service >/dev/null 2>&1
|
||||
systemctl daemon-reload
|
||||
|
||||
for SVC in nginx ${MYSQL_PACKAGE} ${PRODUCT}-api ${PRODUCT}-api-system ${PRODUCT}-urlshortener ${PRODUCT}-thumbnails \
|
||||
${PRODUCT}-socket ${PRODUCT}-studio-notify ${PRODUCT}-notify ${PRODUCT}-people-server ${PRODUCT}-files \
|
||||
${PRODUCT}-files-services ${PRODUCT}-studio ${PRODUCT}-backup ${PRODUCT}-storage-encryption \
|
||||
${PRODUCT}-storage-migration ${PRODUCT}-projects-server ${PRODUCT}-telegram-service ${PRODUCT}-crm \
|
||||
${PRODUCT}-calendar ${PRODUCT}-mail elasticsearch kafka zookeeper
|
||||
${PRODUCT}-storage-migration ${PRODUCT}-telegram-service elasticsearch $KAFKA_SERVICE $ZOOKEEPER_SERVICE
|
||||
do
|
||||
systemctl enable $SVC.service >/dev/null 2>&1
|
||||
systemctl restart $SVC.service
|
||||
systemctl enable $SVC >/dev/null 2>&1
|
||||
systemctl restart $SVC
|
||||
done
|
||||
echo "OK"
|
||||
}
|
||||
@ -242,10 +238,27 @@ input_db_params(){
|
||||
local def_DB_NAME=$(echo $user_connectionString | grep -oP 'Database=\K.*' | grep -o '^[^;]*')
|
||||
local def_DB_USER=$(echo $user_connectionString | grep -oP 'User ID=\K.*' | grep -o '^[^;]*')
|
||||
|
||||
if [ -z $def_DB_HOST ] && [ -z $DB_HOST ]; then read -e -p "Database host: " -i "$DB_HOST" DB_HOST; fi
|
||||
if [ -z $def_DB_NAME ] && [ -z $DB_NAME ]; then read -e -p "Database name: " -i "$DB_NAME" DB_NAME; fi
|
||||
if [ -z $def_DB_USER ] && [ -z $DB_USER ]; then read -e -p "Database user: " -i "$DB_USER" DB_USER; fi
|
||||
if [ -z $DB_PWD ]; then read -e -p "Database password: " -i "$DB_PWD" DB_PWD; fi
|
||||
if [ -z $def_DB_HOST ] && [ -z $DB_HOST ]; then
|
||||
read -e -p "Database host: " -i "$DB_HOST" DB_HOST;
|
||||
else
|
||||
DB_HOST=${DB_HOST:-$def_DB_HOST}
|
||||
fi
|
||||
|
||||
if [ -z $def_DB_NAME ] && [ -z $DB_NAME ]; then
|
||||
read -e -p "Database name: " -i "$DB_NAME" DB_NAME;
|
||||
else
|
||||
DB_NAME=${DB_NAME:-$def_DB_NAME}
|
||||
fi
|
||||
|
||||
if [ -z $def_DB_USER ] && [ -z $DB_USER ]; then
|
||||
read -e -p "Database user: " -i "$DB_USER" DB_USER;
|
||||
else
|
||||
DB_USER=${DB_USER:-$def_DB_USER}
|
||||
fi
|
||||
|
||||
if [ -z $DB_PWD ]; then
|
||||
read -e -p "Database password: " -i "$DB_PWD" -s DB_PWD;
|
||||
fi
|
||||
}
|
||||
|
||||
establish_mysql_conn(){
|
||||
@ -267,8 +280,16 @@ establish_mysql_conn(){
|
||||
|
||||
#Save db settings in .json
|
||||
$JSON_USERCONF "this.ConnectionStrings={'default': {'connectionString': \
|
||||
\"Server=$DB_HOST;Port=$DB_PORT;Database=$DB_NAME;User ID=$DB_USER;Password=$DB_PWD;Pooling=true;Character Set=utf8;AutoEnlist=false;SSL Mode=none\"}}" >/dev/null 2>&1
|
||||
\"Server=$DB_HOST;Port=$DB_PORT;Database=$DB_NAME;User ID=$DB_USER;Password=$DB_PWD;Pooling=true;Character Set=utf8;AutoEnlist=false;SSL Mode=none;AllowPublicKeyRetrieval=true;Connection Timeout=30;Maximum Pool Size=300\"}}" >/dev/null 2>&1
|
||||
|
||||
change_mysql_config
|
||||
|
||||
#Enable database migration
|
||||
$JSON_USERCONF "this.migration={'enabled': \"true\"}" >/dev/null 2>&1
|
||||
|
||||
#Fixing appserver-backup startup error \ Adding backup_backup and backup_schedule tables
|
||||
$MYSQL -D "$DB_NAME" -e 'CREATE TABLE IF NOT EXISTS `backup_backup` ( `id` char(38) NOT NULL, `tenant_id` int(11) NOT NULL, `is_scheduled` int(1) NOT NULL, `name` varchar(255) NOT NULL, `storage_type` int(11) NOT NULL, `storage_base_path` varchar(255) DEFAULT NULL, `storage_path` varchar(255) NOT NULL, `created_on` datetime NOT NULL, `expires_on` datetime NOT NULL DEFAULT "0001-01-01 00:00:00", `storage_params` TEXT NULL, `hash` char(64) NOT NULL, PRIMARY KEY (`id`), KEY `tenant_id` (`tenant_id`), KEY `expires_on` (`expires_on`), KEY `is_scheduled` (`is_scheduled`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;' >/dev/null 2>&1
|
||||
$MYSQL -D "$DB_NAME" -e 'CREATE TABLE IF NOT EXISTS `backup_schedule` ( `tenant_id` int(11) NOT NULL, `backup_mail` int(11) NOT NULL DEFAULT "0", `cron` varchar(255) NOT NULL, `backups_stored` int(11) NOT NULL, `storage_type` int(11) NOT NULL, `storage_base_path` varchar(255) DEFAULT NULL, `last_backup_time` datetime NOT NULL, `storage_params` TEXT NULL, PRIMARY KEY (`tenant_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;' >/dev/null 2>&1
|
||||
echo "OK"
|
||||
}
|
||||
|
||||
@ -376,47 +397,6 @@ change_mysql_config(){
|
||||
systemctl restart ${MYSQL_PACKAGE} >/dev/null 2>&1
|
||||
}
|
||||
|
||||
execute_mysql_script(){
|
||||
|
||||
change_mysql_config
|
||||
|
||||
while ! $MYSQL -e ";" >/dev/null 2>&1; do
|
||||
sleep 1
|
||||
done
|
||||
|
||||
if [ "$DB_USER" = "root" ] && [ ! "$(mysql -V | grep ' 5.5.')" ]; then
|
||||
# allow connect via mysql_native_password with root and empty password
|
||||
$MYSQL -D "mysql" -e "update user set plugin='mysql_native_password' where user='root';ALTER USER '${DB_USER}'@'localhost' IDENTIFIED WITH mysql_native_password BY '${DB_PWD}';" >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
#Checking the quantity of the tables created in the db
|
||||
DB_TABLES_COUNT=$($MYSQL --silent --skip-column-names -e "SELECT COUNT(*) FROM information_schema.tables WHERE table_schema='${DB_NAME}'");
|
||||
|
||||
local SQL_DIR="/var/www/${PRODUCT}/sql"
|
||||
if [ "${DB_TABLES_COUNT}" -eq "0" ]; then
|
||||
|
||||
echo -n "Installing MYSQL database... "
|
||||
|
||||
#Adding data to the db
|
||||
sed -i -e '1 s/^/SET SQL_MODE='ALLOW_INVALID_DATES';\n/;' $SQL_DIR/onlyoffice.sql #Fix a bug related to an incorrect date
|
||||
$MYSQL -e "CREATE DATABASE IF NOT EXISTS $DB_NAME CHARACTER SET utf8 COLLATE 'utf8_general_ci';" >/dev/null 2>&1
|
||||
echo 'CREATE TABLE IF NOT EXISTS `Tenants` ( `id` varchar(200) NOT NULL, `Status` varchar(200) NOT NULL) ENGINE=InnoDB DEFAULT CHARSET=utf8;' >> $SQL_DIR/onlyoffice.sql #Fix non-existent tables Tenants
|
||||
$MYSQL "$DB_NAME" < "$SQL_DIR/createdb.sql" >/dev/null 2>&1
|
||||
$MYSQL "$DB_NAME" < "$SQL_DIR/onlyoffice.sql" >/dev/null 2>&1
|
||||
$MYSQL "$DB_NAME" < "$SQL_DIR/onlyoffice.data.sql" >/dev/null 2>&1
|
||||
$MYSQL "$DB_NAME" < "$SQL_DIR/onlyoffice.resources.sql" >/dev/null 2>&1
|
||||
for i in $(ls $SQL_DIR/*upgrade*.sql); do
|
||||
$MYSQL "$DB_NAME" < ${i} >/dev/null 2>&1
|
||||
done
|
||||
else
|
||||
echo -n "Upgrading MySQL database... "
|
||||
for i in $(ls $SQL_DIR/*upgrade*.sql); do
|
||||
$MYSQL "$DB_NAME" < ${i} >/dev/null 2>&1
|
||||
done
|
||||
fi
|
||||
echo "OK"
|
||||
}
|
||||
|
||||
setup_nginx(){
|
||||
echo -n "Configuring nginx... "
|
||||
|
||||
@ -443,7 +423,6 @@ setup_nginx(){
|
||||
PORTS+=('5002') #ASC.People
|
||||
PORTS+=('5008') #ASC.Files/client
|
||||
PORTS+=('5013') #ASC.Files/editor
|
||||
PORTS+=('5014') #ASC.CRM
|
||||
setsebool -P httpd_can_network_connect on
|
||||
;;
|
||||
disabled)
|
||||
@ -549,8 +528,6 @@ change_elasticsearch_config(){
|
||||
if [ -d /etc/elasticsearch/ ]; then
|
||||
chmod g+ws /etc/elasticsearch/
|
||||
fi
|
||||
|
||||
systemctl start elasticsearch
|
||||
}
|
||||
|
||||
setup_elasticsearch() {
|
||||
@ -566,7 +543,8 @@ setup_elasticsearch() {
|
||||
|
||||
setup_kafka() {
|
||||
|
||||
KAFKA_SERVICE=$(systemctl list-units --no-legend "*kafka*" | cut -f1 -d' ')
|
||||
KAFKA_SERVICE=$(systemctl list-unit-files --no-legend "*kafka*" | grep -oE '[^ ]+.service')
|
||||
ZOOKEEPER_SERVICE=$(systemctl list-unit-files --no-legend "*zookeeper*" | grep -oE '[^ ]+.service')
|
||||
|
||||
if [ -n ${KAFKA_SERVICE} ]; then
|
||||
|
||||
@ -582,7 +560,9 @@ setup_kafka() {
|
||||
sed -i "s/bootstrap.servers=.*/bootstrap.servers=${KAFKA_HOST}:${KAFKA_PORT}/g" $KAFKA_CONF/connect-standalone.properties
|
||||
sed -i "s/logger.kafka.controller=.*,/logger.kafka.controller=INFO,/g" $KAFKA_CONF/log4j.properties
|
||||
sed -i "s/logger.state.change.logger=.*,/logger.state.change.logger=INFO,/g" $KAFKA_CONF/log4j.properties
|
||||
echo "log4j.logger.kafka.producer.async.DefaultEventHandler=INFO, kafkaAppender" >> $KAFKA_CONF/log4j.properties
|
||||
if ! grep -q "DefaultEventHandler" $KAFKA_CONF/log4j.properties; then
|
||||
echo "log4j.logger.kafka.producer.async.DefaultEventHandler=INFO, kafkaAppender" >> $KAFKA_CONF/log4j.properties
|
||||
fi
|
||||
|
||||
#Save kafka parameters in .json
|
||||
$JSON_USERCONF "this.kafka={'BootstrapServers': \"${KAFKA_HOST}:${KAFKA_PORT}\"}" >/dev/null 2>&1
|
||||
@ -607,7 +587,6 @@ install_json
|
||||
if $PACKAGE_MANAGER mysql-client >/dev/null 2>&1 || $PACKAGE_MANAGER mysql-community-client >/dev/null 2>&1; then
|
||||
input_db_params
|
||||
establish_mysql_conn || exit $?
|
||||
execute_mysql_script || exit $?
|
||||
fi
|
||||
|
||||
if $PACKAGE_MANAGER nginx >/dev/null 2>&1; then
|
||||
|
@ -39,6 +39,7 @@ LOG_DIR="/var/log/onlyoffice/${PRODUCT}"
|
||||
DOTNET_RUN="/usr/share/dotnet/dotnet"
|
||||
APP_URLS="http://0.0.0.0"
|
||||
ENVIRONMENT=" --ENVIRONMENT=production"
|
||||
CORE=" --core:products:folder=${BASE_DIR}/products --core:products:subfolder=server"
|
||||
|
||||
SERVICE_NAME=(
|
||||
api
|
||||
@ -55,11 +56,7 @@ SERVICE_NAME=(
|
||||
backup
|
||||
storage-encryption
|
||||
storage-migration
|
||||
projects-server
|
||||
telegram-service
|
||||
crm
|
||||
calendar
|
||||
mail
|
||||
ssoauth
|
||||
)
|
||||
|
||||
@ -94,13 +91,11 @@ reassign_values (){
|
||||
SERVICE_PORT="5006"
|
||||
WORK_DIR="${BASE_DIR}/services/ASC.Studio.Notify/"
|
||||
EXEC_FILE="ASC.Studio.Notify.dll"
|
||||
CORE=" --core:products:folder=${BASE_DIR}/products --core:products:subfolder=server "
|
||||
;;
|
||||
notify )
|
||||
SERVICE_PORT="5005"
|
||||
WORK_DIR="${BASE_DIR}/services/ASC.Notify/"
|
||||
EXEC_FILE="ASC.Notify.dll"
|
||||
CORE=" --core:products:folder=${BASE_DIR}/products --core:products:subfolder=server "
|
||||
;;
|
||||
people-server )
|
||||
SERVICE_PORT="5004"
|
||||
@ -116,7 +111,6 @@ reassign_values (){
|
||||
SERVICE_PORT="5009"
|
||||
WORK_DIR="${BASE_DIR}/products/ASC.Files/service/"
|
||||
EXEC_FILE="ASC.Files.Service.dll"
|
||||
CORE=" --core:products:folder=${BASE_DIR}/products --core:products:subfolder=server"
|
||||
;;
|
||||
studio )
|
||||
SERVICE_PORT="5003"
|
||||
@ -127,7 +121,6 @@ reassign_values (){
|
||||
SERVICE_PORT="5012"
|
||||
WORK_DIR="${BASE_DIR}/services/ASC.Data.Backup/"
|
||||
EXEC_FILE="ASC.Data.Backup.dll"
|
||||
CORE=" --core:products:folder=${BASE_DIR}/products --core:products:subfolder=server"
|
||||
;;
|
||||
storage-migration )
|
||||
SERVICE_PORT="5018"
|
||||
@ -139,31 +132,11 @@ reassign_values (){
|
||||
WORK_DIR="${BASE_DIR}/services/ASC.Data.Storage.Encryption/"
|
||||
EXEC_FILE="ASC.Data.Storage.Encryption.dll"
|
||||
;;
|
||||
projects-server )
|
||||
SERVICE_PORT="5020"
|
||||
WORK_DIR="${BASE_DIR}/products/ASC.Projects/server/"
|
||||
EXEC_FILE="ASC.Projects.dll"
|
||||
;;
|
||||
telegram-service )
|
||||
SERVICE_PORT="51702"
|
||||
WORK_DIR="${BASE_DIR}/services/ASC.TelegramService/"
|
||||
EXEC_FILE="ASC.TelegramService.dll"
|
||||
;;
|
||||
crm )
|
||||
SERVICE_PORT="5021"
|
||||
WORK_DIR="${BASE_DIR}/products/ASC.CRM/server/"
|
||||
EXEC_FILE="ASC.CRM.dll"
|
||||
;;
|
||||
calendar )
|
||||
SERVICE_PORT="5023"
|
||||
WORK_DIR="${BASE_DIR}/products/ASC.Calendar/server/"
|
||||
EXEC_FILE="ASC.Calendar.dll"
|
||||
;;
|
||||
mail )
|
||||
SERVICE_PORT="5022"
|
||||
WORK_DIR="${BASE_DIR}/products/ASC.Mail/server/"
|
||||
EXEC_FILE="ASC.Mail.dll"
|
||||
;;
|
||||
ssoauth )
|
||||
SERVICE_PORT="9833"
|
||||
WORK_DIR="${BASE_DIR}/services/ASC.SsoAuth.Svc/"
|
||||
@ -173,7 +146,6 @@ reassign_values (){
|
||||
SERVICE_NAME="$1"
|
||||
EXEC_START="${DOTNET_RUN} ${WORK_DIR}${EXEC_FILE} --urls=${APP_URLS}:${SERVICE_PORT} --pathToConf=${PATH_TO_CONF} \
|
||||
--'\$STORAGE_ROOT'=${STORAGE_ROOT} --log:dir=${LOG_DIR} --log:name=${SERVICE_NAME}${CORE}${ENVIRONMENT}"
|
||||
CORE=""
|
||||
}
|
||||
|
||||
write_to_file () {
|
||||
|
@ -1,3 +1,2 @@
|
||||
../../../config/*.json etc/onlyoffice/appserver
|
||||
../../../config/*.config etc/onlyoffice/appserver
|
||||
../docker/config/*.sql var/www/appserver/sql
|
||||
|
@ -18,4 +18,4 @@ if ! cat /etc/passwd | grep -q "nginx:"; then
|
||||
fi
|
||||
|
||||
usermod -aG onlyoffice,nginx onlyoffice
|
||||
chown onlyoffice:onlyoffice /var/log/onlyoffice/appserver /var/www/appserver /etc/onlyoffice/appserver
|
||||
chown -R onlyoffice:onlyoffice /var/log/onlyoffice/appserver /var/www/appserver /etc/onlyoffice/appserver
|
||||
|
@ -1,17 +1,9 @@
|
||||
## COPY PUBLIC ##
|
||||
../../../config/nginx/onlyoffice*.conf etc/nginx/conf.d
|
||||
../../../config/nginx/includes/onlyoffice*.conf etc/nginx/includes
|
||||
../../../public/* var/www/appserver/public
|
||||
../../../public/images/* var/www/appserver/public/images
|
||||
../../../public/offline/* var/www/appserver/public/offline
|
||||
../../../public/thirdparty/* var/www/appserver/public/thirdparty
|
||||
../../../products/ASC.Calendar/Client/dist/* var/www/appserver/products/ASC.Calendar/client
|
||||
../../../products/ASC.CRM/Client/dist/* var/www/appserver/products/ASC.CRM/client
|
||||
../../../products/ASC.Projects/Client/dist/* var/www/appserver/products/ASC.Projects/client
|
||||
../../../products/ASC.Calendar/Client/dist/* var/www/appserver/products/ASC.Calendar/client
|
||||
../../../products/ASC.People/Client/dist/* var/www/appserver/products/ASC.People/client
|
||||
../../../products/ASC.Mail/Client/dist/* var/www/appserver/products/ASC.Mail/client
|
||||
../../../products/ASC.Files/Client/dist/* var/www/appserver/products/ASC.Files/client
|
||||
../../../web/ASC.Web.Editor/dist/* var/www/appserver/products/ASC.Files/editor
|
||||
../../../web/ASC.Web.Client/dist/* var/www/appserver/studio/client
|
||||
../../../web/ASC.Web.Login/dist/* var/www/appserver/studio/login
|
||||
../../../config/nginx/onlyoffice*.conf etc/nginx/conf.d
|
||||
../../../config/nginx/includes/onlyoffice*.conf etc/nginx/includes
|
||||
../../../build/deploy/public/* var/www/appserver/public
|
||||
../../../build/deploy/products/ASC.People/client/* var/www/appserver/products/ASC.People/client
|
||||
../../../build/deploy/products/ASC.Files/client/* var/www/appserver/products/ASC.Files/client
|
||||
../../../build/deploy/products/ASC.Files/editor/* var/www/appserver/products/ASC.Files/editor
|
||||
../../../build/deploy/studio/client/* var/www/appserver/studio/client
|
||||
../../../build/deploy/studio/login/* var/www/appserver/studio/login
|
||||
|
@ -1,4 +1,4 @@
|
||||
appserver (0.1-10) unstable; urgency=medium
|
||||
appserver ({{package_header_tag_version}}) unstable; urgency=medium
|
||||
|
||||
* Initial Release.
|
||||
|
||||
|
@ -2,34 +2,30 @@ Source: appserver
|
||||
Section: web
|
||||
Priority: optional
|
||||
Maintainer: onlyoffice
|
||||
Build-Depends: debhelper (>= 10), nodejs (>=10), dotnet-sdk-5.0, yarn
|
||||
Standards-Version: 0.1-10
|
||||
Build-Depends: debhelper (>= 10), nodejs (>=14), dotnet-sdk-6.0, yarn
|
||||
Standards-Version: {{package_header_tag_version}}
|
||||
Homepage: https://www.onlyoffice.com/
|
||||
Architecture: any
|
||||
|
||||
Package: appserver
|
||||
Architecture: any
|
||||
Depends: appserver-api-system,
|
||||
appserver-backup,
|
||||
appserver-calendar,
|
||||
appserver-crm,
|
||||
appserver-storage-encryption,
|
||||
appserver-files,
|
||||
appserver-files-services,
|
||||
appserver-mail,
|
||||
appserver-storage-migration,
|
||||
appserver-notify,
|
||||
appserver-people-server,
|
||||
appserver-projects-server,
|
||||
appserver-socket,
|
||||
appserver-ssoauth,
|
||||
appserver-studio-notify,
|
||||
appserver-telegram-service,
|
||||
appserver-thumbnails,
|
||||
appserver-urlshortener,
|
||||
appserver-api,
|
||||
appserver-studio,
|
||||
appserver-proxy
|
||||
Depends: appserver-api-system (= {{package_header_tag_version}}),
|
||||
appserver-backup (= {{package_header_tag_version}}),
|
||||
appserver-storage-encryption (= {{package_header_tag_version}}),
|
||||
appserver-files (= {{package_header_tag_version}}),
|
||||
appserver-files-services (= {{package_header_tag_version}}),
|
||||
appserver-storage-migration (= {{package_header_tag_version}}),
|
||||
appserver-notify (= {{package_header_tag_version}}),
|
||||
appserver-people-server (= {{package_header_tag_version}}),
|
||||
appserver-socket (= {{package_header_tag_version}}),
|
||||
appserver-ssoauth (= {{package_header_tag_version}}),
|
||||
appserver-studio-notify (= {{package_header_tag_version}}),
|
||||
appserver-telegram-service (= {{package_header_tag_version}}),
|
||||
appserver-thumbnails (= {{package_header_tag_version}}),
|
||||
appserver-urlshortener (= {{package_header_tag_version}}),
|
||||
appserver-api (= {{package_header_tag_version}}),
|
||||
appserver-studio (= {{package_header_tag_version}}),
|
||||
appserver-proxy (= {{package_header_tag_version}})
|
||||
Description: Description
|
||||
|
||||
Package: appserver-common
|
||||
@ -44,174 +40,138 @@ Description: Description
|
||||
|
||||
Package: appserver-api-system
|
||||
Architecture: any
|
||||
Depends: appserver-common,
|
||||
Depends: appserver-common (= {{package_header_tag_version}}),
|
||||
appserver-configuration,
|
||||
dotnet-sdk-5.0,
|
||||
dotnet-sdk-6.0,
|
||||
${misc:Depends},
|
||||
${shlibs:Depends}
|
||||
Description: Description
|
||||
|
||||
Package: appserver-backup
|
||||
Architecture: any
|
||||
Depends: appserver-common,
|
||||
Depends: appserver-common (= {{package_header_tag_version}}),
|
||||
appserver-configuration,
|
||||
dotnet-sdk-5.0,
|
||||
${misc:Depends},
|
||||
${shlibs:Depends}
|
||||
Description: Description
|
||||
|
||||
Package: appserver-calendar
|
||||
Architecture: any
|
||||
Depends: appserver-common,
|
||||
appserver-configuration,
|
||||
dotnet-sdk-5.0,
|
||||
${misc:Depends},
|
||||
${shlibs:Depends}
|
||||
Description: Description
|
||||
|
||||
Package: appserver-crm
|
||||
Architecture: any
|
||||
Depends: appserver-common,
|
||||
appserver-configuration,
|
||||
dotnet-sdk-5.0,
|
||||
dotnet-sdk-6.0,
|
||||
${misc:Depends},
|
||||
${shlibs:Depends}
|
||||
Description: Description
|
||||
|
||||
Package: appserver-storage-encryption
|
||||
Architecture: any
|
||||
Depends: appserver-common,
|
||||
Depends: appserver-common (= {{package_header_tag_version}}),
|
||||
appserver-configuration,
|
||||
dotnet-sdk-5.0,
|
||||
dotnet-sdk-6.0,
|
||||
${misc:Depends},
|
||||
${shlibs:Depends}
|
||||
Description: Description
|
||||
|
||||
Package: appserver-files
|
||||
Architecture: any
|
||||
Depends: appserver-common,
|
||||
Depends: appserver-common (= {{package_header_tag_version}}),
|
||||
appserver-configuration,
|
||||
dotnet-sdk-5.0,
|
||||
dotnet-sdk-6.0,
|
||||
${misc:Depends},
|
||||
${shlibs:Depends}
|
||||
Description: Description
|
||||
|
||||
Package: appserver-files-services
|
||||
Architecture: any
|
||||
Depends: appserver-common,
|
||||
Depends: appserver-common (= {{package_header_tag_version}}),
|
||||
appserver-configuration,
|
||||
dotnet-sdk-5.0,
|
||||
${misc:Depends},
|
||||
${shlibs:Depends}
|
||||
Description: Description
|
||||
|
||||
Package: appserver-mail
|
||||
Architecture: any
|
||||
Depends: appserver-common,
|
||||
appserver-configuration,
|
||||
dotnet-sdk-5.0,
|
||||
dotnet-sdk-6.0,
|
||||
${misc:Depends},
|
||||
${shlibs:Depends}
|
||||
Description: Description
|
||||
|
||||
Package: appserver-storage-migration
|
||||
Architecture: any
|
||||
Depends: appserver-common,
|
||||
Depends: appserver-common (= {{package_header_tag_version}}),
|
||||
appserver-configuration,
|
||||
dotnet-sdk-5.0,
|
||||
dotnet-sdk-6.0,
|
||||
${misc:Depends},
|
||||
${shlibs:Depends}
|
||||
Description: Description
|
||||
|
||||
Package: appserver-notify
|
||||
Architecture: any
|
||||
Depends: appserver-common,
|
||||
Depends: appserver-common (= {{package_header_tag_version}}),
|
||||
appserver-configuration,
|
||||
dotnet-sdk-5.0,
|
||||
dotnet-sdk-6.0,
|
||||
${misc:Depends},
|
||||
${shlibs:Depends}
|
||||
Description: Description
|
||||
|
||||
Package: appserver-people-server
|
||||
Architecture: any
|
||||
Depends: appserver-common,
|
||||
Depends: appserver-common (= {{package_header_tag_version}}),
|
||||
appserver-configuration,
|
||||
dotnet-sdk-5.0,
|
||||
${misc:Depends},
|
||||
${shlibs:Depends}
|
||||
Description: Description
|
||||
|
||||
Package: appserver-projects-server
|
||||
Architecture: any
|
||||
Depends: appserver-common,
|
||||
appserver-configuration,
|
||||
dotnet-sdk-5.0,
|
||||
dotnet-sdk-6.0,
|
||||
${misc:Depends},
|
||||
${shlibs:Depends}
|
||||
Description: Description
|
||||
|
||||
Package: appserver-socket
|
||||
Architecture: any
|
||||
Depends: appserver-common,
|
||||
Depends: appserver-common (= {{package_header_tag_version}}),
|
||||
appserver-configuration,
|
||||
dotnet-sdk-5.0,
|
||||
nodejs (>=10),
|
||||
dotnet-sdk-6.0,
|
||||
nodejs (>=14),
|
||||
${misc:Depends},
|
||||
${shlibs:Depends}
|
||||
Description: Description
|
||||
|
||||
Package: appserver-studio-notify
|
||||
Architecture: any
|
||||
Depends: appserver-common,
|
||||
Depends: appserver-common (= {{package_header_tag_version}}),
|
||||
appserver-configuration,
|
||||
dotnet-sdk-5.0,
|
||||
dotnet-sdk-6.0,
|
||||
${misc:Depends},
|
||||
${shlibs:Depends}
|
||||
Description: Description
|
||||
|
||||
Package: appserver-telegram-service
|
||||
Architecture: any
|
||||
Depends: appserver-common,
|
||||
Depends: appserver-common (= {{package_header_tag_version}}),
|
||||
appserver-configuration,
|
||||
dotnet-sdk-5.0,
|
||||
dotnet-sdk-6.0,
|
||||
${misc:Depends},
|
||||
${shlibs:Depends}
|
||||
Description: Description
|
||||
|
||||
Package: appserver-thumbnails
|
||||
Architecture: any
|
||||
Depends: appserver-common,
|
||||
Depends: appserver-common (= {{package_header_tag_version}}),
|
||||
appserver-configuration,
|
||||
dotnet-sdk-5.0,
|
||||
nodejs (>=10),
|
||||
dotnet-sdk-6.0,
|
||||
nodejs (>=14),
|
||||
${misc:Depends},
|
||||
${shlibs:Depends}
|
||||
Description: Description
|
||||
|
||||
Package: appserver-urlshortener
|
||||
Architecture: any
|
||||
Depends: appserver-common,
|
||||
Depends: appserver-common (= {{package_header_tag_version}}),
|
||||
appserver-configuration,
|
||||
dotnet-sdk-5.0,
|
||||
nodejs (>=10),
|
||||
dotnet-sdk-6.0,
|
||||
nodejs (>=14),
|
||||
${misc:Depends},
|
||||
${shlibs:Depends}
|
||||
Description: Description
|
||||
|
||||
Package: appserver-api
|
||||
Architecture: any
|
||||
Depends: appserver-common,
|
||||
Depends: appserver-common (= {{package_header_tag_version}}),
|
||||
appserver-configuration,
|
||||
dotnet-sdk-5.0,
|
||||
dotnet-sdk-6.0,
|
||||
${misc:Depends},
|
||||
${shlibs:Depends}
|
||||
Description: Description
|
||||
|
||||
Package: appserver-studio
|
||||
Architecture: any
|
||||
Depends: appserver-common,
|
||||
Depends: appserver-common (= {{package_header_tag_version}}),
|
||||
appserver-configuration,
|
||||
dotnet-sdk-5.0,
|
||||
dotnet-sdk-6.0,
|
||||
${misc:Depends},
|
||||
${shlibs:Depends}
|
||||
Description: Description
|
||||
@ -223,10 +183,10 @@ Description: Description
|
||||
|
||||
Package: appserver-ssoauth
|
||||
Architecture: any
|
||||
Depends: appserver-common,
|
||||
Depends: appserver-common (= {{package_header_tag_version}}),
|
||||
appserver-configuration,
|
||||
dotnet-sdk-5.0,
|
||||
nodejs (>=10),
|
||||
dotnet-sdk-6.0,
|
||||
nodejs (>=14),
|
||||
${misc:Depends},
|
||||
${shlibs:Depends}
|
||||
Description: Description
|
||||
|
@ -42,8 +42,8 @@ override_dh_fixperms:
|
||||
dh_fixperms
|
||||
|
||||
override_dh_auto_install:
|
||||
dh_installinit
|
||||
dh_systemd_enable
|
||||
dh_installinit --no-start
|
||||
dh_systemd_enable --no-enable
|
||||
dh_systemd_start --no-start
|
||||
|
||||
override_dh_strip:
|
||||
|
@ -18,33 +18,28 @@ License: AGPLv3
|
||||
Source0: https://github.com/ONLYOFFICE/%{product}/archive/%GIT_BRANCH.tar.gz#/%{sourcename}.tar.gz
|
||||
Source1: https://github.com/ONLYOFFICE/document-templates/archive/main/community-server.tar.gz#/document-templates-main-community-server.tar.gz
|
||||
Source2: https://github.com/ONLYOFFICE/dictionaries/archive/master.tar.gz#/dictionaries-master.tar.gz
|
||||
Source3: https://github.com/ONLYOFFICE/CommunityServer/archive/master.tar.gz#/CommunityServer-master.tar.gz
|
||||
|
||||
BuildRequires: nodejs >= 12.0
|
||||
BuildRequires: nodejs >= 14.0
|
||||
BuildRequires: yarn
|
||||
BuildRequires: dotnet-sdk-5.0
|
||||
BuildRequires: dotnet-sdk-6.0
|
||||
|
||||
Requires: %name-api-system
|
||||
Requires: %name-calendar
|
||||
Requires: %name-crm
|
||||
Requires: %name-backup
|
||||
Requires: %name-storage-encryption
|
||||
Requires: %name-storage-migration
|
||||
Requires: %name-files
|
||||
Requires: %name-files-services
|
||||
Requires: %name-mail
|
||||
Requires: %name-notify
|
||||
Requires: %name-people-server
|
||||
Requires: %name-projects-server
|
||||
Requires: %name-socket
|
||||
Requires: %name-ssoauth
|
||||
Requires: %name-studio-notify
|
||||
Requires: %name-telegram-service
|
||||
Requires: %name-thumbnails
|
||||
Requires: %name-urlshortener
|
||||
Requires: %name-api
|
||||
Requires: %name-studio
|
||||
Requires: %name-proxy
|
||||
Requires: %name-api-system = %version-%release
|
||||
Requires: %name-backup = %version-%release
|
||||
Requires: %name-storage-encryption = %version-%release
|
||||
Requires: %name-storage-migration = %version-%release
|
||||
Requires: %name-files = %version-%release
|
||||
Requires: %name-files-services = %version-%release
|
||||
Requires: %name-notify = %version-%release
|
||||
Requires: %name-people-server = %version-%release
|
||||
Requires: %name-socket = %version-%release
|
||||
Requires: %name-ssoauth = %version-%release
|
||||
Requires: %name-studio-notify = %version-%release
|
||||
Requires: %name-telegram-service = %version-%release
|
||||
Requires: %name-thumbnails = %version-%release
|
||||
Requires: %name-urlshortener = %version-%release
|
||||
Requires: %name-api = %version-%release
|
||||
Requires: %name-studio = %version-%release
|
||||
Requires: %name-proxy = %version-%release
|
||||
|
||||
%description
|
||||
App Server is a platform for building your own online office by connecting ONLYOFFICE modules packed as separate apps.
|
||||
@ -54,10 +49,9 @@ App Server is a platform for building your own online office by connecting ONLYO
|
||||
%prep
|
||||
|
||||
rm -rf %{_rpmdir}/%{_arch}/%{name}-*
|
||||
%setup -b1 -b2 -b3 -n %{sourcename}
|
||||
%setup -b1 -b2 -n %{sourcename}
|
||||
mv -f %{_builddir}/document-templates-main-community-server/* %{_builddir}/%{sourcename}/products/ASC.Files/Server/DocStore/
|
||||
mv -f %{_builddir}/dictionaries-master/* %{_builddir}/%{sourcename}/common/Tests/Frontend.Translations.Tests/dictionaries/
|
||||
mv -f %{_builddir}/CommunityServer-master/build/sql/* %{_builddir}/%{sourcename}/build/install/docker/config/
|
||||
|
||||
%include build.spec
|
||||
|
||||
|
@ -6,26 +6,18 @@
|
||||
%{buildpath}/studio/api/
|
||||
%{buildpath}/products/ASC.People/server/ASC.People.dll
|
||||
%{buildpath}/products/ASC.Files/server/ASC.Files*.dll
|
||||
%{buildpath}/products/ASC.CRM/server/ASC.CRM*.dll
|
||||
%{buildpath}/products/ASC.Projects/server/ASC.Projects*.dll
|
||||
/lib/systemd/system/%{product}-api.service
|
||||
%dir %{buildpath}/studio/
|
||||
%dir %{buildpath}/products/ASC.People/
|
||||
%dir %{buildpath}/products/ASC.People/server/
|
||||
%dir %{buildpath}/products/ASC.Files/
|
||||
%dir %{buildpath}/products/ASC.Files/server/
|
||||
%dir %{buildpath}/products/ASC.CRM/
|
||||
%dir %{buildpath}/products/ASC.CRM/server/
|
||||
%dir %{buildpath}/products/ASC.Projects/
|
||||
%dir %{buildpath}/products/ASC.Projects/server/
|
||||
|
||||
%files backup
|
||||
%defattr(-, onlyoffice, onlyoffice, -)
|
||||
%{buildpath}/services/ASC.Data.Backup/
|
||||
%{buildpath}/products/ASC.People/server/ASC.People.dll
|
||||
%{buildpath}/products/ASC.Files/server/ASC.Files*.dll
|
||||
%{buildpath}/products/ASC.CRM/server/ASC.CRM*.dll
|
||||
%{buildpath}/products/ASC.Projects/server/ASC.Projects*.dll
|
||||
/lib/systemd/system/%{product}-backup.service
|
||||
%dir %{buildpath}/services/
|
||||
%dir %{buildpath}/products/
|
||||
@ -33,16 +25,11 @@
|
||||
%dir %{buildpath}/products/ASC.People/server/
|
||||
%dir %{buildpath}/products/ASC.Files/
|
||||
%dir %{buildpath}/products/ASC.Files/server/
|
||||
%dir %{buildpath}/products/ASC.CRM/
|
||||
%dir %{buildpath}/products/ASC.CRM/server/
|
||||
%dir %{buildpath}/products/ASC.Projects/
|
||||
%dir %{buildpath}/products/ASC.Projects/server/
|
||||
|
||||
%files common
|
||||
%defattr(-, onlyoffice, onlyoffice, -)
|
||||
%config %{_sysconfdir}/onlyoffice/%{product}/
|
||||
%{_var}/log/onlyoffice/%{product}/
|
||||
%{buildpath}/sql/
|
||||
%dir %{_sysconfdir}/onlyoffice/
|
||||
%dir %{_var}/log/onlyoffice/
|
||||
|
||||
@ -51,26 +38,18 @@
|
||||
%{buildpath}/products/ASC.Files/service/
|
||||
%{buildpath}/products/ASC.Files/server/ASC.Files*.dll
|
||||
%{buildpath}/products/ASC.People/server/ASC.People*.dll
|
||||
%{buildpath}/products/ASC.CRM/server/ASC.CRM*.dll
|
||||
%{buildpath}/products/ASC.Projects/server/ASC.Projects*.dll
|
||||
/lib/systemd/system/%{product}-files-services.service
|
||||
%dir %{buildpath}/products/
|
||||
%dir %{buildpath}/products/ASC.People/
|
||||
%dir %{buildpath}/products/ASC.People/server
|
||||
%dir %{buildpath}/products/ASC.Files/
|
||||
%dir %{buildpath}/products/ASC.Files/server/
|
||||
%dir %{buildpath}/products/ASC.CRM/
|
||||
%dir %{buildpath}/products/ASC.CRM/server/
|
||||
%dir %{buildpath}/products/ASC.Projects/
|
||||
%dir %{buildpath}/products/ASC.Projects/server/
|
||||
|
||||
%files notify
|
||||
%defattr(-, onlyoffice, onlyoffice, -)
|
||||
%{buildpath}/services/ASC.Notify/
|
||||
%{buildpath}/products/ASC.People/server/ASC.People.dll
|
||||
%{buildpath}/products/ASC.Files/server/ASC.Files*.dll
|
||||
%{buildpath}/products/ASC.CRM/server/ASC.CRM*.dll
|
||||
%{buildpath}/products/ASC.Projects/server/ASC.Projects*.dll
|
||||
/lib/systemd/system/%{product}-notify.service
|
||||
%dir %{buildpath}/services/
|
||||
%dir %{buildpath}/products/
|
||||
@ -78,26 +57,16 @@
|
||||
%dir %{buildpath}/products/ASC.People/server/
|
||||
%dir %{buildpath}/products/ASC.Files/
|
||||
%dir %{buildpath}/products/ASC.Files/server/
|
||||
%dir %{buildpath}/products/ASC.CRM/
|
||||
%dir %{buildpath}/products/ASC.CRM/server/
|
||||
%dir %{buildpath}/products/ASC.Projects/
|
||||
%dir %{buildpath}/products/ASC.Projects/server/
|
||||
|
||||
%files files
|
||||
%defattr(-, onlyoffice, onlyoffice, -)
|
||||
%{buildpath}/products/ASC.Files/server/
|
||||
%{buildpath}/products/ASC.People/server/ASC.People.dll
|
||||
%{buildpath}/products/ASC.CRM/server/ASC.CRM*.dll
|
||||
%{buildpath}/products/ASC.Projects/server/ASC.Projects*.dll
|
||||
/lib/systemd/system/%{product}-files.service
|
||||
%dir %{buildpath}/products/
|
||||
%dir %{buildpath}/products/ASC.Files/
|
||||
%dir %{buildpath}/products/ASC.People/
|
||||
%dir %{buildpath}/products/ASC.People/server/
|
||||
%dir %{buildpath}/products/ASC.CRM/
|
||||
%dir %{buildpath}/products/ASC.CRM/server/
|
||||
%dir %{buildpath}/products/ASC.Projects/
|
||||
%dir %{buildpath}/products/ASC.Projects/server/
|
||||
|
||||
%files api-system
|
||||
%defattr(-, onlyoffice, onlyoffice, -)
|
||||
@ -115,26 +84,16 @@
|
||||
%{buildpath}/products/ASC.People/client/
|
||||
%{buildpath}/products/ASC.Files/client/
|
||||
%{buildpath}/products/ASC.Files/editor/
|
||||
%{buildpath}/products/ASC.CRM/client/
|
||||
%{buildpath}/products/ASC.Projects/client/
|
||||
%{buildpath}/products/ASC.Calendar/client/
|
||||
%{buildpath}/products/ASC.Mail/client/
|
||||
%dir %{buildpath}/studio/
|
||||
%dir %{buildpath}/products/
|
||||
%dir %{buildpath}/products/ASC.People/
|
||||
%dir %{buildpath}/products/ASC.Files/
|
||||
%dir %{buildpath}/products/ASC.CRM/
|
||||
%dir %{buildpath}/products/ASC.Projects/
|
||||
%dir %{buildpath}/products/ASC.Calendar/
|
||||
%dir %{buildpath}/products/ASC.Mail/
|
||||
|
||||
%files studio-notify
|
||||
%defattr(-, onlyoffice, onlyoffice, -)
|
||||
%{buildpath}/services/ASC.Studio.Notify/
|
||||
%{buildpath}/products/ASC.People/server/ASC.People.dll
|
||||
%{buildpath}/products/ASC.Files/server/ASC.Files*.dll
|
||||
%{buildpath}/products/ASC.CRM/server/ASC.CRM*.dll
|
||||
%{buildpath}/products/ASC.Projects/server/ASC.Projects*.dll
|
||||
/lib/systemd/system/%{product}-studio-notify.service
|
||||
%dir %{buildpath}/services/
|
||||
%dir %{buildpath}/products/
|
||||
@ -142,26 +101,16 @@
|
||||
%dir %{buildpath}/products/ASC.People/server/
|
||||
%dir %{buildpath}/products/ASC.Files/
|
||||
%dir %{buildpath}/products/ASC.Files/server/
|
||||
%dir %{buildpath}/products/ASC.CRM/
|
||||
%dir %{buildpath}/products/ASC.CRM/server/
|
||||
%dir %{buildpath}/products/ASC.Projects/
|
||||
%dir %{buildpath}/products/ASC.Projects/server/
|
||||
|
||||
%files people-server
|
||||
%defattr(-, onlyoffice, onlyoffice, -)
|
||||
%{buildpath}/products/ASC.People/server/
|
||||
%{buildpath}/products/ASC.Files/server/ASC.Files*.dll
|
||||
%{buildpath}/products/ASC.CRM/server/ASC.CRM*.dll
|
||||
%{buildpath}/products/ASC.Projects/server/ASC.Projects*.dll
|
||||
/lib/systemd/system/%{product}-people-server.service
|
||||
%dir %{buildpath}/products/
|
||||
%dir %{buildpath}/products/ASC.People/
|
||||
%dir %{buildpath}/products/ASC.Files/
|
||||
%dir %{buildpath}/products/ASC.Files/server/
|
||||
%dir %{buildpath}/products/ASC.CRM/
|
||||
%dir %{buildpath}/products/ASC.CRM/server/
|
||||
%dir %{buildpath}/products/ASC.Projects/
|
||||
%dir %{buildpath}/products/ASC.Projects/server/
|
||||
|
||||
%files urlshortener
|
||||
%defattr(-, onlyoffice, onlyoffice, -)
|
||||
@ -183,23 +132,17 @@
|
||||
%{buildpath}/services/ASC.Socket.IO.Svc/
|
||||
%{buildpath}/products/ASC.Files/server/ASC.Files*.dll
|
||||
%{buildpath}/products/ASC.People/server/ASC.People.dll
|
||||
%{buildpath}/products/ASC.CRM/server/ASC.CRM*.dll
|
||||
%{buildpath}/products/ASC.Projects/server/ASC.Projects*.dll
|
||||
/lib/systemd/system/%{product}-socket.service
|
||||
%dir %{buildpath}/services/
|
||||
%dir %{buildpath}/products/
|
||||
%dir %{buildpath}/products/ASC.Files/
|
||||
%dir %{buildpath}/products/ASC.People/
|
||||
%dir %{buildpath}/products/ASC.CRM/
|
||||
%dir %{buildpath}/products/ASC.Projects/
|
||||
|
||||
%files studio
|
||||
%defattr(-, onlyoffice, onlyoffice, -)
|
||||
%{buildpath}/studio/server/
|
||||
%{buildpath}/products/ASC.People/server/ASC.People.dll
|
||||
%{buildpath}/products/ASC.Files/server/ASC.Files*.dll
|
||||
%{buildpath}/products/ASC.CRM/server/ASC.CRM*.dll
|
||||
%{buildpath}/products/ASC.Projects/server/ASC.Projects*.dll
|
||||
/lib/systemd/system/%{product}-studio.service
|
||||
%dir %{buildpath}/studio/
|
||||
%dir %{buildpath}/products/
|
||||
@ -207,18 +150,12 @@
|
||||
%dir %{buildpath}/products/ASC.People/server/
|
||||
%dir %{buildpath}/products/ASC.Files/
|
||||
%dir %{buildpath}/products/ASC.Files/server/
|
||||
%dir %{buildpath}/products/ASC.CRM/
|
||||
%dir %{buildpath}/products/ASC.CRM/server/
|
||||
%dir %{buildpath}/products/ASC.Projects/
|
||||
%dir %{buildpath}/products/ASC.Projects/server/
|
||||
|
||||
%files storage-encryption
|
||||
%defattr(-, onlyoffice, onlyoffice, -)
|
||||
%{buildpath}/services/ASC.Data.Storage.Encryption/
|
||||
%{buildpath}/products/ASC.Files/server/ASC.Files*.dll
|
||||
%{buildpath}/products/ASC.People/server/ASC.People.dll
|
||||
%{buildpath}/products/ASC.CRM/server/ASC.CRM*.dll
|
||||
%{buildpath}/products/ASC.Projects/server/ASC.Projects*.dll
|
||||
/lib/systemd/system/%{product}-storage-encryption.service
|
||||
%dir %{buildpath}/services/
|
||||
%dir %{buildpath}/products/
|
||||
@ -226,49 +163,23 @@
|
||||
%dir %{buildpath}/products/ASC.Files/server
|
||||
%dir %{buildpath}/products/ASC.People/
|
||||
%dir %{buildpath}/products/ASC.People/server
|
||||
%dir %{buildpath}/products/ASC.CRM/
|
||||
%dir %{buildpath}/products/ASC.CRM/server
|
||||
%dir %{buildpath}/products/ASC.Projects/
|
||||
%dir %{buildpath}/products/ASC.Projects/server
|
||||
|
||||
%files storage-migration
|
||||
%defattr(-, onlyoffice, onlyoffice, -)
|
||||
%{buildpath}/services/ASC.Data.Storage.Migration/
|
||||
%{buildpath}/products/ASC.Files/server/ASC.Files*.dll
|
||||
%{buildpath}/products/ASC.People/server/ASC.People.dll
|
||||
%{buildpath}/products/ASC.CRM/server/ASC.CRM*.dll
|
||||
%{buildpath}/products/ASC.Projects/server/ASC.Projects*.dll
|
||||
/lib/systemd/system/%{product}-storage-migration.service
|
||||
%dir %{buildpath}/services/
|
||||
%dir %{buildpath}/products/
|
||||
%dir %{buildpath}/products/ASC.Files/
|
||||
%dir %{buildpath}/products/ASC.People/
|
||||
%dir %{buildpath}/products/ASC.CRM/
|
||||
%dir %{buildpath}/products/ASC.Projects/
|
||||
|
||||
%files projects-server
|
||||
%defattr(-, onlyoffice, onlyoffice, -)
|
||||
%{buildpath}/products/ASC.Projects/server/
|
||||
%{buildpath}/products/ASC.Files/server/ASC.Files*.dll
|
||||
%{buildpath}/products/ASC.People/server/ASC.People.dll
|
||||
%{buildpath}/products/ASC.CRM/server/ASC.CRM*.dll
|
||||
/lib/systemd/system/%{product}-projects-server.service
|
||||
%dir %{buildpath}/products/
|
||||
%dir %{buildpath}/products/ASC.Files/
|
||||
%dir %{buildpath}/products/ASC.Files/server/
|
||||
%dir %{buildpath}/products/ASC.People/
|
||||
%dir %{buildpath}/products/ASC.People/server/
|
||||
%dir %{buildpath}/products/ASC.CRM/
|
||||
%dir %{buildpath}/products/ASC.CRM/server/
|
||||
%dir %{buildpath}/products/ASC.Projects/
|
||||
|
||||
%files telegram-service
|
||||
%defattr(-, onlyoffice, onlyoffice, -)
|
||||
%{buildpath}/services/ASC.TelegramService/
|
||||
%{buildpath}/products/ASC.Files/server/ASC.Files*.dll
|
||||
%{buildpath}/products/ASC.People/server/ASC.People.dll
|
||||
%{buildpath}/products/ASC.CRM/server/ASC.CRM*.dll
|
||||
%{buildpath}/products/ASC.Projects/server/ASC.Projects*.dll
|
||||
/lib/systemd/system/%{product}-telegram-service.service
|
||||
%dir %{buildpath}/services/
|
||||
%dir %{buildpath}/products/
|
||||
@ -276,38 +187,6 @@
|
||||
%dir %{buildpath}/products/ASC.Files/server/
|
||||
%dir %{buildpath}/products/ASC.People/
|
||||
%dir %{buildpath}/products/ASC.People/server/
|
||||
%dir %{buildpath}/products/ASC.CRM/
|
||||
%dir %{buildpath}/products/ASC.CRM/server/
|
||||
%dir %{buildpath}/products/ASC.Projects/
|
||||
%dir %{buildpath}/products/ASC.Projects/server/
|
||||
|
||||
%files crm
|
||||
%defattr(-, onlyoffice, onlyoffice, -)
|
||||
%{buildpath}/products/ASC.CRM/server/
|
||||
%{buildpath}/products/ASC.Files/server/ASC.Files*.dll
|
||||
%{buildpath}/products/ASC.People/server/ASC.People.dll
|
||||
%{buildpath}/products/ASC.Projects/server/ASC.Projects*.dll
|
||||
/lib/systemd/system/%{product}-crm.service
|
||||
%dir %{buildpath}/products/
|
||||
%dir %{buildpath}/products/ASC.CRM/
|
||||
%dir %{buildpath}/products/ASC.Files/
|
||||
%dir %{buildpath}/products/ASC.Files/server/
|
||||
%dir %{buildpath}/products/ASC.Projects/
|
||||
%dir %{buildpath}/products/ASC.Projects/server/
|
||||
|
||||
%files calendar
|
||||
%defattr(-, onlyoffice, onlyoffice, -)
|
||||
%{buildpath}/products/ASC.Calendar/server/
|
||||
/lib/systemd/system/%{product}-calendar.service
|
||||
%dir %{buildpath}/products/
|
||||
%dir %{buildpath}/products/ASC.Calendar/
|
||||
|
||||
%files mail
|
||||
%defattr(-, onlyoffice, onlyoffice, -)
|
||||
%{buildpath}/products/ASC.Mail/server/
|
||||
/lib/systemd/system/%{product}-mail.service
|
||||
%dir %{buildpath}/products/
|
||||
%dir %{buildpath}/products/ASC.Mail/
|
||||
|
||||
%files ssoauth
|
||||
%defattr(-, onlyoffice, onlyoffice, -)
|
||||
|
@ -7,20 +7,12 @@ mkdir -p "%{buildroot}%{_sysconfdir}/onlyoffice/%{product}/.private/"
|
||||
mkdir -p "%{buildroot}%{_sysconfdir}/onlyoffice/%{product}/data/"
|
||||
mkdir -p "%{buildroot}%{_var}/log/onlyoffice/%{product}/"
|
||||
mkdir -p "%{buildroot}/lib/systemd/system/"
|
||||
mkdir -p "%{buildroot}%{buildpath}/products/ASC.Calendar/client/"
|
||||
mkdir -p "%{buildroot}%{buildpath}/products/ASC.Calendar/server/"
|
||||
mkdir -p "%{buildroot}%{buildpath}/products/ASC.CRM/client/"
|
||||
mkdir -p "%{buildroot}%{buildpath}/products/ASC.CRM/server/"
|
||||
mkdir -p "%{buildroot}%{buildpath}/products/ASC.Files/client/"
|
||||
mkdir -p "%{buildroot}%{buildpath}/products/ASC.Files/editor/"
|
||||
mkdir -p "%{buildroot}%{buildpath}/products/ASC.Files/server/DocStore/"
|
||||
mkdir -p "%{buildroot}%{buildpath}/products/ASC.Files/service/"
|
||||
mkdir -p "%{buildroot}%{buildpath}/products/ASC.Mail/client/"
|
||||
mkdir -p "%{buildroot}%{buildpath}/products/ASC.Mail/server/"
|
||||
mkdir -p "%{buildroot}%{buildpath}/products/ASC.People/client/"
|
||||
mkdir -p "%{buildroot}%{buildpath}/products/ASC.People/server/"
|
||||
mkdir -p "%{buildroot}%{buildpath}/products/ASC.Projects/client/"
|
||||
mkdir -p "%{buildroot}%{buildpath}/products/ASC.Projects/server/"
|
||||
mkdir -p "%{buildroot}%{buildpath}/public/"
|
||||
mkdir -p "%{buildroot}%{buildpath}/services/ASC.Socket.IO/"
|
||||
mkdir -p "%{buildroot}%{buildpath}/services/ASC.Socket.IO.Svc/"
|
||||
@ -37,18 +29,13 @@ mkdir -p "%{buildroot}%{buildpath}/services/ASC.Thumbnails/"
|
||||
mkdir -p "%{buildroot}%{buildpath}/services/ASC.UrlShortener/"
|
||||
mkdir -p "%{buildroot}%{buildpath}/services/ASC.UrlShortener.Svc/"
|
||||
mkdir -p "%{buildroot}%{buildpath}/services/ASC.Thumbnails.Svc/"
|
||||
mkdir -p "%{buildroot}%{buildpath}/sql/"
|
||||
mkdir -p "%{buildroot}%{buildpath}/studio/api/"
|
||||
mkdir -p "%{buildroot}%{buildpath}/studio/client/"
|
||||
mkdir -p "%{buildroot}%{buildpath}/studio/login/"
|
||||
mkdir -p "%{buildroot}%{buildpath}/studio/server/"
|
||||
cp -rf %{_builddir}/%{sourcename}/publish/products/ASC.Calendar/server/* "%{buildroot}%{buildpath}/products/ASC.Calendar/server/"
|
||||
cp -rf %{_builddir}/%{sourcename}/publish/products/ASC.Mail/server/* "%{buildroot}%{buildpath}/products/ASC.Mail/server/"
|
||||
cp -rf %{_builddir}/%{sourcename}/publish/products/ASC.CRM/server/* "%{buildroot}%{buildpath}/products/ASC.CRM/server/"
|
||||
cp -rf %{_builddir}/%{sourcename}/publish/products/ASC.Files/server/* "%{buildroot}%{buildpath}/products/ASC.Files/server/"
|
||||
cp -rf %{_builddir}/%{sourcename}/publish/services/ASC.Files.Service/service/* "%{buildroot}%{buildpath}/products/ASC.Files/service/"
|
||||
cp -rf %{_builddir}/%{sourcename}/publish/products/ASC.People/server/* "%{buildroot}%{buildpath}/products/ASC.People/server/"
|
||||
cp -rf %{_builddir}/%{sourcename}/publish/products/ASC.Projects/server/* "%{buildroot}%{buildpath}/products/ASC.Projects/server/"
|
||||
cp -rf %{_builddir}/%{sourcename}/publish/services/ASC.ApiSystem/service/* "%{buildroot}%{buildpath}/services/ASC.ApiSystem/"
|
||||
cp -rf %{_builddir}/%{sourcename}/publish/services/ASC.Data.Backup/service/* "%{buildroot}%{buildpath}/services/ASC.Data.Backup/"
|
||||
cp -rf %{_builddir}/%{sourcename}/publish/services/ASC.Notify/service/* "%{buildroot}%{buildpath}/services/ASC.Notify/"
|
||||
@ -67,19 +54,14 @@ cp -rf %{_builddir}/%{sourcename}/publish/services/ASC.UrlShortener.Svc/service/
|
||||
cp -rf %{_builddir}/%{sourcename}/publish/services/ASC.Web.Api/service/* "%{buildroot}%{buildpath}/studio/api/"
|
||||
cp -rf %{_builddir}/%{sourcename}/publish/services/ASC.Web.Studio/service/* "%{buildroot}%{buildpath}/studio/server/"
|
||||
cp -rf %{_builddir}/%{sourcename}/build/install/common/systemd/modules/* "%{buildroot}/lib/systemd/system/"
|
||||
cp -rf %{_builddir}/%{sourcename}/build/install/docker/config/*.sql "%{buildroot}%{buildpath}/sql/"
|
||||
cp -rf %{_builddir}/%{sourcename}/build/install/common/%{product}-configuration.sh "%{buildroot}%{_bindir}/"
|
||||
cp -rf %{_builddir}/%{sourcename}/config/* "%{buildroot}%{_sysconfdir}/onlyoffice/%{product}/"
|
||||
cp -rf %{_builddir}/%{sourcename}/config/nginx/includes/onlyoffice*.conf "%{buildroot}%{_sysconfdir}/nginx/includes/"
|
||||
cp -rf %{_builddir}/%{sourcename}/config/nginx/onlyoffice*.conf "%{buildroot}%{_sysconfdir}/nginx/conf.d/"
|
||||
cp -rf %{_builddir}/%{sourcename}/products/ASC.CRM/Client/dist/* "%{buildroot}%{buildpath}/products/ASC.CRM/client/"
|
||||
cp -rf %{_builddir}/%{sourcename}/products/ASC.Files/Client/dist/* "%{buildroot}%{buildpath}/products/ASC.Files/client/"
|
||||
cp -rf %{_builddir}/%{sourcename}/build/deploy/products/ASC.Files/client/* "%{buildroot}%{buildpath}/products/ASC.Files/client/"
|
||||
cp -rf %{_builddir}/%{sourcename}/products/ASC.Files/Server/DocStore/* "%{buildroot}%{buildpath}/products/ASC.Files/server/DocStore/"
|
||||
cp -rf %{_builddir}/%{sourcename}/products/ASC.People/Client/dist/* "%{buildroot}%{buildpath}/products/ASC.People/client/"
|
||||
cp -rf %{_builddir}/%{sourcename}/products/ASC.Projects/Client/dist/* "%{buildroot}%{buildpath}/products/ASC.Projects/client/"
|
||||
cp -rf %{_builddir}/%{sourcename}/products/ASC.Calendar/Client/dist/* "%{buildroot}%{buildpath}/products/ASC.Calendar/client/"
|
||||
cp -rf %{_builddir}/%{sourcename}/products/ASC.Mail/Client/dist/* "%{buildroot}%{buildpath}/products/ASC.Mail/client/"
|
||||
cp -rf %{_builddir}/%{sourcename}/public/* "%{buildroot}%{buildpath}/public/"
|
||||
cp -rf %{_builddir}/%{sourcename}/web/ASC.Web.Client/dist/* "%{buildroot}%{buildpath}/studio/client/"
|
||||
cp -rf %{_builddir}/%{sourcename}/web/ASC.Web.Editor/dist/* "%{buildroot}%{buildpath}/products/ASC.Files/editor/"
|
||||
cp -rf %{_builddir}/%{sourcename}/web/ASC.Web.Login/dist/* "%{buildroot}%{buildpath}/studio/login/"
|
||||
cp -rf %{_builddir}/%{sourcename}/build/deploy/products/ASC.People/client/* "%{buildroot}%{buildpath}/products/ASC.People/client/"
|
||||
cp -rf %{_builddir}/%{sourcename}/build/deploy/public/* "%{buildroot}%{buildpath}/public/"
|
||||
cp -rf %{_builddir}/%{sourcename}/build/deploy/studio/client/* "%{buildroot}%{buildpath}/studio/client/"
|
||||
cp -rf %{_builddir}/%{sourcename}/build/deploy/products/ASC.Files/editor/* "%{buildroot}%{buildpath}/products/ASC.Files/editor/"
|
||||
cp -rf %{_builddir}/%{sourcename}/build/deploy/studio/login/* "%{buildroot}%{buildpath}/studio/login/"
|
@ -1,8 +1,8 @@
|
||||
%package backup
|
||||
Summary: backup
|
||||
Group: Applications/Internet
|
||||
Requires: %name-common
|
||||
Requires: dotnet-sdk-5.0
|
||||
Requires: %name-common = %version-%release
|
||||
Requires: dotnet-sdk-6.0
|
||||
AutoReqProv: no
|
||||
%description backup
|
||||
|
||||
@ -14,39 +14,39 @@ Group: Applications/Internet
|
||||
%package files-services
|
||||
Summary: files-services
|
||||
Group: Applications/Internet
|
||||
Requires: %name-common
|
||||
Requires: dotnet-sdk-5.0
|
||||
Requires: %name-common = %version-%release
|
||||
Requires: dotnet-sdk-6.0
|
||||
AutoReqProv: no
|
||||
%description files-services
|
||||
|
||||
%package notify
|
||||
Summary: notify
|
||||
Group: Applications/Internet
|
||||
Requires: %name-common
|
||||
Requires: dotnet-sdk-5.0
|
||||
Requires: %name-common = %version-%release
|
||||
Requires: dotnet-sdk-6.0
|
||||
AutoReqProv: no
|
||||
%description notify
|
||||
|
||||
%package files
|
||||
Summary: files
|
||||
Group: Applications/Internet
|
||||
Requires: %name-common
|
||||
Requires: dotnet-sdk-5.0
|
||||
Requires: %name-common = %version-%release
|
||||
Requires: dotnet-sdk-6.0
|
||||
AutoReqProv: no
|
||||
%description files
|
||||
|
||||
%package api-system
|
||||
Summary: api-system
|
||||
Group: Applications/Internet
|
||||
Requires: %name-common
|
||||
Requires: dotnet-sdk-5.0
|
||||
Requires: %name-common = %version-%release
|
||||
Requires: dotnet-sdk-6.0
|
||||
AutoReqProv: no
|
||||
%description api-system
|
||||
|
||||
%package proxy
|
||||
Summary: proxy
|
||||
Group: Applications/Internet
|
||||
Requires: %name-common
|
||||
Requires: %name-common = %version-%release
|
||||
Requires: nginx >= 1.9.5
|
||||
Requires: mysql-community-client >= 5.7.0
|
||||
AutoReqProv: no
|
||||
@ -55,24 +55,24 @@ AutoReqProv: no
|
||||
%package studio-notify
|
||||
Summary: studio-notify
|
||||
Group: Applications/Internet
|
||||
Requires: %name-common
|
||||
Requires: dotnet-sdk-5.0
|
||||
Requires: %name-common = %version-%release
|
||||
Requires: dotnet-sdk-6.0
|
||||
AutoReqProv: no
|
||||
%description studio-notify
|
||||
|
||||
%package people-server
|
||||
Summary: people-server
|
||||
Group: Applications/Internet
|
||||
Requires: %name-common
|
||||
Requires: dotnet-sdk-5.0
|
||||
Requires: %name-common = %version-%release
|
||||
Requires: dotnet-sdk-6.0
|
||||
AutoReqProv: no
|
||||
%description people-server
|
||||
|
||||
%package urlshortener
|
||||
Summary: urlshortener
|
||||
Group: Applications/Internet
|
||||
Requires: %name-common
|
||||
Requires: dotnet-sdk-5.0
|
||||
Requires: %name-common = %version-%release
|
||||
Requires: dotnet-sdk-6.0
|
||||
Requires: nodejs >= 12.0
|
||||
AutoReqProv: no
|
||||
%description urlshortener
|
||||
@ -80,8 +80,8 @@ AutoReqProv: no
|
||||
%package socket
|
||||
Summary: socket
|
||||
Group: Applications/Internet
|
||||
Requires: %name-common
|
||||
Requires: dotnet-sdk-5.0
|
||||
Requires: %name-common = %version-%release
|
||||
Requires: dotnet-sdk-6.0
|
||||
Requires: nodejs >= 12.0
|
||||
AutoReqProv: no
|
||||
%description socket
|
||||
@ -89,8 +89,8 @@ AutoReqProv: no
|
||||
%package thumbnails
|
||||
Summary: thumbnails
|
||||
Group: Applications/Internet
|
||||
Requires: %name-common
|
||||
Requires: dotnet-sdk-5.0
|
||||
Requires: %name-common = %version-%release
|
||||
Requires: dotnet-sdk-6.0
|
||||
Requires: nodejs >= 12.0
|
||||
AutoReqProv: no
|
||||
%description thumbnails
|
||||
@ -98,80 +98,48 @@ AutoReqProv: no
|
||||
%package studio
|
||||
Summary: studio
|
||||
Group: Applications/Internet
|
||||
Requires: %name-common
|
||||
Requires: dotnet-sdk-5.0
|
||||
Requires: %name-common = %version-%release
|
||||
Requires: dotnet-sdk-6.0
|
||||
AutoReqProv: no
|
||||
%description studio
|
||||
|
||||
%package crm
|
||||
Summary: crm
|
||||
Group: Applications/Internet
|
||||
Requires: %name-common
|
||||
Requires: dotnet-sdk-5.0
|
||||
AutoReqProv: no
|
||||
%description crm
|
||||
|
||||
%package api
|
||||
Summary: api
|
||||
Group: Applications/Internet
|
||||
Requires: %name-common
|
||||
Requires: dotnet-sdk-5.0
|
||||
Requires: %name-common = %version-%release
|
||||
Requires: dotnet-sdk-6.0
|
||||
AutoReqProv: no
|
||||
%description api
|
||||
|
||||
%package storage-encryption
|
||||
Summary: storage-encryption
|
||||
Group: Applications/Internet
|
||||
Requires: %name-common
|
||||
Requires: dotnet-sdk-5.0
|
||||
Requires: %name-common = %version-%release
|
||||
Requires: dotnet-sdk-6.0
|
||||
AutoReqProv: no
|
||||
%description storage-encryption
|
||||
|
||||
%package storage-migration
|
||||
Summary: storage-migration
|
||||
Group: Applications/Internet
|
||||
Requires: %name-common
|
||||
Requires: dotnet-sdk-5.0
|
||||
Requires: %name-common = %version-%release
|
||||
Requires: dotnet-sdk-6.0
|
||||
AutoReqProv: no
|
||||
%description storage-migration
|
||||
|
||||
%package projects-server
|
||||
Summary: projects-server
|
||||
Group: Applications/Internet
|
||||
Requires: %name-common
|
||||
Requires: dotnet-sdk-5.0
|
||||
AutoReqProv: no
|
||||
%description projects-server
|
||||
|
||||
%package telegram-service
|
||||
Summary: telegram-service
|
||||
Group: Applications/Internet
|
||||
Requires: %name-common
|
||||
Requires: dotnet-sdk-5.0
|
||||
Requires: %name-common = %version-%release
|
||||
Requires: dotnet-sdk-6.0
|
||||
AutoReqProv: no
|
||||
%description telegram-service
|
||||
|
||||
%package calendar
|
||||
Summary: calendar
|
||||
Group: Applications/Internet
|
||||
Requires: %name-common
|
||||
Requires: dotnet-sdk-5.0
|
||||
AutoReqProv: no
|
||||
%description calendar
|
||||
|
||||
%package mail
|
||||
Summary: mail
|
||||
Group: Applications/Internet
|
||||
Requires: %name-common
|
||||
Requires: dotnet-sdk-5.0
|
||||
AutoReqProv: no
|
||||
%description mail
|
||||
|
||||
%package ssoauth
|
||||
Summary: ssoauth
|
||||
Group: Applications/Internet
|
||||
Requires: %name-common
|
||||
Requires: dotnet-sdk-5.0
|
||||
Requires: %name-common = %version-%release
|
||||
Requires: dotnet-sdk-6.0
|
||||
Requires: nodejs >= 12.0
|
||||
AutoReqProv: no
|
||||
%description ssoauth
|
||||
|
@ -87,7 +87,7 @@
|
||||
"viewed-media": [ ".aac", ".flac", ".m4a", ".mp3", ".oga", ".ogg", ".wav", ".f4v", ".m4v", ".mov", ".mp4", ".ogv", ".webm" ],
|
||||
"index": [ ".pptx", ".xlsx", ".docx" ],
|
||||
"oform": {
|
||||
"url": "https://oforms.onlyoffice.com/data/reqdata.json",
|
||||
"url": "https://cmsoforms.onlyoffice.com/api/oforms?populate=*",
|
||||
"period": 60,
|
||||
"ext": ".oform"
|
||||
}
|
||||
|
@ -328,8 +328,9 @@ class AuthStore {
|
||||
};
|
||||
|
||||
getOforms = () => {
|
||||
const culture =
|
||||
this.userStore.user.cultureName || this.settingsStore.culture;
|
||||
let culture = this.userStore.user.cultureName || this.settingsStore.culture;
|
||||
culture = culture === "en-US" ? "en" : culture;
|
||||
|
||||
return api.settings.getOforms(`${this.settingsStore.urlOforms}${culture}`);
|
||||
};
|
||||
}
|
||||
|
@ -116,6 +116,7 @@ class SettingsStore {
|
||||
|
||||
tenantStatus = null;
|
||||
helpLink = null;
|
||||
hotkeyPanelVisible = false;
|
||||
|
||||
constructor() {
|
||||
makeAutoObservable(this);
|
||||
@ -470,6 +471,10 @@ class SettingsStore {
|
||||
setIsBurgerLoading = (isBurgerLoading) => {
|
||||
this.isBurgerLoading = isBurgerLoading;
|
||||
};
|
||||
|
||||
setHotkeyPanelVisible = (hotkeyPanelVisible) => {
|
||||
this.hotkeyPanelVisible = hotkeyPanelVisible;
|
||||
};
|
||||
}
|
||||
|
||||
export default SettingsStore;
|
||||
|
@ -1,5 +1,4 @@
|
||||
{
|
||||
"Hotkeys": "Qısayollar",
|
||||
"HotkeysActions": "Seçilmiş elementlər üzrə addımın atılması",
|
||||
"HotkeysActionsInPreview": "Digər hərəkətlər",
|
||||
"HotkeysApplicationActions": "Tətbiq hərəkətləri",
|
||||
|
@ -1,5 +1,4 @@
|
||||
{
|
||||
"Hotkeys": "Бързи клавиши",
|
||||
"HotkeysActions": "Вземане на действие по избрани елементи",
|
||||
"HotkeysActionsInPreview": "Други действия",
|
||||
"HotkeysApplicationActions": "Действия на приложението",
|
||||
|
@ -1,5 +1,4 @@
|
||||
{
|
||||
"Hotkeys": "Klávesové zkratky",
|
||||
"HotkeysActions": "Provedení akce na vybraných položkách",
|
||||
"HotkeysActionsInPreview": "Ostatní akce",
|
||||
"HotkeysApplicationActions": "Akce aplikace",
|
||||
|
@ -1,5 +1,4 @@
|
||||
{
|
||||
"Hotkeys": "Tastenkombinationen",
|
||||
"HotkeysActions": "Durchführung von Handlungen zu ausgewählten Elementen",
|
||||
"HotkeysActionsInPreview": "Sonstiges",
|
||||
"HotkeysApplicationActions": "Handlungen der Anwendung",
|
||||
|
@ -1,5 +1,4 @@
|
||||
{
|
||||
"Hotkeys": "Πλήκτρα συντόμευσης",
|
||||
"HotkeysActions": "Ανάληψη δράσης για επιλεγμένα στοιχεία",
|
||||
"HotkeysActionsInPreview": "Άλλες ενέργειες",
|
||||
"HotkeysApplicationActions": "Ενέργειες εφαρμογής",
|
||||
|
@ -1,5 +1,4 @@
|
||||
{
|
||||
"Hotkeys": "Hotkeys",
|
||||
"HotkeysActions": "Taking action on selected items",
|
||||
"HotkeysActionsInPreview": "Other actions",
|
||||
"HotkeysApplicationActions": "Application actions",
|
||||
|
@ -1,5 +1,4 @@
|
||||
{
|
||||
"Hotkeys": "Atajos de teclado",
|
||||
"HotkeysActions": "Tomando medidas sobre los elementos seleccionados",
|
||||
"HotkeysActionsInPreview": "Otras acciones",
|
||||
"HotkeysApplicationActions": "Acciones de aplicación",
|
||||
|
@ -1,5 +1,4 @@
|
||||
{
|
||||
"Hotkeys": "Pikanäppäimet",
|
||||
"HotkeysActions": "Toimintojen suoritus valituille kohteille",
|
||||
"HotkeysActionsInPreview": "Muut toiminnot",
|
||||
"HotkeysApplicationActions": "Sovellustoiminnot",
|
||||
|
@ -1,5 +1,4 @@
|
||||
{
|
||||
"Hotkeys": "Raccourcis clavier",
|
||||
"HotkeysActions": "Prise de mesures sur les éléments sélectionnés",
|
||||
"HotkeysActionsInPreview": "Autres actions",
|
||||
"HotkeysApplicationActions": "Actions d'application",
|
||||
|
@ -1,5 +1,4 @@
|
||||
{
|
||||
"Hotkeys": "Tasti di scelta rapida",
|
||||
"HotkeysActions": "Intraprendere azioni sugli elementi selezionati",
|
||||
"HotkeysActionsInPreview": "Altre azioni",
|
||||
"HotkeysApplicationActions": "Azioni dell'applicazione",
|
||||
|
@ -1,5 +1,4 @@
|
||||
{
|
||||
"Hotkeys": "ホットキー",
|
||||
"HotkeysActions": "選択されているアイテムに対するアクションを実行",
|
||||
"HotkeysActionsInPreview": "その他のアクション",
|
||||
"HotkeysApplicationActions": "アップ理ケーションのアクション",
|
||||
|
@ -1,5 +1,4 @@
|
||||
{
|
||||
"Hotkeys": "단축키",
|
||||
"HotkeysActions": "선택된 항목에 작업 실행하기",
|
||||
"HotkeysActionsInPreview": "기타 작업",
|
||||
"HotkeysApplicationActions": "응용 프로그램 작업",
|
||||
|
@ -1,5 +1,4 @@
|
||||
{
|
||||
"Hotkeys": "ປຸ່ມໃຊ້ປະຈຳ",
|
||||
"HotkeysActions": "ປະຕິບັດລາຍການທີ່ເລືອກ",
|
||||
"HotkeysActionsInPreview": "ການກະທໍາອື່ນໆ",
|
||||
"HotkeysApplicationActions": "ການປະຕິບັດຄໍາຮ້ອງສະຫມັກ",
|
||||
|
@ -1,5 +1,4 @@
|
||||
{
|
||||
"Hotkeys": "Ātrie taustiņi",
|
||||
"HotkeysActions": "Notiek darbību veikšana ar atlasītajiem vienumiem",
|
||||
"HotkeysActionsInPreview": "Citas darbības",
|
||||
"HotkeysApplicationActions": "Programmas darbības",
|
||||
|
@ -1,5 +1,4 @@
|
||||
{
|
||||
"Hotkeys": "Sneltoetsen",
|
||||
"HotkeysActions": "Actie ondernemen op geselecteerde items",
|
||||
"HotkeysActionsInPreview": "Overige acties",
|
||||
"HotkeysApplicationActions": "Applicatie acties",
|
||||
|
@ -1,5 +1,4 @@
|
||||
{
|
||||
"Hotkeys": "Skróty klawiaturowe",
|
||||
"HotkeysActions": "Wykonywanie akcji na zaznaczonych elementach",
|
||||
"HotkeysActionsInPreview": "Inne akcje",
|
||||
"HotkeysApplicationActions": "Akcje w aplikacji",
|
||||
|
@ -1,5 +1,4 @@
|
||||
{
|
||||
"Hotkeys": "Teclas de acesso",
|
||||
"HotkeysActions": "Executar ações nos itens selecionados",
|
||||
"HotkeysActionsInPreview": "Outras ações",
|
||||
"HotkeysApplicationActions": "Ações do aplicativo",
|
||||
|
@ -1,5 +1,4 @@
|
||||
{
|
||||
"Hotkeys": "Teclas de atalho",
|
||||
"HotkeysActions": "A atuar sobre os itens selecionados",
|
||||
"HotkeysActionsInPreview": "Outras ações",
|
||||
"HotkeysApplicationActions": "Ações da Aplicação",
|
||||
|
@ -1,5 +1,4 @@
|
||||
{
|
||||
"Hotkeys": "Comenzi rapide",
|
||||
"HotkeysActions": "Efectuarea acțiunilor asupra elementelor selectate",
|
||||
"HotkeysActionsInPreview": "Alte acțiuni",
|
||||
"HotkeysApplicationActions": "Acțiunile aplicației",
|
||||
|
@ -1,5 +1,4 @@
|
||||
{
|
||||
"Hotkeys": "Горячие клавиши",
|
||||
"HotkeysActions": "Действия с выбранными объектами",
|
||||
"HotkeysActionsInPreview": "Прочие действия",
|
||||
"HotkeysApplicationActions": "Действия в приложении",
|
||||
|
@ -1,5 +1,4 @@
|
||||
{
|
||||
"Hotkeys": "Klávesové skratky",
|
||||
"HotkeysActions": "Vykonanie akcie pre vybraté položky",
|
||||
"HotkeysActionsInPreview": "Ďalšie akcie",
|
||||
"HotkeysApplicationActions": "Aplikačné akcie",
|
||||
|
@ -1,5 +1,4 @@
|
||||
{
|
||||
"Hotkeys": "Bližnjice",
|
||||
"HotkeysActions": "Ukrepanje za izbrane predmete",
|
||||
"HotkeysActionsInPreview": "Druge akcije",
|
||||
"HotkeysApplicationActions": "Akcije aplikacije",
|
||||
|
@ -1,5 +1,4 @@
|
||||
{
|
||||
"Hotkeys": "Kısayol tuşları",
|
||||
"HotkeysActions": "Seçilen öğeler üzerinde işlem yapılıyor",
|
||||
"HotkeysActionsInPreview": "Diğer eylemler",
|
||||
"HotkeysApplicationActions": "Uygulama işlemleri",
|
||||
|
@ -1,5 +1,4 @@
|
||||
{
|
||||
"Hotkeys": "Сполучення клавіш",
|
||||
"HotkeysActions": "Виконання дії з вибраними елементами",
|
||||
"HotkeysActionsInPreview": "Інші дії",
|
||||
"HotkeysApplicationActions": "Дії програми",
|
||||
|
@ -1,5 +1,4 @@
|
||||
{
|
||||
"Hotkeys": "Phím tắt",
|
||||
"HotkeysActions": "Thực hiện hành động đối với các mục đã chọn",
|
||||
"HotkeysActionsInPreview": "Các hành động khác",
|
||||
"HotkeysApplicationActions": "Hành động của ứng dụng",
|
||||
|
@ -1,5 +1,4 @@
|
||||
{
|
||||
"Hotkeys": "快捷键",
|
||||
"HotkeysActions": "对选定的项目采取行动",
|
||||
"HotkeysActionsInPreview": "其他行动",
|
||||
"HotkeysApplicationActions": "应用行动",
|
||||
|
@ -118,7 +118,10 @@ export default function withContent(WrappedContent) {
|
||||
})
|
||||
)
|
||||
)
|
||||
.catch((err) => toastr.error(err))
|
||||
.catch((err) => {
|
||||
toastr.error(err);
|
||||
this.completeAction(fileActionId);
|
||||
})
|
||||
.finally(() => {
|
||||
clearTimeout(timerId);
|
||||
timerId = null;
|
||||
@ -136,7 +139,10 @@ export default function withContent(WrappedContent) {
|
||||
})
|
||||
)
|
||||
)
|
||||
.catch((err) => toastr.error(err))
|
||||
.catch((err) => {
|
||||
toastr.error(err);
|
||||
this.completeAction(fileActionId);
|
||||
})
|
||||
.finally(() => {
|
||||
clearTimeout(timerId);
|
||||
timerId = null;
|
||||
@ -244,7 +250,10 @@ export default function withContent(WrappedContent) {
|
||||
setCreatedItem({ id: createdFolderId, type: "folder" });
|
||||
})
|
||||
.then(() => this.completeAction(itemId))
|
||||
.catch((e) => toastr.error(e))
|
||||
.catch((e) => {
|
||||
toastr.error(e);
|
||||
this.completeAction(itemId);
|
||||
})
|
||||
.finally(() => {
|
||||
const folderIds = [+itemId];
|
||||
createdFolderId && folderIds.push(createdFolderId);
|
||||
@ -318,7 +327,11 @@ export default function withContent(WrappedContent) {
|
||||
return open && openDocEditor(file.id, file.providerKey, tab);
|
||||
})
|
||||
.then(() => this.completeAction(itemId))
|
||||
.catch((e) => toastr.error(e))
|
||||
.catch((e) => {
|
||||
toastr.error(e);
|
||||
tab && tab.close();
|
||||
this.completeAction(itemId);
|
||||
})
|
||||
.finally(() => {
|
||||
const fileIds = [+itemId];
|
||||
createdFileId && fileIds.push(createdFileId);
|
||||
@ -351,7 +364,11 @@ export default function withContent(WrappedContent) {
|
||||
return open && openDocEditor(file.id, file.providerKey, tab);
|
||||
})
|
||||
.then(() => this.completeAction(itemId))
|
||||
.catch((e) => toastr.error(e))
|
||||
.catch((e) => {
|
||||
toastr.error(e);
|
||||
tab && tab.close();
|
||||
this.completeAction(itemId);
|
||||
})
|
||||
.finally(() => {
|
||||
const fileIds = [+itemId];
|
||||
createdFileId && fileIds.push(createdFileId);
|
||||
|
@ -250,6 +250,7 @@ const withHotkeys = (Component) => {
|
||||
|
||||
return inject(
|
||||
({
|
||||
auth,
|
||||
filesStore,
|
||||
dialogsStore,
|
||||
settingsStore,
|
||||
@ -287,7 +288,6 @@ const withHotkeys = (Component) => {
|
||||
} = hotkeyStore;
|
||||
|
||||
const {
|
||||
setHotkeyPanelVisible,
|
||||
setDeleteDialogVisible,
|
||||
setSelectFileDialogVisible,
|
||||
someDialogIsOpen,
|
||||
@ -299,6 +299,7 @@ const withHotkeys = (Component) => {
|
||||
} = filesActionsStore;
|
||||
|
||||
const { visible: mediaViewerIsVisible } = mediaViewerDataStore;
|
||||
const { setHotkeyPanelVisible } = auth.settingsStore;
|
||||
|
||||
return {
|
||||
setSelected,
|
||||
|
@ -110,7 +110,7 @@ const Panels = (props) => {
|
||||
};
|
||||
|
||||
export default inject(
|
||||
({ dialogsStore, uploadDataStore, versionHistoryStore }) => {
|
||||
({ auth, dialogsStore, uploadDataStore, versionHistoryStore }) => {
|
||||
const {
|
||||
sharingPanelVisible,
|
||||
ownerPanelVisible,
|
||||
@ -132,11 +132,11 @@ export default inject(
|
||||
createMasterForm,
|
||||
selectFileDialogVisible,
|
||||
setSelectFileDialogVisible,
|
||||
hotkeyPanelVisible,
|
||||
} = dialogsStore;
|
||||
|
||||
const { uploadPanelVisible } = uploadDataStore;
|
||||
const { isVisible: versionHistoryPanelVisible } = versionHistoryStore;
|
||||
const { hotkeyPanelVisible } = auth.settingsStore;
|
||||
|
||||
return {
|
||||
sharingPanelVisible,
|
||||
|
@ -53,7 +53,7 @@ const HotkeyPanel = ({ visible, setHotkeyPanelVisible, t, tReady }) => {
|
||||
/>
|
||||
<Aside className="hotkeys-panel" visible={visible} onClose={onClose}>
|
||||
<div className="hotkeys_header">
|
||||
<Heading className="hotkeys_heading">{t("Hotkeys")}</Heading>
|
||||
<Heading className="hotkeys_heading">{t("Common:Hotkeys")}</Heading>
|
||||
</div>
|
||||
<StyledScrollbar ref={scrollRef} stype="mediumBlack">
|
||||
<Heading className="hotkeys_sub-header">
|
||||
@ -130,11 +130,13 @@ const HotkeyPanel = ({ visible, setHotkeyPanelVisible, t, tReady }) => {
|
||||
);
|
||||
};
|
||||
|
||||
export default inject(({ dialogsStore }) => {
|
||||
const { hotkeyPanelVisible, setHotkeyPanelVisible } = dialogsStore;
|
||||
export default inject(({ auth }) => {
|
||||
const { hotkeyPanelVisible, setHotkeyPanelVisible } = auth.settingsStore;
|
||||
|
||||
return {
|
||||
visible: hotkeyPanelVisible,
|
||||
setHotkeyPanelVisible,
|
||||
};
|
||||
})(withTranslation(["HotkeysPanel", "Article"])(observer(HotkeyPanel)));
|
||||
})(
|
||||
withTranslation(["HotkeysPanel", "Article", "Common"])(observer(HotkeyPanel))
|
||||
);
|
||||
|
@ -31,7 +31,7 @@ const FilesMediaViewer = (props) => {
|
||||
expandedKeys,
|
||||
setScrollToItem,
|
||||
setCurrentId,
|
||||
setSelection,
|
||||
setBufferSelection,
|
||||
} = props;
|
||||
|
||||
useEffect(() => {
|
||||
@ -126,7 +126,7 @@ const FilesMediaViewer = (props) => {
|
||||
setIsLoading(false);
|
||||
setFirstLoad(false);
|
||||
setScrollToItem({ id: previewFile.id, type: "file" });
|
||||
setSelection([previewFile]);
|
||||
setBufferSelection(previewFile);
|
||||
setToPreviewFile(null);
|
||||
});
|
||||
}
|
||||
@ -142,7 +142,7 @@ const FilesMediaViewer = (props) => {
|
||||
|
||||
setScrollToItem({ id: currentMediaFileId, type: "file" });
|
||||
const targetFile = files.find((item) => item.id === currentMediaFileId);
|
||||
if (targetFile) setSelection([targetFile]);
|
||||
if (targetFile) setBufferSelection(targetFile);
|
||||
|
||||
window.history.replaceState(null, null, url);
|
||||
}
|
||||
@ -189,7 +189,7 @@ export default inject(
|
||||
setIsLoading,
|
||||
setFirstLoad,
|
||||
setScrollToItem,
|
||||
setSelection,
|
||||
setBufferSelection,
|
||||
} = filesStore;
|
||||
const {
|
||||
visible,
|
||||
@ -225,7 +225,7 @@ export default inject(
|
||||
expandedKeys,
|
||||
setScrollToItem,
|
||||
setCurrentId,
|
||||
setSelection,
|
||||
setBufferSelection,
|
||||
};
|
||||
}
|
||||
)(
|
||||
|
@ -88,6 +88,7 @@ const FilesRowContainer = ({
|
||||
>
|
||||
{filesList.map((item, index) => (
|
||||
<SimpleFilesRow
|
||||
id={`${item?.isFolder ? "folder" : "file"}_${item.id}`}
|
||||
key={`${item.id}_${index}`}
|
||||
item={item}
|
||||
sectionWidth={sectionWidth}
|
||||
|
@ -220,6 +220,7 @@ const SimpleFilesRow = (props) => {
|
||||
isAdmin,
|
||||
getContextModel,
|
||||
showHotkeyBorder,
|
||||
id,
|
||||
} = props;
|
||||
|
||||
const withAccess = isAdmin || item.access === 0;
|
||||
@ -231,6 +232,7 @@ const SimpleFilesRow = (props) => {
|
||||
|
||||
return (
|
||||
<StyledWrapper
|
||||
id={id}
|
||||
className={`row-wrapper ${
|
||||
showHotkeyBorder
|
||||
? "row-hotkey-border"
|
||||
|
@ -147,6 +147,7 @@ const Table = ({
|
||||
<TableBody>
|
||||
{filesList.map((item, index) => (
|
||||
<TableRow
|
||||
id={`${item?.isFolder ? "folder" : "file"}_${item.id}`}
|
||||
key={`${item.id}_${index}`}
|
||||
item={item}
|
||||
index={index}
|
||||
|
@ -270,6 +270,7 @@ const FilesTableRow = (props) => {
|
||||
getContextModel,
|
||||
showHotkeyBorder,
|
||||
tableColumns,
|
||||
id,
|
||||
} = props;
|
||||
const { acceptBackground, background } = theme.dragAndDrop;
|
||||
|
||||
@ -341,6 +342,7 @@ const FilesTableRow = (props) => {
|
||||
|
||||
return (
|
||||
<StyledDragAndDrop
|
||||
id={id}
|
||||
data-title={item.title}
|
||||
value={value}
|
||||
className={`files-item ${className} ${item.id}_${item.fileExst} ${
|
||||
|
@ -41,6 +41,7 @@ const FileTile = (props) => {
|
||||
onHideContextMenu,
|
||||
thumbSize,
|
||||
setSelection,
|
||||
id,
|
||||
} = props;
|
||||
|
||||
const temporaryExtension =
|
||||
@ -59,7 +60,7 @@ const FileTile = (props) => {
|
||||
);
|
||||
|
||||
return (
|
||||
<div ref={props.selectableRef}>
|
||||
<div ref={props.selectableRef} id={id}>
|
||||
<DragAndDrop
|
||||
data-title={item.title}
|
||||
value={value}
|
||||
|
@ -76,6 +76,7 @@ const FilesTileContainer = ({ filesList, t, sectionWidth }) => {
|
||||
{filesList.map((item, index) => {
|
||||
return index == 0 ? (
|
||||
<FileTile
|
||||
id={`${item?.isFolder ? "folder" : "file"}_${item.id}`}
|
||||
key={`${item.id}_${index}`}
|
||||
item={item}
|
||||
sectionWidth={sectionWidth}
|
||||
@ -84,6 +85,7 @@ const FilesTileContainer = ({ filesList, t, sectionWidth }) => {
|
||||
/>
|
||||
) : (
|
||||
<FileTile
|
||||
id={`${item?.isFolder ? "folder" : "file"}_${item.id}`}
|
||||
key={`${item.id}_${index}`}
|
||||
item={item}
|
||||
sectionWidth={sectionWidth}
|
||||
|
@ -74,9 +74,7 @@ const SectionBodyContent = (props) => {
|
||||
if (scrollToItem) {
|
||||
const { type, id } = scrollToItem;
|
||||
|
||||
const targetElement = document.querySelector(
|
||||
`div[value='${type}_${id}_draggable']`
|
||||
);
|
||||
const targetElement = document.getElementById(`${type}_${id}`);
|
||||
|
||||
if (!targetElement) return;
|
||||
|
||||
@ -84,12 +82,12 @@ const SectionBodyContent = (props) => {
|
||||
|
||||
if (!isInViewport || viewAs === "table") {
|
||||
const bodyScroll = isMobileOnly
|
||||
? document.querySelector("#customScrollBar > div")
|
||||
? document.querySelector("#customScrollBar > .scroll-body")
|
||||
: document.querySelector(".section-scroll");
|
||||
|
||||
const count =
|
||||
filesList.findIndex((elem) => elem.id === scrollToItem.id) *
|
||||
(isMobileOnly ? 57 : 48);
|
||||
(isMobileOnly ? 57 : viewAs === "table" ? 40 : 48);
|
||||
|
||||
bodyScroll.scrollTo(0, count);
|
||||
}
|
||||
|
@ -25,7 +25,6 @@ class DialogsStore {
|
||||
selectFileDialogVisible = false;
|
||||
convertPasswordDialogVisible = false;
|
||||
isFolderActions = false;
|
||||
hotkeyPanelVisible = false;
|
||||
|
||||
removeItem = null;
|
||||
connectItem = null;
|
||||
@ -219,10 +218,6 @@ class DialogsStore {
|
||||
});
|
||||
};
|
||||
|
||||
setHotkeyPanelVisible = (hotkeyPanelVisible) => {
|
||||
this.hotkeyPanelVisible = hotkeyPanelVisible;
|
||||
};
|
||||
|
||||
get someDialogIsOpen() {
|
||||
return (
|
||||
this.sharingPanelVisible ||
|
||||
@ -240,7 +235,7 @@ class DialogsStore {
|
||||
this.conflictResolveDialogVisible ||
|
||||
this.convertDialogVisible ||
|
||||
this.selectFileDialogVisible ||
|
||||
this.hotkeyPanelVisible
|
||||
this.authStore.settingsStore.hotkeyPanelVisible
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -684,7 +684,7 @@ class FilesStore {
|
||||
);
|
||||
|
||||
if (newItem) {
|
||||
this.setSelection([newItem]);
|
||||
this.setBufferSelection(newItem);
|
||||
this.setScrollToItem({
|
||||
id: newItem.id,
|
||||
type: this.createdItem.type,
|
||||
|
@ -165,5 +165,6 @@
|
||||
"Video": "Video",
|
||||
"View": "Baxın",
|
||||
"ViewWeb": "Veb versiyaya baxın",
|
||||
"Warning": "Xəbərdarlıq"
|
||||
"Warning": "Xəbərdarlıq",
|
||||
"Hotkeys": "Qısayollar"
|
||||
}
|
||||
|
@ -165,5 +165,6 @@
|
||||
"Video": "Видео",
|
||||
"View": "Преглед",
|
||||
"ViewWeb": "Отиди към уеб версия",
|
||||
"Warning": "Внимание"
|
||||
"Warning": "Внимание",
|
||||
"Hotkeys": "Бързи клавиши"
|
||||
}
|
||||
|
@ -165,5 +165,6 @@
|
||||
"Video": "Video",
|
||||
"View": "Zobrazit",
|
||||
"ViewWeb": "Zobrazit webovou verzi",
|
||||
"Warning": "Varování"
|
||||
"Warning": "Varování",
|
||||
"Hotkeys": "Klávesové zkratky"
|
||||
}
|
||||
|
@ -165,5 +165,6 @@
|
||||
"Video": "Video",
|
||||
"View": "Anzeigen",
|
||||
"ViewWeb": "Web-Version öffnen",
|
||||
"Warning": "Warnung"
|
||||
"Warning": "Warnung",
|
||||
"Hotkeys": "Tastenkombinationen"
|
||||
}
|
||||
|
@ -165,5 +165,6 @@
|
||||
"Video": "Βίντεο",
|
||||
"View": "Προβολή",
|
||||
"ViewWeb": "Προβολή διαδικτυακής έκδοσης",
|
||||
"Warning": "Προειδοποίηση"
|
||||
"Warning": "Προειδοποίηση",
|
||||
"Hotkeys": "Πλήκτρα συντόμευσης"
|
||||
}
|
||||
|
@ -165,5 +165,6 @@
|
||||
"Video": "Video",
|
||||
"View": "View",
|
||||
"ViewWeb": "View web version",
|
||||
"Warning": "Warning"
|
||||
"Warning": "Warning",
|
||||
"Hotkeys": "Hotkeys"
|
||||
}
|
||||
|
@ -165,5 +165,6 @@
|
||||
"Video": "Vídeo",
|
||||
"View": "Ver",
|
||||
"ViewWeb": "Ver versión web",
|
||||
"Warning": "Advertencia"
|
||||
"Warning": "Advertencia",
|
||||
"Hotkeys": "Atajos de teclado"
|
||||
}
|
||||
|
@ -165,5 +165,6 @@
|
||||
"Video": "Video",
|
||||
"View": "Näkymä",
|
||||
"ViewWeb": "Näytä verkkoversio",
|
||||
"Warning": "Varoitus"
|
||||
"Warning": "Varoitus",
|
||||
"Hotkeys": "Pikanäppäimet"
|
||||
}
|
||||
|
@ -165,5 +165,6 @@
|
||||
"Video": "Vidéo",
|
||||
"View": "Afficher",
|
||||
"ViewWeb": "Voir la version web",
|
||||
"Warning": "Attention"
|
||||
"Warning": "Attention",
|
||||
"Hotkeys": "Raccourcis clavier"
|
||||
}
|
||||
|
@ -165,5 +165,6 @@
|
||||
"Video": "Video",
|
||||
"View": "Visualizza",
|
||||
"ViewWeb": "Visualizza la versione web",
|
||||
"Warning": "Avviso"
|
||||
"Warning": "Avviso",
|
||||
"Hotkeys": "Tasti di scelta rapida"
|
||||
}
|
||||
|
@ -165,5 +165,6 @@
|
||||
"Video": "動画",
|
||||
"View": "ビュー",
|
||||
"ViewWeb": "ウェブ版を表示する",
|
||||
"Warning": "警告"
|
||||
"Warning": "警告",
|
||||
"Hotkeys": "ホットキー"
|
||||
}
|
||||
|
@ -165,5 +165,6 @@
|
||||
"Video": "동영상",
|
||||
"View": "보기",
|
||||
"ViewWeb": "웹 버전 보기",
|
||||
"Warning": "경고"
|
||||
"Warning": "경고",
|
||||
"Hotkeys": "단축키"
|
||||
}
|
||||
|
@ -164,5 +164,6 @@
|
||||
"Video": "ວິດີໂອ",
|
||||
"View": "ມຸມມອງ",
|
||||
"ViewWeb": "ເປີດຜ່ານຫນ້າເວັບ",
|
||||
"Warning": "ແຈ້ງເຕືອນ"
|
||||
"Warning": "ແຈ້ງເຕືອນ",
|
||||
"Hotkeys": "ປຸ່ມໃຊ້ປະຈຳ"
|
||||
}
|
||||
|
@ -165,5 +165,6 @@
|
||||
"Video": "Video",
|
||||
"View": "Skatīt",
|
||||
"ViewWeb": "Skatīt tīmekļa versiju",
|
||||
"Warning": "Brīdinājums"
|
||||
"Warning": "Brīdinājums",
|
||||
"Hotkeys": "Ātrie taustiņi"
|
||||
}
|
||||
|
@ -165,5 +165,6 @@
|
||||
"Video": "Video",
|
||||
"View": "Bekijk",
|
||||
"ViewWeb": "Webversie bekijken",
|
||||
"Warning": "Waarschuwing"
|
||||
"Warning": "Waarschuwing",
|
||||
"Hotkeys": "Sneltoetsen"
|
||||
}
|
||||
|
@ -165,5 +165,6 @@
|
||||
"Video": "Wideo",
|
||||
"View": "Podgląd",
|
||||
"ViewWeb": "Zobacz wersję internetową",
|
||||
"Warning": "Ostrzeżenie"
|
||||
"Warning": "Ostrzeżenie",
|
||||
"Hotkeys": "Skróty klawiaturowe"
|
||||
}
|
||||
|
@ -165,5 +165,6 @@
|
||||
"Video": "Vídeo",
|
||||
"View": "Ver",
|
||||
"ViewWeb": "Veja a versão web",
|
||||
"Warning": "Aviso"
|
||||
"Warning": "Aviso",
|
||||
"Hotkeys": "Teclas de acesso"
|
||||
}
|
||||
|
@ -165,5 +165,6 @@
|
||||
"Video": "Vídeo",
|
||||
"View": "Ver",
|
||||
"ViewWeb": "Ver versão web",
|
||||
"Warning": "Aviso"
|
||||
"Warning": "Aviso",
|
||||
"Hotkeys": "Teclas de atalho"
|
||||
}
|
||||
|
@ -165,5 +165,6 @@
|
||||
"Video": "Video",
|
||||
"View": "Vizualizare",
|
||||
"ViewWeb": "Accesați versiunea online",
|
||||
"Warning": "Avertisment"
|
||||
"Warning": "Avertisment",
|
||||
"Hotkeys": "Comenzi rapide"
|
||||
}
|
||||
|
@ -165,5 +165,6 @@
|
||||
"Video": "Видео",
|
||||
"View": "Просмотр",
|
||||
"ViewWeb": "Просмотреть веб-версию",
|
||||
"Warning": "Внимание"
|
||||
"Warning": "Внимание",
|
||||
"Hotkeys": "Горячие клавиши"
|
||||
}
|
||||
|
@ -165,5 +165,6 @@
|
||||
"Video": "Video",
|
||||
"View": "Vyhliadka",
|
||||
"ViewWeb": "Zobraziť webovú verziu",
|
||||
"Warning": "Upozornenie"
|
||||
"Warning": "Upozornenie",
|
||||
"Hotkeys": "Klávesové skratky"
|
||||
}
|
||||
|
@ -165,5 +165,6 @@
|
||||
"Video": "Video",
|
||||
"View": "Ogled",
|
||||
"ViewWeb": "Ogled spletne verzije",
|
||||
"Warning": "Opozorilo"
|
||||
"Warning": "Opozorilo",
|
||||
"Hotkeys": "Bližnjice"
|
||||
}
|
||||
|
@ -165,5 +165,6 @@
|
||||
"Video": "Video",
|
||||
"View": "Görüntüle",
|
||||
"ViewWeb": "Web sürümünü görüntüle",
|
||||
"Warning": "Uyarı"
|
||||
"Warning": "Uyarı",
|
||||
"Hotkeys": "Kısayol tuşları"
|
||||
}
|
||||
|
@ -165,5 +165,6 @@
|
||||
"Video": "Відео",
|
||||
"View": "Переглянути",
|
||||
"ViewWeb": "Переглянути веб-версію",
|
||||
"Warning": "Попередження"
|
||||
"Warning": "Попередження",
|
||||
"Hotkeys": "Сполучення клавіш"
|
||||
}
|
||||
|
@ -165,5 +165,6 @@
|
||||
"Video": "Video",
|
||||
"View": "Xem",
|
||||
"ViewWeb": "Xem phiên bản web",
|
||||
"Warning": "Cảnh báo"
|
||||
"Warning": "Cảnh báo",
|
||||
"Hotkeys": "Phím tắt"
|
||||
}
|
||||
|
@ -165,5 +165,6 @@
|
||||
"Video": "视频",
|
||||
"View": "查看",
|
||||
"ViewWeb": "查看网页版",
|
||||
"Warning": "警告"
|
||||
"Warning": "警告",
|
||||
"Hotkeys": "快捷键"
|
||||
}
|
||||
|
6
web/ASC.Web.Client/public/images/logo/dark_doc_space.svg
Normal file
6
web/ASC.Web.Client/public/images/logo/dark_doc_space.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 9.4 KiB |
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 12 KiB |
@ -76,6 +76,8 @@ const HeaderNav = ({
|
||||
buildVersionInfo,
|
||||
debugInfo,
|
||||
settingsModule,
|
||||
setHotkeyPanelVisible,
|
||||
currentProductId,
|
||||
}) => {
|
||||
const { t } = useTranslation(["NavMenu", "Common", "About"]);
|
||||
const [visibleAboutDialog, setVisibleAboutDialog] = useState(false);
|
||||
@ -95,6 +97,10 @@ const HeaderNav = ({
|
||||
}
|
||||
}, []);
|
||||
|
||||
const onHotkeysClick = useCallback(() => {
|
||||
setHotkeyPanelVisible(true);
|
||||
}, []);
|
||||
|
||||
const onCloseDialog = () => setVisibleDialog(false);
|
||||
const onDebugClick = useCallback(() => {
|
||||
setVisibleDebugDialog(true);
|
||||
@ -131,6 +137,18 @@ const HeaderNav = ({
|
||||
}
|
||||
: null;
|
||||
|
||||
let hotkeys = null;
|
||||
if (modules) {
|
||||
const moduleIndex = modules.findIndex((m) => m.appName === "files");
|
||||
if (moduleIndex !== -1 && modules[moduleIndex].id === currentProductId) {
|
||||
hotkeys = {
|
||||
key: "HotkeysBtn",
|
||||
label: t("Common:Hotkeys"),
|
||||
onClick: onHotkeysClick,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
const actions = [
|
||||
{
|
||||
key: "ProfileBtn",
|
||||
@ -148,6 +166,7 @@ const HeaderNav = ({
|
||||
target: "_self",
|
||||
}),
|
||||
},
|
||||
hotkeys,
|
||||
{
|
||||
key: "AboutBtn",
|
||||
label: t("AboutCompanyTitle"),
|
||||
@ -171,7 +190,7 @@ const HeaderNav = ({
|
||||
}
|
||||
|
||||
return actions;
|
||||
}, [onProfileClick, onAboutClick, onLogoutClick]);
|
||||
}, [onProfileClick, onAboutClick, onLogoutClick, currentProductId]);
|
||||
//console.log("HeaderNav render");
|
||||
return (
|
||||
<StyledNav className="profileMenuIcon hidingHeader">
|
||||
@ -241,6 +260,7 @@ export default withRouter(
|
||||
toggleArticleOpen,
|
||||
buildVersionInfo,
|
||||
debugInfo,
|
||||
setHotkeyPanelVisible,
|
||||
} = settingsStore;
|
||||
const { user, userIsUpdate, setUserIsUpdate } = userStore;
|
||||
const modules = auth.availableModules;
|
||||
@ -264,6 +284,7 @@ export default withRouter(
|
||||
buildVersionInfo,
|
||||
debugInfo,
|
||||
settingsModule,
|
||||
setHotkeyPanelVisible,
|
||||
};
|
||||
})(observer(HeaderNav))
|
||||
);
|
||||
|
@ -0,0 +1,60 @@
|
||||
import React, { useState, useEffect } from "react";
|
||||
import { withTranslation } from "react-i18next";
|
||||
|
||||
import { inject, observer } from "mobx-react";
|
||||
|
||||
import withLoading from "../../../../../HOCs/withLoading";
|
||||
import Whitelabel from "./settingsBranding/whitelabel";
|
||||
import CompanyInfoSettings from "./settingsBranding/companyInfoSettings";
|
||||
import styled from "styled-components";
|
||||
import AdditionalResources from "./settingsBranding/additionalResources";
|
||||
|
||||
const StyledComponent = styled.div`
|
||||
width: 100%;
|
||||
font-weight: 400;
|
||||
font-size: 13px;
|
||||
|
||||
.header {
|
||||
font-weight: 700;
|
||||
font-size: 16px;
|
||||
line-height: 22px;
|
||||
padding-bottom: 16px;
|
||||
}
|
||||
|
||||
.description {
|
||||
padding-bottom: 16px;
|
||||
}
|
||||
|
||||
.settings-block {
|
||||
max-width: 433px;
|
||||
padding-bottom: 32px;
|
||||
}
|
||||
|
||||
.save-cancel-buttons {
|
||||
padding-bottom: 24px;
|
||||
}
|
||||
|
||||
.section-description {
|
||||
color: #657077;
|
||||
line-height: 20px;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
`;
|
||||
|
||||
const Branding = (props) => {
|
||||
return (
|
||||
<StyledComponent>
|
||||
<Whitelabel />
|
||||
<div className="section-description">
|
||||
Specify your company information, add links to external resources, and
|
||||
email addresses displayed within the online office interface.
|
||||
</div>
|
||||
<CompanyInfoSettings />
|
||||
<AdditionalResources />
|
||||
</StyledComponent>
|
||||
);
|
||||
};
|
||||
|
||||
export default inject(({ auth, setup, common }) => {})(
|
||||
withLoading(withTranslation(["Settings", "Common"])(observer(Branding)))
|
||||
);
|
@ -7,7 +7,7 @@ import { combineUrl } from "@appserver/common/utils";
|
||||
import config from "../../../../../../package.json";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import Customization from "./customization";
|
||||
import WhiteLabel from "./whitelabel";
|
||||
import Branding from "./branding";
|
||||
import withLoading from "../../../../../HOCs/withLoading";
|
||||
|
||||
const SubmenuCommon = (props) => {
|
||||
@ -42,9 +42,9 @@ const SubmenuCommon = (props) => {
|
||||
content: <Customization />,
|
||||
},
|
||||
{
|
||||
id: "whitelabel",
|
||||
name: t("WhiteLabel"),
|
||||
content: <WhiteLabel />,
|
||||
id: "branding",
|
||||
name: t("Branding"),
|
||||
content: <Branding />,
|
||||
},
|
||||
];
|
||||
|
||||
|
@ -0,0 +1,57 @@
|
||||
import React, { useState, useEffect } from "react";
|
||||
import { withTranslation } from "react-i18next";
|
||||
import SaveCancelButtons from "@appserver/components/save-cancel-buttons";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import withLoading from "../../../../../../HOCs/withLoading";
|
||||
import styled from "styled-components";
|
||||
import Checkbox from "@appserver/components/checkbox";
|
||||
|
||||
const StyledComponent = styled.div`
|
||||
.branding-checkbox {
|
||||
padding-bottom: 16px;
|
||||
}
|
||||
`;
|
||||
|
||||
const AdditionalResources = (props) => {
|
||||
const { t } = props;
|
||||
return (
|
||||
<StyledComponent>
|
||||
<div className="header">Additional resources</div>
|
||||
<div className="description">
|
||||
Choose whether you want to display links to additional resources in
|
||||
Portal modules and sample files in Documents module.
|
||||
</div>
|
||||
<div className="settings-block">
|
||||
<Checkbox
|
||||
className="branding-checkbox"
|
||||
label="Show Feedback & Support link"
|
||||
/>
|
||||
<Checkbox className="branding-checkbox" label="Show sample documents" />
|
||||
<Checkbox
|
||||
className="branding-checkbox"
|
||||
label="Show link to Video Guides"
|
||||
/>
|
||||
<Checkbox
|
||||
className="branding-checkbox"
|
||||
label="Show link to Help Center"
|
||||
/>
|
||||
</div>
|
||||
<SaveCancelButtons
|
||||
id="buttonsCompanyInfoSettings"
|
||||
className="save-cancel-buttons"
|
||||
// onSaveClick={onSavePortalRename}
|
||||
// onCancelClick={onCancelPortalName}
|
||||
saveButtonLabel={t("Common:SaveButton")}
|
||||
cancelButtonLabel={t("Settings:RestoreDefaultButton")}
|
||||
displaySettings={true}
|
||||
// hasScroll={hasScroll}
|
||||
/>
|
||||
</StyledComponent>
|
||||
);
|
||||
};
|
||||
|
||||
export default inject(({ auth, setup, common }) => {})(
|
||||
withLoading(
|
||||
withTranslation(["Settings", "Common"])(observer(AdditionalResources))
|
||||
)
|
||||
);
|
@ -0,0 +1,81 @@
|
||||
import React, { useState, useEffect } from "react";
|
||||
import { withTranslation } from "react-i18next";
|
||||
|
||||
import FieldContainer from "@appserver/components/field-container";
|
||||
import TextInput from "@appserver/components/text-input";
|
||||
import SaveCancelButtons from "@appserver/components/save-cancel-buttons";
|
||||
import { inject, observer } from "mobx-react";
|
||||
|
||||
import withLoading from "../../../../../../HOCs/withLoading";
|
||||
import styled from "styled-components";
|
||||
|
||||
const StyledComponent = styled.div``;
|
||||
|
||||
const CompanyInfoSettings = (props) => {
|
||||
const { t } = props;
|
||||
return (
|
||||
<StyledComponent>
|
||||
<div className="header">Company info settings</div>
|
||||
<div className="description">
|
||||
This information will be displayed in the About this program window.
|
||||
</div>
|
||||
<div className="settings-block">
|
||||
<FieldContainer
|
||||
id="fieldContainerCompanyName"
|
||||
className="field-container-width"
|
||||
labelText="Company name:"
|
||||
isVertical={true}
|
||||
>
|
||||
<TextInput id="textInputContainerCompanyName" scale={true} />
|
||||
</FieldContainer>
|
||||
<FieldContainer
|
||||
id="fieldContainerEmail"
|
||||
className="field-container-width"
|
||||
labelText="Email:"
|
||||
isVertical={true}
|
||||
>
|
||||
<TextInput id="textInputContainerEmail" scale={true} />
|
||||
</FieldContainer>
|
||||
<FieldContainer
|
||||
id="fieldContainerPhone"
|
||||
className="field-container-width"
|
||||
labelText="Phone:"
|
||||
isVertical={true}
|
||||
>
|
||||
<TextInput id="textInputContainerPhone" scale={true} />
|
||||
</FieldContainer>
|
||||
<FieldContainer
|
||||
id="fieldContainerWebsite"
|
||||
className="field-container-width"
|
||||
labelText="Website:"
|
||||
isVertical={true}
|
||||
>
|
||||
<TextInput id="textInputContainerWebsite" scale={true} />
|
||||
</FieldContainer>
|
||||
<FieldContainer
|
||||
id="fieldContainerAddress"
|
||||
className="field-container-width"
|
||||
labelText="Address:"
|
||||
isVertical={true}
|
||||
>
|
||||
<TextInput id="textInputContainerAddress" scale={true} />
|
||||
</FieldContainer>
|
||||
</div>
|
||||
<SaveCancelButtons
|
||||
id="buttonsCompanyInfoSettings"
|
||||
className="save-cancel-buttons"
|
||||
// onSaveClick={onSavePortalRename}
|
||||
// onCancelClick={onCancelPortalName}
|
||||
saveButtonLabel={t("Common:SaveButton")}
|
||||
cancelButtonLabel={t("Settings:RestoreDefaultButton")}
|
||||
displaySettings={true}
|
||||
/>
|
||||
</StyledComponent>
|
||||
);
|
||||
};
|
||||
|
||||
export default inject(({ auth, setup, common }) => {})(
|
||||
withLoading(
|
||||
withTranslation(["Settings", "Common"])(observer(CompanyInfoSettings))
|
||||
)
|
||||
);
|
@ -6,8 +6,7 @@ import FieldContainer from "@appserver/components/field-container";
|
||||
import Text from "@appserver/components/text";
|
||||
import Loader from "@appserver/components/loader";
|
||||
import Button from "@appserver/components/button";
|
||||
import toastr from "@appserver/components/toast/toastr";
|
||||
import Link from "@appserver/components/link";
|
||||
|
||||
import TextInput from "@appserver/components/text-input";
|
||||
|
||||
import { inject, observer } from "mobx-react";
|
||||
@ -22,10 +21,6 @@ const StyledComponent = styled.div`
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
.settings-block {
|
||||
margin-bottom: 70px;
|
||||
}
|
||||
|
||||
.field-container {
|
||||
margin-top: 45px;
|
||||
}
|
||||
@ -250,7 +245,7 @@ const WhiteLabel = (props) => {
|
||||
fd.append("logoText", logoTextWhiteLabel);
|
||||
|
||||
fd.append(`logo[${0}][key]`, 1);
|
||||
fd.append(`logo[${0}][value]`, logoUrlsChange.src);
|
||||
fd.append(`logo[${0}][value]`, logoUrlsChange[0].src);
|
||||
|
||||
const data = new URLSearchParams(fd);
|
||||
|
||||
@ -416,15 +411,27 @@ const WhiteLabel = (props) => {
|
||||
{t("BrowserNoCanvasSupport")}
|
||||
</canvas>
|
||||
) : (
|
||||
<img
|
||||
className="border-img logo-dark"
|
||||
src={
|
||||
logoUrlsChange && logoUrlsChange.some((obj) => obj.id === "2")
|
||||
? logoUrlsChange.find((obj) => obj.id === "2").src
|
||||
: logoUrlsWhiteLabel[1]
|
||||
}
|
||||
alt={t("LogoDark")}
|
||||
/>
|
||||
// <img
|
||||
// className="border-img logo-dark"
|
||||
// src={
|
||||
// logoUrlsChange && logoUrlsChange.some((obj) => obj.id === "2")
|
||||
// ? logoUrlsChange.find((obj) => obj.id === "2").src
|
||||
// : logoUrlsWhiteLabel[1]
|
||||
// }
|
||||
// alt={t("LogoDark")}
|
||||
// />
|
||||
|
||||
<div className="border-img logo-dark">
|
||||
<object
|
||||
type="image/svg+xml"
|
||||
data={
|
||||
logoUrlsChange &&
|
||||
logoUrlsChange.some((obj) => obj.id === "2")
|
||||
? logoUrlsChange.find((obj) => obj.id === "2").src
|
||||
: logoUrlsWhiteLabel[1]
|
||||
}
|
||||
></object>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
{isPortalPaid && (
|
@ -46,7 +46,11 @@ const RestoreBackup = lazy(() =>
|
||||
import("./categories/data-management/backup/restore-backup")
|
||||
);
|
||||
|
||||
const WhiteLabel = lazy(() => import("./categories/common/whitelabel"));
|
||||
const WhiteLabel = lazy(() =>
|
||||
import("./categories/common/settingsBranding/whitelabel")
|
||||
);
|
||||
|
||||
const Branding = lazy(() => import("./categories/common/branding"));
|
||||
|
||||
const PROXY_BASE_URL = combineUrl(AppServerConfig.proxyURL, "/settings");
|
||||
|
||||
@ -54,7 +58,7 @@ const COMMON_URLS = [
|
||||
PROXY_BASE_URL,
|
||||
combineUrl(PROXY_BASE_URL, "/common"),
|
||||
combineUrl(PROXY_BASE_URL, "/common/customization"),
|
||||
combineUrl(PROXY_BASE_URL, "/common/whitelabel"),
|
||||
combineUrl(PROXY_BASE_URL, "/common/branding"),
|
||||
];
|
||||
|
||||
const CUSTOMIZATION_URLS = [
|
||||
|
@ -29,58 +29,58 @@ using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
using ASC.Common;
|
||||
using ASC.Common.Logging;
|
||||
using ASC.Core;
|
||||
using ASC.Core.Common.Settings;
|
||||
using ASC.Core.Common.WhiteLabel;
|
||||
using ASC.Core.Tenants;
|
||||
using ASC.Core.Tenants;
|
||||
using ASC.Data.Storage;
|
||||
using ASC.Web.Core.Users;
|
||||
using ASC.Web.Core.Utility.Skins;
|
||||
|
||||
using Microsoft.Extensions.Options;
|
||||
|
||||
using SixLabors.ImageSharp;
|
||||
|
||||
using TMResourceData;
|
||||
|
||||
using UnknownImageFormatException = SixLabors.ImageSharp.UnknownImageFormatException;
|
||||
|
||||
|
||||
using Microsoft.Extensions.Options;
|
||||
|
||||
using SixLabors.ImageSharp;
|
||||
|
||||
using TMResourceData;
|
||||
|
||||
using UnknownImageFormatException = SixLabors.ImageSharp.UnknownImageFormatException;
|
||||
|
||||
namespace ASC.Web.Core.WhiteLabel
|
||||
{
|
||||
[Serializable]
|
||||
public class TenantWhiteLabelSettings : ISettings
|
||||
{
|
||||
public const string DefaultLogoText = BaseWhiteLabelSettings.DefaultLogoText;
|
||||
|
||||
public const string DefaultLogoText = BaseWhiteLabelSettings.DefaultLogoText;
|
||||
|
||||
#region Logos information: extension, isDefault, text for img auto generating
|
||||
|
||||
internal string LogoLightSmallExt { get; set; }
|
||||
|
||||
internal string LogoLightSmallExt { get; set; }
|
||||
|
||||
[JsonPropertyName("DefaultLogoLightSmall")]
|
||||
internal bool IsDefaultLogoLightSmall { get; set; }
|
||||
internal bool IsDefaultLogoLightSmall { get; set; }
|
||||
|
||||
internal string LogoDarkExt { get; set; }
|
||||
|
||||
internal string LogoDarkExt { get; set; }
|
||||
|
||||
[JsonPropertyName("DefaultLogoDark")]
|
||||
internal bool IsDefaultLogoDark { get; set; }
|
||||
internal bool IsDefaultLogoDark { get; set; }
|
||||
|
||||
internal string LogoFaviconExt { get; set; }
|
||||
|
||||
internal string LogoFaviconExt { get; set; }
|
||||
|
||||
[JsonPropertyName("DefaultLogoFavicon")]
|
||||
internal bool IsDefaultLogoFavicon { get; set; }
|
||||
internal bool IsDefaultLogoFavicon { get; set; }
|
||||
|
||||
internal string LogoDocsEditorExt { get; set; }
|
||||
|
||||
internal string LogoDocsEditorExt { get; set; }
|
||||
|
||||
[JsonPropertyName("DefaultLogoDocsEditor")]
|
||||
internal bool IsDefaultLogoDocsEditor { get; set; }
|
||||
|
||||
internal string LogoDocsEditorEmbedExt;
|
||||
|
||||
[JsonPropertyName("DefaultLogoDocsEditorEmbed")]
|
||||
internal bool IsDefaultLogoDocsEditor { get; set; }
|
||||
|
||||
internal string LogoDocsEditorEmbedExt;
|
||||
|
||||
[JsonPropertyName("DefaultLogoDocsEditorEmbed")]
|
||||
internal bool IsDefaultLogoDocsEditorEmbed { get; set; }
|
||||
|
||||
public string LogoText { get; set; }
|
||||
@ -106,8 +106,8 @@ namespace ASC.Web.Core.WhiteLabel
|
||||
public static readonly Size logoLightSmallSize = new Size(284, 46);
|
||||
public static readonly Size logoDarkSize = new Size(432, 70);
|
||||
public static readonly Size logoFaviconSize = new Size(32, 32);
|
||||
public static readonly Size logoDocsEditorSize = new Size(172, 40);
|
||||
public static readonly Size logoDocsEditorEmbedSize = new Size(172, 40);
|
||||
public static readonly Size logoDocsEditorSize = new Size(172, 40);
|
||||
public static readonly Size logoDocsEditorEmbedSize = new Size(172, 40);
|
||||
|
||||
#endregion
|
||||
|
||||
@ -120,13 +120,13 @@ namespace ASC.Web.Core.WhiteLabel
|
||||
LogoLightSmallExt = null,
|
||||
LogoDarkExt = null,
|
||||
LogoFaviconExt = null,
|
||||
LogoDocsEditorExt = null,
|
||||
LogoDocsEditorExt = null,
|
||||
LogoDocsEditorEmbedExt = null,
|
||||
|
||||
IsDefaultLogoLightSmall = true,
|
||||
IsDefaultLogoDark = true,
|
||||
IsDefaultLogoFavicon = true,
|
||||
IsDefaultLogoDocsEditor = true,
|
||||
IsDefaultLogoDocsEditor = true,
|
||||
IsDefaultLogoDocsEditorEmbed = true,
|
||||
|
||||
LogoText = null
|
||||
@ -148,7 +148,7 @@ namespace ASC.Web.Core.WhiteLabel
|
||||
WhiteLabelLogoTypeEnum.LightSmall => IsDefaultLogoLightSmall,
|
||||
WhiteLabelLogoTypeEnum.Dark => IsDefaultLogoDark,
|
||||
WhiteLabelLogoTypeEnum.Favicon => IsDefaultLogoFavicon,
|
||||
WhiteLabelLogoTypeEnum.DocsEditor => IsDefaultLogoDocsEditor,
|
||||
WhiteLabelLogoTypeEnum.DocsEditor => IsDefaultLogoDocsEditor,
|
||||
WhiteLabelLogoTypeEnum.DocsEditorEmbed => IsDefaultLogoDocsEditorEmbed,
|
||||
_ => true,
|
||||
};
|
||||
@ -158,20 +158,20 @@ namespace ASC.Web.Core.WhiteLabel
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case WhiteLabelLogoTypeEnum.LightSmall:
|
||||
IsDefaultLogoLightSmall = value;
|
||||
case WhiteLabelLogoTypeEnum.LightSmall:
|
||||
IsDefaultLogoLightSmall = value;
|
||||
break;
|
||||
case WhiteLabelLogoTypeEnum.Dark:
|
||||
IsDefaultLogoDark = value;
|
||||
case WhiteLabelLogoTypeEnum.Dark:
|
||||
IsDefaultLogoDark = value;
|
||||
break;
|
||||
case WhiteLabelLogoTypeEnum.Favicon:
|
||||
IsDefaultLogoFavicon = value;
|
||||
case WhiteLabelLogoTypeEnum.Favicon:
|
||||
IsDefaultLogoFavicon = value;
|
||||
break;
|
||||
case WhiteLabelLogoTypeEnum.DocsEditor:
|
||||
IsDefaultLogoDocsEditor = value;
|
||||
case WhiteLabelLogoTypeEnum.DocsEditor:
|
||||
IsDefaultLogoDocsEditor = value;
|
||||
break;
|
||||
case WhiteLabelLogoTypeEnum.DocsEditorEmbed:
|
||||
IsDefaultLogoDocsEditorEmbed = value;
|
||||
case WhiteLabelLogoTypeEnum.DocsEditorEmbed:
|
||||
IsDefaultLogoDocsEditorEmbed = value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -183,7 +183,7 @@ namespace ASC.Web.Core.WhiteLabel
|
||||
WhiteLabelLogoTypeEnum.LightSmall => LogoLightSmallExt,
|
||||
WhiteLabelLogoTypeEnum.Dark => LogoDarkExt,
|
||||
WhiteLabelLogoTypeEnum.Favicon => LogoFaviconExt,
|
||||
WhiteLabelLogoTypeEnum.DocsEditor => LogoDocsEditorExt,
|
||||
WhiteLabelLogoTypeEnum.DocsEditor => LogoDocsEditorExt,
|
||||
WhiteLabelLogoTypeEnum.DocsEditorEmbed => LogoDocsEditorEmbedExt,
|
||||
_ => "",
|
||||
};
|
||||
@ -192,28 +192,28 @@ namespace ASC.Web.Core.WhiteLabel
|
||||
internal void SetExt(WhiteLabelLogoTypeEnum type, string fileExt)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case WhiteLabelLogoTypeEnum.LightSmall:
|
||||
LogoLightSmallExt = fileExt;
|
||||
{
|
||||
case WhiteLabelLogoTypeEnum.LightSmall:
|
||||
LogoLightSmallExt = fileExt;
|
||||
break;
|
||||
case WhiteLabelLogoTypeEnum.Dark:
|
||||
LogoDarkExt = fileExt;
|
||||
case WhiteLabelLogoTypeEnum.Dark:
|
||||
LogoDarkExt = fileExt;
|
||||
break;
|
||||
case WhiteLabelLogoTypeEnum.Favicon:
|
||||
LogoFaviconExt = fileExt;
|
||||
case WhiteLabelLogoTypeEnum.Favicon:
|
||||
LogoFaviconExt = fileExt;
|
||||
break;
|
||||
case WhiteLabelLogoTypeEnum.DocsEditor:
|
||||
LogoDocsEditorExt = fileExt;
|
||||
case WhiteLabelLogoTypeEnum.DocsEditor:
|
||||
LogoDocsEditorExt = fileExt;
|
||||
break;
|
||||
case WhiteLabelLogoTypeEnum.DocsEditorEmbed:
|
||||
LogoDocsEditorEmbedExt = fileExt;
|
||||
case WhiteLabelLogoTypeEnum.DocsEditorEmbed:
|
||||
LogoDocsEditorEmbedExt = fileExt;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
||||
[Scope]
|
||||
public class TenantWhiteLabelSettingsHelper
|
||||
{
|
||||
@ -224,7 +224,7 @@ namespace ASC.Web.Core.WhiteLabel
|
||||
private StorageFactory StorageFactory { get; }
|
||||
private WhiteLabelHelper WhiteLabelHelper { get; }
|
||||
private TenantManager TenantManager { get; }
|
||||
private SettingsManager SettingsManager { get; }
|
||||
private SettingsManager SettingsManager { get; }
|
||||
public IServiceProvider ServiceProvider { get; }
|
||||
private ILog Log { get; set; }
|
||||
|
||||
@ -234,7 +234,7 @@ namespace ASC.Web.Core.WhiteLabel
|
||||
StorageFactory storageFactory,
|
||||
WhiteLabelHelper whiteLabelHelper,
|
||||
TenantManager tenantManager,
|
||||
SettingsManager settingsManager,
|
||||
SettingsManager settingsManager,
|
||||
IServiceProvider serviceProvider,
|
||||
IOptionsMonitor<ILog> option)
|
||||
{
|
||||
@ -243,51 +243,51 @@ namespace ASC.Web.Core.WhiteLabel
|
||||
StorageFactory = storageFactory;
|
||||
WhiteLabelHelper = whiteLabelHelper;
|
||||
TenantManager = tenantManager;
|
||||
SettingsManager = settingsManager;
|
||||
ServiceProvider = serviceProvider;
|
||||
SettingsManager = settingsManager;
|
||||
ServiceProvider = serviceProvider;
|
||||
Log = option.CurrentValue;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#region Restore default
|
||||
|
||||
public bool IsDefault(TenantWhiteLabelSettings tenantWhiteLabelSettings)
|
||||
{
|
||||
var defaultSettings = tenantWhiteLabelSettings.GetDefault(ServiceProvider) as TenantWhiteLabelSettings;
|
||||
|
||||
if (defaultSettings == null) return false;
|
||||
|
||||
return tenantWhiteLabelSettings.LogoLightSmallExt == defaultSettings.LogoLightSmallExt &&
|
||||
tenantWhiteLabelSettings.LogoDarkExt == defaultSettings.LogoDarkExt &&
|
||||
tenantWhiteLabelSettings.LogoFaviconExt == defaultSettings.LogoFaviconExt &&
|
||||
tenantWhiteLabelSettings.LogoDocsEditorExt == defaultSettings.LogoDocsEditorExt &&
|
||||
tenantWhiteLabelSettings.LogoDocsEditorEmbedExt == defaultSettings.LogoDocsEditorEmbedExt &&
|
||||
|
||||
tenantWhiteLabelSettings.IsDefaultLogoLightSmall == defaultSettings.IsDefaultLogoLightSmall &&
|
||||
tenantWhiteLabelSettings.IsDefaultLogoDark == defaultSettings.IsDefaultLogoDark &&
|
||||
tenantWhiteLabelSettings.IsDefaultLogoFavicon == defaultSettings.IsDefaultLogoFavicon &&
|
||||
tenantWhiteLabelSettings.IsDefaultLogoDocsEditor == defaultSettings.IsDefaultLogoDocsEditor &&
|
||||
tenantWhiteLabelSettings.IsDefaultLogoDocsEditorEmbed == defaultSettings.IsDefaultLogoDocsEditorEmbed &&
|
||||
|
||||
tenantWhiteLabelSettings.LogoText == defaultSettings.LogoText;
|
||||
}
|
||||
|
||||
public bool IsDefault(TenantWhiteLabelSettings tenantWhiteLabelSettings)
|
||||
{
|
||||
var defaultSettings = tenantWhiteLabelSettings.GetDefault(ServiceProvider) as TenantWhiteLabelSettings;
|
||||
|
||||
if (defaultSettings == null) return false;
|
||||
|
||||
return tenantWhiteLabelSettings.LogoLightSmallExt == defaultSettings.LogoLightSmallExt &&
|
||||
tenantWhiteLabelSettings.LogoDarkExt == defaultSettings.LogoDarkExt &&
|
||||
tenantWhiteLabelSettings.LogoFaviconExt == defaultSettings.LogoFaviconExt &&
|
||||
tenantWhiteLabelSettings.LogoDocsEditorExt == defaultSettings.LogoDocsEditorExt &&
|
||||
tenantWhiteLabelSettings.LogoDocsEditorEmbedExt == defaultSettings.LogoDocsEditorEmbedExt &&
|
||||
|
||||
tenantWhiteLabelSettings.IsDefaultLogoLightSmall == defaultSettings.IsDefaultLogoLightSmall &&
|
||||
tenantWhiteLabelSettings.IsDefaultLogoDark == defaultSettings.IsDefaultLogoDark &&
|
||||
tenantWhiteLabelSettings.IsDefaultLogoFavicon == defaultSettings.IsDefaultLogoFavicon &&
|
||||
tenantWhiteLabelSettings.IsDefaultLogoDocsEditor == defaultSettings.IsDefaultLogoDocsEditor &&
|
||||
tenantWhiteLabelSettings.IsDefaultLogoDocsEditorEmbed == defaultSettings.IsDefaultLogoDocsEditorEmbed &&
|
||||
|
||||
tenantWhiteLabelSettings.LogoText == defaultSettings.LogoText;
|
||||
}
|
||||
|
||||
public void RestoreDefault(TenantWhiteLabelSettings tenantWhiteLabelSettings, TenantLogoManager tenantLogoManager, int tenantId, IDataStore storage = null)
|
||||
{
|
||||
tenantWhiteLabelSettings.LogoLightSmallExt = null;
|
||||
tenantWhiteLabelSettings.LogoDarkExt = null;
|
||||
tenantWhiteLabelSettings.LogoFaviconExt = null;
|
||||
tenantWhiteLabelSettings.LogoDocsEditorExt = null;
|
||||
tenantWhiteLabelSettings.LogoDocsEditorExt = null;
|
||||
tenantWhiteLabelSettings.LogoDocsEditorEmbedExt = null;
|
||||
|
||||
tenantWhiteLabelSettings.IsDefaultLogoLightSmall = true;
|
||||
tenantWhiteLabelSettings.IsDefaultLogoDark = true;
|
||||
tenantWhiteLabelSettings.IsDefaultLogoFavicon = true;
|
||||
tenantWhiteLabelSettings.IsDefaultLogoDocsEditor = true;
|
||||
tenantWhiteLabelSettings.IsDefaultLogoDocsEditor = true;
|
||||
tenantWhiteLabelSettings.IsDefaultLogoDocsEditorEmbed = true;
|
||||
|
||||
tenantWhiteLabelSettings.SetLogoText(null);
|
||||
|
||||
var store = storage ?? StorageFactory.GetStorage(tenantId.ToString(), moduleName);
|
||||
tenantWhiteLabelSettings.SetLogoText(null);
|
||||
|
||||
var store = storage ?? StorageFactory.GetStorage(tenantId.ToString(), moduleName);
|
||||
|
||||
try
|
||||
{
|
||||
@ -346,9 +346,9 @@ namespace ASC.Web.Core.WhiteLabel
|
||||
using (var memory = new MemoryStream(data))
|
||||
using (var image = Image.Load(memory))
|
||||
{
|
||||
var logoFileName = BuildLogoFileName(type, logoFileExt, false);
|
||||
|
||||
memory.Seek(0, SeekOrigin.Begin);
|
||||
var logoFileName = BuildLogoFileName(type, logoFileExt, false);
|
||||
|
||||
memory.Seek(0, SeekOrigin.Begin);
|
||||
store.SaveAsync(logoFileName, memory).Wait();
|
||||
}
|
||||
|
||||
@ -450,10 +450,10 @@ namespace ASC.Web.Core.WhiteLabel
|
||||
|
||||
return type switch
|
||||
{
|
||||
WhiteLabelLogoTypeEnum.LightSmall => general ? WebImageSupplier.GetAbsoluteWebPath("logo/light_small_general.svg") : WebImageSupplier.GetAbsoluteWebPath("logo/light_small.svg"),
|
||||
WhiteLabelLogoTypeEnum.Dark => general ? WebImageSupplier.GetAbsoluteWebPath("logo/dark_general.png") : WebImageSupplier.GetAbsoluteWebPath("logo/dark.png"),
|
||||
WhiteLabelLogoTypeEnum.DocsEditor => general ? WebImageSupplier.GetAbsoluteWebPath("logo/editor_logo_general.png") : WebImageSupplier.GetAbsoluteWebPath("logo/editor_logo.png"),
|
||||
WhiteLabelLogoTypeEnum.DocsEditorEmbed => general ? WebImageSupplier.GetAbsoluteWebPath("logo/editor_logo_embed_general.png") : WebImageSupplier.GetAbsoluteWebPath("logo/editor_logo_embed.png"),
|
||||
WhiteLabelLogoTypeEnum.LightSmall => WebImageSupplier.GetAbsoluteWebPath("logo/light_small_doc_space.svg"),
|
||||
WhiteLabelLogoTypeEnum.Dark => WebImageSupplier.GetAbsoluteWebPath("logo/dark_doc_space.svg"),
|
||||
WhiteLabelLogoTypeEnum.DocsEditor => general ? WebImageSupplier.GetAbsoluteWebPath("logo/editor_logo_general.png") : WebImageSupplier.GetAbsoluteWebPath("logo/editor_logo.png"),
|
||||
WhiteLabelLogoTypeEnum.DocsEditorEmbed => general ? WebImageSupplier.GetAbsoluteWebPath("logo/editor_logo_embed_general.png") : WebImageSupplier.GetAbsoluteWebPath("logo/editor_logo_embed.png"),
|
||||
WhiteLabelLogoTypeEnum.Favicon => general ? WebImageSupplier.GetAbsoluteWebPath("logo/favicon_general.ico") : WebImageSupplier.GetAbsoluteWebPath("logo/favicon.ico"),
|
||||
_ => "",
|
||||
};
|
||||
@ -537,10 +537,10 @@ namespace ASC.Web.Core.WhiteLabel
|
||||
general ? TenantWhiteLabelSettings.logoFaviconSize.Height / 2 : TenantWhiteLabelSettings.logoFaviconSize.Height),
|
||||
WhiteLabelLogoTypeEnum.DocsEditor => new Size(
|
||||
general ? TenantWhiteLabelSettings.logoDocsEditorSize.Width / 2 : TenantWhiteLabelSettings.logoDocsEditorSize.Width,
|
||||
general ? TenantWhiteLabelSettings.logoDocsEditorSize.Height / 2 : TenantWhiteLabelSettings.logoDocsEditorSize.Height),
|
||||
WhiteLabelLogoTypeEnum.DocsEditorEmbed => new Size(
|
||||
general ? TenantWhiteLabelSettings.logoDocsEditorEmbedSize.Width / 2 : TenantWhiteLabelSettings.logoDocsEditorEmbedSize.Width,
|
||||
general ? TenantWhiteLabelSettings.logoDocsEditorEmbedSize.Height / 2 : TenantWhiteLabelSettings.logoDocsEditorEmbedSize.Height),
|
||||
general ? TenantWhiteLabelSettings.logoDocsEditorSize.Height / 2 : TenantWhiteLabelSettings.logoDocsEditorSize.Height),
|
||||
WhiteLabelLogoTypeEnum.DocsEditorEmbed => new Size(
|
||||
general ? TenantWhiteLabelSettings.logoDocsEditorEmbedSize.Width / 2 : TenantWhiteLabelSettings.logoDocsEditorEmbedSize.Width,
|
||||
general ? TenantWhiteLabelSettings.logoDocsEditorEmbedSize.Height / 2 : TenantWhiteLabelSettings.logoDocsEditorEmbedSize.Height),
|
||||
_ => new Size(0, 0),
|
||||
};
|
||||
}
|
||||
@ -554,7 +554,7 @@ namespace ASC.Web.Core.WhiteLabel
|
||||
try
|
||||
{
|
||||
using var stream = new MemoryStream(data);
|
||||
using var img = Image.Load(stream, out var format);
|
||||
using var img = Image.Load(stream, out var format);
|
||||
|
||||
if (size != img.Size())
|
||||
{
|
||||
@ -568,7 +568,7 @@ namespace ASC.Web.Core.WhiteLabel
|
||||
|
||||
//fileExt = CommonPhotoManager.GetImgFormatName(imgFormat);
|
||||
|
||||
using var stream2 = new MemoryStream(data);
|
||||
using var stream2 = new MemoryStream(data);
|
||||
store.SaveAsync(fileName, stream2).Wait();
|
||||
}
|
||||
catch (ArgumentException error)
|
||||
@ -591,32 +591,32 @@ namespace ASC.Web.Core.WhiteLabel
|
||||
}
|
||||
|
||||
public void Save(TenantWhiteLabelSettings tenantWhiteLabelSettings, int tenantId, TenantLogoManager tenantLogoManager, bool restore = false)
|
||||
{
|
||||
SettingsManager.SaveForTenant(tenantWhiteLabelSettings, tenantId);
|
||||
|
||||
if (tenantId == Tenant.DEFAULT_TENANT)
|
||||
{
|
||||
AppliedTenants.Clear();
|
||||
}
|
||||
else
|
||||
{
|
||||
SetNewLogoText(tenantWhiteLabelSettings, tenantId, restore);
|
||||
tenantLogoManager.RemoveMailLogoDataFromCache();
|
||||
{
|
||||
SettingsManager.SaveForTenant(tenantWhiteLabelSettings, tenantId);
|
||||
|
||||
if (tenantId == Tenant.DEFAULT_TENANT)
|
||||
{
|
||||
AppliedTenants.Clear();
|
||||
}
|
||||
else
|
||||
{
|
||||
SetNewLogoText(tenantWhiteLabelSettings, tenantId, restore);
|
||||
tenantLogoManager.RemoveMailLogoDataFromCache();
|
||||
}
|
||||
}
|
||||
|
||||
private void SetNewLogoText(TenantWhiteLabelSettings tenantWhiteLabelSettings, int tenantId, bool restore = false)
|
||||
{
|
||||
WhiteLabelHelper.DefaultLogoText = TenantWhiteLabelSettings.DefaultLogoText;
|
||||
var partnerSettings = SettingsManager.LoadForDefaultTenant<TenantWhiteLabelSettings>();
|
||||
|
||||
if (restore && string.IsNullOrEmpty(partnerSettings.GetLogoText(SettingsManager)))
|
||||
{
|
||||
WhiteLabelHelper.RestoreOldText(tenantId);
|
||||
}
|
||||
else
|
||||
{
|
||||
WhiteLabelHelper.SetNewText(tenantId, tenantWhiteLabelSettings.GetLogoText(SettingsManager));
|
||||
WhiteLabelHelper.DefaultLogoText = TenantWhiteLabelSettings.DefaultLogoText;
|
||||
var partnerSettings = SettingsManager.LoadForDefaultTenant<TenantWhiteLabelSettings>();
|
||||
|
||||
if (restore && string.IsNullOrEmpty(partnerSettings.GetLogoText(SettingsManager)))
|
||||
{
|
||||
WhiteLabelHelper.RestoreOldText(tenantId);
|
||||
}
|
||||
else
|
||||
{
|
||||
WhiteLabelHelper.SetNewText(tenantId, tenantWhiteLabelSettings.GetLogoText(SettingsManager));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user