2020-02-16 19:30:00 +01:00
|
|
|
// import the styles
|
|
|
|
import Vue from 'vue'
|
|
|
|
import App from './App.vue'
|
|
|
|
import router from './router/index'
|
|
|
|
import store from './store/index'
|
2021-06-20 03:40:40 +02:00
|
|
|
import i18n from './i18n/index'
|
2020-02-16 19:30:00 +01:00
|
|
|
import { library } from '@fortawesome/fontawesome-svg-core'
|
2023-12-08 20:24:08 +01:00
|
|
|
|
2023-12-16 14:50:09 +01:00
|
|
|
import { register as registerSwiper } from 'swiper/element'
|
2023-12-08 20:24:08 +01:00
|
|
|
|
2023-08-29 07:06:42 +02:00
|
|
|
// Please keep the list of constants sorted by name
|
|
|
|
// to avoid code conflict and duplicate entries
|
2022-09-06 04:29:10 +02:00
|
|
|
import {
|
|
|
|
faAngleDown,
|
2023-11-22 18:19:11 +01:00
|
|
|
faAngleUp,
|
2022-09-06 04:29:10 +02:00
|
|
|
faArrowDown,
|
|
|
|
faArrowLeft,
|
|
|
|
faArrowRight,
|
|
|
|
faBars,
|
|
|
|
faBookmark,
|
|
|
|
faCheck,
|
2022-09-29 22:01:54 +02:00
|
|
|
faChevronRight,
|
2023-03-01 01:39:33 +01:00
|
|
|
faCircleUser,
|
2022-09-06 04:29:10 +02:00
|
|
|
faClone,
|
Channel community page (#1568)
* Comunity page strings, Communtiy tab, Community initial API call
Added:
1) Community page strings - the first few strings are now available
2) Community tab - A clickable tab is now displayed on channel pages
3) Community initial API call - on loading the page, the initial access
* Comunity page strings, Communtiy tab, Community initial API call
Added:
1) Community page strings - the first few strings are now available
2) Community tab - A clickable tab is now displayed on channel pages
3) Community initial API call - on loading the page, the initial access
* Data returning added
* Comunity page strings, Communtiy tab, Community initial API call
Added:
1) Community page strings - the first few strings are now available
2) Community tab - A clickable tab is now displayed on channel pages
3) Community initial API call - on loading the page, the initial access
* Data returning added
* Images are now displayed in the community tab
* Comunity page strings, Communtiy tab, Community initial API call
Added:
1) Community page strings - the first few strings are now available
2) Community tab - A clickable tab is now displayed on channel pages
3) Community initial API call - on loading the page, the initial access
* Data returning added
* Images are now displayed in the community tab
* Added primitive video display
* Current changes
* Added preston's change with the ftcard and started on some layout basics
* Created Community Post Component and added fetch more button + functionality
* Fixed problem with videothumbnails not loading and adjusted their height to 100% in the ft-list sass file
* Added poll and ft-list-video to the community page
* Added author name placeholder (missing in module), the published date, the likes and dislikes as well as comment counts to posts. Additionally scaling of images was added
* Added basis for community page playlists
* Finalized a setup for playlists when wide enough
* Fix for missing key in custom list
* Added publish date translation
* Add empty alt tags
Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com>
* fix accessibility issue
Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com>
* change: ununique ids to classes
* add missing alt tag
* Redirect channel/id/community to the channel's community tab
* update yt-channel-info
* update to 3.0.1
* Update yarn.lock
* add basic multiImage support
* use tiny-slider for multiImage community posts
* update getChannelCommunityPostsMore
* Update yarn.lock
* fix yarn lock
* swap community and about tab
* Update yarn.lock
* Fix missing comma
* Removed trailing spaces
* Clearing all community post data when changing to another channel
* Restructuring of how the post cards are added, Empty page text,
ft-element-list props customization
1) Now the community page uses the same setup of ft-element-list as the
other pages on the channel.
2) If no posts are available, now it displays a message saying so
3) The ft-element-list component's display style can now be forced into
a certain display mode (list/grid) with the new prop. It will overwrite
the corresponding default value for list display
* Fixed display text path
* Fix lint"
* Adjusted css to fit to new layout
* Final touches community page to tidy up the console
* fix icons, fix linter
* fix hiding showmore button for community page
* fix showToast calls
* change all this.showToast to showToaast
* reinstall tinyslider
* use helpers
* small fixes
* fix: getting continuation of community posts
* remove unused code
* improve slider style import
* fix hiding 'ShowMore' button
* fix weird typo in css
* add invidous community tab support
* remove console testing code
* Apply suggestions from code review
Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>
* implement suggestions, improve thumbnail replacement
* use flip horizontal
* readd invidious fallback code, remove author name workaround
* replace another google domain when using invidious
* suppport invidious multiImage posts
* Use youtube.js for community posts
* add invidious polls, remove support for fetching more
* reorder icons alpabetically
* re-allow loading more when using localapi
* fix styling of multiImage, hide NA text
* fix loading playlist
* fix spacing of items
* fix issue with direct url to community tab
* make review recommendations
Co-Authored-By: absidue <48293849+absidue@users.noreply.github.com>
* fix displaying selected tab, get best quality image
---------
Co-authored-by: Preston <freetubeapp@protonmail.com>
Co-authored-by: ChunkyProgrammer <78101139+ChunkyProgrammer@users.noreply.github.com>
Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com>
Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>
2023-03-04 09:56:04 +01:00
|
|
|
faComment,
|
2022-09-06 04:29:10 +02:00
|
|
|
faCommentDots,
|
|
|
|
faCopy,
|
|
|
|
faDownload,
|
|
|
|
faEllipsisH,
|
|
|
|
faEllipsisV,
|
|
|
|
faEnvelope,
|
|
|
|
faExchangeAlt,
|
|
|
|
faExclamationCircle,
|
|
|
|
faExternalLinkAlt,
|
2023-08-29 07:06:42 +02:00
|
|
|
faEye,
|
|
|
|
faEyeSlash,
|
2022-09-06 04:29:10 +02:00
|
|
|
faFileDownload,
|
|
|
|
faFileVideo,
|
|
|
|
faFilter,
|
|
|
|
faFire,
|
|
|
|
faGlobe,
|
2023-09-09 18:32:59 +02:00
|
|
|
faHashtag,
|
2022-09-06 04:29:10 +02:00
|
|
|
faHeart,
|
|
|
|
faHistory,
|
|
|
|
faInfoCircle,
|
|
|
|
faLanguage,
|
|
|
|
faList,
|
|
|
|
faNewspaper,
|
2023-09-07 03:28:21 +02:00
|
|
|
faPause,
|
2022-09-06 04:29:10 +02:00
|
|
|
faPlay,
|
|
|
|
faQuestionCircle,
|
|
|
|
faRandom,
|
|
|
|
faRetweet,
|
|
|
|
faRss,
|
|
|
|
faSatelliteDish,
|
|
|
|
faSearch,
|
|
|
|
faShareAlt,
|
|
|
|
faSlidersH,
|
|
|
|
faSortDown,
|
|
|
|
faStar,
|
|
|
|
faStepBackward,
|
|
|
|
faStepForward,
|
|
|
|
faSync,
|
Channel community page (#1568)
* Comunity page strings, Communtiy tab, Community initial API call
Added:
1) Community page strings - the first few strings are now available
2) Community tab - A clickable tab is now displayed on channel pages
3) Community initial API call - on loading the page, the initial access
* Comunity page strings, Communtiy tab, Community initial API call
Added:
1) Community page strings - the first few strings are now available
2) Community tab - A clickable tab is now displayed on channel pages
3) Community initial API call - on loading the page, the initial access
* Data returning added
* Comunity page strings, Communtiy tab, Community initial API call
Added:
1) Community page strings - the first few strings are now available
2) Community tab - A clickable tab is now displayed on channel pages
3) Community initial API call - on loading the page, the initial access
* Data returning added
* Images are now displayed in the community tab
* Comunity page strings, Communtiy tab, Community initial API call
Added:
1) Community page strings - the first few strings are now available
2) Community tab - A clickable tab is now displayed on channel pages
3) Community initial API call - on loading the page, the initial access
* Data returning added
* Images are now displayed in the community tab
* Added primitive video display
* Current changes
* Added preston's change with the ftcard and started on some layout basics
* Created Community Post Component and added fetch more button + functionality
* Fixed problem with videothumbnails not loading and adjusted their height to 100% in the ft-list sass file
* Added poll and ft-list-video to the community page
* Added author name placeholder (missing in module), the published date, the likes and dislikes as well as comment counts to posts. Additionally scaling of images was added
* Added basis for community page playlists
* Finalized a setup for playlists when wide enough
* Fix for missing key in custom list
* Added publish date translation
* Add empty alt tags
Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com>
* fix accessibility issue
Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com>
* change: ununique ids to classes
* add missing alt tag
* Redirect channel/id/community to the channel's community tab
* update yt-channel-info
* update to 3.0.1
* Update yarn.lock
* add basic multiImage support
* use tiny-slider for multiImage community posts
* update getChannelCommunityPostsMore
* Update yarn.lock
* fix yarn lock
* swap community and about tab
* Update yarn.lock
* Fix missing comma
* Removed trailing spaces
* Clearing all community post data when changing to another channel
* Restructuring of how the post cards are added, Empty page text,
ft-element-list props customization
1) Now the community page uses the same setup of ft-element-list as the
other pages on the channel.
2) If no posts are available, now it displays a message saying so
3) The ft-element-list component's display style can now be forced into
a certain display mode (list/grid) with the new prop. It will overwrite
the corresponding default value for list display
* Fixed display text path
* Fix lint"
* Adjusted css to fit to new layout
* Final touches community page to tidy up the console
* fix icons, fix linter
* fix hiding showmore button for community page
* fix showToast calls
* change all this.showToast to showToaast
* reinstall tinyslider
* use helpers
* small fixes
* fix: getting continuation of community posts
* remove unused code
* improve slider style import
* fix hiding 'ShowMore' button
* fix weird typo in css
* add invidous community tab support
* remove console testing code
* Apply suggestions from code review
Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>
* implement suggestions, improve thumbnail replacement
* use flip horizontal
* readd invidious fallback code, remove author name workaround
* replace another google domain when using invidious
* suppport invidious multiImage posts
* Use youtube.js for community posts
* add invidious polls, remove support for fetching more
* reorder icons alpabetically
* re-allow loading more when using localapi
* fix styling of multiImage, hide NA text
* fix loading playlist
* fix spacing of items
* fix issue with direct url to community tab
* make review recommendations
Co-Authored-By: absidue <48293849+absidue@users.noreply.github.com>
* fix displaying selected tab, get best quality image
---------
Co-authored-by: Preston <freetubeapp@protonmail.com>
Co-authored-by: ChunkyProgrammer <78101139+ChunkyProgrammer@users.noreply.github.com>
Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com>
Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>
2023-03-04 09:56:04 +01:00
|
|
|
faThumbsDown,
|
2022-09-06 04:29:10 +02:00
|
|
|
faThumbsUp,
|
|
|
|
faThumbtack,
|
|
|
|
faTimes,
|
|
|
|
faTimesCircle,
|
2023-08-24 22:26:31 +02:00
|
|
|
faUsers,
|
2022-09-06 04:29:10 +02:00
|
|
|
} from '@fortawesome/free-solid-svg-icons'
|
2023-01-20 12:00:07 +01:00
|
|
|
import {
|
|
|
|
faBitcoin,
|
|
|
|
faGithub,
|
|
|
|
faMastodon,
|
|
|
|
faMonero
|
|
|
|
} from '@fortawesome/free-brands-svg-icons'
|
2020-02-16 19:30:00 +01:00
|
|
|
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
|
|
|
|
|
2022-11-05 15:44:21 +01:00
|
|
|
Vue.config.devtools = process.env.NODE_ENV === 'development'
|
|
|
|
Vue.config.performance = process.env.NODE_ENV === 'development'
|
|
|
|
Vue.config.productionTip = process.env.NODE_ENV === 'development'
|
2020-02-16 19:30:00 +01:00
|
|
|
|
2023-08-29 07:06:42 +02:00
|
|
|
// Please keep the list of constants sorted by name
|
|
|
|
// to avoid code conflict and duplicate entries
|
2022-09-06 04:29:10 +02:00
|
|
|
library.add(
|
|
|
|
// solid icons
|
|
|
|
faAngleDown,
|
2023-11-22 18:19:11 +01:00
|
|
|
faAngleUp,
|
2022-09-06 04:29:10 +02:00
|
|
|
faArrowDown,
|
|
|
|
faArrowLeft,
|
|
|
|
faArrowRight,
|
|
|
|
faBars,
|
|
|
|
faBookmark,
|
|
|
|
faCheck,
|
2022-09-29 22:01:54 +02:00
|
|
|
faChevronRight,
|
2023-03-01 01:39:33 +01:00
|
|
|
faCircleUser,
|
2022-09-06 04:29:10 +02:00
|
|
|
faClone,
|
Channel community page (#1568)
* Comunity page strings, Communtiy tab, Community initial API call
Added:
1) Community page strings - the first few strings are now available
2) Community tab - A clickable tab is now displayed on channel pages
3) Community initial API call - on loading the page, the initial access
* Comunity page strings, Communtiy tab, Community initial API call
Added:
1) Community page strings - the first few strings are now available
2) Community tab - A clickable tab is now displayed on channel pages
3) Community initial API call - on loading the page, the initial access
* Data returning added
* Comunity page strings, Communtiy tab, Community initial API call
Added:
1) Community page strings - the first few strings are now available
2) Community tab - A clickable tab is now displayed on channel pages
3) Community initial API call - on loading the page, the initial access
* Data returning added
* Images are now displayed in the community tab
* Comunity page strings, Communtiy tab, Community initial API call
Added:
1) Community page strings - the first few strings are now available
2) Community tab - A clickable tab is now displayed on channel pages
3) Community initial API call - on loading the page, the initial access
* Data returning added
* Images are now displayed in the community tab
* Added primitive video display
* Current changes
* Added preston's change with the ftcard and started on some layout basics
* Created Community Post Component and added fetch more button + functionality
* Fixed problem with videothumbnails not loading and adjusted their height to 100% in the ft-list sass file
* Added poll and ft-list-video to the community page
* Added author name placeholder (missing in module), the published date, the likes and dislikes as well as comment counts to posts. Additionally scaling of images was added
* Added basis for community page playlists
* Finalized a setup for playlists when wide enough
* Fix for missing key in custom list
* Added publish date translation
* Add empty alt tags
Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com>
* fix accessibility issue
Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com>
* change: ununique ids to classes
* add missing alt tag
* Redirect channel/id/community to the channel's community tab
* update yt-channel-info
* update to 3.0.1
* Update yarn.lock
* add basic multiImage support
* use tiny-slider for multiImage community posts
* update getChannelCommunityPostsMore
* Update yarn.lock
* fix yarn lock
* swap community and about tab
* Update yarn.lock
* Fix missing comma
* Removed trailing spaces
* Clearing all community post data when changing to another channel
* Restructuring of how the post cards are added, Empty page text,
ft-element-list props customization
1) Now the community page uses the same setup of ft-element-list as the
other pages on the channel.
2) If no posts are available, now it displays a message saying so
3) The ft-element-list component's display style can now be forced into
a certain display mode (list/grid) with the new prop. It will overwrite
the corresponding default value for list display
* Fixed display text path
* Fix lint"
* Adjusted css to fit to new layout
* Final touches community page to tidy up the console
* fix icons, fix linter
* fix hiding showmore button for community page
* fix showToast calls
* change all this.showToast to showToaast
* reinstall tinyslider
* use helpers
* small fixes
* fix: getting continuation of community posts
* remove unused code
* improve slider style import
* fix hiding 'ShowMore' button
* fix weird typo in css
* add invidous community tab support
* remove console testing code
* Apply suggestions from code review
Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>
* implement suggestions, improve thumbnail replacement
* use flip horizontal
* readd invidious fallback code, remove author name workaround
* replace another google domain when using invidious
* suppport invidious multiImage posts
* Use youtube.js for community posts
* add invidious polls, remove support for fetching more
* reorder icons alpabetically
* re-allow loading more when using localapi
* fix styling of multiImage, hide NA text
* fix loading playlist
* fix spacing of items
* fix issue with direct url to community tab
* make review recommendations
Co-Authored-By: absidue <48293849+absidue@users.noreply.github.com>
* fix displaying selected tab, get best quality image
---------
Co-authored-by: Preston <freetubeapp@protonmail.com>
Co-authored-by: ChunkyProgrammer <78101139+ChunkyProgrammer@users.noreply.github.com>
Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com>
Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>
2023-03-04 09:56:04 +01:00
|
|
|
faComment,
|
2022-09-06 04:29:10 +02:00
|
|
|
faCommentDots,
|
|
|
|
faCopy,
|
|
|
|
faDownload,
|
|
|
|
faEllipsisH,
|
|
|
|
faEllipsisV,
|
|
|
|
faEnvelope,
|
|
|
|
faExchangeAlt,
|
|
|
|
faExclamationCircle,
|
|
|
|
faExternalLinkAlt,
|
2023-08-29 07:06:42 +02:00
|
|
|
faEye,
|
|
|
|
faEyeSlash,
|
2022-09-06 04:29:10 +02:00
|
|
|
faFileDownload,
|
|
|
|
faFileVideo,
|
|
|
|
faFilter,
|
|
|
|
faFire,
|
|
|
|
faGlobe,
|
2023-09-09 18:32:59 +02:00
|
|
|
faHashtag,
|
2022-09-06 04:29:10 +02:00
|
|
|
faHeart,
|
|
|
|
faHistory,
|
|
|
|
faInfoCircle,
|
|
|
|
faLanguage,
|
|
|
|
faList,
|
|
|
|
faNewspaper,
|
2023-09-07 03:28:21 +02:00
|
|
|
faPause,
|
2022-09-06 04:29:10 +02:00
|
|
|
faPlay,
|
|
|
|
faQuestionCircle,
|
|
|
|
faRandom,
|
|
|
|
faRetweet,
|
|
|
|
faRss,
|
|
|
|
faSatelliteDish,
|
|
|
|
faSearch,
|
|
|
|
faShareAlt,
|
|
|
|
faSlidersH,
|
|
|
|
faSortDown,
|
|
|
|
faStar,
|
|
|
|
faStepBackward,
|
|
|
|
faStepForward,
|
|
|
|
faSync,
|
Channel community page (#1568)
* Comunity page strings, Communtiy tab, Community initial API call
Added:
1) Community page strings - the first few strings are now available
2) Community tab - A clickable tab is now displayed on channel pages
3) Community initial API call - on loading the page, the initial access
* Comunity page strings, Communtiy tab, Community initial API call
Added:
1) Community page strings - the first few strings are now available
2) Community tab - A clickable tab is now displayed on channel pages
3) Community initial API call - on loading the page, the initial access
* Data returning added
* Comunity page strings, Communtiy tab, Community initial API call
Added:
1) Community page strings - the first few strings are now available
2) Community tab - A clickable tab is now displayed on channel pages
3) Community initial API call - on loading the page, the initial access
* Data returning added
* Images are now displayed in the community tab
* Comunity page strings, Communtiy tab, Community initial API call
Added:
1) Community page strings - the first few strings are now available
2) Community tab - A clickable tab is now displayed on channel pages
3) Community initial API call - on loading the page, the initial access
* Data returning added
* Images are now displayed in the community tab
* Added primitive video display
* Current changes
* Added preston's change with the ftcard and started on some layout basics
* Created Community Post Component and added fetch more button + functionality
* Fixed problem with videothumbnails not loading and adjusted their height to 100% in the ft-list sass file
* Added poll and ft-list-video to the community page
* Added author name placeholder (missing in module), the published date, the likes and dislikes as well as comment counts to posts. Additionally scaling of images was added
* Added basis for community page playlists
* Finalized a setup for playlists when wide enough
* Fix for missing key in custom list
* Added publish date translation
* Add empty alt tags
Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com>
* fix accessibility issue
Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com>
* change: ununique ids to classes
* add missing alt tag
* Redirect channel/id/community to the channel's community tab
* update yt-channel-info
* update to 3.0.1
* Update yarn.lock
* add basic multiImage support
* use tiny-slider for multiImage community posts
* update getChannelCommunityPostsMore
* Update yarn.lock
* fix yarn lock
* swap community and about tab
* Update yarn.lock
* Fix missing comma
* Removed trailing spaces
* Clearing all community post data when changing to another channel
* Restructuring of how the post cards are added, Empty page text,
ft-element-list props customization
1) Now the community page uses the same setup of ft-element-list as the
other pages on the channel.
2) If no posts are available, now it displays a message saying so
3) The ft-element-list component's display style can now be forced into
a certain display mode (list/grid) with the new prop. It will overwrite
the corresponding default value for list display
* Fixed display text path
* Fix lint"
* Adjusted css to fit to new layout
* Final touches community page to tidy up the console
* fix icons, fix linter
* fix hiding showmore button for community page
* fix showToast calls
* change all this.showToast to showToaast
* reinstall tinyslider
* use helpers
* small fixes
* fix: getting continuation of community posts
* remove unused code
* improve slider style import
* fix hiding 'ShowMore' button
* fix weird typo in css
* add invidous community tab support
* remove console testing code
* Apply suggestions from code review
Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>
* implement suggestions, improve thumbnail replacement
* use flip horizontal
* readd invidious fallback code, remove author name workaround
* replace another google domain when using invidious
* suppport invidious multiImage posts
* Use youtube.js for community posts
* add invidious polls, remove support for fetching more
* reorder icons alpabetically
* re-allow loading more when using localapi
* fix styling of multiImage, hide NA text
* fix loading playlist
* fix spacing of items
* fix issue with direct url to community tab
* make review recommendations
Co-Authored-By: absidue <48293849+absidue@users.noreply.github.com>
* fix displaying selected tab, get best quality image
---------
Co-authored-by: Preston <freetubeapp@protonmail.com>
Co-authored-by: ChunkyProgrammer <78101139+ChunkyProgrammer@users.noreply.github.com>
Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com>
Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>
2023-03-04 09:56:04 +01:00
|
|
|
faThumbsDown,
|
2022-09-06 04:29:10 +02:00
|
|
|
faThumbsUp,
|
|
|
|
faThumbtack,
|
|
|
|
faTimes,
|
|
|
|
faTimesCircle,
|
|
|
|
faUsers,
|
|
|
|
|
|
|
|
// brand icons
|
|
|
|
faGithub,
|
|
|
|
faBitcoin,
|
|
|
|
faMastodon,
|
|
|
|
faMonero
|
|
|
|
)
|
2020-02-16 19:30:00 +01:00
|
|
|
|
2023-12-08 20:24:08 +01:00
|
|
|
registerSwiper()
|
|
|
|
|
2020-10-04 20:30:54 +02:00
|
|
|
Vue.component('FontAwesomeIcon', FontAwesomeIcon)
|
2020-02-16 19:30:00 +01:00
|
|
|
|
2023-01-12 07:55:21 +01:00
|
|
|
/* eslint-disable-next-line no-new */
|
2020-02-16 19:30:00 +01:00
|
|
|
new Vue({
|
|
|
|
el: '#app',
|
|
|
|
router,
|
|
|
|
store,
|
2020-08-06 05:39:00 +02:00
|
|
|
i18n,
|
2020-02-16 19:30:00 +01:00
|
|
|
render: h => h(App)
|
|
|
|
})
|
|
|
|
|
2022-06-13 15:31:32 +02:00
|
|
|
// to avoid accessing electron api from web app build
|
2022-09-15 10:59:09 +02:00
|
|
|
if (process.env.IS_ELECTRON) {
|
2020-03-24 14:22:29 +01:00
|
|
|
const { ipcRenderer } = require('electron')
|
|
|
|
|
|
|
|
// handle menu event updates from main script
|
|
|
|
ipcRenderer.on('change-view', (event, data) => {
|
|
|
|
if (data.route) {
|
|
|
|
router.push(data.route)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|