Skip to content

Commit

Permalink
Add loop toggle on video field
Browse files Browse the repository at this point in the history
  • Loading branch information
sebousan committed Feb 1, 2024
1 parent ceca69f commit f7e6c5f
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 11 deletions.
13 changes: 10 additions & 3 deletions admin/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -379,14 +379,21 @@ div[id^='documents-field'] {
[id^='video-field'] [class*='-ControlContainer']:has(> [for^='controls-field']),
[id^='video-field']
[class*='-ControlContainer']:has(> [for^='screenshot-field']),
[id^='video-field']
[class*='-ControlContainer']:has(> [for^='autoplay-field']) {
[id^='video-field'] [class*='-ControlContainer']:has(> [for^='autoplay-field']),
[id^='video-field'] [class*='-ControlContainer']:has(> [for^='loop-field']) {
flex-direction: column;
width: 33%;
}
[id^='video-field']
[class*='-ControlContainer']:has(> [for^='controls-field']) {
clear: both;
}
[id^='video-field'] [class*='-ControlContainer']:has(> [for^='legend-field']),
[id^='video-field']
[class*='-ControlContainer']:has(> [for^='transcription-field']) {
float: right;
clear: both;
float: none;
width: 100%;
}
[id^='video-field'] [class*='ControlContainer'] > div {
padding-left: 0;
Expand Down
10 changes: 10 additions & 0 deletions admin/app/fields/loop.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { t } from '../i18n/translater.js';

export const loop = {
name: 'loop',
label: t.fields.loop,
widget: 'boolean',
default: false,
required: false,
i18n: 'duplicate'
};
4 changes: 2 additions & 2 deletions admin/app/fields/video-mp4.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ export const mp4 = {
}
},
hint: t.fields.video.mp4.hint,
media_folder: '/static/videos',
public_folder: '/videos'
media_folder: '/static/assets/videos',
public_folder: '/assets/videos'
};
4 changes: 2 additions & 2 deletions admin/app/fields/video-webm.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ export const webm = {
}
},
hint: t.fields.video.webm.hint,
media_folder: '/static/videos',
public_folder: '/videos'
media_folder: '/static/assets/videos',
public_folder: '/assets/videos'
};
10 changes: 6 additions & 4 deletions admin/app/fields/video.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { autoplay } from './autoplay.js';
import { controls } from './controls.js';
import { loop } from './loop.js';
import { legend } from './legend.js';
import { mp4 } from './video-mp4.js';
import { screenshot } from './screenshot.js';
Expand All @@ -17,10 +18,11 @@ export const video = {
fields: [
mp4,
webm,
controls,
autoplay,
screenshot,
legend,
controls,
autoplay,
loop,
screenshot,
legend,
transcription
]
};

0 comments on commit f7e6c5f

Please sign in to comment.