Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
asva-double-panel
Advanced tools
Double panel layout for vue.js.
Imagine modal. Then modal inside of modal. This library does the same, just with two panels. Parent on the left - child on the right. Child on the left - parent on the right. Makes no sense? Check demo.
npm install -D asva-double-panel
yarn add -D asva-double-panel
/#/demo
)First - create a double panel wrapper component.
In example ListPanelExample and CloudPanelExample are root panels (displayed by default).
<template>
<DoublePanel :left="leftPanel" :right="rightPanel"/>
</template>
<script>
import { DoublePanel } from 'asva-double-panel'
import PanelComponent from './PanelComponent.vue'
export default {
components: {
DoublePanel,
ListPanelExample,
CloudPanelExample,
},
computed: {
leftPanel: () => PanelComponent,
rightPanel: () => PanelComponent,
},
}
</script>
Let's dive into panel component structure. 2 things to notice here:
<template>
<div class="panel-component-example">
<p>
Test value from prop: {{ value.test }}
</p>
<p>
<button @click="$panel.close()">Close</button>
<button @click="$panel.closeChild()">Close child</button>
</p>
<p>
<button @click="$panel.create()">Create</button>
</p>
<p>
<button @click="$panel.switchPosition()">Switch position</button>
Position: {{$panel.position}}
</p>
<p>
<button @click="$panel.toggleFullWidth()">Toggle full-width</button>
Full width: {{$panel.isFullWidth}}
</p>
</div>
</template>
<script>
import { panelMixin } from 'asva-double-panel'
export default {
name: 'panel-component',
mixins: [panelMixin],
props: ['value'],
}
</script>
You have to import styles for double panel to function properly.
~asva-double-panel/dist/css/main.css
$panel.close()
- close current panel and its descendants.$panel.closeChild()
- close only panel descendants.$panel.switchPosition()
- move panel from left to right and vice-versa.$panel.toggleFullWidth()
- widen the panel to occupy full space (useful for prints and tables).this.$panel.create(component, [payload, [options]])
, where
import Component from 'Component.vue'
). If you want to create same component recursively - use this.constructor
.Options:
replaceSelf
- Don't create new panel on top, instead replace current one.fullWidth
[Boolean, default: false] - Create panel in fullWidth mode.reuse
[Boolean, default: false] - If true, and panel with current component already exists on top of current one - we'll just refresh payload (useful for iframe reuse).position
['same' | 'opposite', default 'opposite'] - Defines whether new panel should be created directly on top of current one in opposite side.If you feel something is not right - please leave feedback. I might even tweak library a bit for you needs if you case is common. : 3
MIT
FAQs
Double panel layout for vue.js
The npm package asva-double-panel receives a total of 2 weekly downloads. As such, asva-double-panel popularity was classified as not popular.
We found that asva-double-panel demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.