example.view 10.33 KiB
[color = "background"] {
    light: #330000
    dark: #ff0000
[color = "highlight"] {
    light: #000
    dark: #fff
[style = "my-label-text"] {
    border: background 1
    color: highlight
[style = "active"] {
    background: background
[renderer = "generalEditor"] {
    sequence: labels starred other dates
    excluded: deleted syncState uid
    readOnly: uid
    groups {
        dates: dateCreated dateModified dateAccessed changelog
    starred: star
    labels {
        foreach: false
        EditorRow {
            title: "{displayName}"
            Text {
                show: {{!.labels.count}}
                text: "no labels yet"
            FlowStack {
                list: {{.labels}}
                Button {
                    press: openViewByName {
                        name: "all-items-with-label"
                        arguments: {
                            name: "Soccer team"
                            uid: 0x0124
                    VStack {
                        background: {{.color}}
                        cornerRadius: 5
                        Text {
                            text: "{.name}"
                            font: 16 semibold
                            color: #fff
                            padding: 5 8 5 8
    dates {
7172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
foreach: false sectionTitle: "" Text { alignment: center textalign: center text: "{.describeChangelog()}" padding: 30 40 40 40 color: #999 font: 13 maxChar: 300 } } } [language = "English"] { sharewith: "Share with..." addtolist: "Add to list..." duplicate: "Duplicate" showtimeline: "Show Timeline" timelineof: "Timeline of this" starred: "Starred" all: "All" } [language = "Dutch"] { sharewith: "Deel met..." addtolist: "Voeg toe aan lijst..." duplicate: "Dupliceer" showtimeline: "Toon Tijdslijn" timelineof: "Tijdslijn van deze" starred: "Favoriete" all: "Alle" } "defaultButtonsForDataItem" { editActionButton: toggleEditMode filterButtons: openView { icon: "increase.indent" title: "{$showtimeline}" view: { defaultRenderer: timeline queryOptions { query: "AuditItem appliesTo:{.id}" sortProperty: dateCreated sortAscending: true } [renderer = timeline] { timeProperty: dateCreated } } } showContextPane contextButtons: star schedule actionItems: { name: showSharePanel, title: "{$sharewith}" } { name: addToPanel, title: "{$addtolist}" } { name: duplicate, title: "{$duplicate} {type}" } navigateItems: openView { title: "{$timelineof} {type.lowercased()}" view: { defaultRenderer: timeline
141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
queryOptions { query: "AuditItem appliesTo:{.id}" sortProperty: dateCreated sortAscending: true } [renderer = timeline] { timeProperty: dateCreated } } } openViewByName { title: "{$starred} {type.plural()}" name: "filter-starred" arguments: { fromTemplate: "all-{type}" } } openViewByName { title: "{$all} {type.lowercased().plural()}" name: "all-{type}" } } Person { title: "{.firstName}" defaultRenderer: generalEditor include: "defaultButtonsForDataItem" { type: "Person" } [renderer = generalEditor] { groups { profilePicture: profilePicture names: firstName lastName picturesOfPerson: nil } sequence: profilePicture labels names picturesOfPerson phoneNumbers relations addresses websites companies diets medicalConditions publicKeys onlineProfiles other dates /*excluded: profilePicture labels names picturesOfPerson phoneNumbers*/ readOnly: nil picturesOfPerson { foreach: false sectionTitle: "Photos of {.computedTitle()}" SubView { minHeight: 165 view { defaultRenderer: thumbnail.grid queryOptions { query: "photo AND ANY includes.uid = '0x013'" } [renderer = thumbnail.grid] { columns: 5 itemInset: 0 } } arguments: { toolbar: false searchbar: false readonly: true } } }
211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
profilePicture { sectionTitle: "" ZStack { alignment: center Image { image: {{.}} border: #ccc 1 resizable: fill minHeight: 250 maxHeight: 250 opacity: 0.6 align: center } ZStack { border: #fff 27 padding: 12 maxWidth: 140 maxHeight: 140 cornerRadius: 100 align: center Image { image: {{.}} resizable: fill } HSTack { align: center maxWidth: 140 maxHeight: 140 condition: {{!readOnly}} Button { press: add cornerRadius: 25 maxWidth: 50 maxHeight: 50 background: #eee color: #434343 align: center font: 14 regular Text { text: "Edit" } } } } } } labels { foreach: false sectionTitle: "" VSTack { padding: 10 36 5 36 Text { show: {{!.labels.count}} text: "no labels yet" } FlowStack { list: {{.labels}} button {
281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350
press: openViewByName { name: "all-items-with-label" arguments: { name: "Soccer team" uid: 0x0124 } } VStack { background: {{.color}} cornerRadius: 5 Text { text: "{.name}" font: 16 semibold color: #fff padding: 5 8 5 8 } } } } } } publicKeys { EditorRow { title: "{.name}" Text { text: "{.key}" } } } onlineProfiles { EditorRow { title: "{.type}" VStack { cornerRadius: 5 Text { text: "{.handle}" } } } } } } Person[] { title: "All People" defaultRenderer: list emptyResultText: "There are no people here yet" queryOptions { query: "person" sortProperty: dateModified } actionButton: add { template: { type: "Person" } } editActionButton: toggleEditMode filterButtons: showStarred toggleFilterPanel
351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401
[renderer = list] { VStack { alignment: left padding: 5 0 0 20 HStack { alignment: center ZStack { padding: 12 maxWidth: 25 maxHeight: 25 cornerRadius: 30 align: center margin: 5 15 9 0 Image { image: {{.profilePicture}} resizable: fill minHeight: 60 maxHeight: 60 } } VStack { Text { text: "{.firstName} {.lastName}" font: 18 semibold color: #333 padding: 0 0 3 0 } Text { text: "Brother" font: 14 regular color: #888 padding: 0050 } } } Rectangle { minHeight: 1 maxHeight: 1 color: #efefef padding: 0 0 0 0 } } } }