Merge remote-tracking branch 'upstream/develop' into account-menu-react
This commit is contained in:
@@ -89,7 +89,8 @@ function reloadHiddenFirefoxTab(): boolean {
|
||||
|
||||
const startApplication: StartApplication = async function startApplication(
|
||||
defaultSyncServerHost: string,
|
||||
bridge: Bridge
|
||||
bridge: Bridge,
|
||||
nextVersionSyncServerHost: string,
|
||||
) {
|
||||
if (reloadHiddenFirefoxTab()) {
|
||||
return;
|
||||
@@ -106,6 +107,7 @@ const startApplication: StartApplication = async function startApplication(
|
||||
.config(configRoutes)
|
||||
.constant('bridge', bridge)
|
||||
.constant('defaultSyncServerHost', defaultSyncServerHost)
|
||||
.constant('nextVersionSyncServerHost', nextVersionSyncServerHost)
|
||||
.constant('appVersion', bridge.appVersion);
|
||||
|
||||
// Controllers
|
||||
@@ -188,7 +190,8 @@ const startApplication: StartApplication = async function startApplication(
|
||||
if (__WEB__) {
|
||||
startApplication(
|
||||
(window as any)._default_sync_server,
|
||||
new BrowserBridge(__VERSION__)
|
||||
new BrowserBridge(__VERSION__),
|
||||
(window as any)._next_version_sync_server
|
||||
);
|
||||
} else {
|
||||
(window as any).startApplication = startApplication;
|
||||
|
||||
@@ -72,11 +72,11 @@ export const NotesOptions = observer(
|
||||
const buttonRect = tagsButtonRef.current.getBoundingClientRect();
|
||||
const footerHeight = 32;
|
||||
|
||||
if ((buttonRect.top + maxTagsMenuSize) > (clientHeight - footerHeight)) {
|
||||
if (buttonRect.top + maxTagsMenuSize > clientHeight - footerHeight) {
|
||||
setTagsMenuMaxHeight(clientHeight - buttonRect.top - footerHeight - 2);
|
||||
}
|
||||
|
||||
if ((buttonRect.right + maxTagsMenuSize) > clientWidth) {
|
||||
if (buttonRect.right + maxTagsMenuSize > clientWidth) {
|
||||
setTagsMenuPosition({
|
||||
top: buttonRect.top,
|
||||
right: clientWidth - buttonRect.left,
|
||||
@@ -88,7 +88,6 @@ export const NotesOptions = observer(
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
setTagsMenuOpen(!tagsMenuOpen);
|
||||
};
|
||||
|
||||
@@ -169,7 +168,7 @@ export const NotesOptions = observer(
|
||||
{appState.tags.tags.map((tag) => (
|
||||
<button
|
||||
key={tag.title}
|
||||
className={`${buttonClass} py-2`}
|
||||
className={`${buttonClass} py-2 max-w-80`}
|
||||
onBlur={closeOnBlur}
|
||||
onClick={() => {
|
||||
appState.notes.isTagInSelectedNotes(tag)
|
||||
@@ -178,11 +177,12 @@ export const NotesOptions = observer(
|
||||
}}
|
||||
>
|
||||
<span
|
||||
className={
|
||||
appState.notes.isTagInSelectedNotes(tag)
|
||||
? 'font-bold'
|
||||
: ''
|
||||
}
|
||||
className={`whitespace-nowrap overflow-hidden overflow-ellipsis
|
||||
${
|
||||
appState.notes.isTagInSelectedNotes(tag)
|
||||
? 'font-bold'
|
||||
: ''
|
||||
}`}
|
||||
>
|
||||
{tag.title}
|
||||
</span>
|
||||
|
||||
@@ -2,5 +2,6 @@ import { Bridge } from "./services/bridge";
|
||||
|
||||
export type StartApplication = (
|
||||
defaultSyncServerHost: string,
|
||||
bridge: Bridge
|
||||
bridge: Bridge,
|
||||
nextVersionSyncServerHost: string
|
||||
) => Promise<void>;
|
||||
|
||||
@@ -53,6 +53,7 @@ export class WebApplication extends SNApplication {
|
||||
scope: angular.IScope,
|
||||
defaultSyncServerHost: string,
|
||||
public bridge: Bridge,
|
||||
nextVersionSyncServerHost: string,
|
||||
) {
|
||||
super(
|
||||
bridge.environment,
|
||||
@@ -62,7 +63,8 @@ export class WebApplication extends SNApplication {
|
||||
new AlertService(),
|
||||
identifier,
|
||||
[],
|
||||
defaultSyncServerHost
|
||||
defaultSyncServerHost,
|
||||
nextVersionSyncServerHost,
|
||||
);
|
||||
this.$compile = $compile;
|
||||
this.scope = scope;
|
||||
|
||||
@@ -28,7 +28,8 @@ export class ApplicationGroup extends SNApplicationGroup {
|
||||
$rootScope: ng.IRootScopeService,
|
||||
$timeout: ng.ITimeoutService,
|
||||
private defaultSyncServerHost: string,
|
||||
private bridge: Bridge
|
||||
private bridge: Bridge,
|
||||
private nextVersionSyncServerHost: string,
|
||||
) {
|
||||
super(new WebDeviceInterface($timeout, bridge));
|
||||
this.$compile = $compile;
|
||||
@@ -62,7 +63,8 @@ export class ApplicationGroup extends SNApplicationGroup {
|
||||
this.$compile,
|
||||
scope,
|
||||
this.defaultSyncServerHost,
|
||||
this.bridge
|
||||
this.bridge,
|
||||
this.nextVersionSyncServerHost,
|
||||
);
|
||||
const appState = new AppState(
|
||||
this.$rootScope,
|
||||
|
||||
Reference in New Issue
Block a user