Skip to content
Snippets Groups Projects
Select Git revision
  • 7e3e2c92bb783731e95660111f0daf543ed480ca
  • master default protected
  • renovate/aws-aws-sdk-php-3.x-lockfile
  • renovate/webpack-5.x-lockfile
  • renovate/symfony-ux-twig-component-2.x-lockfile
  • renovate/phpunit-phpunit-12.x-lockfile
  • renovate/mariadb-22.x
  • renovate/webpack-cli-6.x
  • renovate/symfony-webpack-encore-bundle-2.x-lockfile
  • renovate/symfony
  • renovate/major-phpstan-packages
  • renovate/phpunit-phpunit-11.x
  • renovate/major-symfony
  • develop/frankenphp
14 results

phpstan.neon

Blame
  • document.js 2.12 KiB
    import { action } from '@ember/object';
    import DualPanelBaseController from "./dualpanel_base";
    import { service } from '@ember/service';
    
    
    export default class DocumentController extends DualPanelBaseController {
    
      @service router;
    
      @action
      async onPanelToggle(hint) {
        /*
          hint is either "left" or "right" depending where
          the onPanelToggle originated from.
        */
        let home_folder;
    
        if (this.extra_id) {
          if (hint === "left") {
            // user decided to close left panel
            if (this.extra_type === 'folder') {
              this.replaceRoute('authenticated.nodes', this.extra_id);
            } else {
              this.replaceRoute('authenticated.document', this.extra_id);
            }
            this.extra_id = null;
            this.extra_type = null;
          } else if (hint === "right") {
            console.log('Closing right panel');
            this.extra_id = null;
            this.extra_type = null;
          } else {
            throw `Unknown value for origin argument: ${origin}`;
          }
        } else {
          home_folder = await this.currentUser.user.home_folder;
          this.extra_id = home_folder.get('id');
          this.extra_type = 'folder';
        }
      }
    
      @action
      onSwapPanels() {
        let document_id = this.router.currentRoute.params['document_id'],
          query_params;
    
        query_params = {
          'queryParams': {
            'extra_id': document_id,
            'extra_type': 'doc'
          }
        };
    
        if (this.extra_id && this.extra_type == 'folder') {
          this.router.transitionTo(
            'authenticated.nodes',
            this.extra_id,
            query_params
          );
        } else if (this.extra_id && this.extra_type == 'doc') {
          this.router.transitionTo(
            'authenticated.document',
            this.extra_id,
            query_params
          )
        }
      }
    
      @action
      onDuplicatePanel() {
        let document_id = this.router.currentRoute.params['document_id'],
          query_params;
    
        query_params = {
          'queryParams': {
            'extra_id': document_id,
            'extra_type': 'doc'
          }
        }
        if (this.extra_id) {
          this.router.transitionTo(
            'authenticated.document',
            document_id,
            query_params
          );
        }
      }
    }