Plugin Directory

Changeset 3050549


Ignore:
Timestamp:
03/13/2024 02:26:16 PM (2 years ago)
Author:
onlyoffice
Message:

dev 2.0.0

Location:
onlyoffice-docspace/trunk
Files:
20 added
3 deleted
63 edited
2 moved

Legend:

Unmodified
Added
Removed
  • onlyoffice-docspace/trunk/CHANGELOG.md

    r3012439 r3050549  
    11# Change Log
     2
     3
     4## 2.0.0
     5## Added
     6- support for public rooms
     7- improved block settings (theme, align)
     8- improved view of the inserted blocks
     9
     10## Changed
     11- delete public user "Wordpress Viewer"
    212
    313## 1.0.1
  • onlyoffice-docspace/trunk/admin/class-oodsp-ajax.php

    r3012439 r3050549  
    1212/**
    1313 *
    14  * (c) Copyright Ascensio System SIA 2023
     14 * (c) Copyright Ascensio System SIA 2024
    1515 *
    1616 * This program is free software; you can redistribute it and/or
     
    6969     */
    7070    public function oodsp_credentials() {
    71         $user      = wp_get_current_user();
    72         $is_public = isset( $_REQUEST['is_public'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['is_public'] ) ) : ''; // phpcs:ignore
     71        $user = wp_get_current_user();
    7372
    74         if ( ! empty( $is_public ) && 'true' === $is_public ) {
    75             $pass = $this->public_docspace::OODSP_PUBLIC_USER_PASS;
     73        $hash = isset( $_REQUEST['hash'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['hash'] ) ) : ''; // phpcs:ignore
     74
     75        if ( ! empty( $hash ) ) {
     76            $result = $this->security_manager->set_oodsp_user_pass( $user->ID, $hash );
     77
     78            if ( ! $result ) {
     79                return wp_die( '0', 400 );
     80            }
     81
     82            $pass = $hash;
    7683        } else {
    77             $hash = isset( $_REQUEST['hash'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['hash'] ) ) : ''; // phpcs:ignore
     84            $pass = $this->security_manager->get_oodsp_user_pass( $user->ID );
    7885
    79             if ( ! empty( $hash ) ) {
    80                 $result = $this->security_manager->set_oodsp_user_pass( $user->ID, $hash );
    81 
    82                 if ( ! $result ) {
    83                     return wp_die( '0', 400 );
    84                 }
    85 
    86                 $pass = $hash;
    87             } else {
    88                 $pass = $this->security_manager->get_oodsp_user_pass( $user->ID );
    89 
    90                 if ( empty( $pass ) ) {
    91                     return wp_die( '0', 404 );
    92                 }
     86            if ( empty( $pass ) ) {
     87                return wp_die( '0', 404 );
    9388            }
    9489        }
     
    9691        wp_die( esc_attr( $pass ) );
    9792    }
    98 
    99     /**
    100      * DocSpace Credentials public.
    101      */
    102     public function no_priv_oodsp_credentials() {
    103         wp_die( esc_attr( $this->public_docspace::OODSP_PUBLIC_USER_PASS ) );
    104     }
    10593}
  • onlyoffice-docspace/trunk/admin/class-oodsp-docspace.php

    r3012439 r3050549  
    1212/**
    1313 *
    14  * (c) Copyright Ascensio System SIA 2023
     14 * (c) Copyright Ascensio System SIA 2024
    1515 *
    1616 * This program is free software; you can redistribute it and/or
     
    3131if ( ! defined( 'ABSPATH' ) ) {
    3232    exit;
     33}
     34
     35if ( ! function_exists( 'WP_Filesystem' ) ) {
     36    include ABSPATH . '/wp-admin/includes/file.php';
     37    WP_Filesystem();
    3338}
    3439
     
    4348 */
    4449class OODSP_DocSpace {
    45     /**
    46      * LOCALES for DocSpace
    47      */
    48     const LOCALES = array(
    49         'az',
    50         'bg',
    51         'cs',
    52         'de',
    53         'el-GR',
    54         'en-GB',
    55         'en-US',
    56         'es',
    57         'fi',
    58         'fr',
    59         'hy-AM',
    60         'it',
    61         'ja-JP',
    62         'ko-KR',
    63         'lo-LA',
    64         'lv',
    65         'nl',
    66         'pl',
    67         'pt',
    68         'pt-BR',
    69         'ro',
    70         'ru',
    71         'sk',
    72         'sl',
    73         'tr',
    74         'uk-UA',
    75         'vi',
    76         'zh-CN',
    77     );
    78 
    79     /**
    80      * OODSP_Settings
     50
     51    /**
     52     * OODSP_Utils
    8153     *
    8254     * @access   private
    83      * @var      OODSP_Settings    $plugin_settings
    84      */
    85     private $plugin_settings;
     55     * @var      OODSP_Utils    $oodsp_utils
     56     */
     57    private $oodsp_utils;
    8658
    8759
     
    9062     */
    9163    public function __construct() {
    92         $this->plugin_settings = new OODSP_Settings();
     64        $this->oodsp_utils = new OODSP_Utils();
    9365    }
    9466
     
    9971        wp_enqueue_script(
    10072            OODSP_PLUGIN_NAME . '-login',
    101             OODSP_PLUGIN_URL . 'admin/js/login.js',
    102             array( 'jquery' ),
     73            OODSP_PLUGIN_URL . 'includes/js/oodsp-login.js',
     74            array( 'jquery', 'wp-util' ),
    10375            OODSP_VERSION,
    10476            true
     
    11385        }
    11486
     87        wp_enqueue_script( 'user-profile' );
     88
     89        $this->oodsp_utils->enqueue_scripts();
     90
    11591        wp_enqueue_script(
    116             'docspace-component-api',
    117             OODSP_PLUGIN_URL . 'assets-onlyoffice-docspace/js/docspace-component-api.js',
     92            'docspace-integration-sdk',
     93            OODSP_PLUGIN_URL . 'assets-onlyoffice-docspace/js/docspace-integration-sdk.js',
    11894            array(),
    11995            OODSP_VERSION,
    12096            true
    12197        );
    122 
    123         $error_message = __( 'Portal unavailable! Please contact the administrator!', 'onlyoffice-docspace-plugin' );
    124 
    125         if ( current_user_can( 'manage_options' ) ) {
    126             $error_message = __( 'Go to the settings to configure ONLYOFFICE DocSpace connector.', 'onlyoffice-docspace-plugin' );
    127         }
    128 
    129         wp_localize_script(
    130             'docspace-component-api',
    131             'DocSpaceComponent',
    132             array(
    133                 'url'         => $this->plugin_settings->get_onlyoffice_docspace_setting( OODSP_Settings::DOCSPACE_URL ),
    134                 'currentUser' => wp_get_current_user()->user_email,
    135                 'locale'      => $this->get_locale_for_docspace(),
    136                 'isPublic'    => false,
    137                 'ajaxUrl'     => admin_url( 'admin-ajax.php' ),
    138                 'images'      => array(
    139                     'onlyoffice'  => plugins_url( 'public/images/onlyoffice.svg', OODSP_PLUGIN_FILE ),
    140                     'unavailable' => plugins_url( 'public/images/unavailable.svg', OODSP_PLUGIN_FILE ),
    141                 ),
    142                 'messages'    => array(
    143                     'error' => $error_message,
    144                 ),
    145             )
    146         );
    147 
    148         wp_enqueue_script( 'user-profile' );
    14998    }
    15099
     
    153102     */
    154103    public function enqueue_styles() {
     104        $this->oodsp_utils->enqueue_styles();
     105
    155106        wp_enqueue_style(
    156             'docspace-components-api',
    157             OODSP_PLUGIN_URL . 'assets-onlyoffice-docspace/css/docspace-component-api.css',
     107            OODSP_PLUGIN_NAME . '-login',
     108            OODSP_PLUGIN_URL . 'includes/css/oodsp-login.css',
    158109            array(),
    159110            OODSP_VERSION
    160111        );
    161112
    162         wp_enqueue_style(
    163             OODSP_PLUGIN_NAME . '-login',
    164             OODSP_PLUGIN_URL . 'admin/css/login.css',
    165             array(),
    166             OODSP_VERSION
    167         );
    168 
    169113        wp_enqueue_style( 'login' );
    170114    }
     
    174118     */
    175119    public function init_menu() {
    176         $logo_svg = file_get_contents( OODSP_PLUGIN_URL . 'admin/images/logo.svg' );
     120        global $wp_filesystem;
     121
     122        $logo_svg = $wp_filesystem->get_contents( OODSP_PLUGIN_URL . 'admin/images/logo.svg' );
    177123
    178124        add_menu_page(
     
    182128            'onlyoffice-docspace',
    183129            array( $this, 'docspace_page' ),
    184             'data:image/svg+xml;base64,' . base64_encode( $logo_svg )
     130            'data:image/svg+xml;base64,' . base64_encode( $logo_svg ) // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode
    185131        );
    186132
     
    204150        <div class="wrap">
    205151            <div class="ds-frame" style="height: calc(100vh - 65px - 32px);">
    206                 <div id="oodsp-manager-frame"></div>
     152                <div id="oodsp-manager-frame" style="width: 100%; height:100%;"></div>
    207153            </div>
    208154        </div>
    209155        <script>
    210156            document.addEventListener('DOMContentLoaded', function () {
    211                 DocSpaceComponent.renderDocSpace(
     157                wp.oodsp.initLoginManager(
    212158                    "oodsp-manager-frame",
    213159                    function() {
     
    217163                            showFilter: true,
    218164                            showHeader: true,
    219                             locale: DocSpaceComponent.locale
     165                            locale: _oodsp.locale
    220166                        });
    221167                    }
     
    248194                        <?php esc_html_e( 'WordPress requests access to your ONLYOFFICE DocSpace', 'onlyoffice-docspace-plugin' ); ?>
    249195                        <br>
    250                         <span>{{{data.domain}}}</span>
     196                        <div title="{{{data.domain}}}">{{{data.domain}}}</div>
    251197                    </h1>
    252198                    <h1>
     
    292238        <?php
    293239    }
    294 
    295     /**
    296      *  DocSpace login template.
    297      */
    298     public function get_locale_for_docspace() {
    299         $locale = str_replace( '_', '-', get_user_locale() );
    300 
    301         if ( in_array( $locale, self::LOCALES, true ) ) {
    302             return $locale;
    303         } else {
    304             $locale = explode( '-', $locale )[0];
    305             foreach ( self::LOCALES as $value ) {
    306                 if ( str_starts_with( $value, $locale ) ) {
    307                     return $value;
    308                 }
    309             }
    310         }
    311 
    312         return 'en-US';
    313     }
    314240}
  • onlyoffice-docspace/trunk/admin/js/settings.js

    r3012439 r3050549  
    3333            .attr( 'tabindex', '-1' )
    3434            .addClass( 'is-dismissible notice notice-' + type )
    35             .append( $( '<p></p>' ).text( message ) )
     35            .append( $( '<p></p>' ).html( message ) )
    3636            .append(
    3737                $( '<button></button>' )
     
    7777        function () {
    7878            const hash = $( '#hash' );
     79            $( '#docspace-script-tag' ).remove();
     80            window.DocSpace = null;
    7981
    8082            if ( ! hash.length ) {
     
    8688                    return false;
    8789                }
    88 
    89                 const pass = $( '#user_pass' ).val().trim();
    90                 DocSpaceComponent.initScript( $( '#docspace_url' ).val().trim() )
     90                const docspaceUrl = $( '#docspace_url' ).val().trim();
     91                const pass        = $( '#user_pass' ).val().trim();
     92                DocspaceIntegrationSdk.initScript( 'oodsp-api-js', docspaceUrl )
    9193                    .then(
    9294                        async function () {
     
    117119                                            $( '#user_pass' ).val( '' )
    118120                                            settingsForm.submit();
     121                                        },
     122                                        "onAppError": function (e) {
     123                                            hideLoader();
     124
     125                                            if ( e === "The current domain is not set in the Content Security Policy (CSP) settings." ) {
     126                                                addNotice(
     127                                                    wp.i18n.sprintf(
     128                                                        wp.i18n.__( 'The current domain is not set in the Content Security Policy (CSP) settings. Please add it via %sthe Developer Tools section%s.', 'onlyoffice-docspace-plugin' ),
     129                                                        '<a href="' + stripTrailingSlash( docspaceUrl ) + '/portal-settings/developer-tools/javascript-sdk" target="_blank">',
     130                                                        "</a>"
     131                                                    ),
     132                                                    'error'
     133                                                );
     134                                            } else {
     135                                                addNotice( e, 'error' );
     136                                            }
    119137                                        }
    120138                                    }
     
    190208
    191209    if ( 'true' === searchParams.get( 'users' ) ) {
    192         DocSpaceComponent.initScript()
     210        DocspaceIntegrationSdk.initScript( 'oodsp-api-js', _oodsp.docspaceUrl )
    193211            .then(
    194212                function (e) {
     
    201219            );
    202220    }
     221
     222    const stripTrailingSlash = ( str ) => {
     223        return str.endsWith( '/' )
     224            ? str.slice( 0, -1 )
     225            : str;
     226    };
    203227}( jQuery ) );
  • onlyoffice-docspace/trunk/admin/settings/actions/settings-invite-users.php

    r3012439 r3050549  
    99/**
    1010 *
    11  * (c) Copyright Ascensio System SIA 2023
     11 * (c) Copyright Ascensio System SIA 2024
    1212 *
    1313 * This program is free software; you can redistribute it and/or
  • onlyoffice-docspace/trunk/admin/settings/actions/settings-update.php

    r3012439 r3050549  
    99/**
    1010 *
    11  * (c) Copyright Ascensio System SIA 2023
     11 * (c) Copyright Ascensio System SIA 2024
    1212 *
    1313 * This program is free software; you can redistribute it and/or
     
    7373
    7474            add_settings_error( 'general', 'settings_updated', __( 'Settings saved', 'onlyoffice-docspace-plugin' ), 'success' );
    75 
    76             $res_create_public_user = $oodsp_request_manager->request_create_public_user( $docspace_url, $res_auth['data'] );
    77 
    78             if ( OODSP_Request_Manager::ERROR_USER_INVITE === $res_create_public_user['error'] ) {
    79                 add_settings_error( 'general', 'settings_updated', __( 'Public DocSpace user was not created! View content will not be available on public pages.', 'onlyoffice-docspace-plugin' ), 'warning' );
    80             } elseif ( OODSP_Request_Manager::ERROR_SET_USER_PASS === $res_create_public_user['error'] ) {
    81                 $res_docspace_public_user = $oodsp_request_manager->request_docspace_user( $docspace_url, OODSP_Public_DocSpace::OODSP_PUBLIC_USER_LOGIN, $res_auth['data'] );
    82 
    83                 if ( ! $res_docspace_public_user['error'] ) {
    84                     $value['docspace_public_user_id'] = $res_docspace_public_user['data']['id'];
    85                     update_option( 'oodsp_settings', $value );
    86                 }
    87 
    88                 add_settings_error( 'general', 'settings_updated', __( 'Public DocSpace user already created, but failed to update authorization.', 'onlyoffice-docspace-plugin' ), 'warning' );
    89             } elseif ( $res_create_public_user['error'] ) {
    90                 add_settings_error( 'general', 'settings_updated', __( 'Public DocSpace user was not created. View content will not be available on public pages.', 'onlyoffice-docspace-plugin' ), 'warning' );
    91             } else {
    92                 $value['docspace_public_user_id'] = $res_create_public_user['data']['id'];
    93                 update_option( 'oodsp_settings', $value );
    94 
    95                 add_settings_error( 'general', 'settings_updated', __( 'Public DocSpace user successfully created.', 'onlyoffice-docspace-plugin' ), 'success' );
    96             }
    9775
    9876            $user = wp_get_current_user(); // Try create current user in DocSpace.
  • onlyoffice-docspace/trunk/admin/settings/class-oodsp-settings.php

    r3012439 r3050549  
    1515/**
    1616 *
    17  * (c) Copyright Ascensio System SIA 2023
     17 * (c) Copyright Ascensio System SIA 2024
    1818 *
    1919 * This program is free software; you can redistribute it and/or
     
    276276                        <?php
    277277                        echo wp_kses(
    278                             __( 'The current user will be added to DocSpace with the <b>Room admin</b> role. <b>WordPress Viewer</b> user will be added to DocSpace with View Only access.', 'onlyoffice-docspace-plugin' ),
     278                            __( 'The current WordPress user will be added to DocSpace with the <b>Room admin</b> role.', 'onlyoffice-docspace-plugin' ),
    279279                            array(
    280280                                'b' => array(
  • onlyoffice-docspace/trunk/includes/class-oodsp-activator.php

    r3012439 r3050549  
    1212/**
    1313 *
    14  * (c) Copyright Ascensio System SIA 2023
     14 * (c) Copyright Ascensio System SIA 2024
    1515 *
    1616 * This program is free software; you can redistribute it and/or
  • onlyoffice-docspace/trunk/includes/class-oodsp-deactivator.php

    r3012439 r3050549  
    1212/**
    1313 *
    14  * (c) Copyright Ascensio System SIA 2023
     14 * (c) Copyright Ascensio System SIA 2024
    1515 *
    1616 * This program is free software; you can redistribute it and/or
  • onlyoffice-docspace/trunk/includes/class-oodsp-i18n.php

    r3012439 r3050549  
    1212/**
    1313 *
    14  * (c) Copyright Ascensio System SIA 2023
     14 * (c) Copyright Ascensio System SIA 2024
    1515 *
    1616 * This program is free software; you can redistribute it and/or
  • onlyoffice-docspace/trunk/includes/class-oodsp-loader.php

    r3012439 r3050549  
    1212/**
    1313 *
    14  * (c) Copyright Ascensio System SIA 2023
     14 * (c) Copyright Ascensio System SIA 2024
    1515 *
    1616 * This program is free software; you can redistribute it and/or
  • onlyoffice-docspace/trunk/includes/class-oodsp-plugin.php

    r3012439 r3050549  
    1515/**
    1616 *
    17  * (c) Copyright Ascensio System SIA 2023
     17 * (c) Copyright Ascensio System SIA 2024
    1818 *
    1919 * This program is free software; you can redistribute it and/or
     
    111111        require_once plugin_dir_path( __DIR__ ) . 'admin/class-oodsp-docspace.php';
    112112        require_once plugin_dir_path( __DIR__ ) . 'admin/class-oodsp-ajax.php';
    113         require_once plugin_dir_path( __DIR__ ) . 'admin/class-oodsp-hook.php';
    114113        require_once plugin_dir_path( __DIR__ ) . 'includes/managers/class-oodsp-request-manager.php';
    115114        require_once plugin_dir_path( __DIR__ ) . 'includes/managers/class-oodsp-security-manager.php';
     115        require_once plugin_dir_path( __DIR__ ) . 'includes/utils/class-oodsp-utils.php';
    116116        require_once plugin_dir_path( __DIR__ ) . 'includes/users/class-oodsp-users-list-table.php';
    117117        require_once plugin_dir_path( __DIR__ ) . 'includes/class-oodsp-i18n.php';
     
    170170        $this->loader->add_action( 'wp_ajax_oodsp_credentials', $plugin_ajax, 'oodsp_credentials' );
    171171        $this->loader->add_action( 'wp_ajax_nopriv_oodsp_credentials', $plugin_ajax, 'no_priv_oodsp_credentials' );
    172 
    173         $plugin_hook = new OODSP_Hook();
    174         $this->loader->add_action( 'post_updated', $plugin_hook, 'rooms_share' );
    175172    }
    176173
  • onlyoffice-docspace/trunk/includes/css/oodsp-login.css

    r3050548 r3050549  
    3232    margin: 0;
    3333    padding: 0 0 25px 0;
     34    font-size: 23px;
    3435}
    3536
    36 .oodsp-login h1#header span {
     37.oodsp-login h1#header div {
    3738    color: #2271B1;
    38     overflow: auto;
     39    overflow: hidden;
     40    text-overflow: ellipsis;
     41    cursor: pointer;
    3942}
  • onlyoffice-docspace/trunk/includes/managers/class-oodsp-request-manager.php

    r3012439 r3050549  
    1212/**
    1313 *
    14  * (c) Copyright Ascensio System SIA 2023
     14 * (c) Copyright Ascensio System SIA 2024
    1515 *
    1616 * This program is free software; you can redistribute it and/or
     
    263263
    264264    /**
    265      * Request Create Public user.
    266      *
    267      * @param string $docspace_url DocSpace URL.
    268      * @param string $docspace_token DocSpace token.
    269      */
    270     public function request_create_public_user( $docspace_url, $docspace_token ) {
    271         $res_docspace_user = $this->request_docspace_user( $docspace_url, OODSP_Public_DocSpace::OODSP_PUBLIC_USER_LOGIN, $docspace_token );
    272 
    273         if ( $res_docspace_user['error'] ) {
    274             return $this->request_invite_user(
    275                 OODSP_Public_DocSpace::OODSP_PUBLIC_USER_LOGIN,
    276                 OODSP_Public_DocSpace::OODSP_PUBLIC_USER_PASS,
    277                 OODSP_Public_DocSpace::OODSP_PUBLIC_USER_FIRSTNAME,
    278                 OODSP_Public_DocSpace::OODSP_PUBLIC_USER_LASTNAME,
    279                 2,
    280                 $docspace_token
    281             );
    282         } else {
    283             return $this->request_set_user_pass(
    284                 $res_docspace_user['data']['id'],
    285                 OODSP_Public_DocSpace::OODSP_PUBLIC_USER_PASS,
    286                 $docspace_token
    287             );
    288         }
    289     }
    290 
    291     /**
    292265     * Request Set DocSpace user password.
    293266     *
     
    366339
    367340    /**
    368      * Request file information to DocSpace.
    369      *
    370      * @param string $file_id File ID.
    371      */
    372     public function request_file_information( $file_id ) {
    373         $result = array(
    374             'error' => null,
    375             'data'  => null,
    376         );
    377 
    378         $res_auth = $this->auth_docspace();
    379 
    380         if ( $res_auth['error'] ) {
    381             return $res_auth;
    382         }
    383 
    384         $responce = wp_remote_post(
    385             $this->plugin_settings->get_onlyoffice_docspace_setting( OODSP_Settings::DOCSPACE_URL ) . 'api/2.0/files/file/' . $file_id,
    386             array(
    387                 'headers' => array( 'Content-Type' => 'application/json; charset=utf-8' ),
    388                 'cookies' => array( 'asc_auth_key' => $res_auth['data'] ),
    389                 'method'  => 'GET',
    390             )
    391         );
    392 
    393         if ( is_wp_error( $responce ) || 200 !== wp_remote_retrieve_response_code( $responce ) ) {
    394             $result['error'] = self::ERROR_GET_FILE_INFO;
    395             return $result;
    396         }
    397 
    398         $body           = json_decode( wp_remote_retrieve_body( $responce ), true );
    399         $result['data'] = $body['response'];
    400 
    401         return $result;
    402     }
    403 
    404     /**
    405      * Request folder information to DocSpace.
    406      *
    407      * @param string $folder_id Folder ID.
    408      */
    409     public function request_folder_information( $folder_id ) {
    410         $result = array(
    411             'error' => null,
    412             'data'  => null,
    413         );
    414 
    415         $res_auth = $this->auth_docspace();
    416 
    417         if ( $res_auth['error'] ) {
    418             return $res_auth;
    419         }
    420 
    421         $responce = wp_remote_post(
    422             $this->plugin_settings->get_onlyoffice_docspace_setting( OODSP_Settings::DOCSPACE_URL ) . 'api/2.0/files/' . $folder_id,
    423             array(
    424                 'headers' => array( 'Content-Type' => 'application/json; charset=utf-8' ),
    425                 'cookies' => array( 'asc_auth_key' => $res_auth['data'] ),
    426                 'method'  => 'GET',
    427             )
    428         );
    429 
    430         if ( is_wp_error( $responce ) || 200 !== wp_remote_retrieve_response_code( $responce ) ) {
    431             $result['error'] = self::ERROR_GET_FOLDER_INFO;
    432             return $result;
    433         }
    434 
    435         $body           = json_decode( wp_remote_retrieve_body( $responce ), true );
    436         $result['data'] = $body['response'];
    437 
    438         return $result;
    439     }
    440 
    441     /**
    442      * Request room share public user to DocSpace.
    443      *
    444      * @param string $room_id Room ID.
    445      */
    446     public function request_room_share_public_user( $room_id ) {
    447         $result = array(
    448             'error' => null,
    449             'data'  => null,
    450         );
    451 
    452         $res_auth = $this->auth_docspace();
    453 
    454         if ( $res_auth['error'] ) {
    455             return $res_auth;
    456         }
    457 
    458         $responce = wp_remote_post(
    459             $this->plugin_settings->get_onlyoffice_docspace_setting( OODSP_Settings::DOCSPACE_URL ) . 'api/2.0/files/rooms/' . $room_id . '/share',
    460             array(
    461                 'headers' => array( 'Content-Type' => 'application/json; charset=utf-8' ),
    462                 'cookies' => array( 'asc_auth_key' => $res_auth['data'] ),
    463                 'body'    => wp_json_encode(
    464                     array(
    465                         'invitations' => array(
    466                             array(
    467                                 'access' => 2,
    468                                 'id'     => $this->plugin_settings->get_onlyoffice_docspace_setting( 'docspace_public_user_id' ),
    469                             ),
    470                         ),
    471                         'message'     => 'Invitation message',
    472                         'notify'      => true,
    473                     )
    474                 ),
    475                 'method'  => 'PUT',
    476             )
    477         );
    478 
    479         if ( is_wp_error( $responce ) || 200 !== wp_remote_retrieve_response_code( $responce ) ) {
    480             $result['error'] = self::ERROR_SHARE_ROOM;
    481             return $result;
    482         }
    483 
    484         $body           = json_decode( wp_remote_retrieve_body( $responce ), true );
    485         $result['data'] = $body['response'];
    486 
    487         return $result;
    488     }
    489 
    490     /**
    491341     * Return array: email, first name, last name.
    492342     *
  • onlyoffice-docspace/trunk/includes/managers/class-oodsp-security-manager.php

    r3012439 r3050549  
    1212/**
    1313 *
    14  * (c) Copyright Ascensio System SIA 2023
     14 * (c) Copyright Ascensio System SIA 2024
    1515 *
    1616 * This program is free software; you can redistribute it and/or
  • onlyoffice-docspace/trunk/includes/users/class-oodsp-users-list-table.php

    r3012439 r3050549  
    1212/**
    1313 *
    14  * (c) Copyright Ascensio System SIA 2023
     14 * (c) Copyright Ascensio System SIA 2024
    1515 *
    1616 * This program is free software; you can redistribute it and/or
     
    116116
    117117        $args = array(
    118             'number'     => $users_per_page,
    119             'offset'     => ( $paged - 1 ) * $users_per_page,
    120             'role'       => $role,
    121             'capability' => 'upload_files',
    122             'search'     => $s,
    123             'fields'     => 'all_with_meta',
     118            'number' => $users_per_page,
     119            'offset' => ( $paged - 1 ) * $users_per_page,
     120            'role'   => $role,
     121            'search' => $s,
     122            'fields' => 'all_with_meta',
    124123        );
    125124
     
    167166                        $this->items[ $userid ]->docspace_role   = $this->get_docspace_user_role_label( $this->docspace_users[ $t ] );
    168167
    169                         if ( 0 === $this->items[ $userid ]->docspace_status || 1 === $this->items[ $userid ]->docspace_status ) {
     168                        if (
     169                            0 === $this->items[ $userid ]->docspace_status
     170                            || 1 === $this->items[ $userid ]->docspace_status
     171                            || 2 === $this->items[ $userid ]->docspace_status
     172                            ) {
    170173                            $oodsp_security_manager = new OODSP_Security_Manager();
    171174                            $user_pass              = $oodsp_security_manager->get_oodsp_user_pass( $user_object->ID );
     
    265268        foreach ( $wp_roles->get_names() as $this_role => $name ) {
    266269            if ( $count_users && ! isset( $avail_roles[ $this_role ] ) ) {
    267                 continue;
    268             }
    269 
    270             if ( ! isset( get_role( $this_role )->capabilities['upload_files'] ) ) {
    271270                continue;
    272271            }
  • onlyoffice-docspace/trunk/languages/onlyoffice-docspace-plugin-de_DE-4d9e7e5bfeb560d3581c5fa0f4136bc5.json

    r3012439 r3050549  
    1 {"translation-revision-date":"","generator":"WP-CLI\/2.8.1","source":"admin\/js\/settings.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"de_DE","plural-forms":"nplurals=2; plural=(n != 1);"},"ONLYOFFICE DocSpace cannot be reached.":["ONLYOFFICE DocSpace ist nicht erreichbar."]}}}
     1{"translation-revision-date":"","generator":"WP-CLI\/2.10.0","source":"admin\/js\/settings.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"de_DE","plural-forms":"nplurals=2; plural=(n != 1);"},"ONLYOFFICE DocSpace cannot be reached.":["ONLYOFFICE DocSpace ist nicht erreichbar."],"The current domain is not set in the Content Security Policy (CSP) settings. Please add it via %sthe Developer Tools section%s.":["Die aktuelle Dom\u00e4ne ist nicht in den Einstellungen der Content Security Policy (CSP) festgelegt. Bitte f\u00fcgen Sie sie \u00fcber den Abschnitt %sEntwickler-Tools%s hinzu."]}}}
  • onlyoffice-docspace/trunk/languages/onlyoffice-docspace-plugin-de_DE-93edf268056602020e97c3a56d0516e5.json

    r3012439 r3050549  
    1 {"translation-revision-date":"","generator":"WP-CLI\/2.8.1","source":"onlyoffice-docspace-wordpress-block\/build\/index.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"de_DE","plural-forms":"nplurals=2; plural=(n != 1);"},"Settings":["Einstellungen"],"Width":["Breite"],"Height":["H\u00f6he"],"Left menu":["Men\u00fc links"],"Navigation and Title":["Navigieren und Titel"],"Action button":["Schaltfl\u00e4che Aktion"],"Search, Filter and Sort":["Suchen, Filtern und Sortieren"],"Header":["Kopfzeile"],"Replace":["Ersetzen"],"Select room":["Raum w\u00e4hlen"],"Select file":["Datei w\u00e4hlen"],"Room":["Raum"],"File":["Datei"],"Pick room or media file from your DocSpace":["W\u00e4hlen Sie einen Raum oder eine Mediendatei aus Ihrem DocSpace"]}}}
     1{"translation-revision-date":"","generator":"WP-CLI\/2.10.0","source":"onlyoffice-docspace-wordpress-block\/build\/index.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"de_DE","plural-forms":"nplurals=2; plural=(n != 1);"},"Settings":["Einstellungen"],"Width":["Breite"],"Height":["H\u00f6he"],"Left menu":["Men\u00fc links"],"Navigation and Title":["Navigieren und Titel"],"Action button":["Schaltfl\u00e4che Aktion"],"Search, Filter and Sort":["Suchen, Filtern und Sortieren"],"Header":["Kopfzeile"],"Replace":["Ersetzen"],"Select room":["Raum w\u00e4hlen"],"Select file":["Datei w\u00e4hlen"],"Room":["Raum"],"File":["Datei"],"Pick room or media file from your DocSpace":["W\u00e4hlen Sie einen Raum oder eine Mediendatei aus Ihrem DocSpace"],"Theme":["Thema"],"Light":["Hell"],"Dark":["Dunkel"]}}}
  • onlyoffice-docspace/trunk/languages/onlyoffice-docspace-plugin-de_DE-e56b1718c2603d6d0b2c35bca1b6778e.json

    r3012439 r3050549  
    1 {"translation-revision-date":"","generator":"WP-CLI\/2.8.1","source":"admin\/js\/login.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"de_DE","plural-forms":"nplurals=2; plural=(n != 1);"},"<strong>Error:<\/strong> User authentication failed.":["<strong>Fehler:<\/strong> Benutzerauthentifizierung fehlgeschlagen."],"<strong>Error:<\/strong> The password field is empty.":["<strong>Fehler:<\/strong> Das Passwortfeld ist leer."]}}}
     1{"translation-revision-date":"","generator":"WP-CLI\/2.9.0","source":"admin\/js\/login.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"de_DE","plural-forms":"nplurals=2; plural=(n != 1);"},"<strong>Error:<\/strong> User authentication failed.":["<strong>Fehler:<\/strong> Benutzerauthentifizierung fehlgeschlagen."],"<strong>Error:<\/strong> The password field is empty.":["<strong>Fehler:<\/strong> Das Passwortfeld ist leer."]}}}
  • onlyoffice-docspace/trunk/languages/onlyoffice-docspace-plugin-de_DE.po

    r3012439 r3050549  
    1212"Content-Transfer-Encoding: 8bit\n"
    1313"Plural-Forms: nplurals=2; plural=(n != 1);\n"
    14 "X-Generator: Poedit 3.3.2\n"
     14"X-Generator: Poedit 3.4.1\n"
    1515
    1616msgid "ONLYOFFICE DocSpace Settings"
     
    3333msgstr "Speichern"
    3434
    35 msgid "The current user will be added to DocSpace with the <b>Room admin</b> role. <b>WordPress Viewer</b> user will be added to DocSpace with View Only access."
    36 msgstr "Der aktuelle Benutzer wird zu DocSpace mit der Rolle <b>Raumadministrator</b> hinzugefügt. Der <b>WordPress-Viewer</b>-Benutzer wird zu DocSpace mit Nur-Ansicht-Zugang hinzugefügt."
     35msgid "The current WordPress user will be added to DocSpace with the <b>Room admin</b> role."
     36msgstr "Der aktuelle WordPress-Benutzer wird zu DocSpace mit der Rolle <b>Raumadministrator</b> hinzugefügt."
    3737
    3838msgid "DocSpace Users"
     
    9191msgstr "Der angegebene Benutzer ist kein DocSpace-Administrator!"
    9292
    93 msgid "Public DocSpace user was not created! View content will not be available on public pages."
    94 msgstr "Öffentlicher DocSpace-Benutzer wurde nicht erstellt! Inhalte werden auf öffentlichen Seiten nicht verfügbar sein."
    95 
    96 msgid "Public DocSpace user already created, but failed to update authorization."
    97 msgstr "Öffentlicher DocSpace-Benutzer wurde bereits erstellt, aber die Berechtigung konnte nicht aktualisiert werden."
    98 
    99 msgid "Public DocSpace user was not created. View content will not be available on public pages."
    100 msgstr "Öffentlicher DocSpace-Benutzer wurde nicht erstellt. Inhalte werden auf öffentlichen Seiten nicht verfügbar sein."
    101 
    102 msgid "Public DocSpace user successfully created."
    103 msgstr "Öffentlicher DocSpace-Benutzer erfolgreich erstellt."
    104 
    10593msgid "User %s already exists in DocSpace!"
    10694msgstr "Benutzer %s existiert bereits in DocSpace!"
     
    200188msgstr "Bitte wenden Sie sich an den Administrator."
    201189
    202 msgid "Reset WordPress Viewer to continue"
    203 msgstr "Setzen Sie den WordPress Viewer zurück, um fortzufahren"
    204 
    205 msgid "You may experience issues with access to your content because WordPress Viewer data has been lost. Please proceed to the DocSpace plugin settings and click the Save button. WordPress Viewer will be added again to DocSpace."
    206 msgstr "Es kann zu Problemen beim Zugriff auf Ihre Inhalte kommen, da die WordPress Viewer-Daten verloren gegangen sind. Bitte gehen Sie zu den DocSpace-Plugin-Einstellungen und klicken Sie auf die Schaltfläche Speichern. WordPress Viewer wird wieder zu DocSpace hinzugefügt."
    207 
    208190msgid "Please proceed to the DocSpace plugin via the left side menu and enter your password to restore access."
    209191msgstr "Bitte gehen Sie über das Menü auf der linken Seite zum DocSpace-Plugin und geben Sie Ihr Passwort ein, um den Zugang wiederherzustellen."
    210192
     193msgid "Access denied!"
     194msgstr "Zugriff verweigert!"
     195
     196msgid "Please log in to the site!"
     197msgstr "Bitte loggen Sie sich auf der Seite ein!"
     198
    211199msgid "WordPress requests access to your ONLYOFFICE DocSpace"
    212200msgstr "WordPress fordert Zugang zu Ihrem ONLYOFFICE DocSpace an"
     
    218206msgstr "Anmeldung"
    219207
    220 #: admin/js/login.js
     208#: includes/js/oodsp-login.js
    221209msgid "<strong>Error:</strong> User authentication failed."
    222210msgstr "<strong>Fehler:</strong> Benutzerauthentifizierung fehlgeschlagen."
    223211
    224 #: admin/js/login.js
     212#: includes/js/oodsp-login.js
    225213msgid "<strong>Error:</strong> The password field is empty."
    226214msgstr "<strong>Fehler:</strong> Das Passwortfeld ist leer."
    227215
     216#: admin/js/settings.js
     217msgid "The current domain is not set in the Content Security Policy (CSP) settings. Please add it via %sthe Developer Tools section%s."
     218msgstr "Die aktuelle Domäne ist nicht in den Einstellungen der Content Security Policy (CSP) festgelegt. Bitte fügen Sie sie über den Abschnitt %sEntwickler-Tools%s hinzu."
     219
     220#: onlyoffice-docspace-wordpress-block/build/index.js
     221msgid "Theme"
     222msgstr "Thema"
     223
     224#: onlyoffice-docspace-wordpress-block/build/index.js
     225msgid "Light"
     226msgstr "Hell"
     227
     228#: onlyoffice-docspace-wordpress-block/build/index.js
     229msgid "Dark"
     230msgstr "Dunkel"
     231
  • onlyoffice-docspace/trunk/languages/onlyoffice-docspace-plugin-es_ES-4d9e7e5bfeb560d3581c5fa0f4136bc5.json

    r3012439 r3050549  
    1 {"translation-revision-date":"","generator":"WP-CLI\/2.8.1","source":"admin\/js\/settings.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"es_ES","plural-forms":"nplurals=2; plural=(n != 1);"},"ONLYOFFICE DocSpace cannot be reached.":["ONLYOFFICE DocSpace no est\u00e1 disponible."]}}}
     1{"translation-revision-date":"","generator":"WP-CLI\/2.10.0","source":"admin\/js\/settings.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"es_ES","plural-forms":"nplurals=2; plural=(n != 1);"},"ONLYOFFICE DocSpace cannot be reached.":["ONLYOFFICE DocSpace no est\u00e1 disponible."],"The current domain is not set in the Content Security Policy (CSP) settings. Please add it via %sthe Developer Tools section%s.":["El dominio actual no est\u00e1 establecido en la configuraci\u00f3n de la Pol\u00edtica de seguridad de contenidos (CSP). Por favor, a\u00f1\u00e1dalo a trav\u00e9s de %sla secci\u00f3n Herramientas de desarrollo%s."]}}}
  • onlyoffice-docspace/trunk/languages/onlyoffice-docspace-plugin-es_ES-93edf268056602020e97c3a56d0516e5.json

    r3012439 r3050549  
    1 {"translation-revision-date":"","generator":"WP-CLI\/2.8.1","source":"onlyoffice-docspace-wordpress-block\/build\/index.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"es_ES","plural-forms":"nplurals=2; plural=(n != 1);"},"Settings":["Ajustes"],"Width":["Ancho"],"Height":["Altura"],"Left menu":["Men\u00fa izquierdo"],"Navigation and Title":["Navegaci\u00f3n y t\u00edtulo"],"Action button":["Bot\u00f3n Acci\u00f3n"],"Search, Filter and Sort":["Buscar, filtrar y ordenar"],"Header":["Encabezado"],"Replace":["Reemplazar"],"Select room":["Seleccionar sala"],"Select file":["Seleccionar archivo"],"Room":["Sala"],"File":["Archivo"],"Pick room or media file from your DocSpace":["Elija una sala o un archivo multimedia de su DocSpace"]}}}
     1{"translation-revision-date":"","generator":"WP-CLI\/2.10.0","source":"onlyoffice-docspace-wordpress-block\/build\/index.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"es_ES","plural-forms":"nplurals=2; plural=(n != 1);"},"Settings":["Ajustes"],"Width":["Ancho"],"Height":["Altura"],"Left menu":["Men\u00fa izquierdo"],"Navigation and Title":["Navegaci\u00f3n y t\u00edtulo"],"Action button":["Bot\u00f3n Acci\u00f3n"],"Search, Filter and Sort":["Buscar, filtrar y ordenar"],"Header":["Encabezado"],"Replace":["Reemplazar"],"Select room":["Seleccionar sala"],"Select file":["Seleccionar archivo"],"Room":["Sala"],"File":["Archivo"],"Pick room or media file from your DocSpace":["Elija una sala o un archivo multimedia de su DocSpace"],"Theme":["Tema"],"Light":["Claro"],"Dark":["Oscuro"]}}}
  • onlyoffice-docspace/trunk/languages/onlyoffice-docspace-plugin-es_ES-e56b1718c2603d6d0b2c35bca1b6778e.json

    r3012439 r3050549  
    1 {"translation-revision-date":"","generator":"WP-CLI\/2.8.1","source":"admin\/js\/login.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"es_ES","plural-forms":"nplurals=2; plural=(n != 1);"},"<strong>Error:<\/strong> User authentication failed.":["<strong>Error:<\/strong> Ha fallado la autenticaci\u00f3n de usuario."],"<strong>Error:<\/strong> The password field is empty.":["<strong>Error:<\/strong> El campo de contrase\u00f1a est\u00e1 vac\u00edo."]}}}
     1{"translation-revision-date":"","generator":"WP-CLI\/2.9.0","source":"admin\/js\/login.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"es_ES","plural-forms":"nplurals=2; plural=(n != 1);"},"<strong>Error:<\/strong> User authentication failed.":["<strong>Error:<\/strong> Ha fallado la autenticaci\u00f3n de usuario."],"<strong>Error:<\/strong> The password field is empty.":["<strong>Error:<\/strong> El campo de contrase\u00f1a est\u00e1 vac\u00edo."]}}}
  • onlyoffice-docspace/trunk/languages/onlyoffice-docspace-plugin-es_ES.po

    r3012439 r3050549  
    1212"Content-Transfer-Encoding: 8bit\n"
    1313"Plural-Forms: nplurals=2; plural=(n != 1);\n"
    14 "X-Generator: Poedit 3.3.2\n"
     14"X-Generator: Poedit 3.4.1\n"
    1515
    1616msgid "ONLYOFFICE DocSpace Settings"
     
    3333msgstr "Guardar"
    3434
    35 msgid "The current user will be added to DocSpace with the <b>Room admin</b> role. <b>WordPress Viewer</b> user will be added to DocSpace with View Only access."
    36 msgstr "El usuario actual se añadirá a DocSpace con el rol <b>Administrador de sala</b>. El usuario <b>Visualizador de WordPress</b> se añadirá a DocSpace con acceso de Solo visualización."
     35msgid "The current WordPress user will be added to DocSpace with the <b>Room admin</b> role."
     36msgstr "El usuario actual de WordPress se añadirá a DocSpace con el rol <b>Administrador de sala</b>."
    3737
    3838msgid "DocSpace Users"
     
    9191msgstr "¡El usuario especificado no es administrador de DocSpace!"
    9292
    93 msgid "Public DocSpace user was not created! View content will not be available on public pages."
    94 msgstr "No se ha creado el usuario público de DocSpace. Ver contenido no estará disponible en las páginas públicas."
    95 
    96 msgid "Public DocSpace user already created, but failed to update authorization."
    97 msgstr "El usuario público de DocSpace ya se ha creado, pero no se ha podido actualizar la autorización."
    98 
    99 msgid "Public DocSpace user was not created. View content will not be available on public pages."
    100 msgstr "No se ha creado el usuario público de DocSpace. Ver contenido no estará disponible en las páginas públicas."
    101 
    102 msgid "Public DocSpace user successfully created."
    103 msgstr "El usuario público de DocSpace se ha creado correctamente."
    104 
    10593msgid "User %s already exists in DocSpace!"
    10694msgstr "¡El usuario %s ya existe en DocSpace!"
     
    200188msgstr "Por favor, póngase en contacto con el administrador."
    201189
    202 msgid "Reset WordPress Viewer to continue"
    203 msgstr "Reinicie el visualizador de WordPress para continuar"
    204 
    205 msgid "You may experience issues with access to your content because WordPress Viewer data has been lost. Please proceed to the DocSpace plugin settings and click the Save button. WordPress Viewer will be added again to DocSpace."
    206 msgstr "Es posible que experimente problemas de acceso a su contenido debido a que se han perdido los datos del visualizador de WordPress. Vaya a los ajustes del plugin de DocSpace y haga clic en el botón Guardar. El visualizador de WordPress se añadirá de nuevo a DocSpace."
    207 
    208190msgid "Please proceed to the DocSpace plugin via the left side menu and enter your password to restore access."
    209191msgstr "Por favor, diríjase al plugin de DocSpace a través del menú de la izquierda e introduzca su contraseña para restaurar el acceso."
    210192
     193msgid "Access denied!"
     194msgstr "¡Acceso denegado!"
     195
     196msgid "Please log in to the site!"
     197msgstr "¡Por favor, inicie sesión en el sitio!"
     198
    211199msgid "WordPress requests access to your ONLYOFFICE DocSpace"
    212200msgstr "WordPress solicita acceso a su ONLYOFFICE DocSpace"
     
    218206msgstr "Entrar"
    219207
    220 #: admin/js/login.js
     208#: includes/js/oodsp-login.js
    221209msgid "<strong>Error:</strong> User authentication failed."
    222210msgstr "<strong>Error:</strong> Ha fallado la autenticación de usuario."
    223211
    224 #: admin/js/login.js
     212#: includes/js/oodsp-login.js
    225213msgid "<strong>Error:</strong> The password field is empty."
    226214msgstr "<strong>Error:</strong> El campo de contraseña está vacío."
    227215
     216#: admin/js/settings.js
     217msgid "The current domain is not set in the Content Security Policy (CSP) settings. Please add it via %sthe Developer Tools section%s."
     218msgstr "El dominio actual no está establecido en la configuración de la Política de seguridad de contenidos (CSP). Por favor, añádalo a través de %sla sección Herramientas de desarrollo%s."
     219
     220#: onlyoffice-docspace-wordpress-block/build/index.js
     221msgid "Theme"
     222msgstr "Tema"
     223
     224#: onlyoffice-docspace-wordpress-block/build/index.js
     225msgid "Light"
     226msgstr "Claro"
     227
     228#: onlyoffice-docspace-wordpress-block/build/index.js
     229msgid "Dark"
     230msgstr "Oscuro"
     231
  • onlyoffice-docspace/trunk/languages/onlyoffice-docspace-plugin-fr_FR-4d9e7e5bfeb560d3581c5fa0f4136bc5.json

    r3012439 r3050549  
    1 {"translation-revision-date":"","generator":"WP-CLI\/2.8.1","source":"admin\/js\/settings.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"fr_FR","plural-forms":"nplurals=2; plural=(n > 1);"},"ONLYOFFICE DocSpace cannot be reached.":["Il est impossible de joindre ONLYOFFICE DocSpace."]}}}
     1{"translation-revision-date":"","generator":"WP-CLI\/2.10.0","source":"admin\/js\/settings.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"fr_FR","plural-forms":"nplurals=2; plural=(n > 1);"},"ONLYOFFICE DocSpace cannot be reached.":["Il est impossible de joindre ONLYOFFICE DocSpace."],"The current domain is not set in the Content Security Policy (CSP) settings. Please add it via %sthe Developer Tools section%s.":["Le domaine actuel n'est pas d\u00e9fini dans les param\u00e8tres de la Politique de s\u00e9curit\u00e9 du contenu (CSP). Veuillez l'ajouter via %la section Outils de d\u00e9veloppement%s."]}}}
  • onlyoffice-docspace/trunk/languages/onlyoffice-docspace-plugin-fr_FR-93edf268056602020e97c3a56d0516e5.json

    r3012439 r3050549  
    1 {"translation-revision-date":"","generator":"WP-CLI\/2.8.1","source":"onlyoffice-docspace-wordpress-block\/build\/index.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"fr_FR","plural-forms":"nplurals=2; plural=(n > 1);"},"Settings":["Param\u00e8tres"],"Width":["Largeur"],"Height":["Hauteur"],"Left menu":["Menu gauche"],"Navigation and Title":["Navigation et titre"],"Action button":["Bouton Action"],"Search, Filter and Sort":["Rechercher, filtrer et trier"],"Header":["En-t\u00eate"],"Replace":["Remplacer"],"Select room":["S\u00e9lectionner salle"],"Select file":["S\u00e9lectionner fichier"],"Room":["Salle"],"File":["Fichier"],"Pick room or media file from your DocSpace":["Choisissez une salle ou un fichier multim\u00e9dia dans votre DocSpace"]}}}
     1{"translation-revision-date":"","generator":"WP-CLI\/2.10.0","source":"onlyoffice-docspace-wordpress-block\/build\/index.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"fr_FR","plural-forms":"nplurals=2; plural=(n > 1);"},"Settings":["Param\u00e8tres"],"Width":["Largeur"],"Height":["Hauteur"],"Left menu":["Menu gauche"],"Navigation and Title":["Navigation et titre"],"Action button":["Bouton Action"],"Search, Filter and Sort":["Rechercher, filtrer et trier"],"Header":["En-t\u00eate"],"Replace":["Remplacer"],"Select room":["S\u00e9lectionner salle"],"Select file":["S\u00e9lectionner fichier"],"Room":["Salle"],"File":["Fichier"],"Pick room or media file from your DocSpace":["Choisissez une salle ou un fichier multim\u00e9dia dans votre DocSpace"],"Theme":["Th\u00e8me"],"Light":["Clair"],"Dark":["Sombre"]}}}
  • onlyoffice-docspace/trunk/languages/onlyoffice-docspace-plugin-fr_FR-e56b1718c2603d6d0b2c35bca1b6778e.json

    r3012439 r3050549  
    1 {"translation-revision-date":"","generator":"WP-CLI\/2.8.1","source":"admin\/js\/login.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"fr_FR","plural-forms":"nplurals=2; plural=(n > 1);"},"<strong>Error:<\/strong> User authentication failed.":["<strong>Erreur :<\/strong> L'authentification de l'utilisateur a \u00e9chou\u00e9."],"<strong>Error:<\/strong> The password field is empty.":["<strong>Erreur :<\/strong> Le champ du mot de passe est vide."]}}}
     1{"translation-revision-date":"","generator":"WP-CLI\/2.9.0","source":"admin\/js\/login.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"fr_FR","plural-forms":"nplurals=2; plural=(n > 1);"},"<strong>Error:<\/strong> User authentication failed.":["<strong>Erreur :<\/strong> L'authentification de l'utilisateur a \u00e9chou\u00e9."],"<strong>Error:<\/strong> The password field is empty.":["<strong>Erreur :<\/strong> Le champ du mot de passe est vide."]}}}
  • onlyoffice-docspace/trunk/languages/onlyoffice-docspace-plugin-fr_FR.po

    r3012439 r3050549  
    1212"Content-Transfer-Encoding: 8bit\n"
    1313"Plural-Forms: nplurals=2; plural=(n > 1);\n"
    14 "X-Generator: Poedit 3.3.2\n"
     14"X-Generator: Poedit 3.4.1\n"
    1515
    1616msgid "ONLYOFFICE DocSpace Settings"
     
    3333msgstr "Enregistrer"
    3434
    35 msgid "The current user will be added to DocSpace with the <b>Room admin</b> role. <b>WordPress Viewer</b> user will be added to DocSpace with View Only access."
    36 msgstr "L'utilisateur actuel sera ajouté à DocSpace avec le rôle <b>Administrateur de salle</b>. L'utilisateur de <b>WordPress Viewer</b> sera ajouté à DocSpace avec un accès en lecture seule."
     35msgid "The current WordPress user will be added to DocSpace with the <b>Room admin</b> role."
     36msgstr "L'utilisateur actuel de WordPress  sera ajouté à DocSpace avec le rôle <b>Administrateur de salle</b>."
    3737
    3838msgid "DocSpace Users"
     
    9191msgstr "L'utilisateur spécifié n'est pas un administrateur DocSpace !"
    9292
    93 msgid "Public DocSpace user was not created! View content will not be available on public pages."
    94 msgstr "L'utilisateur public de DocSpace n'a pas été créé. La visualisation du contenu ne sera pas disponible sur les pages publiques."
    95 
    96 msgid "Public DocSpace user already created, but failed to update authorization."
    97 msgstr "L'utilisateur public de DocSpace a déjà été créé, mais la mise à jour de l'autorisation a échoué."
    98 
    99 msgid "Public DocSpace user was not created. View content will not be available on public pages."
    100 msgstr "L'utilisateur public de DocSpace n'a pas été créé. La visualisation du contenu ne sera pas disponible sur les pages publiques."
    101 
    102 msgid "Public DocSpace user successfully created."
    103 msgstr "Utilisateur DocSpace public créé avec succès."
    104 
    10593msgid "User %s already exists in DocSpace!"
    10694msgstr "L'utilisateur %s existe déjà dans DocSpace !"
     
    200188msgstr "Veuillez contacter l'administrateur."
    201189
    202 msgid "Reset WordPress Viewer to continue"
    203 msgstr "Réinitialisez le visualiseur WordPress pour continuer"
    204 
    205 msgid "You may experience issues with access to your content because WordPress Viewer data has been lost. Please proceed to the DocSpace plugin settings and click the Save button. WordPress Viewer will be added again to DocSpace."
    206 msgstr "Il est possible que vous rencontriez des problèmes d'accès à votre contenu parce que les données de WordPress Viewer ont été perdues. Veuillez vous rendre dans les réglages du plugin DocSpace et cliquer sur le bouton Enregistrer. WordPress Viewer sera à nouveau ajouté à DocSpace."
    207 
    208190msgid "Please proceed to the DocSpace plugin via the left side menu and enter your password to restore access."
    209191msgstr "Veuillez accéder au plugin DocSpace via le menu de gauche et saisir votre mot de passe pour rétablir l'accès."
    210192
     193msgid "Access denied!"
     194msgstr "Accès refusé !"
     195
     196msgid "Please log in to the site!"
     197msgstr "Veuillez vous connecter sur le site !"
     198
    211199msgid "WordPress requests access to your ONLYOFFICE DocSpace"
    212200msgstr "WordPress demande l'accès à votre ONLYOFFICE DocSpace"
     
    218206msgstr "Connexion"
    219207
    220 #: admin/js/login.js
     208#: includes/js/oodsp-login.js
    221209msgid "<strong>Error:</strong> User authentication failed."
    222210msgstr "<strong>Erreur :</strong> L'authentification de l'utilisateur a échoué."
    223211
    224 #: admin/js/login.js
     212#: includes/js/oodsp-login.js
    225213msgid "<strong>Error:</strong> The password field is empty."
    226214msgstr "<strong>Erreur :</strong> Le champ du mot de passe est vide."
    227215
     216#: admin/js/settings.js
     217msgid "The current domain is not set in the Content Security Policy (CSP) settings. Please add it via %sthe Developer Tools section%s."
     218msgstr "Le domaine actuel n'est pas défini dans les paramètres de la Politique de sécurité du contenu (CSP). Veuillez l'ajouter via %la section Outils de développement%s."
     219
     220#: onlyoffice-docspace-wordpress-block/build/index.js
     221msgid "Theme"
     222msgstr "Thème"
     223
     224#: onlyoffice-docspace-wordpress-block/build/index.js
     225msgid "Light"
     226msgstr "Clair"
     227
     228#: onlyoffice-docspace-wordpress-block/build/index.js
     229msgid "Dark"
     230msgstr "Sombre"
     231
  • onlyoffice-docspace/trunk/languages/onlyoffice-docspace-plugin-it_IT-4d9e7e5bfeb560d3581c5fa0f4136bc5.json

    r3012439 r3050549  
    1 {"translation-revision-date":"","generator":"WP-CLI\/2.8.1","source":"admin\/js\/settings.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"it_IT","plural-forms":"nplurals=2; plural=(n != 1);"},"ONLYOFFICE DocSpace cannot be reached.":["Impossibile raggiungere ONLYOFFICE DocSpace."]}}}
     1{"translation-revision-date":"","generator":"WP-CLI\/2.10.0","source":"admin\/js\/settings.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"it_IT","plural-forms":"nplurals=2; plural=(n != 1);"},"ONLYOFFICE DocSpace cannot be reached.":["Impossibile raggiungere ONLYOFFICE DocSpace."],"The current domain is not set in the Content Security Policy (CSP) settings. Please add it via %sthe Developer Tools section%s.":["Il dominio corrente non \u00e8 impostato nelle impostazioni della Content Security Policy (CSP). Aggiungilo tramite %sla sezione Strumenti per sviluppatori%s."]}}}
  • onlyoffice-docspace/trunk/languages/onlyoffice-docspace-plugin-it_IT-93edf268056602020e97c3a56d0516e5.json

    r3012439 r3050549  
    1 {"translation-revision-date":"","generator":"WP-CLI\/2.8.1","source":"onlyoffice-docspace-wordpress-block\/build\/index.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"it_IT","plural-forms":"nplurals=2; plural=(n != 1);"},"Settings":["Impostazioni"],"Width":["Larghezza"],"Height":["Altezza"],"Left menu":["Men\u00f9 a sinistra"],"Navigation and Title":["Naviga e Nomina"],"Action button":["Pulsante di azione"],"Search, Filter and Sort":["Cerca, filtra e ordina"],"Header":["Intestazione"],"Replace":["Sostituisci"],"Select room":["Seleziona stanza"],"Select file":["Seleziona file"],"Room":["Stanza"],"File":["File"],"Pick room or media file from your DocSpace":["Scegli la stanza virtuale o il file multimediale dal tuo DocSpace"]}}}
     1{"translation-revision-date":"","generator":"WP-CLI\/2.10.0","source":"onlyoffice-docspace-wordpress-block\/build\/index.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"it_IT","plural-forms":"nplurals=2; plural=(n != 1);"},"Settings":["Impostazioni"],"Width":["Larghezza"],"Height":["Altezza"],"Left menu":["Men\u00f9 a sinistra"],"Navigation and Title":["Naviga e Nomina"],"Action button":["Pulsante di azione"],"Search, Filter and Sort":["Cerca, filtra e ordina"],"Header":["Intestazione"],"Replace":["Sostituisci"],"Select room":["Seleziona stanza"],"Select file":["Seleziona file"],"Room":["Stanza"],"File":["File"],"Pick room or media file from your DocSpace":["Scegli la stanza virtuale o il file multimediale dal tuo DocSpace"],"Theme":["Tema"],"Light":["Chiaro"],"Dark":["Scuro"]}}}
  • onlyoffice-docspace/trunk/languages/onlyoffice-docspace-plugin-it_IT-e56b1718c2603d6d0b2c35bca1b6778e.json

    r3012439 r3050549  
    1 {"translation-revision-date":"","generator":"WP-CLI\/2.8.1","source":"admin\/js\/login.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"it_IT","plural-forms":"nplurals=2; plural=(n != 1);"},"<strong>Error:<\/strong> User authentication failed.":["<strong>Errore:<\/strong> L'autenticazione dell'utente non \u00e8 riuscita."],"<strong>Error:<\/strong> The password field is empty.":["<strong>Errore:<\/strong> Il campo della password \u00e8 vuoto."]}}}
     1{"translation-revision-date":"","generator":"WP-CLI\/2.9.0","source":"admin\/js\/login.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"it_IT","plural-forms":"nplurals=2; plural=(n != 1);"},"<strong>Error:<\/strong> User authentication failed.":["<strong>Errore:<\/strong> L'autenticazione dell'utente non \u00e8 riuscita."],"<strong>Error:<\/strong> The password field is empty.":["<strong>Errore:<\/strong> Il campo della password \u00e8 vuoto."]}}}
  • onlyoffice-docspace/trunk/languages/onlyoffice-docspace-plugin-it_IT.po

    r3012439 r3050549  
    1212"Content-Transfer-Encoding: 8bit\n"
    1313"Plural-Forms: nplurals=2; plural=(n != 1);\n"
    14 "X-Generator: Poedit 3.3.2\n"
     14"X-Generator: Poedit 3.4.1\n"
    1515
    1616msgid "ONLYOFFICE DocSpace Settings"
     
    3333msgstr "Salva"
    3434
    35 msgid "The current user will be added to DocSpace with the <b>Room admin</b> role. <b>WordPress Viewer</b> user will be added to DocSpace with View Only access."
    36 msgstr "L'utente corrente verrà aggiunto a DocSpace nel ruolo di <b>Amministratore della stanza</b>. L'utente <b>WordPress Viewer</b> verrà aggiunto a DocSpace con accesso di sola visualizzazione."
     35msgid "The current WordPress user will be added to DocSpace with the <b>Room admin</b> role."
     36msgstr "L'utente corrente di WordPress verrà aggiunto a DocSpace nel ruolo di <b>Amministratore della stanza</b>."
    3737
    3838msgid "DocSpace Users"
     
    9191msgstr "L'utente specificato non è un amministratore di DocSpace!"
    9292
    93 msgid "Public DocSpace user was not created! View content will not be available on public pages."
    94 msgstr "L'utente DocSpace pubblico non è stato creato! La visualizzazione del contenuto non sarà disponibile sulle pagine pubbliche."
    95 
    96 msgid "Public DocSpace user already created, but failed to update authorization."
    97 msgstr "Utente DocSpace pubblico è già stato creato, ma non è riuscito ad aggiornare l'autorizzazione."
    98 
    99 msgid "Public DocSpace user was not created. View content will not be available on public pages."
    100 msgstr "L'utente DocSpace pubblico non è stato creato. La visualizzazione del contenuto non sarà disponibile sulle pagine pubbliche."
    101 
    102 msgid "Public DocSpace user successfully created."
    103 msgstr "Utente DocSpace pubblico creato correttamente."
    104 
    10593msgid "User %s already exists in DocSpace!"
    10694msgstr "L'utente %s già esiste in DocSpace!"
     
    200188msgstr "Ti pregiamo di contattare l'amministratore."
    201189
    202 msgid "Reset WordPress Viewer to continue"
    203 msgstr "Reimposta il Visualizzatore WordPress per continuare"
    204 
    205 msgid "You may experience issues with access to your content because WordPress Viewer data has been lost. Please proceed to the DocSpace plugin settings and click the Save button. WordPress Viewer will be added again to DocSpace."
    206 msgstr "Potresti riscontrare problemi con l'accesso ai tuoi contenuti perché i dati del Visualizzatore WordPress sono andati persi. Procedi alle impostazioni del plugin DocSpace e fai clic sul pulsante Salva. Il Visualizzatore WordPress verrà aggiunto nuovamente a DocSpace."
    207 
    208190msgid "Please proceed to the DocSpace plugin via the left side menu and enter your password to restore access."
    209191msgstr "Procedi al plugin DocSpace tramite il menu a sinistra e inserisci la password per ripristinare l'accesso."
    210192
     193msgid "Access denied!"
     194msgstr "Accesso negato!"
     195
     196msgid "Please log in to the site!"
     197msgstr "Ti preghiamo di effettuare il login al sito!"
     198
    211199msgid "WordPress requests access to your ONLYOFFICE DocSpace"
    212200msgstr "WordPress richiede l'accesso al tuo ONLYOFFICE DocSpace"
     
    218206msgstr "Accesso"
    219207
    220 #: admin/js/login.js
     208#: includes/js/oodsp-login.js
    221209msgid "<strong>Error:</strong> User authentication failed."
    222210msgstr "<strong>Errore:</strong> L'autenticazione dell'utente non è riuscita."
    223211
    224 #: admin/js/login.js
     212#: includes/js/oodsp-login.js
    225213msgid "<strong>Error:</strong> The password field is empty."
    226214msgstr "<strong>Errore:</strong> Il campo della password è vuoto."
    227215
     216#: admin/js/settings.js
     217msgid "The current domain is not set in the Content Security Policy (CSP) settings. Please add it via %sthe Developer Tools section%s."
     218msgstr "Il dominio corrente non è impostato nelle impostazioni della Content Security Policy (CSP). Aggiungilo tramite %sla sezione Strumenti per sviluppatori%s."
     219
     220#: onlyoffice-docspace-wordpress-block/build/index.js
     221msgid "Theme"
     222msgstr "Tema"
     223
     224#: onlyoffice-docspace-wordpress-block/build/index.js
     225msgid "Light"
     226msgstr "Chiaro"
     227
     228#: onlyoffice-docspace-wordpress-block/build/index.js
     229msgid "Dark"
     230msgstr "Scuro"
     231
  • onlyoffice-docspace/trunk/languages/onlyoffice-docspace-plugin-pt_BR-4d9e7e5bfeb560d3581c5fa0f4136bc5.json

    r3012439 r3050549  
    1 {"translation-revision-date":"","generator":"WP-CLI\/2.8.1","source":"admin\/js\/settings.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"pt_BR","plural-forms":"nplurals=2; plural=(n > 1);"},"ONLYOFFICE DocSpace cannot be reached.":["ONLYOFFICE DocSpace n\u00e3o pode ser acessado."]}}}
     1{"translation-revision-date":"","generator":"WP-CLI\/2.10.0","source":"admin\/js\/settings.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"pt_BR","plural-forms":"nplurals=2; plural=(n > 1);"},"ONLYOFFICE DocSpace cannot be reached.":["ONLYOFFICE DocSpace n\u00e3o pode ser acessado."],"The current domain is not set in the Content Security Policy (CSP) settings. Please add it via %sthe Developer Tools section%s.":["El dominio actual no est\u00e1 establecido en la configuraci\u00f3n de la Pol\u00edtica de seguridad de contenidos (CSP). Por favor, a\u00f1\u00e1dalo a trav\u00e9s de %sla secci\u00f3n Herramientas de desarrollo%s."]}}}
  • onlyoffice-docspace/trunk/languages/onlyoffice-docspace-plugin-pt_BR-93edf268056602020e97c3a56d0516e5.json

    r3012439 r3050549  
    1 {"translation-revision-date":"","generator":"WP-CLI\/2.8.1","source":"onlyoffice-docspace-wordpress-block\/build\/index.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"pt_BR","plural-forms":"nplurals=2; plural=(n > 1);"},"Settings":["Configura\u00e7\u00f5es"],"Width":["Largura"],"Height":["Altura"],"Left menu":["Menu esquerdo"],"Navigation and Title":["Navegar e T\u00edtulo"],"Action button":["Bot\u00e3o de a\u00e7\u00e3o"],"Search, Filter and Sort":["Pesquise, filtre e classifique"],"Header":["Cabe\u00e7alho"],"Replace":["Substituir"],"Select room":["Selecione o quarto"],"Select file":["Selecionar arquivo"],"Room":["Sala"],"File":["Arquivo"],"Pick room or media file from your DocSpace":["Escolha uma sala ou arquivo de m\u00eddia do seu DocSpace"]}}}
     1{"translation-revision-date":"","generator":"WP-CLI\/2.10.0","source":"onlyoffice-docspace-wordpress-block\/build\/index.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"pt_BR","plural-forms":"nplurals=2; plural=(n > 1);"},"Settings":["Configura\u00e7\u00f5es"],"Width":["Largura"],"Height":["Altura"],"Left menu":["Menu esquerdo"],"Navigation and Title":["Navegar e T\u00edtulo"],"Action button":["Bot\u00e3o de a\u00e7\u00e3o"],"Search, Filter and Sort":["Pesquise, filtre e classifique"],"Header":["Cabe\u00e7alho"],"Replace":["Substituir"],"Select room":["Selecione o quarto"],"Select file":["Selecionar arquivo"],"Room":["Sala"],"File":["Arquivo"],"Pick room or media file from your DocSpace":["Escolha uma sala ou arquivo de m\u00eddia do seu DocSpace"],"Theme":["Tema"],"Light":["Claro"],"Dark":["Escuro"]}}}
  • onlyoffice-docspace/trunk/languages/onlyoffice-docspace-plugin-pt_BR-e56b1718c2603d6d0b2c35bca1b6778e.json

    r3012439 r3050549  
    1 {"translation-revision-date":"","generator":"WP-CLI\/2.8.1","source":"admin\/js\/login.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"pt_BR","plural-forms":"nplurals=2; plural=(n > 1);"},"<strong>Error:<\/strong> User authentication failed.":["<strong>Erro:<\/strong> falha na autentica\u00e7\u00e3o do usu\u00e1rio."],"<strong>Error:<\/strong> The password field is empty.":["<strong>Erro:<\/strong> O campo de senha est\u00e1 vazio."]}}}
     1{"translation-revision-date":"","generator":"WP-CLI\/2.9.0","source":"admin\/js\/login.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"pt_BR","plural-forms":"nplurals=2; plural=(n > 1);"},"<strong>Error:<\/strong> User authentication failed.":["<strong>Erro:<\/strong> falha na autentica\u00e7\u00e3o do usu\u00e1rio."],"<strong>Error:<\/strong> The password field is empty.":["<strong>Erro:<\/strong> O campo de senha est\u00e1 vazio."]}}}
  • onlyoffice-docspace/trunk/languages/onlyoffice-docspace-plugin-pt_BR.po

    r3012439 r3050549  
    1212"Content-Transfer-Encoding: 8bit\n"
    1313"Plural-Forms: nplurals=2; plural=(n > 1);\n"
    14 "X-Generator: Poedit 3.3.2\n"
     14"X-Generator: Poedit 3.4.1\n"
    1515
    1616msgid "ONLYOFFICE DocSpace Settings"
     
    3333msgstr "Salvar"
    3434
    35 msgid "The current user will be added to DocSpace with the <b>Room admin</b> role. <b>WordPress Viewer</b> user will be added to DocSpace with View Only access."
    36 msgstr "O usuário atual será adicionado ao DocSpace com a função de <b>Administrador da sala</b>. O usuário do <b>Visualizador WordPress</b> será adicionado ao DocSpace com acesso somente visualização."
     35msgid "The current WordPress user will be added to DocSpace with the <b>Room admin</b> role."
     36msgstr "O usuário atual do WordPress será adicionado ao DocSpace com a função de <b>Administrador da sala</b>."
    3737
    3838msgid "DocSpace Users"
     
    9191msgstr "O usuário especificado não é um administrador do DocSpace!"
    9292
    93 msgid "Public DocSpace user was not created! View content will not be available on public pages."
    94 msgstr "O usuário público do DocSpace não foi criado! O conteúdo da visualização não estará disponível em páginas públicas."
    95 
    96 msgid "Public DocSpace user already created, but failed to update authorization."
    97 msgstr "Usuário público do DocSpace já criado, mas não conseguiu atualizar a autorização."
    98 
    99 msgid "Public DocSpace user was not created. View content will not be available on public pages."
    100 msgstr "O usuário público do DocSpace não foi criado. O conteúdo da visualização não estará disponível em páginas públicas."
    101 
    102 msgid "Public DocSpace user successfully created."
    103 msgstr "Usuário público do DocSpace criado com sucesso."
    104 
    10593msgid "User %s already exists in DocSpace!"
    10694msgstr "O usuário %s já existe no DocSpace!"
     
    200188msgstr "Entrar em contato com o administrador. "
    201189
    202 msgid "Reset WordPress Viewer to continue"
    203 msgstr "Redefina o Visualizador WordPress para continuar"
    204 
    205 msgid "You may experience issues with access to your content because WordPress Viewer data has been lost. Please proceed to the DocSpace plugin settings and click the Save button. WordPress Viewer will be added again to DocSpace."
    206 msgstr "Você pode ter problemas de acesso ao seu conteúdo porque os dados do Visualizador WordPress foram perdidos. Prossiga para as configurações do plugin DocSpace e clique no botão Salvar. O WordPress Viewer será adicionado novamente ao DocSpace."
    207 
    208190msgid "Please proceed to the DocSpace plugin via the left side menu and enter your password to restore access."
    209191msgstr "Prossiga para o plugin DocSpace através do menu do lado esquerdo e digite sua senha para restaurar o acesso."
    210192
     193msgid "Access denied!"
     194msgstr "Acesso negado!"
     195
     196msgid "Please log in to the site!"
     197msgstr "Por favor faça login no site!"
     198
    211199msgid "WordPress requests access to your ONLYOFFICE DocSpace"
    212200msgstr "WordPress solicita acesso ao seu ONLYOFFICE DocSpace"
     
    218206msgstr "Login"
    219207
    220 #: admin/js/login.js
     208#: includes/js/oodsp-login.js
    221209msgid "<strong>Error:</strong> User authentication failed."
    222210msgstr "<strong>Erro:</strong> falha na autenticação do usuário."
    223211
    224 #: admin/js/login.js
     212#: includes/js/oodsp-login.js
    225213msgid "<strong>Error:</strong> The password field is empty."
    226214msgstr "<strong>Erro:</strong> O campo de senha está vazio."
    227215
     216#: admin/js/settings.js
     217msgid "The current domain is not set in the Content Security Policy (CSP) settings. Please add it via %sthe Developer Tools section%s."
     218msgstr "El dominio actual no está establecido en la configuración de la Política de seguridad de contenidos (CSP). Por favor, añádalo a través de %sla sección Herramientas de desarrollo%s."
     219
     220#: onlyoffice-docspace-wordpress-block/build/index.js
     221msgid "Theme"
     222msgstr "Tema"
     223
     224#: onlyoffice-docspace-wordpress-block/build/index.js
     225msgid "Light"
     226msgstr "Claro"
     227
     228#: onlyoffice-docspace-wordpress-block/build/index.js
     229msgid "Dark"
     230msgstr "Escuro"
     231
  • onlyoffice-docspace/trunk/languages/onlyoffice-docspace-plugin-ru_RU-4d9e7e5bfeb560d3581c5fa0f4136bc5.json

    r3012439 r3050549  
    1 {"translation-revision-date":"","generator":"WP-CLI\/2.8.1","source":"admin\/js\/settings.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"ru","plural-forms":"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);"},"ONLYOFFICE DocSpace cannot be reached.":["ONLYOFFICE DocSpace \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d."]}}}
     1{"translation-revision-date":"","generator":"WP-CLI\/2.10.0","source":"admin\/js\/settings.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"ru","plural-forms":"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);"},"ONLYOFFICE DocSpace cannot be reached.":["ONLYOFFICE DocSpace \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d."],"The current domain is not set in the Content Security Policy (CSP) settings. Please add it via %sthe Developer Tools section%s.":["\u0422\u0435\u043a\u0443\u0449\u0438\u0439 \u0434\u043e\u043c\u0435\u043d \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 (CSP). \u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0435\u0433\u043e \u0447\u0435\u0440\u0435\u0437 \u0440\u0430\u0437\u0434\u0435\u043b %s\u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430%s."]}}}
  • onlyoffice-docspace/trunk/languages/onlyoffice-docspace-plugin-ru_RU-93edf268056602020e97c3a56d0516e5.json

    r3012439 r3050549  
    1 {"translation-revision-date":"","generator":"WP-CLI\/2.8.1","source":"onlyoffice-docspace-wordpress-block\/build\/index.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"ru","plural-forms":"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);"},"Settings":["\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438"],"Width":["\u0428\u0438\u0440\u0438\u043d\u0430"],"Height":["\u0412\u044b\u0441\u043e\u0442\u0430"],"Left menu":["\u041b\u0435\u0432\u043e\u0435 \u043c\u0435\u043d\u044e"],"Navigation and Title":["\u041d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044f \u0438 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a"],"Action button":["\u041a\u043d\u043e\u043f\u043a\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f"],"Search, Filter and Sort":["\u041f\u043e\u0438\u0441\u043a, \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044f \u0438 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430"],"Header":["\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a"],"Replace":["\u0417\u0430\u043c\u0435\u043d\u0438\u0442\u044c"],"Select room":["\u0412\u044b\u0431\u0440\u0430\u0442\u044c \u043a\u043e\u043c\u043d\u0430\u0442\u0443"],"Select file":["\u0412\u044b\u0431\u0440\u0430\u0442\u044c \u0444\u0430\u0439\u043b"],"Room":["\u041a\u043e\u043c\u043d\u0430\u0442\u0430"],"File":["\u0424\u0430\u0439\u043b"],"Pick room or media file from your DocSpace":["\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043a\u043e\u043c\u043d\u0430\u0442\u0443 \u0438\u043b\u0438 \u043c\u0435\u0434\u0438\u0430\u0444\u0430\u0439\u043b \u0438\u0437 DocSpace "]}}}
     1{"translation-revision-date":"","generator":"WP-CLI\/2.10.0","source":"onlyoffice-docspace-wordpress-block\/build\/index.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"ru","plural-forms":"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);"},"Settings":["\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438"],"Width":["\u0428\u0438\u0440\u0438\u043d\u0430"],"Height":["\u0412\u044b\u0441\u043e\u0442\u0430"],"Left menu":["\u041b\u0435\u0432\u043e\u0435 \u043c\u0435\u043d\u044e"],"Navigation and Title":["\u041d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044f \u0438 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a"],"Action button":["\u041a\u043d\u043e\u043f\u043a\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f"],"Search, Filter and Sort":["\u041f\u043e\u0438\u0441\u043a, \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044f \u0438 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430"],"Header":["\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a"],"Replace":["\u0417\u0430\u043c\u0435\u043d\u0438\u0442\u044c"],"Select room":["\u0412\u044b\u0431\u0440\u0430\u0442\u044c \u043a\u043e\u043c\u043d\u0430\u0442\u0443"],"Select file":["\u0412\u044b\u0431\u0440\u0430\u0442\u044c \u0444\u0430\u0439\u043b"],"Room":["\u041a\u043e\u043c\u043d\u0430\u0442\u0430"],"File":["\u0424\u0430\u0439\u043b"],"Pick room or media file from your DocSpace":["\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043a\u043e\u043c\u043d\u0430\u0442\u0443 \u0438\u043b\u0438 \u043c\u0435\u0434\u0438\u0430\u0444\u0430\u0439\u043b \u0438\u0437 DocSpace "],"Theme":["\u0422\u0435\u043c\u0430"],"Light":["\u0421\u0432\u0435\u0442\u043b\u0430\u044f"],"Dark":["\u0422\u0435\u043c\u043d\u0430\u044f"]}}}
  • onlyoffice-docspace/trunk/languages/onlyoffice-docspace-plugin-ru_RU-e56b1718c2603d6d0b2c35bca1b6778e.json

    r3012439 r3050549  
    1 {"translation-revision-date":"","generator":"WP-CLI\/2.8.1","source":"admin\/js\/login.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"ru","plural-forms":"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);"},"<strong>Error:<\/strong> User authentication failed.":["<strong>\u041e\u0448\u0438\u0431\u043a\u0430:<\/strong> \u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f."],"<strong>Error:<\/strong> The password field is empty.":["<strong>\u041e\u0448\u0438\u0431\u043a\u0430<\/strong>: \u0412\u044b \u043d\u0435 \u0432\u0432\u0435\u043b\u0438 \u043f\u0430\u0440\u043e\u043b\u044c."]}}}
     1{"translation-revision-date":"","generator":"WP-CLI\/2.9.0","source":"admin\/js\/login.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"ru","plural-forms":"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);"},"<strong>Error:<\/strong> User authentication failed.":["<strong>\u041e\u0448\u0438\u0431\u043a\u0430:<\/strong> \u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f."],"<strong>Error:<\/strong> The password field is empty.":["<strong>\u041e\u0448\u0438\u0431\u043a\u0430<\/strong>: \u0412\u044b \u043d\u0435 \u0432\u0432\u0435\u043b\u0438 \u043f\u0430\u0440\u043e\u043b\u044c."]}}}
  • onlyoffice-docspace/trunk/languages/onlyoffice-docspace-plugin-ru_RU.po

    r3012439 r3050549  
    1212"Content-Transfer-Encoding: 8bit\n"
    1313"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n"
    14 "X-Generator: Poedit 3.3.2\n"
     14"X-Generator: Poedit 3.4.1\n"
    1515
    1616msgid "ONLYOFFICE DocSpace Settings"
     
    3333msgstr "Сохранить"
    3434
    35 msgid "The current user will be added to DocSpace with the <b>Room admin</b> role. <b>WordPress Viewer</b> user will be added to DocSpace with View Only access."
    36 msgstr "Текущий пользователь будет добавлен в DocSpace с ролью <b>Администратор комнаты</b>. Пользователь <b>WordPress Viewer</b> будет добавлен в DocSpace с доступом только для просмотра."
     35msgid "The current WordPress user will be added to DocSpace with the <b>Room admin</b> role."
     36msgstr "Текущий пользователь WordPress будет добавлен в DocSpace с ролью <b>Администратор комнаты</b>."
    3737
    3838msgid "DocSpace Users"
     
    9191msgstr "Указанный пользователь не является администратором DocSpace!"
    9292
    93 msgid "Public DocSpace user was not created! View content will not be available on public pages."
    94 msgstr "Публичный пользователь DocSpace не создан! Просмотр контента будет недоступен на общедоступных страницах."
    95 
    96 msgid "Public DocSpace user already created, but failed to update authorization."
    97 msgstr "Публичный пользователь DocSpace уже создан, но ему не удалось обновить авторизацию."
    98 
    99 msgid "Public DocSpace user was not created. View content will not be available on public pages."
    100 msgstr "Публичный пользователь DocSpace не создан. Просмотр контента будет недоступен на общедоступных страницах."
    101 
    102 msgid "Public DocSpace user successfully created."
    103 msgstr "Публичный пользователь DocSpace успешно создан."
    104 
    10593msgid "User %s already exists in DocSpace!"
    10694msgstr "Пользователь %s уже существует в DocSpace!"
     
    200188msgstr "Пожалуйста, свяжитесь с администратором."
    201189
    202 msgid "Reset WordPress Viewer to continue"
    203 msgstr "Сбросьте WordPress Viewer, чтобы продолжить"
    204 
    205 msgid "You may experience issues with access to your content because WordPress Viewer data has been lost. Please proceed to the DocSpace plugin settings and click the Save button. WordPress Viewer will be added again to DocSpace."
    206 msgstr "У вас могут возникнуть проблемы с доступом к контенту из-за потери данных WordPress Viewer. Перейдите к настройкам плагина DocSpace и нажмите кнопку Сохранить. WordPress Viewer снова будет добавлен в DocSpace."
    207 
    208190msgid "Please proceed to the DocSpace plugin via the left side menu and enter your password to restore access."
    209191msgstr "Пожалуйста, перейдите к плагину DocSpace через меню слева и введите свой пароль, чтобы восстановить доступ."
    210192
     193msgid "Access denied!"
     194msgstr "Доступ запрещен!"
     195
     196msgid "Please log in to the site!"
     197msgstr "Пожалуйста, авторизуйтесь на сайте!"
     198
    211199msgid "WordPress requests access to your ONLYOFFICE DocSpace"
    212200msgstr "WordPress запрашивает доступ к вашему ONLYOFFICE DocSpace"
     
    218206msgstr "Авторизоваться"
    219207
    220 #: admin/js/login.js
     208#: includes/js/oodsp-login.js
    221209msgid "<strong>Error:</strong> User authentication failed."
    222210msgstr "<strong>Ошибка:</strong> Не удалось выполнить аутентификацию пользователя."
    223211
    224 #: admin/js/login.js
     212#: includes/js/oodsp-login.js
    225213msgid "<strong>Error:</strong> The password field is empty."
    226214msgstr "<strong>Ошибка</strong>: Вы не ввели пароль."
    227215
     216#: admin/js/settings.js
     217msgid "The current domain is not set in the Content Security Policy (CSP) settings. Please add it via %sthe Developer Tools section%s."
     218msgstr "Текущий домен не указан в настройках политики безопасности контента (CSP). Пожалуйста, добавьте его через раздел %sИнструменты разработчика%s."
     219
     220#: onlyoffice-docspace-wordpress-block/build/index.js
     221msgid "Theme"
     222msgstr "Тема"
     223
     224#: onlyoffice-docspace-wordpress-block/build/index.js
     225msgid "Light"
     226msgstr "Светлая"
     227
     228#: onlyoffice-docspace-wordpress-block/build/index.js
     229msgid "Dark"
     230msgstr "Темная"
     231
  • onlyoffice-docspace/trunk/languages/onlyoffice-docspace-plugin-zh_CN-4d9e7e5bfeb560d3581c5fa0f4136bc5.json

    r3012439 r3050549  
    1 {"translation-revision-date":"","generator":"WP-CLI\/2.8.1","source":"admin\/js\/settings.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"zh_CN","plural-forms":"nplurals=1; plural=0;"},"ONLYOFFICE DocSpace cannot be reached.":["\u65e0\u6cd5\u8bbf\u95ee ONLYOFFICE \u534f\u4f5c\u7a7a\u95f4\u3002"]}}}
     1{"translation-revision-date":"","generator":"WP-CLI\/2.10.0","source":"admin\/js\/settings.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"zh_CN","plural-forms":"nplurals=1; plural=0;"},"ONLYOFFICE DocSpace cannot be reached.":["\u65e0\u6cd5\u8bbf\u95ee ONLYOFFICE \u534f\u4f5c\u7a7a\u95f4\u3002"],"The current domain is not set in the Content Security Policy (CSP) settings. Please add it via %sthe Developer Tools section%s.":["\u5185\u5bb9\u5b89\u5168\u7b56\u7565 (CSP) \u8bbe\u7f6e\u4e2d\u672a\u8bbe\u7f6e\u5f53\u524d\u57df\u3002\u8bf7\u901a\u8fc7 %sthe Developer Tools section%s \u6dfb\u52a0\u5f53\u533a\u57df\u3002"]}}}
  • onlyoffice-docspace/trunk/languages/onlyoffice-docspace-plugin-zh_CN-93edf268056602020e97c3a56d0516e5.json

    r3012439 r3050549  
    1 {"translation-revision-date":"","generator":"WP-CLI\/2.8.1","source":"onlyoffice-docspace-wordpress-block\/build\/index.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"zh_CN","plural-forms":"nplurals=1; plural=0;"},"Settings":["\u8bbe\u7f6e"],"Width":["\u5bbd\u5ea6"],"Height":["\u9ad8\u5ea6"],"Left menu":["\u5de6\u4fa7\u83dc\u5355"],"Navigation and Title":["\u5bfc\u822a\u548c\u6807\u9898"],"Action button":["\u64cd\u4f5c\u6309\u94ae"],"Search, Filter and Sort":["\u641c\u7d22\u3001\u7b5b\u9009\u548c\u6392\u5e8f"],"Header":["\u9875\u9996"],"Replace":["\u66ff\u6362"],"Select room":["\u9009\u62e9\u623f\u95f4"],"Select file":["\u9009\u62e9\u6587\u4ef6"],"Room":["\u623f\u95f4"],"File":["\u6587\u4ef6"],"Pick room or media file from your DocSpace":["\u5728\u534f\u4f5c\u7a7a\u95f4\u4e2d\u9009\u62e9\u623f\u95f4\u6216\u5a92\u4f53\u6587\u4ef6"]}}}
     1{"translation-revision-date":"","generator":"WP-CLI\/2.10.0","source":"onlyoffice-docspace-wordpress-block\/build\/index.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"zh_CN","plural-forms":"nplurals=1; plural=0;"},"Settings":["\u8bbe\u7f6e"],"Width":["\u5bbd\u5ea6"],"Height":["\u9ad8\u5ea6"],"Left menu":["\u5de6\u4fa7\u83dc\u5355"],"Navigation and Title":["\u5bfc\u822a\u548c\u6807\u9898"],"Action button":["\u64cd\u4f5c\u6309\u94ae"],"Search, Filter and Sort":["\u641c\u7d22\u3001\u7b5b\u9009\u548c\u6392\u5e8f"],"Header":["\u9875\u9996"],"Replace":["\u66ff\u6362"],"Select room":["\u9009\u62e9\u623f\u95f4"],"Select file":["\u9009\u62e9\u6587\u4ef6"],"Room":["\u623f\u95f4"],"File":["\u6587\u4ef6"],"Pick room or media file from your DocSpace":["\u5728\u534f\u4f5c\u7a7a\u95f4\u4e2d\u9009\u62e9\u623f\u95f4\u6216\u5a92\u4f53\u6587\u4ef6"],"Theme":["\u4e3b\u984c"],"Light":["\u6dfa\u8272\u4e3b\u984c"],"Dark":["\u6df1\u8272\u7684"]}}}
  • onlyoffice-docspace/trunk/languages/onlyoffice-docspace-plugin-zh_CN-e56b1718c2603d6d0b2c35bca1b6778e.json

    r3012439 r3050549  
    1 {"translation-revision-date":"","generator":"WP-CLI\/2.8.1","source":"admin\/js\/login.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"zh_CN","plural-forms":"nplurals=1; plural=0;"},"<strong>Error:<\/strong> User authentication failed.":["<strong>\u9519\u8bef\uff1a<\/strong>\u7528\u6237\u8eab\u4efd\u8ba4\u8bc1\u5931\u8d25\u3002"],"<strong>Error:<\/strong> The password field is empty.":["<strong>\u9519\u8bef\uff1a<\/strong>\u5bc6\u7801\u5b57\u6bb5\u4e3a\u7a7a\u3002"]}}}
     1{"translation-revision-date":"","generator":"WP-CLI\/2.9.0","source":"admin\/js\/login.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"zh_CN","plural-forms":"nplurals=1; plural=0;"},"<strong>Error:<\/strong> User authentication failed.":["<strong>\u9519\u8bef\uff1a<\/strong>\u7528\u6237\u8eab\u4efd\u8ba4\u8bc1\u5931\u8d25\u3002"],"<strong>Error:<\/strong> The password field is empty.":["<strong>\u9519\u8bef\uff1a<\/strong>\u5bc6\u7801\u5b57\u6bb5\u4e3a\u7a7a\u3002"]}}}
  • onlyoffice-docspace/trunk/languages/onlyoffice-docspace-plugin-zh_CN.po

    r3012439 r3050549  
    1212"Content-Transfer-Encoding: 8bit\n"
    1313"Plural-Forms: nplurals=1; plural=0;\n"
    14 "X-Generator: Poedit 3.3.2\n"
     14"X-Generator: Poedit 3.4.1\n"
    1515
    1616msgid "ONLYOFFICE DocSpace Settings"
     
    3333msgstr "保存"
    3434
    35 msgid "The current user will be added to DocSpace with the <b>Room admin</b> role. <b>WordPress Viewer</b> user will be added to DocSpace with View Only access."
    36 msgstr "当前用户将以<b>房间管理员</b>角色添加至协作空间中。<b>WordPress 查看者</b>用户在被添加至协作空间时将拥有“仅查看”访问权限。"
     35msgid "The current WordPress user will be added to DocSpace with the <b>Room admin</b> role."
     36msgstr "当前 WordPress 用户将以<b>房间管理员</b>角色添加至协作空间中。"
    3737
    3838msgid "DocSpace Users"
     
    9191msgstr "指定的用户不是协作空间管理员!"
    9292
    93 msgid "Public DocSpace user was not created! View content will not be available on public pages."
    94 msgstr "公开协作空间用户已创建!公开页面上查看内容不可用。"
    95 
    96 msgid "Public DocSpace user already created, but failed to update authorization."
    97 msgstr "公开协作空间用户已创建但未更新授权。"
    98 
    99 msgid "Public DocSpace user was not created. View content will not be available on public pages."
    100 msgstr "公开协作空间用户已创建。公开页面上查看内容不可用。"
    101 
    102 msgid "Public DocSpace user successfully created."
    103 msgstr "公开协作空间用户已成功创建。"
    104 
    10593msgid "User %s already exists in DocSpace!"
    10694msgstr "用户 %s 已存在于协作空间中!"
     
    200188msgstr "请联系管理员。"
    201189
    202 msgid "Reset WordPress Viewer to continue"
    203 msgstr "重置 WordPress 查看者以继续"
    204 
    205 msgid "You may experience issues with access to your content because WordPress Viewer data has been lost. Please proceed to the DocSpace plugin settings and click the Save button. WordPress Viewer will be added again to DocSpace."
    206 msgstr "由于 WordPress 查看者数据丢失,您可能会遇到内容访问权限问题。请前往协作空间插件设置并点击保存按钮。WordPress 查看者将被再次添加至协作空间。"
    207 
    208190msgid "Please proceed to the DocSpace plugin via the left side menu and enter your password to restore access."
    209191msgstr "请通过左侧菜单前往协作空间插件并输入您的密码以恢复访问权限。"
    210192
     193msgid "Access denied!"
     194msgstr "访问被拒!"
     195
     196msgid "Please log in to the site!"
     197msgstr "请登录网站!"
     198
    211199msgid "WordPress requests access to your ONLYOFFICE DocSpace"
    212200msgstr "WordPress 请求访问您的 ONLYOFFICE 协作空间"
     
    218206msgstr "登录"
    219207
    220 #: admin/js/login.js
     208#: includes/js/oodsp-login.js
    221209msgid "<strong>Error:</strong> User authentication failed."
    222210msgstr "<strong>错误:</strong>用户身份认证失败。"
    223211
    224 #: admin/js/login.js
     212#: includes/js/oodsp-login.js
    225213msgid "<strong>Error:</strong> The password field is empty."
    226214msgstr "<strong>错误:</strong>密码字段为空。"
    227215
     216#: admin/js/settings.js
     217msgid "The current domain is not set in the Content Security Policy (CSP) settings. Please add it via %sthe Developer Tools section%s."
     218msgstr "内容安全策略 (CSP) 设置中未设置当前域。请通过 %sthe Developer Tools section%s 添加当区域。"
     219
     220#: onlyoffice-docspace-wordpress-block/build/index.js
     221msgid "Theme"
     222msgstr "主題"
     223
     224#: onlyoffice-docspace-wordpress-block/build/index.js
     225msgid "Light"
     226msgstr "淺色主題"
     227
     228#: onlyoffice-docspace-wordpress-block/build/index.js
     229msgid "Dark"
     230msgstr "深色的"
     231
  • onlyoffice-docspace/trunk/languages/onlyoffice-docspace-plugin.pot

    r3012439 r3050549  
    3333msgstr ""
    3434
    35 msgid "The current user will be added to DocSpace with the <b>Room admin</b> role. <b>WordPress Viewer</b> user will be added to DocSpace with View Only access."
     35msgid "The current WordPress user will be added to DocSpace with the <b>Room admin</b> role."
    3636msgstr ""
    3737
     
    9191msgstr ""
    9292
    93 msgid "Public DocSpace user was not created! View content will not be available on public pages."
    94 msgstr ""
    95 
    96 msgid "Public DocSpace user already created, but failed to update authorization."
    97 msgstr ""
    98 
    99 msgid "Public DocSpace user was not created. View content will not be available on public pages."
    100 msgstr ""
    101 
    102 msgid "Public DocSpace user successfully created."
    103 msgstr ""
    104 
    10593msgid "User %s already exists in DocSpace!"
    10694msgstr ""
     
    200188msgstr ""
    201189
    202 msgid "Reset WordPress Viewer to continue"
    203 msgstr ""
    204 
    205 msgid "You may experience issues with access to your content because WordPress Viewer data has been lost. Please proceed to the DocSpace plugin settings and click the Save button. WordPress Viewer will be added again to DocSpace."
    206 msgstr ""
    207 
    208190msgid "Please proceed to the DocSpace plugin via the left side menu and enter your password to restore access."
    209191msgstr ""
    210192
     193msgid "Access denied!"
     194msgstr ""
     195
     196msgid "Please log in to the site!"
     197msgstr ""
     198
    211199msgid "WordPress requests access to your ONLYOFFICE DocSpace"
    212200msgstr ""
     
    218206msgstr ""
    219207
    220 #: admin/js/login.js
     208#: includes/js/oodsp-login.js
    221209msgid "<strong>Error:</strong> User authentication failed."
    222210msgstr ""
    223211
    224 #: admin/js/login.js
     212#: includes/js/oodsp-login.js
    225213msgid "<strong>Error:</strong> The password field is empty."
    226214msgstr ""
    227215
     216#: admin/js/settings.js
     217msgid "The current domain is not set in the Content Security Policy (CSP) settings. Please add it via %sthe Developer Tools section%s."
     218msgstr ""
     219
     220#: onlyoffice-docspace-wordpress-block/build/index.js
     221msgid "Theme"
     222msgstr ""
     223
     224#: onlyoffice-docspace-wordpress-block/build/index.js
     225msgid "Light"
     226msgstr ""
     227
     228#: onlyoffice-docspace-wordpress-block/build/index.js
     229msgid "Dark"
     230msgstr ""
  • onlyoffice-docspace/trunk/onlyoffice-docspace-wordpress-block/block.json

    r3012439 r3050549  
    2727        "height":{
    2828            "type": "string"
     29        },
     30        "requestToken":{
     31            "type": "string"
     32        },
     33        "theme": {
     34            "type": "string"
    2935        }
     36    },
     37    "supports": {
     38        "align": true
    3039    }
    3140}
  • onlyoffice-docspace/trunk/onlyoffice-docspace-wordpress-block/build/index.asset.php

    r3012439 r3050549  
    1 <?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => 'bea9265b566bf91652b1');
     1<?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '72f5f85c0b4667a693b2');
  • onlyoffice-docspace/trunk/onlyoffice-docspace-wordpress-block/build/index.css

    r3012439 r3050549  
    1 .components-modal__content{padding:0!important}.docspace-icon{border-radius:12px;height:64px;width:64px}
     1.wp-block-onlyoffice-docspace-wordpress-onlyoffice-docspace__editor{align-items:center;color:#fff;display:flex;font-size:20px;height:inherit;justify-content:center;margin:0;max-width:inherit;overflow:hidden;text-align:center;vertical-align:middle;width:inherit}.components-modal__content{min-height:150px;padding:0!important;width:400px}.components-modal__header~div{height:100%}.oodsp-selector-frame-modal{display:flex;height:500px!important;justify-content:center;max-height:100%;vertical-align:middle}.oodsp-selector-frame-modal:has(.oodsp-login){height:unset!important}#oodsp-selector-frame-container{height:100%!important}#oodsp-selector-frame{display:block;height:100%;width:100%}.wp-block-onlyoffice-docspace-wordpress-onlyoffice-docspace__editor p{margin:0;text-align:left}.wp-block-onlyoffice-docspace-wordpress-onlyoffice-docspace__editor .entity-icon{border-radius:22px;height:128px;width:128px}.wp-block-onlyoffice-docspace-wordpress-onlyoffice-docspace__editor .entity-info{padding-left:20px}.wp-block-onlyoffice-docspace-wordpress-onlyoffice-docspace__editor .entity-info-label{font-weight:600;min-width:-moz-max-content;min-width:max-content}.wp-block-onlyoffice-docspace-wordpress-onlyoffice-docspace__editor .entity-info-label svg{height:18px!important;width:18px!important}.wp-block-onlyoffice-docspace-wordpress-onlyoffice-docspace__editor img{border-radius:22px;height:100%;width:100%}.wp-block-onlyoffice-docspace-wordpress-onlyoffice-docspace__editor svg{height:100%;width:100%}.wp-block-onlyoffice-docspace-wordpress-onlyoffice-docspace__editor.room{background:#eceef1;color:#333}.wp-block-onlyoffice-docspace-wordpress-onlyoffice-docspace__editor.file{background:linear-gradient(121.94deg,#489bef,#388bde 99.94%)}.oodsp-selector-frame-modal .oodsp-login{padding:0;width:auto}.oodsp-selector-frame-modal .login form{border:unset;margin-top:0;padding-top:0}
  • onlyoffice-docspace/trunk/onlyoffice-docspace-wordpress-block/build/index.js

    r3012439 r3050549  
    1 (()=>{"use strict";var e={d:(t,o)=>{for(var l in o)e.o(o,l)&&!e.o(t,l)&&Object.defineProperty(t,l,{enumerable:!0,get:o[l]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};e.d({},{l:()=>i,i:()=>d});const t=window.React,o=window.wp.blocks,l=JSON.parse('{"name":"onlyoffice-docspace-wordpress/onlyoffice-docspace"}'),a=window.wp.blockEditor,c=window.wp.components,n=window.wp.element,r=window.wp.i18n,i={},d=(0,t.createElement)("svg",{width:"66",height:"60",viewBox:"0 0 66 60",fill:"black",xmlns:"http://www.w3.org/2000/svg"},(0,t.createElement)("path",{opacity:"0.5",fillRule:"evenodd",clipRule:"evenodd",d:"M28.9406 59.2644L2.20792 46.9066C-0.0693069 45.8277 -0.0693069 44.1604 2.20792 43.1796L11.5148 38.8642L28.8416 46.9066C31.1188 47.9854 34.7822 47.9854 36.9604 46.9066L54.2871 38.8642L63.5941 43.1796C65.8713 44.2585 65.8713 45.9258 63.5941 46.9066L36.8614 59.2644C34.7822 60.2452 31.1188 60.2452 28.9406 59.2644Z",fill:"black"}),(0,t.createElement)("path",{opacity:"0.75",fillRule:"evenodd",clipRule:"evenodd",d:"M28.9406 44.0606L2.20792 31.7028C-0.069307 30.6239 -0.069307 28.9566 2.20792 27.9758L11.3168 23.7584L28.9406 31.8989C31.2178 32.9778 34.8812 32.9778 37.0594 31.8989L54.6832 23.7584L63.7921 27.9758C66.0693 29.0547 66.0693 30.722 63.7921 31.7028L37.0594 44.0606C34.7822 45.1395 31.1188 45.1395 28.9406 44.0606Z",fill:"black"}),(0,t.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M28.9406 29.2518L2.20792 16.8939C-0.069307 15.8151 -0.069307 14.1478 2.20792 13.167L28.9406 0.809144C31.2178 -0.269715 34.8812 -0.269715 37.0594 0.809144L63.7921 13.167C66.0693 14.2458 66.0693 15.9132 63.7921 16.8939L37.0594 29.2518C34.7822 30.2325 31.1188 30.2325 28.9406 29.2518Z",fill:"black"})),{name:s}=l;(0,o.registerBlockType)(s,{icon:d,edit:({attributes:e,setAttributes:o})=>{const l=(0,a.useBlockProps)({style:i}),[s,p]=(0,n.useState)(!1),[m,f]=(0,n.useState)({}),[u,g]=(0,n.useState)(!1);(0,n.useEffect)((()=>{s&&DocSpaceComponent.renderDocSpace("oodsp-selector-frame",(function(){DocSpace.SDK.initFrame(m)}))}),[s]);const h=t=>{Object.keys(e).forEach((t=>delete e[t])),o({roomId:t[0].id,name:t[0].label,icon:t[0].icon}),DocSpace.SDK.frames["oodsp-selector-frame"].destroyFrame(),p(!1)},y=t=>{Object.keys(e).forEach((t=>delete e[t])),o({fileId:t.id,name:t.title,icon:t.icon}),DocSpace.SDK.frames["oodsp-selector-frame"].destroyFrame(),p(!1)},w=()=>{DocSpace.SDK.frames["oodsp-selector-frame"].destroyFrame(),p(!1)},E=e=>{const t=e.target.dataset.mode||null;var o=null;switch(t){case"room-selector":o=h;break;case"file-selector":o=y}f({frameId:"oodsp-selector-frame",title:e.target.dataset.title||"",width:"400px",height:"500px",mode:t,selectorType:"roomsOnly",locale:DocSpaceComponent.locale,events:{onSelectCallback:o,onCloseCallback:w}}),p(!0)};return(0,t.createElement)("div",{...l},e.roomId||e.fileId?(0,t.createElement)("div",null,(0,t.createElement)(a.InspectorControls,{key:"setting"},(0,t.createElement)(c.PanelBody,{title:(0,r.__)("Settings","onlyoffice-docspace-plugin")},(0,t.createElement)(a.HeightControl,{label:(0,r.__)("Width","onlyoffice-docspace-plugin"),value:e.width,onChange:e=>o({width:e})}),(0,t.createElement)(a.HeightControl,{label:(0,r.__)("Height","onlyoffice-docspace-plugin"),value:e.height,onChange:e=>o({height:e})}))),(0,t.createElement)("p",{style:{display:"flex"}},e.icon&&!u?(0,t.createElement)("img",{class:"docspace-icon",src:DocSpaceComponent.getAbsoluteUrl(e.icon),onerror:()=>g(!0)}):(0,t.createElement)("div",null,d),(0,t.createElement)("p",{style:{marginLeft:"25px"}}," ",e.name||""),(0,t.createElement)(a.BlockControls,null,(0,t.createElement)(c.ToolbarGroup,null,(0,t.createElement)(c.Dropdown,{popoverProps:{variant:"toolbar"},renderToggle:({isOpenDropdown:e,onToggle:o})=>(0,t.createElement)(c.ToolbarButton,{"aria-expanded":e,"aria-haspopup":"true",onClick:o},(0,r.__)("Replace","onlyoffice-docspace-plugin")),renderContent:({onClose:e})=>(0,t.createElement)(t.Fragment,null,(0,t.createElement)(c.NavigableMenu,null,(0,t.createElement)(c.MenuItem,{onClick:t=>{t.target.dataset.title=(0,r.__)("Select room","onlyoffice-docspace-plugin"),t.target.dataset.mode="room-selector",E(t),e()}},(0,r.__)("Room","onlyoffice-docspace-plugin")),(0,t.createElement)(c.MenuItem,{onClick:t=>{t.target.dataset.title=(0,r.__)("Select file","onlyoffice-docspace-plugin"),t.target.dataset.mode="file-selector",E(t),e()}},(0,r.__)("File","onlyoffice-docspace-plugin"))))}))))):(0,t.createElement)("div",null,(0,t.createElement)(c.Placeholder,{icon:d,label:"ONLYOFFICE DocSpace",instructions:(0,r.__)("Pick room or media file from your DocSpace","onlyoffice-docspace-plugin")},(0,t.createElement)(c.Button,{variant:"primary","data-title":(0,r.__)("Select room","onlyoffice-docspace-plugin"),"data-mode":"room-selector",onClick:E},(0,r.__)("Select room","onlyoffice-docspace-plugin")),(0,t.createElement)(c.Button,{variant:"primary","data-title":(0,r.__)("Select file","onlyoffice-docspace-plugin"),"data-mode":"file-selector",onClick:E},(0,r.__)("Select file","onlyoffice-docspace-plugin")))),s&&(0,t.createElement)(c.Modal,{onRequestClose:e=>{"onBlur"!=e._reactName&&(p(!1),DocSpace&&DocSpace.SDK.frames["oodsp-selector-frame"].destroyFrame())},title:m.title,style:{minHeight:"572px"}},(0,t.createElement)("div",{id:"oodsp-selector-frame"})))},save:({attributes:e})=>{if(!e.roomId&&!e.fileId)return"";let o="";return e.hasOwnProperty("roomId")?o+="roomId="+e.roomId+" ":e.hasOwnProperty("fileId")&&(o+="fileId="+e.fileId+" "),e.hasOwnProperty("width")&&e.width.length>0&&(o+="width="+e.width+" "),e.hasOwnProperty("height")&&e.height.length>0&&(o+="height="+e.height+" "),(0,t.createElement)(n.RawHTML,null,`[onlyoffice-docspace ${o} /]`)}})})();
     1(()=>{"use strict";var e={d:(t,l)=>{for(var o in l)e.o(l,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:l[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};e.d({},{V:()=>p,y:()=>h});const t=window.React,l=window.wp.blocks,o=JSON.parse('{"name":"onlyoffice-docspace-wordpress/onlyoffice-docspace"}'),n=window.wp.blockEditor,a=window.wp.components,r=window.wp.element,c=window.wp.i18n,i=(0,t.createElement)("svg",{width:"96",height:"96",viewBox:"0 0 96 96",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,t.createElement)("rect",{x:"2",y:"2",width:"92",height:"92",rx:"10",stroke:"black","stroke-opacity":"0.17","stroke-width":"4"}),(0,t.createElement)("rect",{x:"18",y:"18",width:"25",height:"25",rx:"3",fill:"white"}),(0,t.createElement)("rect",{x:"18",y:"54",width:"25",height:"25",rx:"3",fill:"white"}),(0,t.createElement)("rect",{x:"53",y:"54",width:"25",height:"25",rx:"3",fill:"white"}),(0,t.createElement)("rect",{x:"53",y:"18",width:"25",height:"25",rx:"3",fill:"white"})),s=(0,t.createElement)("svg",{width:"97",height:"96",viewBox:"0 0 97 96",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,t.createElement)("path",{d:"M10.5 1H57.5L86.5 30V95H10.5V1Z",fill:"white"}),(0,t.createElement)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.5 95H86.5V30L57.5 1H10.5V95ZM57.5 0H9.5V96H87.5V30L57.5 0Z",fill:"url(#paint0_linear_3527_59860)"}),(0,t.createElement)("path",{d:"M33.5 67H39.5V73H33.5V67Z",fill:"#BFBFBF"}),(0,t.createElement)("path",{d:"M45.5 67H51.5V73H45.5V67Z",fill:"#BFBFBF"}),(0,t.createElement)("path",{d:"M63.5 67H57.5V73H63.5V67Z",fill:"#BFBFBF"}),(0,t.createElement)("path",{opacity:"0.3",d:"M56.5 30V1H57.5V29H86.5L87.5 30H56.5Z",fill:"black"}),(0,t.createElement)("defs",null,(0,t.createElement)("linearGradient",{id:"paint0_linear_3527_59860",x1:"48.5",y1:"94.25",x2:"48.5",y2:"1.21299e-06",gradientUnits:"userSpaceOnUse"},(0,t.createElement)("stop",{"stop-color":"#A8A8A8"}),(0,t.createElement)("stop",{offset:"1","stop-color":"#DADADA"})))),d=(0,t.createElement)("svg",{width:"18",height:"17",viewBox:"0 0 18 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,t.createElement)("path",{d:"M8.5 10.4197V4.58032C8.5 4.22147 8.69229 3.89012 9.00386 3.71208L14.0039 0.854937C14.6705 0.47399 15.5 0.955357 15.5 1.72318V13.2768C15.5 14.0446 14.6705 14.526 14.0039 14.1451L9.00386 11.2879C8.69229 11.1099 8.5 10.7785 8.5 10.4197Z",fill:"#333333"}),(0,t.createElement)("rect",{x:"1.5",y:"4",width:"6",height:"7",rx:"1",fill:"#333333"}),(0,t.createElement)("path",{d:"M4.38184 12L5.60542 14.4472C5.85241 14.9411 6.45308 15.1414 6.94706 14.8944C7.44104 14.6474 7.64126 14.0467 7.39427 13.5527L6.6179 12H4.38184Z",fill:"#333333"})),m=(0,t.createElement)("svg",{width:"18",height:"17",viewBox:"0 0 18 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,t.createElement)("path",{d:"M8.5 10.4197V4.58032C8.5 4.22147 8.69229 3.89012 9.00386 3.71208L14.0039 0.854937C14.6705 0.47399 15.5 0.955357 15.5 1.72318V13.2768C15.5 14.0446 14.6705 14.526 14.0039 14.1451L9.00386 11.2879C8.69229 11.1099 8.5 10.7785 8.5 10.4197Z",fill:"white"}),(0,t.createElement)("rect",{x:"1.5",y:"4",width:"6",height:"7",rx:"1",fill:"white"}),(0,t.createElement)("path",{d:"M4.38184 12L5.60542 14.4472C5.85241 14.9411 6.45308 15.1414 6.94706 14.8944C7.44104 14.6474 7.64126 14.0467 7.39427 13.5527L6.6179 12H4.38184Z",fill:"white"})),p={height:"500px",background:"#a2ccef"},h=(0,t.createElement)("svg",{width:"66",height:"60",viewBox:"0 0 66 60",fill:"black",xmlns:"http://www.w3.org/2000/svg"},(0,t.createElement)("path",{opacity:"0.5",fillRule:"evenodd",clipRule:"evenodd",d:"M28.9406 59.2644L2.20792 46.9066C-0.0693069 45.8277 -0.0693069 44.1604 2.20792 43.1796L11.5148 38.8642L28.8416 46.9066C31.1188 47.9854 34.7822 47.9854 36.9604 46.9066L54.2871 38.8642L63.5941 43.1796C65.8713 44.2585 65.8713 45.9258 63.5941 46.9066L36.8614 59.2644C34.7822 60.2452 31.1188 60.2452 28.9406 59.2644Z",fill:"black"}),(0,t.createElement)("path",{opacity:"0.75",fillRule:"evenodd",clipRule:"evenodd",d:"M28.9406 44.0606L2.20792 31.7028C-0.069307 30.6239 -0.069307 28.9566 2.20792 27.9758L11.3168 23.7584L28.9406 31.8989C31.2178 32.9778 34.8812 32.9778 37.0594 31.8989L54.6832 23.7584L63.7921 27.9758C66.0693 29.0547 66.0693 30.722 63.7921 31.7028L37.0594 44.0606C34.7822 45.1395 31.1188 45.1395 28.9406 44.0606Z",fill:"black"}),(0,t.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M28.9406 29.2518L2.20792 16.8939C-0.069307 15.8151 -0.069307 14.1478 2.20792 13.167L28.9406 0.809144C31.2178 -0.269715 34.8812 -0.269715 37.0594 0.809144L63.7921 13.167C66.0693 14.2458 66.0693 15.9132 63.7921 16.8939L37.0594 29.2518C34.7822 30.2325 31.1188 30.2325 28.9406 29.2518Z",fill:"black"})),{name:f}=o;(0,l.registerBlockType)(f,{icon:h,edit:({attributes:e,setAttributes:l})=>{const[o,f]=(0,r.useState)(!1),[g,u]=(0,r.useState)({}),[w,y]=(0,r.useState)(!1),E=[{label:(0,c.__)("Light","onlyoffice-docspace-plugin"),value:"Base"},{label:(0,c.__)("Dark","onlyoffice-docspace-plugin"),value:"Dark"}];(0,r.useEffect)((()=>{o&&wp.oodsp.initLoginManager("oodsp-selector-frame",(function(){DocSpace.SDK.initFrame(g)}))}),[o]);const _=t=>{Object.keys(e).forEach((t=>delete e[t]));const o=t[0].requestTokens,n=o?o[0].requestToken:null;l({roomId:t[0].id,name:t[0].label,icon:t[0].icon}),n&&l({requestToken:n}),DocSpace.SDK.frames["oodsp-selector-frame"].destroyFrame(),f(!1)},v=t=>{Object.keys(e).forEach((t=>delete e[t]));const o=t.requestTokens,n=o?o[0].requestToken:null;l({fileId:t.id,name:t.title,icon:t.icon}),n&&l({requestToken:n}),DocSpace.SDK.frames["oodsp-selector-frame"].destroyFrame(),f(!1)},C=()=>{DocSpace.SDK.frames["oodsp-selector-frame"].destroyFrame(),f(!1)},k=e=>{const t=e.target.dataset.mode||null;var l=null;switch(t){case"room-selector":l=_;break;case"file-selector":l=v}u({frameId:"oodsp-selector-frame",title:e.target.dataset.title||"",width:"100%",height:"100%",mode:t,selectorType:"roomsOnly",locale:_oodsp.locale,events:{onSelectCallback:l,onCloseCallback:C}}),f(!0)};e.hasOwnProperty("width")&&e.width.length>0&&(p.width=e.width),e.hasOwnProperty("height")&&e.height.length>0&&(p.height=e.height);let b=!0;"full"===e.align&&(delete p.width,b=!1);let L=!e.roomId&&!e.fileId,x=!L&&e.roomId?"room":"file",S=!L&&e.roomId?(0,c.__)("Room","onlyoffice-docspace-plugin"):(0,c.__)("File","onlyoffice-docspace-plugin"),B=(e=>{switch(e){case"room":return i;case"file":return s;default:return null}})(x),F=e.hasOwnProperty("requestToken")&&e.requestToken.length>0?(e=>{switch(e){case"room":return d;case"file":return m;default:return null}})(x):"";const D=L?(0,n.useBlockProps)({style:null}):(0,n.useBlockProps)({style:p});return(0,t.createElement)("div",{...D},L?(0,t.createElement)(t.Fragment,null,(0,t.createElement)(a.Placeholder,{icon:h,label:"ONLYOFFICE DocSpace",instructions:(0,c.__)("Pick room or media file from your DocSpace","onlyoffice-docspace-plugin")},(0,t.createElement)(a.Button,{variant:"primary","data-title":(0,c.__)("Select room","onlyoffice-docspace-plugin"),"data-mode":"room-selector",onClick:k},(0,c.__)("Select room","onlyoffice-docspace-plugin")),(0,t.createElement)(a.Button,{variant:"primary","data-title":(0,c.__)("Select file","onlyoffice-docspace-plugin"),"data-mode":"file-selector",onClick:k},(0,c.__)("Select file","onlyoffice-docspace-plugin")))):(0,t.createElement)(t.Fragment,null,(0,t.createElement)(n.InspectorControls,{key:"setting"},(0,t.createElement)(a.PanelBody,{title:(0,c.__)("Settings","onlyoffice-docspace-plugin")},b?(0,t.createElement)(n.HeightControl,{label:(0,c.__)("Width","onlyoffice-docspace-plugin"),value:e.width,onChange:e=>l({width:e})}):"",(0,t.createElement)(n.HeightControl,{label:(0,c.__)("Height","onlyoffice-docspace-plugin"),value:e.height,onChange:e=>l({height:e})}),(0,t.createElement)(a.SelectControl,{label:(0,c.__)("Theme","onlyoffice-docspace-plugin"),value:e.theme,options:E,onChange:e=>{l({theme:e})}}))),(0,t.createElement)("div",{className:`wp-block-onlyoffice-docspace-wordpress-onlyoffice-docspace__editor ${x}`},(0,t.createElement)("tbody",null,(0,t.createElement)("tr",null,(0,t.createElement)("td",{valign:"middle"},(0,t.createElement)("div",{class:"entity-icon"},e.icon&&!w?(0,t.createElement)("img",{src:wp.oodsp.getAbsoluteUrl(e.icon),onError:()=>{y(!0)}}):(0,t.createElement)(t.Fragment,null,B))),(0,t.createElement)("td",{class:"entity-info"},(0,t.createElement)("p",{class:"entity-info-label"},"Docspace ",S," ",F),(0,t.createElement)("p",null,(0,t.createElement)("span",{style:{fontWeight:500}},(0,c.__)("Name"),":")," ",e.name||""))))),(0,t.createElement)(n.BlockControls,null,(0,t.createElement)(a.ToolbarGroup,null,(0,t.createElement)(a.Dropdown,{popoverProps:{variant:"toolbar"},renderToggle:({isOpenDropdown:e,onToggle:l})=>(0,t.createElement)(a.ToolbarButton,{"aria-expanded":e,"aria-haspopup":"true",onClick:l},(0,c.__)("Replace","onlyoffice-docspace-plugin")),renderContent:({onClose:e})=>(0,t.createElement)(t.Fragment,null,(0,t.createElement)(a.NavigableMenu,null,(0,t.createElement)(a.MenuItem,{onClick:t=>{t.target.dataset.title=(0,c.__)("Select room","onlyoffice-docspace-plugin"),t.target.dataset.mode="room-selector",k(t),e()}},(0,c.__)("Room","onlyoffice-docspace-plugin")),(0,t.createElement)(a.MenuItem,{onClick:t=>{t.target.dataset.title=(0,c.__)("Select file","onlyoffice-docspace-plugin"),t.target.dataset.mode="file-selector",k(t),e()}},(0,c.__)("File","onlyoffice-docspace-plugin"))))})))),o&&(0,t.createElement)(a.Modal,{onRequestClose:e=>{"onBlur"!=e._reactName&&(f(!1),DocSpace&&DocSpace.SDK.frames["oodsp-selector-frame"].destroyFrame())},title:g.title},(0,t.createElement)("div",{class:"oodsp-selector-frame-modal"},(0,t.createElement)("div",{id:"oodsp-selector-frame"}))))},save:({attributes:e})=>{if(!e.roomId&&!e.fileId)return"";let l="";return e.hasOwnProperty("roomId")?l+="roomId="+e.roomId+" ":e.hasOwnProperty("fileId")&&(l+="fileId="+e.fileId+" "),e.hasOwnProperty("width")&&e.width.length>0&&(l+="width="+e.width+" "),e.hasOwnProperty("height")&&e.height.length>0&&(l+="height="+e.height+" "),e.hasOwnProperty("align")&&e.align.length>0&&(l+="align="+e.align+" "),e.hasOwnProperty("theme")&&e.theme.length>0&&(l+="theme="+e.theme+" "),e.hasOwnProperty("requestToken")&&e.requestToken.length>0&&(l+="requestToken="+e.requestToken+" "),(0,t.createElement)(r.RawHTML,null,`[onlyoffice-docspace ${l} /]`)}})})();
  • onlyoffice-docspace/trunk/onlyoffice-docspace-wordpress-block/src/edit.js

    r3012439 r3050549  
    11/*
    2  * (c) Copyright Ascensio System SIA 2023
     2 * (c) Copyright Ascensio System SIA 2024
    33 *
    44 * This program is free software; you can redistribute it and/or
     
    3232    ToolbarButton,
    3333    ToolbarGroup,
    34     Dropdown
     34    Dropdown,
     35    SelectControl
    3536} from '@wordpress/components';
    3637import { useState, useEffect } from '@wordpress/element';
    3738import { blockStyle, onlyofficeIcon } from "./index";
    3839import { __ } from '@wordpress/i18n';
     40import { getIconByType, getPublicIconByType } from "./icons";
    3941
    4042const Edit = ({ attributes, setAttributes }) => {
    41     const blockProps = useBlockProps({ style: blockStyle });
    4243    const [isOpen, setOpen] = useState( false );
    4344    const [modalConfig, setModalConfig] = useState( {} );
    4445    const [showDefaultIcon, setShowDefaultIcon] = useState( false );
    4546
     47    const themes = [
     48        {
     49            label: __("Light", "onlyoffice-docspace-plugin"),
     50            value: "Base"
     51        },
     52        {
     53            label: __("Dark", "onlyoffice-docspace-plugin"),
     54            value: "Dark"
     55        }
     56    ];
     57
    4658    const script = () => {
    4759        if (isOpen) {
    48             DocSpaceComponent.renderDocSpace(
     60            wp.oodsp.initLoginManager(
    4961                "oodsp-selector-frame",
    5062                function() {
     
    5971    const onSelectRoomCallback = (event) => {
    6072        Object.keys(attributes).forEach(key => delete attributes[key]);
    61         setAttributes({roomId: event[0].id, name: event[0].label, icon: event[0].icon});
     73
     74        const requestTokens = event[0].requestTokens;
     75        const requestToken = requestTokens ? requestTokens[0].requestToken : null;
     76
     77        setAttributes({
     78            roomId: event[0].id,
     79            name: event[0].label,
     80            icon: event[0].icon
     81        });
     82
     83        if (requestToken) {
     84            setAttributes({
     85                requestToken: requestToken
     86            });
     87        }
     88
    6289        DocSpace.SDK.frames["oodsp-selector-frame"].destroyFrame();
    6390        setOpen(false);
     
    6693    const onSelectFileCallback = (event) => {
    6794        Object.keys(attributes).forEach(key => delete attributes[key]);
    68         setAttributes({fileId: event.id, name: event.title, icon: event.icon});
     95
     96        const requestTokens = event.requestTokens;
     97        const requestToken = requestTokens ? requestTokens[0].requestToken : null;
     98
     99        setAttributes({
     100            fileId: event.id,
     101            name: event.title,
     102            icon: event.icon
     103        });
     104
     105        if (requestToken) {
     106            setAttributes({
     107                requestToken: requestToken
     108            });
     109        }
     110
    69111        DocSpace.SDK.frames["oodsp-selector-frame"].destroyFrame();
    70112        setOpen(false);
     
    92134            frameId: "oodsp-selector-frame",
    93135            title: event.target.dataset.title || "",
    94             width: "400px",
    95             height: "500px",
     136            width: "100%",
     137            height: "100%",
    96138            mode: mode,
    97139            selectorType: "roomsOnly",
    98             locale: DocSpaceComponent.locale,
     140            locale: _oodsp.locale,
    99141            events: {
    100142                onSelectCallback: onSelectCallback,
     
    115157    }
    116158
     159    if (attributes.hasOwnProperty('width') && attributes.width.length > 0) {
     160        blockStyle.width = attributes.width;
     161    }
     162
     163    if (attributes.hasOwnProperty('height') && attributes.height.length > 0) {
     164        blockStyle.height = attributes.height;
     165    }
     166
     167    let showWidthControl = true;
     168
     169    if (attributes.align === "full") {
     170        delete blockStyle.width;
     171        showWidthControl = false;
     172    }
     173
     174    let showPlaceholder = ! attributes.roomId && ! attributes.fileId;
     175    let entityType = ! showPlaceholder && attributes.roomId ? "room" : "file";
     176    let entityLabel = ! showPlaceholder && attributes.roomId ? __("Room", "onlyoffice-docspace-plugin") : __("File", "onlyoffice-docspace-plugin");
     177    let entityIcon = getIconByType(entityType);
     178    let entytiIsPublic = attributes.hasOwnProperty('requestToken') && attributes.requestToken.length > 0 ? getPublicIconByType(entityType) : "";
     179
     180    const blockProps = showPlaceholder ?  useBlockProps( { style: null } ) : useBlockProps( { style: blockStyle } );
    117181    return (
    118182        <div {...blockProps}>
    119             {attributes.roomId || attributes.fileId ?
    120                 <div>
     183            {! showPlaceholder ?
     184                <>
    121185                    <InspectorControls key="setting">
    122186                        <PanelBody title={ __("Settings", "onlyoffice-docspace-plugin") }>
    123                             <HeightControl label={ __("Width", "onlyoffice-docspace-plugin") } value={attributes.width} onChange={ ( value ) => setAttributes({ width: value }) }/>
     187                            {       
     188                                showWidthControl ?
     189                                    <HeightControl label={ __("Width", "onlyoffice-docspace-plugin") } value={attributes.width} onChange={ ( value ) => setAttributes({ width: value }) }/>
     190                                    :
     191                                    ''
     192                            }
    124193                            <HeightControl label={ __("Height", "onlyoffice-docspace-plugin") } value={attributes.height} onChange={ ( value ) => setAttributes({ height: value }) }/>
     194                            <SelectControl
     195                                label={__("Theme", "onlyoffice-docspace-plugin")}
     196                                value={attributes.theme}
     197                                options={themes}
     198                                onChange={(value) => {setAttributes({ theme: value })}}
     199                            />
    125200                        </PanelBody>
    126201                    </InspectorControls>
    127                     <p style={{display: 'flex'}}>
    128                     {attributes.icon && !showDefaultIcon ?
    129                         <img class='docspace-icon' src={ DocSpaceComponent.getAbsoluteUrl(attributes.icon) }  onerror={() => setShowDefaultIcon( true ) } />
    130                         :
    131                         <div>{onlyofficeIcon}</div>
    132                     }
    133                     <p style={{marginLeft: '25px'}}> {attributes.name || ""}</p>
     202
     203                    <div className={ `wp-block-onlyoffice-docspace-wordpress-onlyoffice-docspace__editor ${entityType}`}>
     204                        <tbody>
     205                            <tr>
     206                                <td valign="middle">
     207                                    <div class="entity-icon">
     208                                        {
     209                                            attributes.icon && !showDefaultIcon ?
     210                                                <img src={ wp.oodsp.getAbsoluteUrl(attributes.icon) } onError={() => { setShowDefaultIcon( true ) }} />
     211                                                :
     212                                                <>{entityIcon}</>
     213                                        }
     214                                    </div>
     215                                </td>
     216                                <td class="entity-info">
     217                                    <p class="entity-info-label">Docspace {entityLabel} {entytiIsPublic}</p>
     218                                    <p><span style={{fontWeight: 500}}>{__("Name")}:</span> {attributes.name || ""}</p>
     219                                </td>
     220                            </tr>
     221                        </tbody>
     222                    </div>
     223
    134224                    <BlockControls>
    135225                        <ToolbarGroup>
     
    174264                        </ToolbarGroup>
    175265                    </BlockControls>
    176                 </p>
    177                 </div>
     266                </>
    178267            :
    179                 <div>
     268                <>
    180269                    <Placeholder
    181270                        icon={onlyofficeIcon}
     
    200289                        </Button>
    201290                    </Placeholder>
    202                 </div>
     291                </>
    203292            }
    204293            { isOpen && (
    205                 <Modal onRequestClose={ closeModal } title={ modalConfig.title } style={{ minHeight: "572px" }}>
    206                     <div id="oodsp-selector-frame"></div>
     294                <Modal onRequestClose={ closeModal } title={ modalConfig.title } >
     295                    <div class="oodsp-selector-frame-modal">
     296                        <div id="oodsp-selector-frame"></div>
     297                    </div>
    207298                </Modal>
    208299            ) }
  • onlyoffice-docspace/trunk/onlyoffice-docspace-wordpress-block/src/index.js

    r3012439 r3050549  
    11/*
    2  * (c) Copyright Ascensio System SIA 2023
     2 * (c) Copyright Ascensio System SIA 2024
    33 *
    44 * This program is free software; you can redistribute it and/or
     
    2525import save from './save';
    2626
    27 export const blockStyle = { };
     27export const blockStyle = {
     28    height: '500px',
     29    background: '#a2ccef'
     30 };
    2831
    2932export const onlyofficeIcon = (
  • onlyoffice-docspace/trunk/onlyoffice-docspace-wordpress-block/src/save.js

    r3012439 r3050549  
    11/*
    2  * (c) Copyright Ascensio System SIA 2023
     2 * (c) Copyright Ascensio System SIA 2024
    33 *
    44 * This program is free software; you can redistribute it and/or
     
    4040    }
    4141
     42    if ( attributes.hasOwnProperty('align') && attributes.align.length > 0 ) {
     43        parameters += 'align=' + attributes.align + ' ';
     44    }
     45
     46    if ( attributes.hasOwnProperty('theme') && attributes.theme.length > 0 ) {
     47        parameters += 'theme=' + attributes.theme + ' ';
     48    }
     49
     50    if ( attributes.hasOwnProperty('requestToken') && attributes.requestToken.length > 0 ) {
     51        parameters += 'requestToken=' + attributes.requestToken + ' ';
     52    }
     53
    4254    return <RawHTML>{ `[onlyoffice-docspace ${ parameters } /]` }</RawHTML>;
    4355};
  • onlyoffice-docspace/trunk/onlyoffice-docspace-wordpress-block/src/styles.css

    r3012439 r3050549  
     1.wp-block-onlyoffice-docspace-wordpress-onlyoffice-docspace__editor {
     2    align-items: center;
     3    color: white;
     4    display: flex;
     5    font-size: 20px;
     6    height: inherit;
     7    justify-content: center;
     8    margin: 0;
     9    max-width: inherit;
     10    overflow: hidden;
     11    text-align: center;
     12    vertical-align: middle;
     13    width: inherit;
     14}
     15
    116.components-modal__content {
    217    padding: 0 !important;
     18    min-height: 150px;
     19    width: 400px;
    320}
    421
    5 .docspace-icon {
    6     border-radius: 12px;
    7     height: 64px;
    8     width: 64px;
     22.components-modal__header ~ div {
     23    height: 100%;
    924}
     25
     26.oodsp-selector-frame-modal {
     27    display: flex;
     28    vertical-align: middle;
     29    height: 500px !important;
     30    max-height: 100%;
     31    justify-content: center;
     32}
     33.oodsp-selector-frame-modal:has(.oodsp-login) {
     34    height: unset !important;
     35}
     36
     37#oodsp-selector-frame-container {
     38    height: 100% !important;
     39}
     40
     41#oodsp-selector-frame {
     42    display: block;
     43    width: 100%;
     44    height: 100%;
     45}
     46
     47.wp-block-onlyoffice-docspace-wordpress-onlyoffice-docspace__editor p {
     48    margin: 0;
     49    text-align: left;
     50}
     51
     52.wp-block-onlyoffice-docspace-wordpress-onlyoffice-docspace__editor .entity-icon {
     53    border-radius: 22px;
     54    width: 128px;
     55    height: 128px;
     56}
     57
     58.wp-block-onlyoffice-docspace-wordpress-onlyoffice-docspace__editor .entity-info {
     59    padding-left:20px;
     60}
     61
     62.wp-block-onlyoffice-docspace-wordpress-onlyoffice-docspace__editor .entity-info-label {
     63    font-weight: 600;
     64    min-width: max-content;
     65}
     66
     67.wp-block-onlyoffice-docspace-wordpress-onlyoffice-docspace__editor .entity-info-label svg {
     68    width: 18px !important;
     69    height: 18px !important;
     70}
     71
     72.wp-block-onlyoffice-docspace-wordpress-onlyoffice-docspace__editor img {
     73    border-radius: 22px;
     74    width: 100%;
     75    height: 100%;
     76}
     77.wp-block-onlyoffice-docspace-wordpress-onlyoffice-docspace__editor svg {
     78    width: 100%;
     79    height: 100%;
     80}
     81
     82.wp-block-onlyoffice-docspace-wordpress-onlyoffice-docspace__editor.room {
     83    background: #ECEEF1;
     84    color: #333333;
     85}
     86
     87.wp-block-onlyoffice-docspace-wordpress-onlyoffice-docspace__editor.file {
     88    background: linear-gradient(121.94deg, #489BEF 0%, #388BDE 99.94%);
     89}
     90
     91.oodsp-selector-frame-modal .oodsp-login {
     92    padding: 0;   
     93    width: auto;
     94}
     95
     96
     97.oodsp-selector-frame-modal .login form {
     98    border: unset;
     99    padding-top: 0;
     100    margin-top: 0;
     101}
  • onlyoffice-docspace/trunk/onlyoffice-docspace-wordpress.php

    r3012439 r3050549  
    88 * Plugin URI:        https://github.com/ONLYOFFICE/onlyoffice-docspace-wordpress
    99 * Description:       Add ONLYOFFICE DocSpace on page
    10  * Version:           1.0.1
     10 * Version:           2.0.0
    1111 * Requires at least: 5.7
    1212 * Requires PHP:      7.4
     
    2121/**
    2222 *
    23  * (c) Copyright Ascensio System SIA 2023
     23 * (c) Copyright Ascensio System SIA 2024
    2424 *
    2525 * This program is free software; you can redistribute it and/or
     
    4646 */
    4747define( 'OODSP_PLUGIN_NAME', 'onlyoffice-docspace-wordpress' );
    48 define( 'OODSP_VERSION', '1.0.1' );
     48define( 'OODSP_VERSION', '2.0.0' );
    4949define( 'OODSP_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
    5050define( 'OODSP_PLUGIN_FILE', __FILE__ );
  • onlyoffice-docspace/trunk/public/class-oodsp-public-docspace.php

    r3012439 r3050549  
    1111/**
    1212 *
    13  * (c) Copyright Ascensio System SIA 2023
     13 * (c) Copyright Ascensio System SIA 2024
    1414 *
    1515 * This program is free software; you can redistribute it and/or
     
    4040 */
    4141class OODSP_Public_DocSpace {
    42     const OODSP_PUBLIC_USER_LOGIN     = '[email protected]';
    43     const OODSP_PUBLIC_USER_PASS      = '8c6b8b3e59010d7c925a47039f749d86fbdc9b37257cd262f2dae7c84a106505';
    44     const OODSP_PUBLIC_USER_FIRSTNAME = 'WordPress';
    45     const OODSP_PUBLIC_USER_LASTNAME  = 'Viewer';
    4642
    4743    /**
    48      * OODSP_Settings
     44     * OODSP_Utils
    4945     *
    5046     * @access   private
    51      * @var      OODSP_Settings    $plugin_settings
     47     * @var      OODSP_Utils    $oodsp_utils
    5248     */
    53     private $plugin_settings;
    54 
    55     /**
    56      * OODSP_DocSpace
    57      *
    58      * @access   private
    59      * @var      OODSP_DocSpace    $plugin_docspace
    60      */
    61     private $plugin_docspace;
     49    private $oodsp_utils;
    6250
    6351    /**
     
    6553     */
    6654    public function __construct() {
    67         $this->plugin_settings = new OODSP_Settings();
    68         $this->plugin_docspace = new OODSP_DocSpace();
     55        $this->oodsp_utils = new OODSP_Utils();
    6956    }
    7057
     
    125112            'width'        => '100%',
    126113            'height'       => '500px',
     114            'align'        => '',
    127115            'mode'         => 'manager',
    128116            'editorGoBack' => false,
     117            'theme'        => 'Base',
    129118        );
    130119
     
    147136        }
    148137
    149         $post = get_post();
    150 
    151         if ( 'private' === $post->post_status ) {
    152             $is_public    = false;
    153             $current_user = wp_get_current_user()->user_email;
    154         } else {
    155             $is_public    = true;
    156             $current_user = self::OODSP_PUBLIC_USER_LOGIN;
     138        if ( empty( $atts['theme'] ) ) {
     139            $atts['theme'] = $defaults_atts['theme'];
    157140        }
    158141
     142        if ( array_key_exists( 'requestToken', $attr ) ) {
     143            $atts['requestToken'] = $attr['requestToken'];
     144            $atts['rootPath']     = '/rooms/share';
     145        }
     146
     147        $this->oodsp_utils->enqueue_scripts();
     148        $this->oodsp_utils->enqueue_styles();
     149
    159150        wp_enqueue_script(
    160             'docspace-component-api',
    161             OODSP_PLUGIN_URL . 'assets-onlyoffice-docspace/js/docspace-component-api.js',
     151            'docspace-integration-sdk',
     152            OODSP_PLUGIN_URL . 'assets-onlyoffice-docspace/js/docspace-integration-sdk.js',
    162153            array(),
    163154            OODSP_VERSION,
    164155            true
    165         );
    166 
    167         $error_message = __( 'Portal unavailable! Please contact the administrator!', 'onlyoffice-docspace-plugin' );
    168 
    169         if ( current_user_can( 'manage_options' ) && ! $is_public ) {
    170             $error_message = __( 'Go to the settings to configure ONLYOFFICE DocSpace connector.', 'onlyoffice-docspace-plugin' );
    171         }
    172 
    173         $unauthorized_header  = __( 'Authorization unsuccessful!', 'onlyoffice-docspace-plugin' );
    174         $unauthorized_message = __( 'Please contact the administrator.', 'onlyoffice-docspace-plugin' );
    175 
    176         if ( current_user_can( 'manage_options' ) && $is_public ) {
    177             $unauthorized_header  = __( 'Reset WordPress Viewer to continue', 'onlyoffice-docspace-plugin' );
    178             $unauthorized_message = __( 'You may experience issues with access to your content because WordPress Viewer data has been lost. Please proceed to the DocSpace plugin settings and click the Save button. WordPress Viewer will be added again to DocSpace.', 'onlyoffice-docspace-plugin' );
    179         } elseif ( ! $is_public ) {
    180             $unauthorized_message = __( 'Please proceed to the DocSpace plugin via the left side menu and enter your password to restore access.', 'onlyoffice-docspace-plugin' );
    181         }
    182 
    183         wp_localize_script(
    184             'docspace-component-api',
    185             'DocSpaceComponent',
    186             array(
    187                 'url'         => $this->plugin_settings->get_onlyoffice_docspace_setting( OODSP_Settings::DOCSPACE_URL ),
    188                 'currentUser' => $current_user,
    189                 'isPublic'    => $is_public,
    190                 'locale'      => $this->plugin_docspace->get_locale_for_docspace(),
    191                 'ajaxUrl'     => admin_url( 'admin-ajax.php' ),
    192                 'images'      => array(
    193                     'onlyoffice'  => plugins_url( 'public/images/onlyoffice.svg', OODSP_PLUGIN_FILE ),
    194                     'unavailable' => plugins_url( 'public/images/unavailable.svg', OODSP_PLUGIN_FILE ),
    195                 ),
    196                 'messages'    => array(
    197                     'error'                => $error_message,
    198                     'unauthorized_header'  => $unauthorized_header,
    199                     'unauthorized_message' => $unauthorized_message,
    200                 ),
    201             )
    202         );
    203 
    204         wp_enqueue_style(
    205             'docspace-components-api',
    206             OODSP_PLUGIN_URL . 'assets-onlyoffice-docspace/css/docspace-component-api.css',
    207             array(),
    208             OODSP_VERSION
    209156        );
    210157
     
    217164        );
    218165
    219         $output  = '<div>';
    220         $output .= "<div class='onlyoffice-docspace-block' data-config='" . wp_json_encode( $atts ) . "' id='onlyoffice-docspace-block-" . $instance . "' style='overflow: overlay; width:" . $atts['width'] . '; height:' . $atts['height'] . "'></div>";
     166        wp_enqueue_style(
     167            OODSP_PLUGIN_NAME . '-public-docspace',
     168            OODSP_PLUGIN_URL . 'public/css/public-docspace.css',
     169            array(),
     170            OODSP_VERSION
     171        );
     172
     173        $align = ! empty( $atts['align'] ) ? 'align' . $atts['align'] : '';
     174        $size  = ! empty( $atts['width'] ) && ! ( 'full' === $atts['align'] ) ? 'width: ' . $atts['width'] . ';' : '';
     175        $size .= ! empty( $atts['height'] ) ? 'height: ' . $atts['height'] . ';' : '';
     176
     177        $output  = '<div class="wp-block-onlyoffice-docspace-wordpress-onlyoffice-docspace ' . $align . ' size-full" style="' . $size . '">';
     178        $output .= "<div class='onlyoffice-docspace-block' data-config='" . wp_json_encode( $atts ) . "' id='onlyoffice-docspace-block-" . $instance . "'></div>";
    221179        $output .= '</div>';
    222180
  • onlyoffice-docspace/trunk/public/js/public-docspace.js

    r3012439 r3050549  
    55 */
    66
    7 (function () {
     7(function ($) {
    88    document.addEventListener(
    99        'DOMContentLoaded',
     
    1616            }
    1717
    18             DocSpaceComponent.initScript().then(
     18            const oodspErrorTemplate = wp.template( 'oodsp-error' );
     19
     20            DocspaceIntegrationSdk.initScript( "oodsp-api-js", _oodsp.docspaceUrl ).then(
    1921                function () {
    2022                    for ( var config of oodspConfigs ) {
    21                         DocSpaceComponent.initPublicDocSpace(
     23                        config.width  = "100%";
     24                        config.height = "100%";
     25                        config.locale = _oodsp.locale;
     26
     27                        if (_oodsp.isAnonymous) {
     28                            if ( ! config.hasOwnProperty( 'requestToken' ) || config.requestToken.length <= 0 ) {
     29                                $( "#" + config.frameId ).html(
     30                                    oodspErrorTemplate(
     31                                        {
     32                                            header: _oodsp.messages.unauthorizedHeader,
     33                                            message: _oodsp.messages.unauthorizedMessage
     34                                        }
     35                                    )
     36                                );
     37                                continue;
     38                            }
     39
     40                            DocspaceIntegrationSdk.logout(
     41                                config.frameId,
     42                                function () {
     43                                    DocSpace.SDK.initFrame( config );
     44                                }
     45                            );
     46                            continue;
     47                        }
     48
     49                        DocspaceIntegrationSdk.loginByPasswordHash(
    2250                            config.frameId,
    23                             config.width || null,
    24                             config.height || null,
     51                            _oodsp.currentUser,
    2552                            function () {
    26                                 config.locale = DocSpaceComponent.locale;
     53                                return wp.oodsp.getPasswordHash()
     54                            },
     55                            function () {
    2756                                DocSpace.SDK.initFrame( config );
    2857                            },
    2958                            function () {
    30                                 DocSpaceComponent.renderError( config.frameId );
     59                                if ( ! config.hasOwnProperty( 'requestToken' ) || config.requestToken.length <= 0 ) {
     60                                    $( "#" + config.frameId ).html(
     61                                        oodspErrorTemplate(
     62                                            {
     63                                                header: _oodsp.messages.unauthorizedHeader,
     64                                                message: _oodsp.messages.unauthorizedMessage
     65                                            }
     66                                        )
     67                                    );
     68                                    return;
     69                                }
     70
     71                                DocspaceIntegrationSdk.logout(
     72                                    config.frameId,
     73                                    function () {
     74                                        DocSpace.SDK.initFrame( config );
     75                                    }
     76                                );
    3177                            }
    3278                        );
     
    3682                function () {
    3783                    for ( var config of oodspConfigs ) {
    38                         DocSpaceComponent.renderError( config.frameId );
     84                        $( "#" + config.frameId ).html(
     85                            oodspErrorTemplate(
     86                                {
     87                                    message: _oodsp.messages.docspaceUnavailable
     88                                }
     89                            )
     90                        );
    3991                    }
    4092                }
     
    4294        }
    4395    );
    44 })();
     96
     97})( jQuery );
  • onlyoffice-docspace/trunk/readme.txt

    r3012439 r3050549  
    44Requires at least: 6.2
    55Tested up to: 6.3.1
    6 Stable tag: 1.0.1
     6Stable tag: 2.0.0
    77Requires PHP: 8.0
    88License: GPLv2
Note: See TracChangeset for help on using the changeset viewer.