Versie 0.2.0
This commit is contained in:
commit
e77d8fd373
495 files changed
+81026
No files matched your search
@@ -0,0 +1,37 @@
|
||||
// Generated, do not edit. sha256:4bf6f8ef0a0bf339d290a677844034b6b894f341f060833980b2dc5ccb489b09
|
||||
import { esc } from './escape.js';
|
||||
import { SHIELD } from './icons.js';
|
||||
import { t } from '../i18n/index.js';
|
||||
import { TARGETS, targetHash } from '../../shared/config.js';
|
||||
import { limitFor } from '../license.js';
|
||||
|
||||
export function lockIcon(title = t('license.lockedTitle')) {
|
||||
return `<span class="lock-icon" title="${esc(title)}" aria-label="${esc(title)}">${SHIELD}</span>`;
|
||||
}
|
||||
|
||||
export function lockPanelHtml(what) {
|
||||
const href = targetHash(TARGETS.LICENSE);
|
||||
return `<div class="lock-panel">
|
||||
<div class="lock-panel-head">${lockIcon()}<span>${esc(t('license.lockedTitle'))}</span></div>
|
||||
<p class="lock-panel-what">${esc(what)}</p>
|
||||
<p class="lock-panel-more"><a href="${esc(href)}">${esc(t('license.whatIsPaid'))}</a></p>
|
||||
</div>`;
|
||||
}
|
||||
|
||||
export function lockNoteHtml(what) {
|
||||
return `<div class="lock-note">${lockIcon()}<span>${esc(what)}</span> `
|
||||
+ `<a href="${esc(targetHash(TARGETS.LICENSE))}">${esc(t('license.whatIsPaid'))}</a></div>`;
|
||||
}
|
||||
|
||||
export function counterHtml(text) {
|
||||
return text ? `<span class="lock-counter">${esc(text)}</span>` : '';
|
||||
}
|
||||
|
||||
export function capacityCfg(kind, used) {
|
||||
const max = limitFor(kind);
|
||||
if (max === null) return {};
|
||||
return {
|
||||
toolbarNote: () => t('license.counter', { n: used(), max }),
|
||||
createHidden: () => used() >= max,
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user