Skip to content

Commit 93ac7dc

Browse files
author
Simon Mellberg
committed
Added icon from main app.
Signed-off-by: Simon Mellberg <[email protected]>
1 parent 8d85053 commit 93ac7dc

File tree

4 files changed

+26
-6
lines changed

4 files changed

+26
-6
lines changed

plugins/caspar/app/components/LibraryListFolder/index.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { useState } from "react"
22

3-
import { Icon } from '../../../../inspector/app/components/Icon'
3+
import { Icon } from '../../../../../app/components/Icon'
44

55
import "./style.css"
66

@@ -11,7 +11,7 @@ const LibraryListFolderName = ({ isOpen, name, handleClick }) => {
1111
onClick={handleClick}
1212
>
1313
<div className='LibraryListFolder-nameIcon'>
14-
<Icon name='arrow-down' />
14+
<Icon name='arrowRight' />
1515
</div>
1616
<div className="LibraryListFolder-nameText">
1717
{name}

plugins/caspar/app/components/LibraryListFolder/style.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@
3232
.LibraryListFolder-nameIcon {
3333
margin-right: .1em;
3434
display: flex;
35-
transform: rotate(-90deg);
35+
transform: rotate(0deg);
3636
justify-items: center;
3737
scale: 80%;
3838
}
3939

4040
.LibraryListFolder-name.is-open .LibraryListFolder-nameIcon {
41-
transform: rotate(0deg);
41+
transform: rotate(90deg);
4242
}
4343

4444
.LibraryListFolder-nameText {

plugins/caspar/app/utils/library.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ function buildFolderTree (paths) {
6868
const pwd = parts.slice(0, index + 1).join('/') // Join parts to get the path
6969

7070
let existing = currentLevel.find((item) => item.name === part) // Check if folder exists on current level
71-
71+
7272
// If the folder exists, go into it
7373
if (existing) {
7474
if (!isFile) {

plugins/caspar/app/utils/library.unit.test.js

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ const { buildFolderTree, getFileName } = require('./library.cjs')
33
test('multiple folders with same name', () => {
44
const input = [
55
{ name: 'folder1/file1' },
6-
{ name: 'folder1/file2' }
6+
{ name: 'folder1/file2' },
7+
{ name: 'folder2/folder1/file3'}
78
]
89

910
const expected = [
@@ -23,6 +24,25 @@ test('multiple folders with same name', () => {
2324
id: expect.any(String)
2425
}
2526
]
27+
},
28+
{
29+
file: false,
30+
name: 'folder2',
31+
id: expect.any(String),
32+
files: [
33+
{
34+
file: false,
35+
name: 'folder1',
36+
id: expect.any(String),
37+
files: [
38+
{
39+
file: true,
40+
name: 'folder2/folder1/file3',
41+
id: expect.any(String)
42+
}
43+
]
44+
}
45+
]
2646
}
2747
]
2848

0 commit comments

Comments
 (0)