Skip to content

Commit

Permalink
Merge pull request #13703 from nextcloud/backport/13658/stable30.0
Browse files Browse the repository at this point in the history
[stable30.0] fix(chat): Edit last message hotkey on macOS
  • Loading branch information
ShGKme authored Nov 6, 2024
2 parents 5355eb0 + 9ccba0c commit efc116f
Show file tree
Hide file tree
Showing 13 changed files with 36 additions and 10 deletions.
14 changes: 14 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
"@nextcloud/stylelint-config": "^3.0.1",
"@nextcloud/webpack-vue-config": "^6.2.0",
"@types/jest": "^29.5.13",
"@types/ua-parser-js": "^0.7.39",
"@vue/test-utils": "^1.3.6",
"@vue/tsconfig": "^0.5.1",
"@vue/vue2-jest": "^29.2.6",
Expand Down
2 changes: 1 addition & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ import { EventBus } from './services/EventBus.js'
import { leaveConversationSync } from './services/participantsService.js'
import { useFederationStore } from './stores/federation.ts'
import { useSidebarStore } from './stores/sidebar.js'
import { checkBrowser } from './utils/browserCheck.js'
import { checkBrowser } from './utils/browserCheck.ts'
import { signalingKill } from './utils/webrtc/index.js'
export default {
Expand Down
2 changes: 1 addition & 1 deletion src/FilesSidebarTabApp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import { getFileConversation } from './services/filesIntegrationServices.js'
import {
leaveConversationSync,
} from './services/participantsService.js'
import { checkBrowser } from './utils/browserCheck.js'
import { checkBrowser } from './utils/browserCheck.ts'
import CancelableRequest from './utils/cancelableRequest.js'
import { signalingKill } from './utils/webrtc/index.js'
Expand Down
2 changes: 1 addition & 1 deletion src/PublicShareAuthRequestPasswordButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import { t } from '@nextcloud/l10n'
import NcButton from '@nextcloud/vue/dist/Components/NcButton.js'
import { getPublicShareAuthConversationToken } from './services/publicShareAuthService.js'
import { checkBrowser } from './utils/browserCheck.js'
import { checkBrowser } from './utils/browserCheck.ts'
export default {
Expand Down
2 changes: 1 addition & 1 deletion src/PublicShareSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ import { getPublicShareConversationData } from './services/filesIntegrationServi
import {
leaveConversationSync,
} from './services/participantsService.js'
import { checkBrowser } from './utils/browserCheck.js'
import { checkBrowser } from './utils/browserCheck.ts'
import { signalingKill } from './utils/webrtc/index.js'
export default {
Expand Down
1 change: 1 addition & 0 deletions src/components/NewMessage/NewMessage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
dir="auto"
@keydown.esc="handleInputEsc"
@keydown.ctrl.up="handleEditLastMessage"
@keydown.meta.up="handleEditLastMessage"
@input="handleTyping"
@paste="handlePastedFiles"
@submit="handleSubmit" />
Expand Down
7 changes: 5 additions & 2 deletions src/components/SettingsDialog/SettingsDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
</dd>
</div>
<div>
<dt><kbd>Ctrl</kbd> + <kbd>↑</kbd></dt>
<dt><kbd>{{ CmdOrCtrl }}</kbd> + <kbd>↑</kbd></dt>
<dd class="shortcut-description">
{{ t('spreed', 'Edit your last message') }}
</dd>
Expand All @@ -148,7 +148,7 @@
</dd>
</div>
<div>
<dt><kbd>Ctrl</kbd> + <kbd>F</kbd></dt>
<dt><kbd>{{ CmdOrCtrl }}</kbd> + <kbd>F</kbd></dt>
<dd class="shortcut-description">
{{ t('spreed', 'Search') }}
</dd>
Expand Down Expand Up @@ -210,6 +210,7 @@ import { getTalkConfig } from '../../services/CapabilitiesManager.ts'
import { useCustomSettings } from '../../services/SettingsAPI.ts'
import { useSettingsStore } from '../../stores/settings.js'
import { useSoundsStore } from '../../stores/sounds.js'
import { isMac } from '../../utils/browserCheck.ts'
import { satisfyVersion } from '../../utils/satisfyVersion.ts'
const serverVersion = loadState('core', 'config', {}).version ?? '29.0.0.0'
Expand Down Expand Up @@ -237,8 +238,10 @@ export default {
const soundsStore = useSoundsStore()
const { customSettingsSections } = useCustomSettings()
const isBackgroundBlurred = ref(isBackgroundBlurredState)
const CmdOrCtrl = isMac ? 'Cmd' : 'Ctrl'
return {
CmdOrCtrl,
settingsStore,
soundsStore,
supportTypingStatus,
Expand Down
2 changes: 1 addition & 1 deletion src/components/TopBar/CallButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ import { useBreakoutRoomsStore } from '../../stores/breakoutRooms.ts'
import { useSettingsStore } from '../../stores/settings.js'
import { useSoundsStore } from '../../stores/sounds.js'
import { useTalkHashStore } from '../../stores/talkHash.js'
import { blockCalls, unsupportedWarning } from '../../utils/browserCheck.js'
import { blockCalls, unsupportedWarning } from '../../utils/browserCheck.ts'
export default {
name: 'CallButton',
Expand Down
7 changes: 7 additions & 0 deletions src/utils/browserCheck.js → src/utils/browserCheck.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ import { t } from '@nextcloud/l10n'

const parser = new UAParser()
const browser = parser.getBrowser()
const os = parser.getOS()

/**
* Per-OS flags
*/

export const isMac = os.name === 'Mac OS'

/**
* Per-browser flags and a major version
Expand Down
2 changes: 1 addition & 1 deletion src/utils/media/pipeline/MediaDevicesSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

import TrackSource from './TrackSource.js'
import { isChromium } from '../../browserCheck.js'
import { isChromium } from '../../browserCheck.ts'
import { mediaDevicesManager } from '../../webrtc/index.js'

/**
Expand Down
2 changes: 1 addition & 1 deletion src/utils/webrtc/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import BrowserStorage from '../../services/BrowserStorage.js'
import { getTalkConfig } from '../../services/CapabilitiesManager.ts'
import { fetchSignalingSettings } from '../../services/signalingService.js'
import store from '../../store/index.js'
import { isSafari } from '../browserCheck.js'
import { isSafari } from '../browserCheck.ts'
import CancelableRequest from '../cancelableRequest.js'
import Signaling from '../signaling.js'
import SignalingTypingHandler from '../SignalingTypingHandler.js'
Expand Down
2 changes: 1 addition & 1 deletion src/utils/webrtc/simplewebrtc/peer.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import adapter from 'webrtc-adapter'
import webrtcSupport from 'webrtcsupport'
import WildEmitter from 'wildemitter'

import { isSafari } from '../../../utils/browserCheck.js'
import { isSafari } from '../../browserCheck.ts'

/**
* @param {object} stream the stream object.
Expand Down

0 comments on commit efc116f

Please sign in to comment.