synology_apm_repo.sdk.presentation.icons module¶
Short glyphs a caller renders inline next to a name — shared so the CLI and TUI never each pick their own for the same concept.
- synology_apm_repo.sdk.presentation.icons.FILE_STATE_ICON: dict[str, str] = {'cloud_only': '☁', 'encrypted': '🔒', 'normal': ''}¶
Keyed by
FileState.value(sdk.units.base.FileState), not the enum itself — this module, like every other presentation helper, has no SDK-internal import of its own. A caller holding the real enum looks upFILE_STATE_ICON[state.value];""(NORMAL) means no suffix. Appended by the caller at render time, never carried across the SDK/CLI/TUI boundary as a pre-rendered string — onlyfile_state’s own semantic value crosses that boundary.cloud_only’s glyph is the bare U+2601 codepoint, not U+2601+U+FE0F (the VS16 emoji-presentation sequence): U+2601 isNeutralwidth per Unicode’s own East Asian Width property, so both that andrich.cells.cell_len— what the TUI’sDataTablesizes a column from — already agree it’s one cell; adding VS16 would make that agreement depend on however a given terminal/font andrichversion each choose to size the emoji-presentation form, rather than a single property this file can verify on its own.encryptedneeds no such care either way: U+1F512 alone is alreadyWide(two cells) by the same property, nothing for VS16 to change.
- synology_apm_repo.sdk.presentation.icons.file_state_suffix(value)¶
A ready-to-append suffix for
value(FileState.value) — a leading space plus the matching icon, or""when there’s no icon (FileState.NORMAL, or an unrecognized value) — so every caller appends this directly instead of separately re-deriving “no icon means no suffix” at each render site.
- synology_apm_repo.sdk.presentation.icons.DIAGNOSTIC_ICON = '⚠'¶
Appended when a listing node is a
diagnostic_node()placeholder (sdk.units.base.node_is_diagnostic) rather than real content — shown unconditionally, likeFILE_STATE_ICONabove, since this is user-facing backup-completeness information, not an internal identifier gated behind verbose mode. Bare U+26A0, not U+26A0+U+FE0F, sameNeutral-width/cell_lenreasoning asFILE_STATE_ICON’scloud_onlycomment above.
- synology_apm_repo.sdk.presentation.icons.diagnostic_suffix(is_diagnostic)¶
A ready-to-append suffix when
is_diagnosticis true (adiagnostic_node()placeholder), or""otherwise — the same “no icon means no suffix” shape asfile_state_suffix, for a boolean condition instead of a keyed value.