mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-03 21:19:01 +01:00 
			
		
		
		
	feat(rtl): align floating buttons properly
This commit is contained in:
		
							parent
							
								
									25c9f52cf4
								
							
						
					
					
						commit
						8e2517459f
					
				@ -10,7 +10,8 @@ const TPL = `
 | 
			
		||||
            position: relative;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        .floating-buttons-children,.show-floating-buttons {
 | 
			
		||||
        .floating-buttons-children,
 | 
			
		||||
        .show-floating-buttons {
 | 
			
		||||
            position: absolute;
 | 
			
		||||
            top: 10px;
 | 
			
		||||
            right: 10px;
 | 
			
		||||
@ -19,6 +20,21 @@ const TPL = `
 | 
			
		||||
            z-index: 100;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        .note-split.rtl .floating-buttons-children,
 | 
			
		||||
        .note-split.rtl .show-floating-buttons {
 | 
			
		||||
            right: unset;
 | 
			
		||||
            left: 10px;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        .note-split.rtl .close-floating-buttons {
 | 
			
		||||
            order: -1;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        .note-split.rtl .close-floating-buttons,
 | 
			
		||||
        .note-split.rtl .show-floating-buttons {
 | 
			
		||||
            transform: rotate(180deg);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        .type-canvas .floating-buttons-children {
 | 
			
		||||
            top: 70px;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
@ -5,6 +5,7 @@ import type BasicWidget from "./basic_widget.js";
 | 
			
		||||
import type { EventData } from "../components/app_context.js";
 | 
			
		||||
import type NoteContext from "../components/note_context.js";
 | 
			
		||||
import type FNote from "../entities/fnote.js";
 | 
			
		||||
import { getLocaleById } from "../services/i18n.js";
 | 
			
		||||
 | 
			
		||||
export default class NoteWrapperWidget extends FlexContainer<BasicWidget> {
 | 
			
		||||
 | 
			
		||||
@ -56,6 +57,10 @@ export default class NoteWrapperWidget extends FlexContainer<BasicWidget> {
 | 
			
		||||
        this.$widget.addClass(utils.getMimeTypeClass(note.mime));
 | 
			
		||||
 | 
			
		||||
        this.$widget.toggleClass("protected", note.isProtected);
 | 
			
		||||
 | 
			
		||||
        const noteLanguage = note?.getLabelValue("language");
 | 
			
		||||
        const locale = getLocaleById(noteLanguage);
 | 
			
		||||
        this.$widget.toggleClass("rtl", !!locale?.rtl);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    #isFullWidthNote(note: FNote) {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user