diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 9e586b92e..000000000 --- a/.eslintignore +++ /dev/null @@ -1,8 +0,0 @@ -# Ignore "third party" code whose style we will not change. -/boot/sjcl.js -/core/modules/utils/base64-utf8/base64-utf8.module.js -/core/modules/utils/base64-utf8/base64-utf8.module.min.js -/core/modules/utils/diff-match-patch/diff_match_patch.js -/core/modules/utils/diff-match-patch/diff_match_patch_uncompressed.js -/core/modules/utils/dom/csscolorparser.js -/plugins/tiddlywiki/*/files/ diff --git a/.eslintrc.yml b/.eslintrc.yml deleted file mode 100644 index 0316b8385..000000000 --- a/.eslintrc.yml +++ /dev/null @@ -1,286 +0,0 @@ -env: - browser: true - commonjs: true - es2021: true - node: true -extends: 'eslint:recommended' -globals: - "$tw": "writable" # temporary -parserOptions: - ecmaVersion: 5 -rules: - array-bracket-newline: 'off' - array-bracket-spacing: 'off' - array-callback-return: 'off' - array-element-newline: 'off' - arrow-body-style: error - arrow-parens: - - error - - as-needed - arrow-spacing: - - error - - after: true - before: true - block-scoped-var: 'off' - block-spacing: 'off' - brace-style: 'off' - callback-return: 'off' - camelcase: 'off' - capitalized-comments: 'off' - class-methods-use-this: error - comma-dangle: 'off' - comma-spacing: 'off' - comma-style: 'off' - complexity: 'off' - computed-property-spacing: 'off' - consistent-return: 'off' - consistent-this: 'off' - curly: 'off' - default-case: 'off' - default-case-last: error - default-param-last: error - dot-location: 'off' - dot-notation: 'off' - eol-last: 'off' - eqeqeq: 'off' - func-call-spacing: 'off' - func-name-matching: 'off' - func-names: 'off' - func-style: 'off' - function-call-argument-newline: 'off' - function-paren-newline: 'off' - generator-star-spacing: error - global-require: 'off' - grouped-accessor-pairs: error - guard-for-in: 'off' - handle-callback-err: 'off' - id-blacklist: error - id-denylist: error - id-length: 'off' - id-match: error - implicit-arrow-linebreak: error - indent: 'off' - indent-legacy: 'off' - init-declarations: 'off' - jsx-quotes: error - key-spacing: 'off' - keyword-spacing: - - error - - before: true - after: false - overrides: - 'case': - after: true - 'do': - 'after': true - 'else': - after: true - 'return': - after: true - 'throw': - after: true - 'try': - after: true - line-comment-position: 'off' - linebreak-style: 'off' - lines-around-comment: 'off' - lines-around-directive: 'off' - lines-between-class-members: error - max-classes-per-file: error - max-depth: 'off' - max-len: 'off' - max-lines: 'off' - max-lines-per-function: 'off' - max-nested-callbacks: error - max-params: 'off' - max-statements: 'off' - max-statements-per-line: 'off' - multiline-comment-style: 'off' - multiline-ternary: 'off' - new-parens: 'off' - newline-after-var: 'off' - newline-before-return: 'off' - newline-per-chained-call: 'off' - no-alert: 'off' - no-array-constructor: 'off' - no-await-in-loop: error - no-bitwise: 'off' - no-buffer-constructor: 'off' - no-caller: error - no-catch-shadow: 'off' - no-confusing-arrow: error - no-console: 'off' - no-constant-condition: - - error - - checkLoops: false - no-constructor-return: error - no-continue: 'off' - no-div-regex: 'off' - no-duplicate-imports: error - no-else-return: 'off' - no-empty-function: 'off' - no-eq-null: 'off' - no-eval: 'off' - no-extend-native: 'off' - no-extra-bind: 'off' - no-extra-label: 'off' - no-extra-parens: 'off' - no-floating-decimal: 'off' - no-implicit-coercion: - - error - - boolean: false - number: false - string: false - no-implicit-globals: 'off' - no-implied-eval: error - no-inline-comments: 'off' - no-invalid-this: 'off' - no-iterator: error - no-label-var: 'off' - no-labels: 'off' - no-lone-blocks: 'off' - no-lonely-if: 'off' - no-loop-func: 'off' - no-loss-of-precision: error - no-magic-numbers: 'off' - no-mixed-operators: 'off' - no-mixed-requires: 'off' - no-multi-assign: 'off' - no-multi-spaces: 'off' - no-multi-str: error - no-multiple-empty-lines: 'off' - no-native-reassign: 'off' - no-negated-condition: 'off' - no-negated-in-lhs: error - no-nested-ternary: 'off' - no-new: 'off' - no-new-func: 'off' - no-new-object: 'off' - no-new-require: error - no-new-wrappers: error - no-octal-escape: error - no-param-reassign: 'off' - no-path-concat: error - no-plusplus: 'off' - no-process-env: 'off' - no-process-exit: 'off' - no-promise-executor-return: error - no-proto: 'off' - no-restricted-exports: error - no-restricted-globals: error - no-restricted-imports: error - no-restricted-modules: error - no-restricted-properties: error - no-restricted-syntax: error - no-return-assign: 'off' - no-return-await: error - no-script-url: 'off' - no-self-compare: 'off' - no-sequences: 'off' - no-shadow: 'off' - no-spaced-func: 'off' - no-sync: 'off' - no-tabs: 'off' - no-template-curly-in-string: error - no-ternary: 'off' - no-throw-literal: 'off' - no-trailing-spaces: 'off' - no-undef-init: 'off' - no-undefined: 'off' - no-underscore-dangle: 'off' - no-unmodified-loop-condition: 'off' - no-unneeded-ternary: 'off' - no-unreachable-loop: error - no-unused-expressions: 'off' - no-use-before-define: 'off' - no-useless-backreference: error - no-useless-call: 'off' - no-useless-computed-key: error - no-useless-concat: 'off' - no-useless-constructor: error - no-useless-rename: error - no-useless-return: 'off' - no-var: 'off' - no-void: 'off' - no-warning-comments: 'off' - no-whitespace-before-property: error - nonblock-statement-body-position: - - error - - any - object-curly-newline: 'off' - object-curly-spacing: 'off' - object-property-newline: 'off' - object-shorthand: 'off' - one-var: 'off' - one-var-declaration-per-line: 'off' - operator-assignment: 'off' - operator-linebreak: 'off' - padded-blocks: 'off' - padding-line-between-statements: error - prefer-arrow-callback: 'off' - prefer-const: 'off' - prefer-destructuring: 'off' - prefer-exponentiation-operator: 'off' - prefer-named-capture-group: 'off' - prefer-numeric-literals: error - prefer-object-spread: 'off' - prefer-promise-reject-errors: error - prefer-reflect: 'off' - prefer-regex-literals: 'off' - prefer-rest-params: 'off' - prefer-spread: 'off' - prefer-template: 'off' - quote-props: 'off' - quotes: - - error - - double - - avoidEscape: true - radix: 'off' - require-atomic-updates: error - require-await: error - require-jsdoc: 'off' - require-unicode-regexp: 'off' - rest-spread-spacing: error - semi: 'off' - semi-spacing: 'off' - semi-style: 'off' - sort-imports: error - sort-keys: 'off' - sort-vars: 'off' - space-before-blocks: 'off' - space-before-function-paren: 'off' - space-in-parens: 'off' - space-infix-ops: 'off' - space-unary-ops: 'off' - spaced-comment: 'off' - strict: 'off' - switch-colon-spacing: 'off' - symbol-description: error - template-curly-spacing: error - template-tag-spacing: error - unicode-bom: - - error - - never - valid-jsdoc: 'off' - valid-typeof: - - error - - requireStringLiterals: false - vars-on-top: 'off' - wrap-iife: 'off' - wrap-regex: 'off' - yield-star-spacing: error - yoda: 'off' - - # temporary rules - no-useless-escape: 'off' - no-unused-vars: 'off' - no-empty: 'off' - no-extra-semi: 'off' - no-redeclare: 'off' - no-control-regex: "off" - no-mixed-spaces-and-tabs: "off" - no-extra-boolean-cast: "off" - no-prototype-builtins: "off" - no-undef: "off" - no-unreachable: "off" - no-self-assign: "off" diff --git a/.github/workflows/cla-signed.yml b/.github/workflows/cla-signed.yml index 6783219d1..01d57d014 100644 --- a/.github/workflows/cla-signed.yml +++ b/.github/workflows/cla-signed.yml @@ -23,8 +23,8 @@ jobs: pull-requests: write steps: - run: | - if ! $BRANCH == "tiddlywiki-com"; then - echo "This CLA signature targets the wrong branch" + if [[ "$BRANCH" != "tiddlywiki-com" ]]; then + echo "This CLA signature targets the wrong branch: $BRANCH" gh pr comment "$NUMBER" -b "@$AUTHOR Signatures to the CLA must target the 'tiddlywiki-com' branch." fi env: diff --git a/core/modules/startup/rootwidget.js b/core/modules/startup/rootwidget.js index d81e07aee..d96d569c3 100644 --- a/core/modules/startup/rootwidget.js +++ b/core/modules/startup/rootwidget.js @@ -52,7 +52,9 @@ exports.startup = function() { basicAuthUsername: params["basic-auth-username"], basicAuthUsernameFromStore: params["basic-auth-username-from-store"], basicAuthPassword: params["basic-auth-password"], - basicAuthPasswordFromStore: params["basic-auth-password-from-store"] + basicAuthPasswordFromStore: params["basic-auth-password-from-store"], + bearerAuthToken: params["bearer-auth-token"], + bearerAuthTokenFromStore: params["bearer-auth-token-from-store"] }); }); $tw.rootWidget.addEventListener("tm-http-cancel-all-requests",function(event) { diff --git a/core/modules/utils/dom/http.js b/core/modules/utils/dom/http.js index 65bdfd1e5..f16f1c512 100644 --- a/core/modules/utils/dom/http.js +++ b/core/modules/utils/dom/http.js @@ -104,6 +104,8 @@ basicAuthUsername: plain username for basic authentication basicAuthUsernameFromStore: name of password store entry containing username basicAuthPassword: plain password for basic authentication basicAuthPasswordFromStore: name of password store entry containing password +bearerAuthToken: plain text token for bearer authentication +bearerAuthTokenFromStore: name of password store entry contain bear authorization token */ function HttpClientRequest(options) { var self = this; @@ -135,8 +137,11 @@ function HttpClientRequest(options) { }); this.basicAuthUsername = options.basicAuthUsername || (options.basicAuthUsernameFromStore && $tw.utils.getPassword(options.basicAuthUsernameFromStore)) || ""; this.basicAuthPassword = options.basicAuthPassword || (options.basicAuthPasswordFromStore && $tw.utils.getPassword(options.basicAuthPasswordFromStore)) || ""; + this.bearerAuthToken = options.bearerAuthToken || (options.bearerAuthTokenFromStore && $tw.utils.getPassword(options.bearerAuthTokenFromStore)) || ""; if(this.basicAuthUsername && this.basicAuthPassword) { this.requestHeaders.Authorization = "Basic " + $tw.utils.base64Encode(this.basicAuthUsername + ":" + this.basicAuthPassword); + } else if(this.bearerAuthToken) { + this.requestHeaders.Authorization = "Bearer " + this.bearerAuthToken; } } diff --git a/core/palettes/Vanilla.tid b/core/palettes/Vanilla.tid index 76307acee..d981a485e 100644 --- a/core/palettes/Vanilla.tid +++ b/core/palettes/Vanilla.tid @@ -32,7 +32,7 @@ dragger-background: <> dragger-foreground: <> dropdown-background: <> dropdown-border: <> -dropdown-tab-background-selected: #fff +dropdown-tab-background-selected: #ffffff dropdown-tab-background: #ececec dropzone-background: rgba(0,200,0,0.7) external-link-background-hover: inherit @@ -54,7 +54,7 @@ modal-border: #999999 modal-footer-background: #f5f5f5 modal-footer-border: #dddddd modal-header-border: #eeeeee -muted-foreground: #bbb +muted-foreground: #bbbbbb network-activity-foreground: #448844 notification-background: #ffffdd notification-border: #999999 @@ -98,7 +98,7 @@ tab-foreground: #666666 table-border: #dddddd table-footer-background: #a8a8a8 table-header-background: #f0f0f0 -tag-background: #ec6 +tag-background: #eecc66 tag-foreground: #ffffff testcase-accent-level-1: #c1eaff testcase-accent-level-2: #E3B740 @@ -132,11 +132,11 @@ toolbar-done-button: untagged-background: #999999 very-muted-foreground: #888888 wikilist-background: #e5e5e5 -wikilist-item: #fff -wikilist-info: #000 -wikilist-title: #666 +wikilist-item: #ffffff +wikilist-info: #000000 +wikilist-title: #666666 wikilist-title-svg: <> -wikilist-url: #aaa +wikilist-url: #aaaaaa wikilist-button-open: #4fb82b wikilist-button-open-hover: green wikilist-button-reveal: #5778d8 @@ -144,7 +144,7 @@ wikilist-button-reveal-hover: blue wikilist-button-remove: #d85778 wikilist-button-remove-hover: red wikilist-toolbar-background: #d3d3d3 -wikilist-toolbar-foreground: #888 +wikilist-toolbar-foreground: #888888 wikilist-droplink-dragover: rgba(255,192,192,0.5) wikilist-button-background: #acacac -wikilist-button-foreground: #000 +wikilist-button-foreground: #000000 diff --git a/core/ui/EditorToolbar/file-import.tid b/core/ui/EditorToolbar/file-import.tid index 20cff547d..0fd5e08a5 100644 --- a/core/ui/EditorToolbar/file-import.tid +++ b/core/ui/EditorToolbar/file-import.tid @@ -1,20 +1,30 @@ title: $:/core/ui/EditorToolbar/file-import tags: $:/tags/EditorTools -condition: [!has[type]] [type[text/vnd.tiddlywiki]] +condition: [filter{$:/config/Editor/EnableImportFilter}] -\define lingo-base() $:/language/Import/ +\procedure lingo-base() $:/language/Import/ -\define closePopupActions() +\procedure closePopupActions() <$action-deletetiddler $filter="[title] [title]"/> -\end +\end closePopupActions -\define replacement-text-image() [img[$title$]] +\procedure tw5-ImageTemplate() [img[$(currentTiddler)$]] +\procedure tw5-FileTemplate() [[$(currentTiddler)$]] -\define replacement-text-file() [[$title$]] + +\function escape.title() [search-replace:g:regexp[\(|\)|<|>|\\],[\$&]] +\procedure markdown-ImageTemplate() ![](<#${ [escape.title[]] }$>) +\procedure markdown-FileTemplate() [](<#${ [escape.title[]] }$>) -\define postImportActions() +\function is.markdown.tiddler() [all[]type[text/x-markdown]] [all[]type[text/markdown]] +\function is.image() [get[type]prefix[image]] +\function get.markdown.link() [is.image[]thenelse] +\function get.tw5.link() [is.image[]thenelse] +\function get.link.template() [is.markdown.tiddler[]thenelse] + +\procedure postImportActions() \whitespace trim -<$list filter="[links[]] :reduce[get[type]prefix[image]thenelsesearch-replace[$title$],addprefix]" variable="imageTitle"> +<$list filter="[links[]] :reduce[get.link.template[]substitute[]addprefix]" variable="imageTitle"> <$action-sendmessage $message="tm-edit-text-operation" $param="insert-text" @@ -22,14 +32,14 @@ condition: [!has[type]] [type[text/vnd.tiddlywiki] /> <> -\end +\end postImportActions -\define buttons() +\procedure buttons() \whitespace trim <$button class="tc-btn-invisible" actions=<> ><> <$button class="tc-btn-invisible" message="tm-perform-import" param=<> actions=<> ><> -\end +\end buttons \whitespace trim <$reveal type="popup" state=<> tag="div" class="tc-editor-importpopup"> @@ -42,4 +52,4 @@ condition: [!has[type]] [type[text/vnd.tiddlywiki] - + \ No newline at end of file diff --git a/core/ui/TagManager.tid b/core/ui/TagManager.tid index e554d66cc..75daf840f 100644 --- a/core/ui/TagManager.tid +++ b/core/ui/TagManager.tid @@ -62,6 +62,7 @@ color: #bbb \end \whitespace trim +
@@ -116,3 +117,4 @@ color: #bbb
+
\ No newline at end of file diff --git a/core/ui/ViewTemplate/subtitle/default.tid b/core/ui/ViewTemplate/subtitle/default.tid index 99042c95e..5c55712fa 100644 --- a/core/ui/ViewTemplate/subtitle/default.tid +++ b/core/ui/ViewTemplate/subtitle/default.tid @@ -4,7 +4,7 @@ title: $:/core/ui/ViewTemplate/subtitle/default <$reveal type="nomatch" stateTitle=<> text="hide" tag="div" retain="yes" animate="yes">
<$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewTemplate/Subtitle]!has[draft.of]]" variable="subtitleTiddler"> -<$transclude tiddler=<> mode="inline"/><$list-join>  +<$transclude tiddler=<> mode="inline"/>
diff --git a/core/ui/ViewTemplate/subtitle/modifier.tid b/core/ui/ViewTemplate/subtitle/modifier.tid index 8437ada9b..e4062380d 100644 --- a/core/ui/ViewTemplate/subtitle/modifier.tid +++ b/core/ui/ViewTemplate/subtitle/modifier.tid @@ -1,4 +1,4 @@ title: $:/core/ui/ViewTemplate/subtitle/modifier tags: $:/tags/ViewTemplate/Subtitle -<$link to={{!!modifier}}/> \ No newline at end of file +<%if [{!!modifier}!is[blank]] %><$link to={{!!modifier}}/><%endif%> \ No newline at end of file diff --git a/core/wiki/config/EditorEnableImportFilter.tid b/core/wiki/config/EditorEnableImportFilter.tid index 55d068e12..805ad72f0 100644 --- a/core/wiki/config/EditorEnableImportFilter.tid +++ b/core/wiki/config/EditorEnableImportFilter.tid @@ -1,4 +1,4 @@ title: $:/config/Editor/EnableImportFilter type: text/vnd.tiddlywiki -[all[current]type[text/vnd.tiddlywiki]] [all[current]!has[type]] \ No newline at end of file +[all[current]type[text/vnd.tiddlywiki]] [all[current]!has[type]] [all[current]type[text/markdown]] [all[current]type[text/x-markdown]] \ No newline at end of file diff --git a/editions/es-ES/tiddlers/Signing_the_Contributor_License_Agreement.tid b/editions/es-ES/tiddlers/Signing_the_Contributor_License_Agreement.tid index 2ed039471..cbe0dc065 100644 --- a/editions/es-ES/tiddlers/Signing_the_Contributor_License_Agreement.tid +++ b/editions/es-ES/tiddlers/Signing_the_Contributor_License_Agreement.tid @@ -13,7 +13,7 @@ Crea un //pull request// en GitHub para añadir tu nombre a `cla-individual.md` # Según seas persona física o fiscal, ve a #*[[licenses/CLA-individual|https://github.com/TiddlyWiki/TiddlyWiki5/tree/master/licenses/cla-individual.md]] o a -#*[[licenses/CLA-entity|https://github.com/TiddlyWiki/TiddlyWiki5/tree/master/licenses/cla-entity.md]] +#*[[licenses/CLA-entity|https://github.com/TiddlyWiki/TiddlyWiki5/tree/master/licenses/cla-entity.md]] #Haz clic en el botón ''Edit'' arriba a la derecha (al hacerlo se creará un fork del repositorio para que puedas editar el archivo) diff --git a/editions/es-ES/tiddlers/Tutorials.tid b/editions/es-ES/tiddlers/Tutorials.tid index afa2d7696..092cf5c66 100644 --- a/editions/es-ES/tiddlers/Tutorials.tid +++ b/editions/es-ES/tiddlers/Tutorials.tid @@ -8,7 +8,7 @@ type: text/vnd.tiddlywiki Páginas con tutoriales y consejos relacionados con ~TiddlyWiki. -Envía más tutoriales que encuentres para ampliar esta lista via [[GitHub|https://github.com/TiddlyWiki/TiddlyWiki5]] o [[Twitter|https://twitter.com/tiddlywiki]], o publícalas en el [[grupo|https://groups.google.com/forum/?hl=es#!forum/tiddlywiki]] +Envía más tutoriales que encuentres para ampliar esta lista via [[GitHub|https://github.com/TiddlyWiki/TiddlyWiki5]] o [[Twitter|https://twitter.com/tiddlywiki]], o publícalas en el [[foro|https://talk.tiddlywiki.org/]]