Fix: System-wide type hardening and V3 API alignment
This commit is contained in:
@@ -259,6 +259,20 @@ export const shorten_string = function shorten_string({
|
||||
return new_string;
|
||||
};
|
||||
|
||||
// Svelte action to set focus on an element
|
||||
function set_focus(node: HTMLElement, focus: boolean) {
|
||||
if (focus) {
|
||||
node.focus();
|
||||
}
|
||||
return {
|
||||
update(new_focus: boolean) {
|
||||
if (new_focus) {
|
||||
node.focus();
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// Updated 2024-06-19
|
||||
// This function should return a shorted version of a filename if over the max length. It should always contain at least the first character of the original filename and the complete extension.
|
||||
// Example 1: The Original Long File Name.pdf -> The Orig....pdf
|
||||
@@ -328,5 +342,6 @@ export const ae_util = {
|
||||
encrypt_content: encrypt_content,
|
||||
encrypt_wrapper: encrypt_wrapper,
|
||||
decrypt_content: decrypt_content,
|
||||
decrypt_wrapper: decrypt_wrapper
|
||||
decrypt_wrapper: decrypt_wrapper,
|
||||
set_focus: set_focus
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user