aboutsummaryrefslogtreecommitdiffstats
path: root/src/features/announcements/components/AnnouncementScreen.js
diff options
context:
space:
mode:
authorLibravatar Bennett <hello@vantezzen.io>2020-04-17 14:32:53 +0200
committerLibravatar GitHub <noreply@github.com>2020-04-17 13:32:53 +0100
commit3239172af9fb68226e1e11392b16f833b726ad72 (patch)
treefdafdea17c8873cffdec64351e532ffdb2c7d233 /src/features/announcements/components/AnnouncementScreen.js
parentNew Crowdin translations (#570) (diff)
downloadferdium-app-3239172af9fb68226e1e11392b16f833b726ad72.tar.gz
ferdium-app-3239172af9fb68226e1e11392b16f833b726ad72.tar.zst
ferdium-app-3239172af9fb68226e1e11392b16f833b726ad72.zip
Merge Franz 5.5.0 beta.1 and 2 (#549)
* Automatic i18n update (i18n.meetfranz.com) * Fix zoom not working * Automatic i18n update (i18n.meetfranz.com) * Automatic i18n update (i18n.meetfranz.com) * Add environment variable FRANZ_APPDATA_DIR * Add environment variable for config FRANZ_APPDATA_DIR * fix stuff that shouldn't need fixing in the first place * notarize app * bump version to 5.4.1 * Automatic i18n update (i18n.meetfranz.com) * Automatic i18n update (i18n.meetfranz.com) * Automatic i18n update (i18n.meetfranz.com) * Automatic i18n update (i18n.meetfranz.com) * Automatic i18n update (i18n.meetfranz.com) * Automatic i18n update (i18n.meetfranz.com) * Automatic i18n update (i18n.meetfranz.com) * Automatic i18n update (i18n.meetfranz.com) * Automatic i18n update (i18n.meetfranz.com) * Automatic i18n update (i18n.meetfranz.com) * Automatic i18n update (i18n.meetfranz.com) * Automatic i18n update (i18n.meetfranz.com) * Automatic i18n update (i18n.meetfranz.com) * Automatic i18n update (i18n.meetfranz.com) * update to electron 7.1.7 * bump version to 5.5.0 * Automatic i18n update (i18n.meetfranz.com) * Bump electron to 7.1.10 * plan changes * filter plan variants * add missing string * Automatic i18n update (i18n.meetfranz.com) * Automatic i18n update (i18n.meetfranz.com) * Automatic i18n update (i18n.meetfranz.com) * Replace/remove deprecated electron function calls Electron replaced several function calls with object properties. Franz still uses some of these deprecated functions, so this commit will replace these with their new property counterpart. This commit is only transferring the changes made in getferdi/ferdi#371 and getferdi/ferdi#384 into the upstream repository. * Automatic i18n update (i18n.meetfranz.com) * Automatic i18n update (i18n.meetfranz.com) * Update to electron 8.0.1 * feat(Service): Add service hibernation to save system resources * Fix linting issues * Automatic i18n update (i18n.meetfranz.com) * Automatic i18n update (i18n.meetfranz.com) * Bump version to electron 8.1.1 * update strings * update electron-notarize * Automatic i18n update (i18n.meetfranz.com) * Automatic i18n update (i18n.meetfranz.com) * Automatic i18n update (i18n.meetfranz.com) * Add audio & video permission request for cataline * Automatic i18n update (i18n.meetfranz.com) * bump version to beta 1 * Automatic i18n update (i18n.meetfranz.com) * enable external links * Fix main content href * Automatic i18n update (i18n.meetfranz.com) * fix(Service): Fix issue with user agent override in service workers * Automatic i18n update (i18n.meetfranz.com) * fix macOS string replacement * Automatic i18n update (i18n.meetfranz.com) * fix(Experimental): Fix Google signin * fix(Service): Add integrity checks to prevent services recipes getting lost * Remove service reload on app-resume * update strings * bump version to beta 2 * Automatic i18n update (i18n.meetfranz.com) * bump electron-builder and electron-updater deps * test video permissions * fix `extendInfo` keys * fix typo * fix permission request * update camera/microphone entitlements * Automatic i18n update (i18n.meetfranz.com) * Test screen capture permissions * unpack `mac-screen-capture-permissions` * don't require localstorage temp key for permissions request * move macOS permission request to main process * Fix checking for permissions * fix(macOS): Ask the user to move Franz to the `/Applications` Folder * only try to recover recipe when user is online * update service request link * Update changelog * Reset `service.lostRecipeReloadAttempt` once service is alive again * Update translations * Fix crash on macOS * Fix merge errors * Fix lint * Disable ConnectionLostBanner * #551 Add information about Ferdi to the user agent * Fix requested changes * Remove tsbuildinfo files * Add .tsbuildinfo files to gitignore * Fix "Cannot destructure property 'app' of '_electron.remote' as it is undefined" Co-authored-by: FranzBot <i18n@meetfranz.com> Co-authored-by: Makazzz <makazzzpro@live.ca> Co-authored-by: Stefan Malzner <stefan@adlk.io>
Diffstat (limited to 'src/features/announcements/components/AnnouncementScreen.js')
-rw-r--r--src/features/announcements/components/AnnouncementScreen.js41
1 files changed, 31 insertions, 10 deletions
diff --git a/src/features/announcements/components/AnnouncementScreen.js b/src/features/announcements/components/AnnouncementScreen.js
index 38de2dbc8..2f25e7139 100644
--- a/src/features/announcements/components/AnnouncementScreen.js
+++ b/src/features/announcements/components/AnnouncementScreen.js
@@ -192,6 +192,11 @@ class AnnouncementScreen extends Component {
192 stores: PropTypes.shape({ 192 stores: PropTypes.shape({
193 ui: PropTypes.instanceOf(UIStore).isRequired, 193 ui: PropTypes.instanceOf(UIStore).isRequired,
194 }).isRequired, 194 }).isRequired,
195 actions: PropTypes.shape({
196 app: PropTypes.shape({
197 openExternalUrl: PropTypes.func.isRequired,
198 }).isRequired,
199 }).isRequired,
195 }; 200 };
196 201
197 static contextTypes = { 202 static contextTypes = {
@@ -199,7 +204,7 @@ class AnnouncementScreen extends Component {
199 }; 204 };
200 205
201 render() { 206 render() {
202 const { classes, stores } = this.props; 207 const { classes, stores, actions } = this.props;
203 const { intl } = this.context; 208 const { intl } = this.context;
204 const { changelog, announcement } = announcementsStore; 209 const { changelog, announcement } = announcementsStore;
205 const themeImage = stores.ui.isDarkThemeActive ? 'dark' : 'light'; 210 const themeImage = stores.ui.isDarkThemeActive ? 'dark' : 'light';
@@ -223,14 +228,23 @@ class AnnouncementScreen extends Component {
223 __html: marked(announcement.main.text, markedOptions), 228 __html: marked(announcement.main.text, markedOptions),
224 }} 229 }}
225 /> 230 />
226 <div className={classes.mainCtaButton}> 231 {(announcement.main.cta.label || announcement.main.cta.href) && (
227 <Button 232 <div className={classes.mainCtaButton}>
228 label={announcement.main.cta.label} 233 <Button
229 onClick={() => { 234 label={announcement.main.cta.label}
230 window.location.href = `#${announcement.main.cta.href}`; 235 onClick={() => {
231 }} 236 const {
232 /> 237 href,
233 </div> 238 } = announcement.main.cta;
239 if (announcement.main.cta.href.startsWith('http')) {
240 actions.app.openExternalUrl({ url: href });
241 } else {
242 window.location.href = `#${href}`;
243 }
244 }}
245 />
246 </div>
247 )}
234 </div> 248 </div>
235 </div> 249 </div>
236 </div> 250 </div>
@@ -250,7 +264,14 @@ class AnnouncementScreen extends Component {
250 <Button 264 <Button
251 label={announcement.spotlight.cta.label} 265 label={announcement.spotlight.cta.label}
252 onClick={() => { 266 onClick={() => {
253 window.location.href = `#${announcement.spotlight.cta.href}`; 267 const {
268 href,
269 } = announcement.spotlight.cta;
270 if (announcement.spotlight.cta.href.startsWith('http')) {
271 actions.app.openExternalUrl({ url: href });
272 } else {
273 window.location.href = `#${href}`;
274 }
254 }} 275 }}
255 /> 276 />
256 </div> 277 </div>