Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Screenshot of video #2221

Merged
merged 9 commits into from
May 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const IpcChannels = {
GET_SYSTEM_LOCALE: 'get-system-locale',
GET_USER_DATA_PATH: 'get-user-data-path',
GET_USER_DATA_PATH_SYNC: 'get-user-data-path-sync',
GET_PICTURES_PATH: 'get-pictures-path',
SHOW_OPEN_DIALOG: 'show-open-dialog',
SHOW_SAVE_DIALOG: 'show-save-dialog',
STOP_POWER_SAVE_BLOCKER: 'stop-power-save-blocker',
Expand Down
14 changes: 13 additions & 1 deletion src/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -405,11 +405,23 @@ function runApp() {
event.returnValue = app.getPath('userData')
})

ipcMain.handle(IpcChannels.GET_PICTURES_PATH, () => {
return app.getPath('pictures')
})

ipcMain.handle(IpcChannels.SHOW_OPEN_DIALOG, async (_, options) => {
return await dialog.showOpenDialog(options)
})

ipcMain.handle(IpcChannels.SHOW_SAVE_DIALOG, async (_, options) => {
ipcMain.handle(IpcChannels.SHOW_SAVE_DIALOG, async (event, { options, useModal }) => {
if (useModal) {
const senderWindow = BrowserWindow.getAllWindows().find((window) => {
return window.webContents.id === event.sender.id
})
if (senderWindow) {
return await dialog.showSaveDialog(senderWindow, options)
}
}
return await dialog.showSaveDialog(options)
})

Expand Down
13 changes: 13 additions & 0 deletions src/renderer/assets/img/camera.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 7 additions & 7 deletions src/renderer/components/data-settings/data-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ export default Vue.extend({
]
}

const response = await this.showSaveDialog(options)
const response = await this.showSaveDialog({ options })
if (response.canceled || response.filePath === '') {
// User canceled the save dialog
return
Expand Down Expand Up @@ -766,7 +766,7 @@ export default Vue.extend({
return object
})

const response = await this.showSaveDialog(options)
const response = await this.showSaveDialog({ options })
if (response.canceled || response.filePath === '') {
// User canceled the save dialog
return
Expand Down Expand Up @@ -818,7 +818,7 @@ export default Vue.extend({
}
})

const response = await this.showSaveDialog(options)
const response = await this.showSaveDialog({ options })
if (response.canceled || response.filePath === '') {
// User canceled the save dialog
return
Expand Down Expand Up @@ -864,7 +864,7 @@ export default Vue.extend({
exportText += `${channel.id},${channelUrl},${channelName}\n`
})
exportText += '\n'
const response = await this.showSaveDialog(options)
const response = await this.showSaveDialog({ options })
if (response.canceled || response.filePath === '') {
// User canceled the save dialog
return
Expand Down Expand Up @@ -917,7 +917,7 @@ export default Vue.extend({
newPipeObject.subscriptions.push(subscription)
})

const response = await this.showSaveDialog(options)
const response = await this.showSaveDialog({ options })
if (response.canceled || response.filePath === '') {
// User canceled the save dialog
return
Expand Down Expand Up @@ -1048,7 +1048,7 @@ export default Vue.extend({
]
}

const response = await this.showSaveDialog(options)
const response = await this.showSaveDialog({ options })
if (response.canceled || response.filePath === '') {
// User canceled the save dialog
return
Expand Down Expand Up @@ -1220,7 +1220,7 @@ export default Vue.extend({
]
}

const response = await this.showSaveDialog(options)
const response = await this.showSaveDialog({ options })
if (response.canceled || response.filePath === '') {
// User canceled the save dialog
return
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/ft-slider/ft-slider.css
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
}

.pure-material-slider > input:disabled + span {
color: rgba(var(--pure-material-onsurface-rgb, 0, 0, 0), 0.38);
opacity: 0.38;
}

/* Webkit | Track */
Expand Down
4 changes: 4 additions & 0 deletions src/renderer/components/ft-slider/ft-slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ export default Vue.extend({
valueExtension: {
type: String,
default: null
},
disabled: {
type: Boolean,
default: false
}
},
data: function () {
Expand Down
3 changes: 2 additions & 1 deletion src/renderer/components/ft-slider/ft-slider.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
<input
:id="id"
v-model.number="currentValue"
:disabled="disabled"
type="range"
:min="minValue"
:max="maxValue"
:step="step"
@change="$emit('change', $event.target.value)"
@change="$emit('change', currentValue)"
>
<span>
{{ label }}:
Expand Down
Loading