Skip to content

Commit

Permalink
Merge branch 'development' of github.com:FreeTubeApp/FreeTube into fe…
Browse files Browse the repository at this point in the history
…at/preferred-viewing-mode
  • Loading branch information
kommunarr committed Jan 14, 2025
2 parents b82daca + d7e2a76 commit 5aa0900
Show file tree
Hide file tree
Showing 65 changed files with 991 additions and 609 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/flatpak.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,22 +77,22 @@ jobs:
date +"%Y-%m-%d" >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
- name: Update x64 File Location in yml File
uses: mikefarah/yq@v4.44.6
uses: mikefarah/yq@v4.45.1
with:
# The Command which should be run
cmd: yq -i '.modules[0].sources[0].url = "https://github.com/FreeTubeApp/FreeTube/releases/download/v${{ steps.sub.outputs.result }}-beta/freetube-${{ steps.sub.outputs.result }}-linux-x64-portable.zip"' io.freetubeapp.FreeTube.yml
- name: Update x64 Hash in yml File
uses: mikefarah/yq@v4.44.6
uses: mikefarah/yq@v4.45.1
with:
# The Command which should be run
cmd: yq -i '.modules[0].sources[0].sha256 = "${{ env.HASH_X64 }}"' io.freetubeapp.FreeTube.yml
- name: Update ARM File Location in yml File
uses: mikefarah/yq@v4.44.6
uses: mikefarah/yq@v4.45.1
with:
# The Command which should be run
cmd: yq -i '.modules[0].sources[1].url = "https://github.com/FreeTubeApp/FreeTube/releases/download/v${{ steps.sub.outputs.result }}-beta/freetube-${{ steps.sub.outputs.result }}-linux-arm64-portable.zip"' io.freetubeapp.FreeTube.yml
- name: Update ARM Hash in yml File
uses: mikefarah/yq@v4.44.6
uses: mikefarah/yq@v4.45.1
with:
# The Command which should be run
cmd: yq -i '.modules[0].sources[1].sha256 = "${{ env.HASH_ARM64 }}"' io.freetubeapp.FreeTube.yml
Expand Down
15 changes: 7 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,12 @@
"autolinker": "^4.1.0",
"bgutils-js": "^3.1.2",
"electron-context-menu": "^4.0.4",
"lodash.debounce": "^4.0.8",
"marked": "^15.0.5",
"marked": "^15.0.6",
"path-browserify": "^1.0.1",
"portal-vue": "^2.1.7",
"process": "^0.11.10",
"shaka-player": "^4.12.5",
"swiper": "^11.2.0",
"shaka-player": "^4.12.7",
"swiper": "^11.2.1",
"vue": "^2.7.16",
"vue-i18n": "^8.28.2",
"vue-observe-visibility": "^1.0.0",
Expand All @@ -83,15 +82,15 @@
"@babel/plugin-transform-class-properties": "^7.25.9",
"@babel/preset-env": "^7.26.0",
"@double-great/stylelint-a11y": "^3.0.2",
"@eslint/js": "^9.17.0",
"@eslint/js": "^9.18.0",
"@intlify/eslint-plugin-vue-i18n": "^3.2.0",
"babel-loader": "^9.2.1",
"copy-webpack-plugin": "^12.0.2",
"css-loader": "^7.1.2",
"css-minimizer-webpack-plugin": "^7.0.0",
"electron": "^33.2.1",
"electron": "^33.3.1",
"electron-builder": "^25.1.8",
"eslint": "^9.17.0",
"eslint": "^9.18.0",
"eslint-plugin-jsdoc": "^50.6.1",
"eslint-plugin-jsonc": "^2.18.2",
"eslint-plugin-unicorn": "^56.0.1",
Expand All @@ -102,7 +101,7 @@
"html-webpack-plugin": "^5.6.3",
"js-yaml": "^4.1.0",
"json-minimizer-webpack-plugin": "^5.0.0",
"lefthook": "^1.10.1",
"lefthook": "^1.10.3",
"mini-css-extract-plugin": "^2.9.2",
"neostandard": "^0.12.0",
"npm-run-all2": "^7.0.2",
Expand Down
32 changes: 28 additions & 4 deletions src/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,25 @@ import { generatePoToken } from './poTokenGenerator'
const brotliDecompressAsync = promisify(brotliDecompress)

if (process.argv.includes('--version')) {
console.log(`v${packageDetails.version} Beta`) // eslint-disable-line no-console
app.exit()
} else if (process.argv.includes('--help') || process.argv.includes('-h')) {
printHelp()
app.exit()
} else {
runApp()
}

function printHelp() {
// eslint-disable-next-line no-console
console.log(`\
usage: ${process.argv0} [options...] [url]
Options:
--help, -h show this message, then exit
--version print the current version, then exit
--new-window reuse an existing instance if possible`)
}

function runApp() {
/** @type {Set<string>} */
let ALLOWED_RENDERER_FILES
Expand Down Expand Up @@ -246,14 +260,24 @@ function runApp() {
}

app.on('second-instance', (_, commandLine, __) => {
// Someone tried to run a second instance, we should focus our window
// Someone tried to run a second instance
if (typeof commandLine !== 'undefined') {
const url = getLinkUrl(commandLine)
if (mainWindow && mainWindow.webContents) {
if (mainWindow.isMinimized()) mainWindow.restore()
mainWindow.focus()
if (commandLine.includes('--new-window')) {
// The user wants to create a new window in the existing instance
if (url) startupUrl = url
createWindow({
showWindowNow: true,
replaceMainWindow: true,
})
} else {
// Just focus the main window (instead of starting a new instance)
if (mainWindow.isMinimized()) mainWindow.restore()
mainWindow.focus()

if (url) mainWindow.webContents.send(IpcChannels.OPEN_URL, url)
if (url) mainWindow.webContents.send(IpcChannels.OPEN_URL, url)
}
} else {
if (url) startupUrl = url
createWindow()
Expand Down
8 changes: 7 additions & 1 deletion src/renderer/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,18 @@
user-select: unset;
}

.changeLogTitle {
padding-inline: 16px;
overflow-wrap: break-word;
margin-block-end: 16px;
}

.changeLogText {
overflow-y: scroll;
block-size: 40vh;
display: block;
padding-inline: 16px;
margin-block: 16px;
margin-block-end: 16px;
overflow-wrap: break-word;
}

Expand Down
4 changes: 2 additions & 2 deletions src/renderer/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import FtFlexBox from './components/ft-flex-box/ft-flex-box.vue'
import TopNav from './components/top-nav/top-nav.vue'
import SideNav from './components/SideNav/SideNav.vue'
import FtNotificationBanner from './components/ft-notification-banner/ft-notification-banner.vue'
import FtPrompt from './components/ft-prompt/ft-prompt.vue'
import FtPrompt from './components/FtPrompt/FtPrompt.vue'
import FtButton from './components/ft-button/ft-button.vue'
import FtToast from './components/ft-toast/ft-toast.vue'
import FtProgressBar from './components/FtProgressBar/FtProgressBar.vue'
Expand Down Expand Up @@ -261,7 +261,7 @@ export default defineComponent({
.replaceAll(/https:\/\/github\.com\/FreeTubeApp\/FreeTube\/pull\/(\d+)/g, '[#$1]($&)')

// Add the title
changelog = `# ${json[0].name}\n${changelog}`
changelog = `${changelog}`

this.updateChangelog = marked.parse(changelog)
this.changeLogTitle = json[0].name
Expand Down
9 changes: 8 additions & 1 deletion src/renderer/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,17 @@
/>
<ft-prompt
v-if="showReleaseNotes"
:label="changeLogTitle"
theme="readable-width"
@click="showReleaseNotes = !showReleaseNotes"
>
<template #label="{ labelId }">
<h1
:id="labelId"
class="changeLogTitle"
>
{{ changeLogTitle }}
</h1>
</template>
<span
class="changeLogText"
lang="en"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import { onMounted, ref } from 'vue'
import FtSettingsSection from '../FtSettingsSection/FtSettingsSection.vue'
import FtFlexBox from '../ft-flex-box/ft-flex-box.vue'
import FtToggleSwitch from '../ft-toggle-switch/ft-toggle-switch.vue'
import FtPrompt from '../ft-prompt/ft-prompt.vue'
import FtPrompt from '../FtPrompt/FtPrompt.vue'
import { IpcChannels } from '../../../constants'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,20 @@
:label="$t('KeyboardShortcutPrompt.Keyboard Shortcuts')"
@click="hideKeyboardShortcutPrompt"
>
<div class="titleAndCloseButton">
<h2>
{{ $t('KeyboardShortcutPrompt.Keyboard Shortcuts') }}
</h2>
<FtIconButton
:title="$t('Close')"
:icon="['fas', 'xmark']"
theme="destructive"
@click="hideKeyboardShortcutPrompt"
/>
</div>
<template #label="{ labelId }">
<div class="titleAndCloseButton">
<h2 :id="labelId">
{{ $t('KeyboardShortcutPrompt.Keyboard Shortcuts') }}
</h2>
<FtIconButton
:title="$t('Close')"
:icon="['fas', 'xmark']"
theme="destructive"
@click="hideKeyboardShortcutPrompt"
/>
</div>
</template>

<div
v-if="primarySections"
class="primarySections"
Expand Down Expand Up @@ -58,7 +61,7 @@
import { computed } from 'vue'
import { KeyboardShortcuts } from '../../../constants'
import { getLocalizedShortcut } from '../../helpers/utils'
import FtPrompt from '../ft-prompt/ft-prompt.vue'
import FtPrompt from '../FtPrompt/FtPrompt.vue'
import store from '../../store/index'
import { useI18n } from '../../composables/use-i18n-polyfill'
import FtIconButton from '../ft-icon-button/ft-icon-button.vue'
Expand Down
Loading

0 comments on commit 5aa0900

Please sign in to comment.