mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 09:59:47 -05:00
A design that describes what WeKan already DOES belongs with the feature it describes, not in the folder for things being proposed. Fifteen docs move: Design/Accessibility.md -> Features/Accessibility/Accessibility-Improvements.md Design/Original-Positions.md -> Features/Board/Original-Positions.md Design/Page/* -> Features/Page/* (thirteen pages that exist) Design/AdminPanelProblems.md -> Features/Admin-Panel/Problems/Design.md What stays in docs/Design is what the folder is for: the principles (Design-Principles, Monkey-Proof-Software), the comparisons, the roadmap (Multiverse), and the proposals not yet built (Multitenancy, Autoupdate). The Admin Panel Problems design is new and covers six changes - summaries, the per-actor tally, IPv4/IPv6 columns, an API report, a per-address login tally, and blocking with increasing delays. Three are shipped and three are planned; it is filed under the feature because the pane exists, with each planned item marked so it can become plain description as it lands. Every reference in the repository is rewritten - 152 files, including the CSS comments that point at the table-page design, which a first pass over .md and .js alone missed. Two suites asserted the old paths and now assert the new ones. A moved doc whose links nobody fixed is worse than one nobody moved. Thanks to xet7 !
51 lines
1.8 KiB
JavaScript
51 lines
1.8 KiB
JavaScript
import { ReactiveCache } from '/imports/reactiveCache';
|
|
import { Session } from 'meteor/session';
|
|
import { TAPi18n } from '/imports/i18n';
|
|
import AccessibilitySettings from '/models/accessibilitySettings';
|
|
|
|
// The three pages that carry a name of their own: an admin can rename Support
|
|
// and Accessibility, and Import names the source it is importing from.
|
|
//
|
|
// They live HERE, not in the pages themselves, because the top header bar has
|
|
// to ask for them and the header is loaded by the layout - that is, very early.
|
|
// Importing a page's own module from the header pulls that module into the
|
|
// header's graph and runs it before its .jade has registered, so
|
|
// `Template.import.onCreated` was `undefined.onCreated`: a TypeError at module
|
|
// load, which aborts every module after it. That is why `connectionMethod` and
|
|
// the rest went missing at the same time.
|
|
//
|
|
// This module registers no template and touches no DOM, so it is safe to load
|
|
// at any point. models/lib/pageTitles.js, docs/Features/Page/Header.md
|
|
|
|
export function supportPageTitle() {
|
|
const setting = ReactiveCache.getCurrentSetting();
|
|
return (setting && setting.supportTitle) || '';
|
|
}
|
|
|
|
export function accessibilityPageTitle() {
|
|
const setting = AccessibilitySettings.findOne({});
|
|
return (setting && setting.title) || '';
|
|
}
|
|
|
|
const IMPORT_SOURCE_NAMES = {
|
|
trello: 'Trello',
|
|
wekan: 'JSON',
|
|
csv: 'CSV-TSV',
|
|
excel: 'Excel',
|
|
jira: 'Jira',
|
|
kanboard: 'Kanboard',
|
|
deck: 'NextCloud Deck',
|
|
openproject: 'OpenProject',
|
|
github: 'GitHub',
|
|
gitlab: 'GitLab',
|
|
gitea: 'Gitea',
|
|
forgejo: 'Forgejo',
|
|
asana: 'Asana',
|
|
zenkit: 'Zenkit',
|
|
};
|
|
|
|
export function importPageTitle() {
|
|
const sourceName = IMPORT_SOURCE_NAMES[Session.get('importSource')] || 'JSON';
|
|
return `${TAPi18n.__('import')} / ${sourceName}`;
|
|
}
|