Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
simple-editor
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Public
simple-editor
Commits
5b051b94
Commit
5b051b94
authored
Aug 07, 2026
by
Jonathan Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make API links configurable in editor
parent
9ac52b6d
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
18 additions
and
26 deletions
+18
-26
.env.development
.env.development
+2
-1
.env.production
.env.production
+1
-0
README.md
README.md
+1
-0
App.vue
src/App.vue
+2
-9
ClipEffectsModal.vue
src/components/ClipEffectsModal.vue
+1
-1
Clips.vue
src/components/Clips.vue
+3
-1
Files.vue
src/components/Files.vue
+2
-0
Projects.vue
src/components/Projects.vue
+2
-0
main.js
src/main.js
+4
-0
Editor.vue
src/views/Editor.vue
+0
-14
No files found.
.env.development
View file @
5b051b94
VUE_APP_OPENSHOT_API_URL=http://127.0.0.1:
8090
VUE_APP_OPENSHOT_API_URL=http://127.0.0.1:
9001
VUE_APP_GA_ID=UA-4381101-7
VUE_APP_GA_ID=UA-4381101-7
VUE_APP_SHOW_API_LINKS=true
.env.production
View file @
5b051b94
VUE_APP_OPENSHOT_API_URL=https://cloud.openshot.org
VUE_APP_OPENSHOT_API_URL=https://cloud.openshot.org
VUE_APP_GA_ID=UA-4381101-7
VUE_APP_GA_ID=UA-4381101-7
VUE_APP_SHOW_API_LINKS=true
README.md
View file @
5b051b94
...
@@ -100,6 +100,7 @@ Configuration variables are stored in `.env` and `vue.config.js` files.
...
@@ -100,6 +100,7 @@ Configuration variables are stored in `.env` and `vue.config.js` files.
-
`VUE_APP_GA_ID`
: Global site tag (gtag.js) for tracking on Google Analytics
-
`VUE_APP_GA_ID`
: Global site tag (gtag.js) for tracking on Google Analytics
-
`VUE_APP_OPENSHOT_API_URL`
: URL of your own OpenShot Cloud API instance
-
`VUE_APP_OPENSHOT_API_URL`
: URL of your own OpenShot Cloud API instance
-
`VUE_APP_SHOW_API_LINKS`
: Set to
`false`
to hide the API navigation link and all contextual "View in API" actions (defaults to enabled)
-
`publicPath`
: Relative path where this app will be served by your production web server
-
`publicPath`
: Relative path where this app will be served by your production web server
See
[
Configuration Reference
](
https://cli.vuejs.org/config/
)
.
See
[
Configuration Reference
](
https://cli.vuejs.org/config/
)
.
src/App.vue
View file @
5b051b94
...
@@ -20,11 +20,8 @@
...
@@ -20,11 +20,8 @@
<li
class=
"nav-item"
>
<li
class=
"nav-item"
>
<router-link
to=
"/about"
class=
"nav-link"
aria-current=
"page"
>
About
</router-link>
<router-link
to=
"/about"
class=
"nav-link"
aria-current=
"page"
>
About
</router-link>
</li>
</li>
<li
class=
"nav-item"
>
<li
v-if=
"$showApiLinks"
class=
"nav-item"
>
<a
class=
"nav-link"
:href=
"apiHref('/')"
target=
"_blank"
rel=
"noopener"
>
API Explorer
</a>
<a
class=
"nav-link"
href=
"/"
target=
"_blank"
rel=
"noopener"
>
API
</a>
</li>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
:href=
"apiHref('/doc/')"
target=
"_blank"
rel=
"noopener"
>
Documentation
</a>
</li>
</li>
<li
v-show=
"isAuthenticated"
class=
"nav-item px-3"
>
<li
v-show=
"isAuthenticated"
class=
"nav-item px-3"
>
<router-link
to=
"/logout"
class=
"nav-link"
aria-current=
"page"
>
Logout
</router-link>
<router-link
to=
"/logout"
class=
"nav-link"
aria-current=
"page"
>
Logout
</router-link>
...
@@ -62,10 +59,6 @@ import DemoExpiryNotice from './components/DemoExpiryNotice.vue'
...
@@ -62,10 +59,6 @@ import DemoExpiryNotice from './components/DemoExpiryNotice.vue'
export
default
{
export
default
{
components
:
{
DemoExpiryNotice
},
components
:
{
DemoExpiryNotice
},
methods
:
{
methods
:
{
apiHref
(
path
)
{
const
base
=
(
process
.
env
.
VUE_APP_OPENSHOT_API_URL
||
window
.
location
.
origin
).
replace
(
/
\/
+$/
,
''
)
return
`
${
base
}${
path
}
`
},
removeError
(
error
)
{
removeError
(
error
)
{
this
.
removeError
(
error
)
this
.
removeError
(
error
)
},
},
...
...
src/components/ClipEffectsModal.vue
View file @
5b051b94
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
<p
v-if=
"clipDisplayLabel"
class=
"clip-meta mb-0 text-muted"
>
<p
v-if=
"clipDisplayLabel"
class=
"clip-meta mb-0 text-muted"
>
{{
clipDisplayLabel
}}
{{
clipDisplayLabel
}}
</p>
</p>
<a
v-if=
"clipContext.clipUrl"
<a
v-if=
"
$showApiLinks &&
clipContext.clipUrl"
class=
"clip-api-link"
class=
"clip-api-link"
:href=
"clipContext.clipUrl"
:href=
"clipContext.clipUrl"
target=
"_blank"
target=
"_blank"
...
...
src/components/Clips.vue
View file @
5b051b94
...
@@ -61,8 +61,10 @@
...
@@ -61,8 +61,10 @@
<li
v-if=
"index > 0"
><a
class=
"dropdown-item"
href=
"#"
@
click=
"moveClipBtn('up', clip, index, index - 1)"
>
Move Up
</a></li>
<li
v-if=
"index > 0"
><a
class=
"dropdown-item"
href=
"#"
@
click=
"moveClipBtn('up', clip, index, index - 1)"
>
Move Up
</a></li>
<li
v-if=
"index
<
clips
.
length
-
1
"
><a
class=
"dropdown-item"
href=
"#"
@
click=
"moveClipBtn('down', clip, index, index + 1)"
>
Move Down
</a></li>
<li
v-if=
"index
<
clips
.
length
-
1
"
><a
class=
"dropdown-item"
href=
"#"
@
click=
"moveClipBtn('down', clip, index, index + 1)"
>
Move Down
</a></li>
<li
v-if=
"index > 0 || index
<
clips
.
length
-
1
"
><hr
class=
"dropdown-divider"
></li>
<li
v-if=
"index > 0 || index
<
clips
.
length
-
1
"
><hr
class=
"dropdown-divider"
></li>
<template
v-if=
"$showApiLinks"
>
<li><a
class=
"dropdown-item"
:href=
"clip.url"
target=
"_blank"
rel=
"noopener"
>
View in API
</a></li>
<li><a
class=
"dropdown-item"
:href=
"clip.url"
target=
"_blank"
rel=
"noopener"
>
View in API
</a></li>
<li><hr
class=
"dropdown-divider"
></li>
<li><hr
class=
"dropdown-divider"
></li>
</
template
>
<li><a
class=
"dropdown-item"
href=
"#"
@
click=
"deleteClipBtn(clip.id)"
>
Delete
</a></li>
<li><a
class=
"dropdown-item"
href=
"#"
@
click=
"deleteClipBtn(clip.id)"
>
Delete
</a></li>
</ul>
</ul>
</span>
</span>
...
@@ -136,7 +138,7 @@
...
@@ -136,7 +138,7 @@
Cancel
Cancel
</button>
</button>
<div
class=
"d-flex align-items-center gap-2"
>
<div
class=
"d-flex align-items-center gap-2"
>
<a
v-if=
"current_export.url"
<a
v-if=
"
$showApiLinks &&
current_export.url"
class=
"btn btn-outline-primary"
class=
"btn btn-outline-primary"
:href=
"current_export.url"
:href=
"current_export.url"
target=
"_blank"
target=
"_blank"
...
...
src/components/Files.vue
View file @
5b051b94
...
@@ -54,8 +54,10 @@
...
@@ -54,8 +54,10 @@
<path
d=
"M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0zm0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0zm0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0z"
/>
<path
d=
"M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0zm0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0zm0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0z"
/>
</svg>
</svg>
<ul
class=
"dropdown-menu small-dropdown"
>
<ul
class=
"dropdown-menu small-dropdown"
>
<template
v-if=
"$showApiLinks"
>
<li><a
class=
"dropdown-item"
:href=
"file.url"
target=
"_blank"
rel=
"noopener"
>
View in API
</a></li>
<li><a
class=
"dropdown-item"
:href=
"file.url"
target=
"_blank"
rel=
"noopener"
>
View in API
</a></li>
<li><hr
class=
"dropdown-divider"
></li>
<li><hr
class=
"dropdown-divider"
></li>
</
template
>
<li><a
class=
"dropdown-item"
href=
"#"
@
click=
"deleteFileBtn(file)"
>
Delete
</a></li>
<li><a
class=
"dropdown-item"
href=
"#"
@
click=
"deleteFileBtn(file)"
>
Delete
</a></li>
</ul>
</ul>
</div>
</div>
...
...
src/components/Projects.vue
View file @
5b051b94
...
@@ -24,8 +24,10 @@
...
@@ -24,8 +24,10 @@
</svg>
</svg>
<ul
class=
"dropdown-menu small-dropdown"
>
<ul
class=
"dropdown-menu small-dropdown"
>
<li><a
class=
"dropdown-item"
href=
"#"
@
click=
"launchEditor(project)"
>
Launch Editor
</a></li>
<li><a
class=
"dropdown-item"
href=
"#"
@
click=
"launchEditor(project)"
>
Launch Editor
</a></li>
<template
v-if=
"$showApiLinks"
>
<li><a
class=
"dropdown-item"
:href=
"project.url"
target=
"_blank"
rel=
"noopener"
>
View in API
</a></li>
<li><a
class=
"dropdown-item"
:href=
"project.url"
target=
"_blank"
rel=
"noopener"
>
View in API
</a></li>
<li><hr
class=
"dropdown-divider"
></li>
<li><hr
class=
"dropdown-divider"
></li>
</
template
>
<li><a
class=
"dropdown-item"
href=
"#"
@
click=
"editProjectClick(project)"
>
Edit
</a></li>
<li><a
class=
"dropdown-item"
href=
"#"
@
click=
"editProjectClick(project)"
>
Edit
</a></li>
<li><a
class=
"dropdown-item"
href=
"#"
@
click=
"showDeletePrompt(project)"
>
Delete
</a></li>
<li><a
class=
"dropdown-item"
href=
"#"
@
click=
"showDeletePrompt(project)"
>
Delete
</a></li>
</ul>
</ul>
...
...
src/main.js
View file @
5b051b94
...
@@ -9,6 +9,10 @@ import { initAdsConversions, isDemoEnvironment } from "./utils/adsConversions"
...
@@ -9,6 +9,10 @@ import { initAdsConversions, isDemoEnvironment } from "./utils/adsConversions"
const
app
=
createApp
(
App
)
const
app
=
createApp
(
App
)
// Keep the educational links enabled by default. Deployments that only want
// the editing experience can hide every API link at build time.
app
.
config
.
globalProperties
.
$showApiLinks
=
process
.
env
.
VUE_APP_SHOW_API_LINKS
!==
'false'
const
tagId
=
process
.
env
.
VUE_APP_GA_ID
const
tagId
=
process
.
env
.
VUE_APP_GA_ID
if
(
tagId
)
{
if
(
tagId
)
{
app
.
use
(
createGtag
({
app
.
use
(
createGtag
({
...
...
src/views/Editor.vue
View file @
5b051b94
<
template
>
<
template
>
<div
v-if=
"hasData"
class=
"api-context-bar"
>
<div><span>
Editing project
</span><strong>
{{
project
.
name
}}
</strong></div>
<a
:href=
"project.url"
target=
"_blank"
rel=
"noopener"
>
View Project in API
</a>
</div>
<!-- Video Editor container -->
<!-- Video Editor container -->
<div
class=
"row"
>
<div
class=
"row"
>
...
@@ -85,12 +80,3 @@ export default {
...
@@ -85,12 +80,3 @@ export default {
}
}
}
}
</
script
>
</
script
>
<
style
scoped
>
.api-context-bar
{
margin-bottom
:
16px
;
padding
:
10px
14px
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
gap
:
16px
;
border
:
1px
solid
#dbe3ef
;
border-radius
:
9px
;
background
:
#f8fafc
;
color
:
#64748b
;
font-size
:
13px
;
}
.api-context-bar
span
{
margin-right
:
7px
;
}
.api-context-bar
strong
{
color
:
#273449
;
}
.api-context-bar
a
{
color
:
#2563eb
;
font-weight
:
600
;
text-decoration
:
none
;
white-space
:
nowrap
;
}
.api-context-bar
a
:hover
{
text-decoration
:
underline
;
}
@media
(
max-width
:
575px
)
{
.api-context-bar
{
align-items
:
flex-start
;
flex-direction
:
column
;
gap
:
5px
;
}
}
</
style
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment